Source is from a Digital8 tape that I captured in WinDV to a DV-AVI Type 1 file, then ran through VirtualDub with direct stream copy saved as AVI, this is to convert it to DV-AVI Type 2 so that I can open it in Avidemux (DV-AVI Type 1 won't open in Avidemux). Here I'm using a few filters to de-interlace, resize to 640x480 etc. and output to MP4 (h264 and AAC resampled to 48000khz), but the audio in the output file is gradually losing sync. I have had success with these settings before but this video gets really bad towards the end.
In my quest to figure out the cause of this, I just noticed that when using the MP4v2 Muxer in Avidemux, MediaInfo shows this:
Frame rate mode : Variable
Frame rate : 59.940 (59940/1000) FPS
Minimum frame rate : 19.982 FPS
Maximum frame rate : 59.960 FPS
However, the AVI files are constant frame rate, and when I set Avidemux Output Format to MP4 Muxer instead of MP4v2 Muxer, the output file is constant frame rate. I suspect this is why the audio is coming out of sync. Can MP4v2 Muxer not output constant frame rate?
+ Reply to Thread
Results 1 to 4 of 4
MediaInfo reports variable frame rate when the container is at all able to support it. That doesn't always mean that it is actually used; MediaInfo does not scan the whole file, creating statistics about the duration of every frame. It relies more on values stored in headers.
But in your case, the slight difference between the general (NTSC conformant) and the max-vfr rate (slightly off NTSC) is suspicious, as well as a weird min-vfr rate. A miscalculation seems probable.
DV codec does not support vfr. Neither does avi container. Mp4v2 muxer may have some problems, but it sounds like something else (or in addition) is being done wrong here.
There are better options for converting type1 to type2, just look in the tools section. No need for all the vdub business.
Avidemux I get constant frame rate MKV file. It makes no sense why outputting MP4 would do this. Also, I should mention that part of the reason I was using VirtualDub was to append multiple files that were recorded close together into one AVI file. It shouldn't be altering the video or audio at all, just remuxing. If there is a better way please let me know. You didn't give any recommendations for alternatives so I tried out DVdate to convert to DV-AVI Type 2, but still Avidemux was outputting VFR with audio losing sync.
I tried My MP4Box GUI and it seems after demuxing the video and audio from the problem MP4 files and then remuxing a new MP4 file from the H264 and AAC files, I have a constant frame rate 59.94 and audio is back to being in sync! At least it worked on this video. I will have to see if it fixes the others too. Should I go ahead with this workflow or is this likely to introduce more issues? Still frustrated that Avidemux doesn't have a setting to turn VFR off, wish I didn't have to go through this extra step.