Avidemux Forum

Avidemux => Unix-Like (Linux/Bsd/...) => Topic started by: hobbes1069 on December 17, 2018, 02:08:07 PM

Title: --output-format MATROSKA but still saves as AVI
Post by: hobbes1069 on December 17, 2018, 02:08:07 PM
I'm trying to use avidemux3_cli to resave some recordings from TS to MKV as they seem to work better on my Plex server. The TS files tend to have audio out of sync on my Roku TVs and in the Plex web player.


$ avidemux3_cli --load Good\ Eats\ -\ s14e06.ts --audio-codec COPY --video-codec COPY --output-format MATROSKA --save test.mkv


But I still get a warning about saving H264 in an AVI container, and if I press Y unsurprisingly a AVI format file is saved.

Thanks,
Richard

Fedora 29 x86_64
Avidemux 2.7.1 installed from RPM Fusion
Title: Re: --output-format MATROSKA but still saves as AVI
Post by: eumagga0x2a on December 17, 2018, 10:29:32 PM
When an invalid muxer name like MATROSKA is provided, UI_SetCurrentFormat(uint32_t) (https://github.com/mean00/avidemux2/blob/master/avidemux/cli/ADM_userInterfaces/ADM_gui2/gui_none.cpp#L147) is never called, so that cliFormat (https://github.com/mean00/avidemux2/blob/master/avidemux/cli/ADM_userInterfaces/ADM_gui2/gui_none.cpp#L19) remains unchanged at its initial value of zero resulting in muxerIndex (https://github.com/mean00/avidemux2/blob/master/avidemux/common/gui_savenew.cpp#L128) being set by UI_GetCurrentFormat() (https://github.com/mean00/avidemux2/blob/master/avidemux/cli/ADM_userInterfaces/ADM_gui2/gui_none.cpp#L143) to zero --> AVI.

It would be probably better to find out the actual index of the MKV muxer and to initalize cliFormat to that value.
Title: Re: --output-format MATROSKA but still saves as AVI
Post by: eumagga0x2a on December 18, 2018, 10:53:19 AM
[cli] Fall back on MKV muxer if no valid output format has been provided (https://github.com/mean00/avidemux2/commit/f5a1746c706c1bf15bdd2513fc887b0f3af58621)

Hopefully not too many users relied on the old "no output format = AVI" semantics in their scripts...