Avidemux 2-7-5 write .mp4 and .mkv not properly read by VLC or WMP

Started by Bobi, January 17, 2021, 01:33:12 PM

Previous topic - Next topic

Bobi

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:
  • If I reopen the file with Avidemux, the video is correctly read (with sound)
  • If I reopen the file with VLC or Windows Media Player, the video runs without sound for a while, and then the sound correctly appears in the middle of the video. The sound is then properly synchronized with the image.

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:
  • I load a mp4 file in Avidemux, and I extract a sub-part of it, using Start Marker A, End Marker B, Save =>.mkv. Let's say I extracted the segment [22:00; 25:00] of a 30-minute-long video
  • I load the now 3-minute-long video, and I replace the audio: Audio ==> Select Track ==> I untick Track 1, and Enable Track 2 with a .wav file
  • I synchronize the .wav music with the 3-minute-long video, by tickling the "Shift" box, and typing in let's say -200ms
  • I save the file, as a .mkv and also a .mp4 file (Save ==> I replace the extension with mp4)

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


eumagga0x2a

2.7.5 is an unsupported legacy version, please verify that the problem persists for you with the latest nightly build (currently a MinGW one from Jan 4 2021).

Bobi

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.

eumagga0x2a

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.

Bobi

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:

eumagga0x2a

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

Thank you for your report, please try a future nightly build (VC++ builds, MinGW builds).