I have done some searching and found others with this issue but I haven't been able to resolve mine yet. Basically at the beginning of the video everything is in synch. The farther into the movie the more out of synch things get. I have used mediainfo to compare time lengths and it shows them as the same. The output of that is below.
I'm fairly a newbie when it comes to video stuff. I have tried avidemux 2.6 although I don't know really how to use that program. The few options I tried didn't work. I tried Frame Rate Changer 2009 without luck. The only field I changed in it was the scale. No luck with it. I tried YAAI which seems to get me the closest but still not good enough. I changed the stretch video setting as far as it would go to the longer setting, but it seems it just needs to go a little farther. FPS shows 49.9168 and stretch factor 83.3102.
This is only happening with xvid avi files. MKV, MP4, WMV, MOV etc all seem fine. I have tried on two different computers using MPC-HC. My media PC runs Media Browser and that shows the same issues.
I tried another xvid avi file and it plays fine, main difference is it has a FPS of 23.976.
Any help in figuring this out greatly appreciated.
General
Complete name :
Format : AVI
Format/Info : Audio Video Interleave
File size : 844 MiB
Duration : 42mn 29s
Overall bit rate mode : Variable
Overall bit rate : 2 776 Kbps
Video
ID : 0
Format : MPEG-4 Visual
Format profile : Advanced Simple@L5
Format settings, BVOP : 2
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 42mn 29s
Bit rate : 2 630 Kbps
Width : 640 pixels
Height : 360 pixels
Display aspect ratio : 16:9
Frame rate : 59.940 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.190
Stream size : 799 MiB (95%)
Writing library : XviD 64
Audio
ID : 1
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Codec ID : 55
Codec ID/Hint : MP3
Duration : 42mn 29s
Bit rate mode : Variable
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 38.9 MiB (5%)
Alignment : Aligned on interleaves
Interleave, duration : 24 ms (1.44 video frame)
Interleave, preload duration : 178 ms
Title :
Writing library : LAME3.98.4
Thanks
+ Reply to Thread
Results 1 to 27 of 27
-
-
MediaInfo doesn't actually know how long each stream is so it just prints out the play length of the file as a whole for each stream. The same thing happens with MKV's... if only someone could figure out a way to fix that...
You may have to extract each stream into it's own container to check if there is a difference between lengths, that should give us some idea of what to do next. -
-
Well, you could use MKVMerge from MKVToolNix and use it to separate each track into it's own file, or you could cheat and download the pre version, remux your file whole then give us the MediaInfo output for it.
-
ok some searching says to use virtualdubmod. I grabbed it and got the following prompts which I clicked Yes and Ok. Looks like maybe I need a codec. I have heard bad stories of installing some of these. Would this one be ok? http://www.free-codecs.com/download/xvid_codec.htm
-
I guess you could try a direct stream copy using VirtualDub. Ignore all the errors and just do it, as long as it doesn't change the original file there's no harm done.
-
Using mkvmerge I think I did it right, gave me a mka file and below is the mediainfo output.
General
Unique ID : 179560039318419241584755295018595399569 (0x87160172882FC31D9F190B4437C03791)
Complete name :
Format : Matroska
Format version : Version 4 / Version 2
File size : 39.1 MiB
Duration : 42mn 29s
Overall bit rate mode : Variable
Overall bit rate : 129 Kbps
Encoded date : UTC 2014-06-04 12:24:56
Writing application : mkvmerge v6.8.0 ('Theme for Great Cities') 64bit built on Mar 2 2014 21:34:26
Writing library : libebml v1.3.0 + libmatroska v1.4.1
Audio
ID : 1
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Codec ID : A_MPEG/L3
Codec ID/Hint : MP3
Duration : 42mn 29s
Bit rate mode : Variable
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 38.9 MiB (100%)
Writing library : LAME3.98.4
Language : English
Default : Yes
Forced : No -
Here is the output using vdub. It doesn't show below but vdub showed the audio stream exactly 42:29:459. Looks like video is 42:29:55.
General
Complete name :
Format : MPEG Audio
File size : 38.9 MiB
Duration : 42mn 29s
Overall bit rate mode : Variable
Overall bit rate : 128 Kbps
Writing library : LAME3.98.4
Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Duration : 42mn 29s
Bit rate mode : Variable
Bit rate : 128 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 38.9 MiB (100%)
Writing library : LAME3.98.4
-
If you remux the whole thing into an MKV does it play properly? Have you tried setting the Frame-Rate to 60fps? Is the audio ahead of the video or vice-versa? What codec pack(s) do you have installed?
-
Ok, I was wrong on the video length, it is 43:57. Also the FPS is different on original which it now shows. See mediainfo below. Audio is ahead of video. I haven't tried using 60fps or remux into mkv. I haven't installed any codecs, just windows 7 pro and whatever is comes with.
General
Complete name :
Format : AVI
Format/Info : Audio Video Interleave
File size : 803 MiB
Duration : 43mn 57s
Overall bit rate : 2 552 Kbps
Writing application : VirtualDubMod 1.5.10.2 (build 2542/release)
Writing library : VirtualDubMod build 2542/release
Video
ID : 0
Format : MPEG-4 Visual
Format profile : Advanced Simple@L5
Format settings, BVOP : 2
Format settings, QPel : No
Format settings, GMC : No warppoints
Format settings, Matrix : Default (H.263)
Codec ID : XVID
Codec ID/Hint : XviD
Duration : 43mn 57s
Bit rate : 2 541 Kbps
Width : 640 pixels
Height : 360 pixels
Display aspect ratio : 16:9
Frame rate : 57.917 fps
Original frame rate : 59.940 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.190
Stream size : 799 MiB (100%)
Writing library : XviD 64 -
remux into mkv and no luck, still off. Tried using 60fps and it put everything off from beginning to end.
So I have a video file that is 43:57 and an audio that is 42.29. They start off fine together, but get more out of synch as the show goes on. How do I get them aligned?
Thanks -
Why don't you try what the Virtualdub error says? Make a CBR copy of the audio track. Also, it looks like your video frame rate is going into some screwy territory on your later attempts.
-
Bad idea u_u VirtualDubMod is OUTDATED, and only the devil knows why it still is a favourite among many random pirates.
But let's try a different approach: use MP4Box for remuxing the AVI into an MP4 file, and then check if the problem persists.
This is only happening with xvid avi files.
Even though VBR audio in AVI has been a NON-problem since ages ago, but...
Out of curiosity: a low-quality AVI with framerate=59.94fps 0_o ---
--- where did you get it? And what does it contain? -
Tried using YAMB with mp4box and now don't have any audio. Not sure if I did it right, I just pulled in the avi file and with all default settings clicked Mux. I got an mp4 file but no sound.
Do I need to maybe demux the audio/video first, then add them both into YAMB and then remux? haha like I said, pretty new with all these tools. -
Ahhhh I'm about ready to just throw in the towel. I used belight and converted the mp3 to wav 44.1. Tried using mkvmerge and no luck, audio off from the beginning even. I tried avidemux but I must have not done something right, the fps must be off because everything was in fast motion. I added the avi file with no audio. Then went to Audio -- select track -- add my wav I just created, then did a save video.
Is there way to progressively stretch the audio from 42:29 to 43:57 to match the video? All this muxing back together no matter which format seems to give the same results. It is just laying a short audio onto a longer video which puts the audio more ahead as the video progresses. -
Oh gosh. So many people posted here and forced you to jump through so many unnecessary hoops, when all you needed to do is change the audio mp3 stream from variable bitrate (VBR) to constant bitrate (CBR). VirtualDub will do it, provided the lame mp3 codec is loaded. The xvid video stream can remain unchanged.
EDIT: Oh, I see smrpx mentioned it in post #13. That's all you have to do. -
He's already converted it to WAV, will CBR MP3 achieve better results than that?
I'm wondering why the Frame Rate changed when the video was placed in it's own AVI. The video is 42:29, not 43:57, otherwise the original AVI would have had a duration of 43:57.
There may be two issues here. It's odd that after all this time no one has been able to figure out VBR MP3.
Re-encode the audio to WAV or CBR MP3, then make sure you force the video frame-rate to 59.940fps when you remux.
Failing that MKVMerge -y 1:0,n1/n2 will stretch the audio stream but you'll have to figure out the exact ratio to use (replace n1 and n2 with actual numbers).
https://www.google.com/?gfe_rd=cr&ei=x9yPU6G7BsPC8gfOxYHwBg#q=variable+bit+rate+MP3+sync+issues -
Chances are pretty good that'll throw the audio out completely...... if it's supposed to be VBR.
I've got lots of AVIs with VBR MP3 and not had any problem playing them, but if I let VirtualDubMod change the header to CBR it'd put them completely out of sync. -
@spike428: I meant MP4Box, not one of its GUIs:
Code:mp4box -add path-to\input.avi path-to\output.mp4
Also: maybe you actually have a Variable Frame-Rate AVI,
AND/OR it was muxed VERY-improperly,
and in this case, a simple remux won't fix the sync issue.Last edited by El Heggunte; 5th Jun 2014 at 03:41. Reason: add info
-
P.S.: as a last resort, you might upload a copy of the problematic file to a filesharing service, so that we the other members can examine it.
-
Oh, god. I kept looking for any indication of VFR or CFR but MediaInfo doesn't say anything and AVIs aren't supposed to be capable of VFR. Apparently the only way to manage it is to up the frame rate and add null frames. Nothing I can see indicates VFR but I'm not really sure what I'm looking for. I doubt dropping the actual Frame-Rate at any point would lengthen the play time as you'd need 2 seconds worth of encoded frames to fill 1 second of playtime and I'm pretty sure null frames should be retained when remuxed, unless they're part of the container rather than the stream.
Hopefully that's not it. -
I did I thought, I clicked yes to the prompt to rewrite the headers in post #5.
Anyway, I'm going to start over and try the suggestions from this thread all again. I ended up with a lot of different test files and by now have kinda lost track of which ones are what from what I did. I will post back my findings.
Thanks -
How many of these AVIs are giving you audio sync problems and where did they come from?
I ask, because maybe there's nothing wrong with the AVIs themselves as such, and maybe there's nothing wrong with your playback method, maybe they were encoded incorrectly in the first place and there's nothing you can do to fix them short of re-encoding the original video again (properly). It might be nothing to do with the frame rate. Can you upload a sample? -
-
Original file with vbr audio, untampered should only need what vdub vbr detection error said to do about extracting the audio as raw ... don't change compressors or anything else ... just raw extract (pcm) the audio.
Simply replace the original audio back in vdub, set video to direct stream copy and audio compressor type needed ... thou in general 44.100 khz audio is used for cross hardware compatibility, not 48.000 khz.
And let it rip ... this has solved 99% of files having vbr audio in my collection over the years.
Anything beyond this gets further treatment using the change tempo feature in audacity to make minor adjustments through out the file length to resync.