[mythtv-users] mythtranscode command no longer working
Scott Theisen
scott.the.elm at gmail.com
Sun Dec 14 19:58:40 UTC 2025
On 2025/12/14 13:12, Adam Stylinski wrote:
> On Fri, Oct 10, 2025 at 10:28:34AM +0100, Paul Gardiner via mythtv-users wrote:
>> On 10/10/2025 00:09, Scott Theisen wrote:
>>> On 2025/10/09 12:22, Paul Gardiner via mythtv-users wrote:
>>>>
>>>> On 09/10/2025 00:27, Scott Theisen wrote:
>>>>> On 2025/10/08 17:03, Roland Ernst wrote:
>>>>>>
>>>>>> On Wed, Oct 8, 2025 at 8:44 PM Scott Theisen
>>>>>> <scott.the.elm at gmail.com> wrote:
>>>>>>
>>>>>> On 2025/10/08 14:13, Roland Ernst wrote:
>>>>>>> On Wed, Oct 8, 2025 at 4:34 PM Paul Gardiner via mythtv-users
>>>>>>> <mythtv-users at mythtv.org> wrote:
>>>>>>>
>>>>>>> I have a script I've been using to transcode over many years.
>>>>>>> It first
>>>>>>> issues:
>>>>>>>
>>>>>>> mythtranscode -v general --chanid 20104 --starttime
>>>>>>> 20240401185800
>>>>>>> --fifoinfo --passthrough
>>>>>>>
>>>>>>> That now is producing the error "AVFormat mode not set". Have
>>>>>>> things
>>>>>>> change so that there is an additional option I need to pass?
>>>>>>>
>>>>>>> Cheers,
>>>>>>> Paul.
>>>>>>>
>>>>>>>
>>>>>>> This was also mentioned in the forum.
>>>>>>> Looking at commit 5e83f17 <https://github.com/MythTV/mythtv/
>>>>>>> commit/5e83f17>, the two checks for !avmode are suspect:
>>>>>>> IMHO, they should have been removed alongside with above commit.
>>>>>>>
>>>>>>> https://github.com/MythTV/mythtv/blob/fcb36c3/mythtv/programs/
>>>>>>> mythtranscode/transcode.cpp#L173
>>>>>>> https://github.com/MythTV/mythtv/blob/fcb36c3/mythtv/programs/
>>>>>>> mythtranscode/transcode.cpp#L935
>>>>>>>
>>>>>>> I you compile from source, you may test it.
>>>>>>> I can do that within the next 2 weeks.
>>>>>>>
>>>>>>> Roland
>>>>>> The flag to set AVFormat mode is `--avf`, although since the
>>>>>> NuppelVideo output support was removed that should be the only
>>>>>> mode remaining, so I probably should have removed it at the same
>>>>>> time. I'll look into it.
>>>>>>
>>>>>> Scott
>>>>>>
>>>>>>
>>>>>> The other modes are "hls" for http live stream and "fifo"
>>>>>> providing decoded raw data in fifo nodes.
>>>>>>
>>>>>> Roland
>>>>> HLS sets m_avfMode to true, however, the "fifo" code path is different.
>>>>>
>>>>> The problem is no one compiled and used mythtranscode without
>>>>> libmp3lame, so the incorrect requirement of m_avfMode being true
>>>>> was not discovered. Line 173 is incorrect and line 935 will
>>>>> always be false.
>>>>>
>>>>> ```
>>>>> diff --git a/mythtv/programs/mythtranscode/transcode.cpp
>>>>> b/mythtv/ programs/mythtranscode/transcode.cpp
>>>>> index 9fb0491aa6..8ae5d5780d 100644
>>>>> --- a/mythtv/programs/mythtranscode/transcode.cpp
>>>>> +++ b/mythtv/programs/mythtranscode/transcode.cpp
>>>>> @@ -170,10 +170,9 @@int Transcode::TranscodeFile(const QString
>>>>> &inputname,
>>>>> }
>>>>> }
>>>>>
>>>>> - if (!m_avfMode)
>>>>> + if (!m_avfMode && fifodir.isEmpty())
>>>>> {
>>>>> - LOG(VB_GENERAL, LOG_ERR,
>>>>> - "AVFormat mode not set.");
>>>>> + LOG(VB_GENERAL, LOG_ERR, "No output mode is set.");
>>>>> return REENCODE_ERROR;
>>>>> }
>>>>>
>>>>>
>>>>> ```
>>>>>
>>>>> That should be the minimal fix.
>>>>
>>>> Thanks both Roland and Scott for such a quick response. It's also
>>>> very useful to be able to call with --fifoinfo, but not --fifodir.
>>>> Would this minimal change support that case?
>>> `--fifoinfo` sets the fifodir parameter to a non empty dummy value, so,
>>> yes, that change enables mythtranscode to proceed past that check when
>>> given the `--fifoinfo` argument.
>>>
>>> Another parameter to signal just fifoinfo causes the program to exit
>>> after printing the fifo info and before outputting to any files.
>> Great! I'll try it out and confirm
>>
>>
>> _______________________________________________
>> mythtv-users mailing list
>> mythtv-users at mythtv.org
>> http://lists.mythtv.org/mailman/listinfo/mythtv-users
>> http://wiki.mythtv.org/Mailing_List_etiquette
>> MythTV Forums: https://forum.mythtv.org
> I too appear to be hitting this error on lossless transcodes with the default lossless transcode job. Is there anything to edit in the database to make it supply the fifo info argument? This isn't a "user job", this is a job that's there by default.
The fix was applied to master (v36) and fixes/35. If the log says
"AVFormat mode not set.", you need to update MythTV. If it has been
updated, it will now say "No output mode is set."
There shouldn't be any reason to change the database since the problem
was a logic error in the application code.
More information about the mythtv-users
mailing list