VideoHelp Forum
+ Reply to Thread
Results 1 to 27 of 27
Thread
  1. 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
    Quote Quote  
  2. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  3. What can I use to do that? I did look at dgindex, but that didn't seem to work. I tried dgavcdec and dgmpgdec. I think the AVC one is the wrong one for this file type. dgmpg did extract several files, mp1 2 or 3 I think but none of them would play so not sure if I did it right.
    Quote Quote  
  4. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  5. 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


    Click image for larger version

Name:	vdub_error1.jpg
Views:	467
Size:	54.5 KB
ID:	25525Click image for larger version

Name:	vdub_error2.jpg
Views:	567
Size:	38.4 KB
ID:	25524
    Quote Quote  
  6. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  7. 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
    Quote Quote  
  8. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    So how long is the Video Stream?
    Quote Quote  
  9. 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

    Click image for larger version

Name:	vdub_stream1.jpg
Views:	492
Size:	80.2 KB
ID:	25528
    Quote Quote  
  10. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    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?
    Quote Quote  
  11. 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
    Quote Quote  
  12. 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
    Quote Quote  
  13. 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.
    Quote Quote  
  14. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    Originally Posted by spike428 View Post
    ok some searching says to use virtualdubmod.
    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.
    AVIs with Variable BitRate MP3 --- or not
    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?
    Quote Quote  
  15. Member hech54's Avatar
    Join Date
    Jul 2001
    Location
    Yank in Europe
    Search PM
    Originally Posted by ndjamena View Post
    What codec pack(s) do you have installed?
    Codec "packs" are stupid and dangerous.

    Only install the codecs you need.

    This is an easy fix but hard to explain.
    I'd demux and convert the audio to regular .wav, 44.1 like you get from a CD.
    Load the video and the .wav audio into VDub or Avidemux to see if that fixes your sync problem.
    Quote Quote  
  16. Originally Posted by El Heggunte View Post

    But let's try a different approach: use MP4Box for remuxing the AVI into an MP4 file, and then check if the problem persists.
    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.
    Quote Quote  
  17. Originally Posted by hech54 View Post
    Originally Posted by ndjamena View Post
    What codec pack(s) do you have installed?
    Codec "packs" are stupid and dangerous.

    Only install the codecs you need.

    This is an easy fix but hard to explain.
    I'd demux and convert the audio to regular .wav, 44.1 like you get from a CD.
    Load the video and the .wav audio into VDub or Avidemux to see if that fixes your sync problem.
    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.
    Quote Quote  
  18. Member
    Join Date
    Jan 2007
    Location
    Republic of Texas
    Search Comp PM
    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.
    Quote Quote  
  19. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    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
    Quote Quote  
  20. Originally Posted by filmboss80 View Post
    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.
    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.
    Quote Quote  
  21. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    @spike428: I meant MP4Box, not one of its GUIs:

    Code:
    mp4box -add path-to\input.avi path-to\output.mp4
    BTW, it's never too late to face the Command-Line Interface

    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
    Quote Quote  
  22. DECEASED
    Join Date
    Jun 2009
    Location
    Heaven
    Search Comp PM
    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.
    Quote Quote  
  23. Member
    Join Date
    Sep 2012
    Location
    Australia
    Search Comp PM
    Originally Posted by El Heggunte View Post
    Also: maybe you actually have a Variable Frame-Rate AVI
    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.
    Quote Quote  
  24. Originally Posted by filmboss80 View Post
    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.
    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
    Quote Quote  
  25. 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?
    Quote Quote  
  26. Originally Posted by spike428 View Post
    I did I thought, I clicked yes to the prompt to rewrite the headers in post #5.
    You'll be sorry. That's a recipe for out-of-synch audio. hello_hello is asking the right questions and giving the best advice.
    Quote Quote  
  27. Member
    Join Date
    Feb 2004
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!