VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Jan 2008
    Location
    Germany
    Search Comp PM
    Hello!

    I encoded a mkv file (video x264, audio ac3) with a higher bitrate to a mkv file (video x264, audio aac) with a lower bitrate. This process results in an out of sync audio. The delay is variable: at the beginning of the file, the sound is in sync and then it becomes gradually faster than the video.
    Here are the details:

    The original file has the following specifications

    Code:
    Format                           : Matroska
    File size                        : 12.3 GiB
    Duration                         : 3h 3mn
    Overal bit rate                  : 9597 Kbps
    Encoded date                     : UTC 2007-08-19 00:03:37
    Writing application              : mkvmerge v2.0.2 ('You're My Flame') built on Feb 21 2007 23:40:55
    Writing library                  : libebml v0.7.7 + libmatroska v0.8.1
    
    Video
    Format                           : AVC
    Format/Info                      : Advanced Video Codec
    Format profile                   : High@L5.1
    Format settings, CABAC           : Yes
    Format settings, ReFrames        : 8
    Codec ID                         : V_MPEG4/ISO/AVC
    Duration                         : 3h 3mn
    Bit rate                         : 8758 Kbps
    Nominal bit rate                 : 9132 Kbps
    Width                            : 1920 pixels
    Height                           : 816 pixels
    Display aspect ratio             : 2.35
    Frame rate                       : 23.976 fps
    Colorimetry                      : 4:2:0
    Scan type                        : Progressive
    Bits/(Pixel*Frame)               : 0.243
    Writing library                  : x264 - core 56 svn-667C
    Encoding settings                : cabac=1 / ref=5 / deblock=1:-2:-1 / analyse=0x3:0x133 / me=umh / subme=6 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=2 / deadzone=21,11 / chroma_qp_offset=0 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=9132 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30
    Language                         : English
    
    Audio
    Format                           : AC-3
    Format/Info                      : Audio Coding 3
    Codec ID                         : A_AC3
    Duration                         : 3h 3mn
    Bit rate mode                    : CBR
    Bit rate                         : 448 Kbps
    Channel(s)                       : 6 channels
    Channel positions                : Front: L C R, Rear: L R, LFE
    Sampling rate                    : 48.0 KHz
    Language                         : English
    I used MkvExtract to extract the AC3 file and MeGui to encode sound and audio (If I wouldn't encode the audio and use the original AC3 file, I would have the same desync issue):


    Code:
    Format                           : Matroska
    File size                        : 2.80 GiB
    Duration                         : 3h 3mn
    Overal bit rate                  : 2184 Kbps
    Encoded date                     : UTC 2008-05-31 07:19:41
    Writing application              : mkvmerge v2.2.0 ('Turn It On Again') built on Mar  4 2008 12:58:26
    Writing library                  : libebml v0.7.7 + libmatroska v0.8.1
    
    Video
    Format                           : AVC
    Format/Info                      : Advanced Video Codec
    Format profile                   : High@L5.1
    Format settings, CABAC           : Yes
    Format settings, ReFrames        : 10
    Codec ID                         : V_MPEG4/ISO/AVC
    Duration                         : 3h 3mn
    Nominal bit rate                 : 1914 Kbps
    Width                            : 1280 pixels
    Height                           : 544 pixels
    Display aspect ratio             : 2.35
    Frame rate                       : 23.976 fps
    Colorimetry                      : 4:2:0
    Scan type                        : Progressive
    Bits/(Pixel*Frame)               : 0.115
    Writing library                  : x264 - core 59 r851M e11ef38
    Encoding settings                : cabac=1 / ref=10 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=6 / me-prepass=0 / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=3 / nr=0 / decimate=0 / mbaff=0 / fgo=0 / bframes=5 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=2pass / bitrate=1914 / ratetol=1.0 / rceq='blurCplx^(1-qComp)' / qcomp=1.00 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / pb_ratio=1.30 / aq=2:1.00
    Language                         : English
    
    Audio
    Format                           : AAC
    Format/Info                      : Advanced Audio Codec
    Format version                   : Version 4
    Format profile                   : LC
    Format settings, SBR             : No
    Codec ID                         : A_AAC
    Duration                         : 3h 3mn
    Channel(s)                       : 6 channels
    Channel positions                : Front: L C R, Rear: L R, LFE
    Sampling rate                    : 48.0 KHz
    Resolution                       : 16 bits
    I usually don't have these desync issues with any mkv files. I would be extremely grateful if you could help me in fixing this problem.
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    I would try reconvert the mkv with xvid4psp or ripbot264 and see if it make any difference.

    But it could be a variable frame rate mkv and then it will be more difficult.
    Quote Quote  
  3. In your avs script, try using convertfps, which usually gets around the vfr problem

    DirectShowSource("Path\file.mkv,fps=23.976,convert fps=true)


    The other approach would be to shrink/expand the audio in the mkv container using mkvmergegui. The information you provided suggests that both audio tracks and both video tracks are the same duration; so this probably won't work. But anyways: under the format specific options tab (once you highlighted the audio track), you will see "stretch by". Just enter a ratio like 999/1000 to make the audio smaller...etc...
    Quote Quote  
  4. Member
    Join Date
    Jan 2008
    Location
    Germany
    Search Comp PM
    Thanks alot for your replies!
    I will try to reencode with xvid4psp with convertfps=true and see what kind of output this will produce.
    Ripbot crashes with an I/O error when I try to add a video file.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!