VideoHelp Forum
+ Reply to Thread
Results 1 to 15 of 15
Thread
  1. I actually have 2 problems. I use StaxRip to encode Blu-rays and DVDs. But I had a problem with a recent movie. After ripping and encoding the audio and video was out of sync. It was a DVD rip. So I hit up Google and found a potential solution to the sync issues. BUT I ran into another problem trying to fix that problem. So here it is:

    I'm using mkvmerge to mux raw h264 and raw ac3. In the GUI I go to mux and it keeps giving an error (return) code 2 saying the formats do not match. It's the AC3 I think. But I really know very little about this. It's just x264 encoded MPEG2 and the extracted AC3 track from the source VOBs from the DVD. StaxRip muxes them, but the audio is out of sync. So I read that incorrect framerates are often the cause of this. So I'm wondering if what should be 23.976xxxx is actually maybe 23.98 or 23.970 and is causing the audio to be out of sync. So mkvmerge and adjust the frame rate to be correct, but I can't get to that point because it keeps returning an error saying the formats do not match.

    Any help would be greatly appreciated.
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    1. How much delay, and is it changing?

    2. Did you try to extract the main movie PGC from the DVD to be processed in StaxRip, or are you trying to process VOB files as they were on DVD?

    3. MediaInfo report. MediaInfo report. MediaInfo report.
    Quote Quote  
  3. 1. You mean actual delay in the movie? I don't know. How do I find that out? The track supposedly has a 0ms delay.
    2. It was just decrpyted VOB files that I tried to encode in StaxRip. I ran DVDFab on the disc. I don't even know what a PGC is...
    3. Here's the report for the first VOB file from the movie:
    General
    Complete name : F:\MainMovie\THE_NOVEMBER_MAN\VIDEO_TS\VTS_01_1.VO B
    Format : MPEG-PS
    File size : 1 024 MiB
    Duration : 20mn 55s
    Overall bit rate mode : Variable
    Overall bit rate : 6 844 Kbps
    Writing library : encoded by TMPGEnc (ver. 2.524.63.181)

    Video
    ID : 224 (0xE0)
    Format : MPEG Video
    Format version : Version 2
    Format profile : Main@Main
    Format settings, BVOP : Yes
    Format settings, Matrix : Custom
    Format settings, GOP : Variable
    Duration : 20mn 55s
    Bit rate mode : Variable
    Bit rate : 6 259 Kbps
    Width : 720 pixels
    Height : 480 pixels
    Display aspect ratio : 16:9
    Frame rate : 23.976 fps
    Standard : NTSC
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Scan order : 2:3 Pulldown
    Compression mode : Lossy
    Bits/(Pixel*Frame) : 0.755
    Time code of first frame : 00:00:00:00
    Time code source : Group of pictures header
    Stream size : 937 MiB (91%)
    Writing library : TMPGEnc 2.524.63.181
    Color primaries : BT.601 NTSC
    Transfer characteristics : BT.601
    Matrix coefficients : BT.601

    Audio
    ID : 189 (0xBD)-128 (0x80)
    Format : AC-3
    Format/Info : Audio Coding 3
    Mode extension : CM (complete main)
    Format settings, Endianness : Big
    Muxing mode : DVD-Video
    Duration : 20mn 54s
    Bit rate mode : Constant
    Bit rate : 448 Kbps
    Channel(s) : 6 channels
    Channel positions : Front: L C R, Side: L R, LFE
    Sampling rate : 48.0 KHz
    Bit depth : 16 bits
    Compression mode : Lossy
    Stream size : 67.0 MiB (7%)

    Text #1
    ID : 224 (0xE0)-CC3
    Format : EIA-608
    Muxing mode, more info : Muxed in Video #1
    Bit rate mode : Constant
    Stream size : 0.00 Byte (0%)

    Text #2
    ID : 189 (0xBD)-32 (0x20)
    Format : RLE
    Format/Info : Run-length encoding
    Muxing mode : DVD-Video

    Menu

    Thanks for the help.
    Quote Quote  
  4. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    1. Rather milliseconds or several seconds? And: Is the delay different at the beginning and at the end of the whole movie, e.g. is it growing?

    2. Use the DVD decoding software not in "File mode" to decrypt everything, but in "Movie mode" to decode only "the main movie". If you already ripped all files, then you can also use PGCDemux to extract the main movie PGC from the whole DVD structure. Many converters are unable to handle the whole DVD, they need an extraction of only the main movie, sequentially (without any alternative cuts), with only one camera angle (in the rare case when it might be "multi-angle authored").

    3. In general, I would be less interested in the VOB file, they can't have much unusual content because they must be DVD Video compliant. Details about the H.264 video and AC3 audio are possibly more interesting. But there is already a slight problem: Raw H.264 video may lack specific information because it has no header. One of the most important attributes it may lack is the frame rate. So this time, it is good to see the analysis of the VOB file too. It tells me that the video stream seems to have a pulldown flag, so I believe it is in fact progressive film at 23.976 fps, but will be telecined by a DVD player to 29.97 fps NTSC. A video converter should stay at 23.976 fps progressive.
    Quote Quote  
  5. First thanks for hanging in there with me.

    The raw AC3 track, when extracted, says it has a 0 millisecond delay. I have never watched more than the first minute or so of the movie. Just long enough to see that the audio and video are out of sync. I deleted the muxed MKV, so now all I have are the raw h264, AC3, chapter stuff etc. In short, I have whatever a pretty much default configuration of StaxRip extracts and processes. So do you want the raw h264 and AC3 MediaInfo report too? Do you think you may have an idea what would cause mkvmerge to fuss about muxing them? Or are you trying to figure the A/V synv issue too?
    Quote Quote  
  6. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Do not read from the track's filename. Listen and guess the delay (or count the difference between a visible and audible peak if you have a video editing software which displays both a "film strip" view of the video and a waveform view of the audio, e.g. at an explosion or slamming door). And especially, try to compare the delays in the beginning and in the end of the movie.

    If the delay is several seconds, but about constant over the whole playing time, the reason is probably that you did not extract the "main movie" but used the VTS as it was authored on DVD, therefore some tools may not know that there are publisher trailers in the beginning of the VTS (Video Titleset) which do not belong to the movie PGC (Program Chain) and should be ignored, but cause the delay instead.

    But if the delay is barely noticable in the beginning, but grows towards the end of the movie, there is a completely different reason, most usually a wrong assumption about the frame rate. Remember, a raw H.264 video stream may not contain any information about its framerate, so it is possible that multiplexers assume a default rate which may be wrong in your case.

    Because the possible reasons are so different, discovering your specific reason is a little elaborate.
    Quote Quote  
  7. Thanks for explaining the audio video sync thing. But do you have any idea why mkvmerge would not allow me to mux the video and audio together?? I tried using PGCDemux to extract the audio and video and mux them with mkvmerge but it gave the same "formats do not match" error. I will say that I leave most of the options in the GUI blank or at default, except the FPS and audio delay.
    Quote Quote  
  8. Are you using the "add" button in mkvmergegui? The "append" button is the wrong one for this. It will give you that error
    Quote Quote  
  9. No, actually I was using "append"... so use "add", eh?

    BAM!!!

    You're right!! Muxed the files just fine with "Add"! You're one helpful dude, poisondeathray. Thanks.

    EDIT:

    Okay, LigH.de. The audio sync problem was fixed throughout the entire movie. The audio is actually after the video, so it can't be fixed by adding a delay. I demuxed with PGCDemux, then muxed with mkvmerge, and there was no delay. So I have to assume the delay was caused as a result of the encoding process...?? I've read that deinterlacing video can cause syncing issues. I did deinterlace even though you said it was progressive video (I didn't know at the time). I'm going to try re-encoding without deinterlacing and see if that helps. What are your thoughts though?
    Last edited by Malonn; 29th Jan 2015 at 10:05.
    Quote Quote  
  10. If audio comes after video, you can use a negative AV delay , eg. "-200ms" . But if delay is progressively worsening, then you cannot fix it with a constant delay

    That mediainfo report suggests the movie is progressive (soft pulldown). You should NOT deinterlace. You should "inverse telecine" or IVTC (or remove pulldown). 23.976 is correct
    Quote Quote  
  11. The audio/video syncing was constant throughout the movie. It didn't worsen. But unfortunately I think my power supply is starting to fail, as I can't encode video without my computer crashing. So I have to wait for a new PSU before I can try anything with not deinterlacing and such.

    Is there an real accurate way to find the exact audio delay, so I know how much of a negative delay to put in, if I can't fix the syncing any other way?
    Quote Quote  
  12. Most people just use a software edia player. Most will shift the audio with keys +/- 10ms. When it's in sync, note the value use that for the muxing delay

    Another method is to open it up in a video editor, look at the waveform peaks that coincide with the video
    Quote Quote  
  13. I tend to use WMP, but I don't think that has a audio correcting feature. It's pretty basic, but it comes with Windows so I've always used it. I have VLC though backed up. That has the audio correcting feature? I rarely use it, thus I am not too familiar with it's feature set.
    Quote Quote  
  14. VLC uses the J,K keys, but it's +/-50ms , so too coarse

    Every media player is different, and you can usually remap the keys if you want to. For example, in MPCHC the default configuration uses the +/- keys on the numpad and it's +/- 10ms
    Quote Quote  
  15. Maybe I can reduce the increments of the audio correction on VLC? I don't know, like I said I tend to use WMP -- the crappiest of media players.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!