Avidemux Forum

Avidemux => Windows => Topic started by: Bobi on January 17, 2021, 01:33:12 PM

Title: Avidemux 2-7-5 write .mp4 and .mkv not properly read by VLC or WMP
Post by: Bobi on January 17, 2021, 01:33:12 PM
Hi everybody,

I regularly run into the following problem with Avidemux 2-7-5-Release:
I write (with File -> Save) mp4 or mkv files with Avidemux, then I close the software:

My problem: I want the sound to be here since the very beginning of the video in VLC and other softwares, not only Avidemux.

Step to generate the buggy .mp4/.mkv file:

Could you guys point me out some things I'm doing wrong please ?
I'm sorry if this problem was already raised before, I couldn't find it, but I'll admit I haven't made the most thorough search beforehand.
Please, tell me if my post is not clear.
Would it help if I were to upload one of the .mp4 file ?

Thanks for your time

Title: Re: Avidemux 2-7-5 write .mp4 and .mkv not properly read by VLC or WMP
Post by: eumagga0x2a on January 17, 2021, 01:40:50 PM
2.7.5 is an unsupported legacy version, please verify that the problem persists for you with the latest nightly build (https://avidemux.org/nightly/) (currently a MinGW one (https://avidemux.org/nightly/win64) from Jan 4 2021).
Title: Re: Avidemux 2-7-5 write .mp4 and .mkv not properly read by VLC or WMP
Post by: Bobi on April 18, 2021, 08:39:41 PM
Hi, I just reproduced the exact same problem with the same workflow with Avidemux 2-7-8 - Release
Do you guys know if I'm the only one running into this problem ?
I can provide a .mp4/wmk file generated by Avidemux which is not read correctly by VLC.
Title: Re: Avidemux 2-7-5 write .mp4 and .mkv not properly read by VLC or WMP
Post by: eumagga0x2a on April 18, 2021, 10:25:36 PM
Indeed, I can confirm that with external PCM audio tracks, we produce awfully badly multiplexed MKV files, storing over 1 MiB of audio per block, such huge blocks placed wide apart. Of course, most video players fail to seek in such MKVs.

For now, a very simple workaround is to mux with the MOV muxer into a .mov (QuickTime format) file first (changing the extension in file dialog doesn't change the file type!), then load this .mov and remux it using the MKV muxer into a .mkv, if you absolutely need a Matroska and not a QuickTime file.
Title: Re: Avidemux 2-7-5 write .mp4 and .mkv not properly read by VLC or WMP
Post by: Bobi on April 20, 2021, 08:55:37 PM
Hi,

so I did as you said:
I selected the MOV muxer and exported my file as a .mov file (I understand now that in order to write a proper mp4 file, I should have selected the mp4 Muxer instead of juste doing a save as, and then change the extension to mp4 on the fly).
I tried reading the freshly generated .mov file with the windows app "Movies & TV", and the synchronisation sound/image was wrong (it did not take into account the Shift I made in Avidemux).
But then, I tried reading the .mov file with VLC media player, and it worked, with proper sound/image synchronisation  ;D  ;D I'll be happy with it.

Thanks a lot :+1:
Title: Re: Avidemux 2-7-5 write .mp4 and .mkv not properly read by VLC or WMP
Post by: eumagga0x2a on April 20, 2021, 11:50:13 PM
The issue with external PCM audio tracks should be fixed now for all use cases:

[coreAudio,editor] Feed external PCM audio tracks in chunks max. 10 ms in duration to consumers (https://github.com/mean00/avidemux2/commit/b2ed48d39269c10ffa712bc64265b00fb45ce399)

Thank you for your report, please try a future nightly build (VC++ builds (https://avidemux.org/nightly/vsWin64/), MinGW builds (https://avidemux.org/nightly/win64/)).