audio/video out of sync

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
basic_user
Posts: 7
Joined: Thu Mar 29, 2018 3:26 am

audio/video out of sync

Post by basic_user »

Hi,

I've read posts all over about this issue but it always seems that the audio lags the video, my case is opposite; the video lags the audio. Only by 1 or 2 seconds, but it's annoying.
I have Transformers and Transformers 2, I ripped both with DVDFAB 8 and processed Transformers through HandBrake just fine. I've done this process with most of the DVD's in my collection without issue. But Transformers 2 is the latest of 3 that I've had this exact problem with and I can't seem to find the reason. I'm attaching the log below but this doesn't seem to be a rip issue (I've used DVDFAB 8 on very new movies and very old movies) and the processed out-of-sync video has no other issues than the lip sync lag; no artifacts, no skipping, nothing.

I've also tried both variable and constant frame rate, and I've tried multiple variable rates though honestly the decision process was random (I've no idea what the source frame rate is).

I'm hoping someone can point out the issue for me. Thanks.

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 6.1.7601 Service Pack 1 - 64bit
CPU: Intel(R) Core(TM) i3 CPU         550  @ 3.20GHz
Ram: 8119 MB, 
GPU Information:
  NVIDIA GeForce GT 240 - 9.18.13.4195
Screen: 1920x1080
Temp Dir: C:\Users\someone\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\someone\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

-------------------------------------------


# Starting Encode ...

[19:04:26] hb_init: starting libhb thread
[19:04:26] 1 job(s) to process
[19:04:26] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 6,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      },
      {
        "Name": "Chapter 2"
      },
      {
        "Name": "Chapter 3"
      },
      {
        "Name": "Chapter 4"
      },
      {
        "Name": "Chapter 5"
      },
      {
        "Name": "Chapter 6"
      },
      {
        "Name": "Chapter 7"
      },
      {
        "Name": "Chapter 8"
      },
      {
        "Name": "Chapter 9"
      },
      {
        "Name": "Chapter 10"
      },
      {
        "Name": "Chapter 11"
      },
      {
        "Name": "Chapter 12"
      },
      {
        "Name": "Chapter 13"
      },
      {
        "Name": "Chapter 14"
      },
      {
        "Name": "Chapter 15"
      },
      {
        "Name": "Chapter 16"
      },
      {
        "Name": "Chapter 17"
      },
      {
        "Name": "Chapter 18"
      },
      {
        "Name": "Chapter 19"
      },
      {
        "Name": "Chapter 20"
      },
      {
        "Name": "Chapter 21"
      }
    ],
    "ChapterMarkers": true,
    "File": "C:\\Users\\someone\\Videos\\Compressed\\TRANSFORMERS2.m4v",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "62",
          "crop-left": "0",
          "crop-right": "2",
          "crop-top": "58",
          "height": "360",
          "width": "718"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "1"
        }
      }
    ]
  },
  "PAR": {
    "Num": 32,
    "Den": 27
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 21
    },
    "Title": 47,
    "Path": "C:\\Users\\someone\\Videos\\FullDisc\\TRANSFORMERS2"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 65536,
    "Level": "4.0",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "main",
    "Quality": 22.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[19:04:26] CPU: Intel(R) Core(TM) i3 CPU         550  @ 3.20GHz
[19:04:26]  - logical processor count: 4
[19:04:26] Intel Quick Sync Video support: no
[19:04:26] hb_scan: path=C:\Users\someone\Videos\FullDisc\TRANSFORMERS2, title_index=47
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[19:04:26] bd: not a bd - trying as a stream/file instead
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open C:\Users\someone\Videos\FullDisc\TRANSFORMERS2 for reading
libdvdread: Device C:\Users\someone\Videos\FullDisc\TRANSFORMERS2 inaccessible, CSS authentication not available.
[19:04:26] scan: DVD has 99 title(s)
[19:04:26] scan: scanning title 47
[19:04:26] scan: opening IFO for VTS 8
[19:04:26] pgc_id: 7, pgn: 1: pgc: 000000001D1CEEF0
[19:04:26] scan: vts=8, ttn=7, cells=0->55, blocks=7->6, 3866123 blocks
[19:04:26] scan: duration is 02:29:46 (8986000 ms)
[19:04:26] scan: checking audio 1
[19:04:26] scan: id=0x80bd, lang=English (AC3), 3cc=eng ext=1
[19:04:26] scan: checking audio 2
[19:04:26] scan: id=0x81bd, lang=Francais (AC3), 3cc=fra ext=1
[19:04:26] scan: checking audio 3
[19:04:26] scan: id=0x82bd, lang=español (AC3), 3cc=spa ext=1
[19:04:26] scan: checking subtitle 1
[19:04:26] scan: id=0x21bd, lang=English, 3cc=eng ext=1
[19:04:26] scan: checking subtitle 2
[19:04:26] scan: id=0x23bd, lang=Francais, 3cc=fra ext=1
[19:04:26] scan: checking subtitle 3
[19:04:26] scan: id=0x25bd, lang=español, 3cc=spa ext=1
[19:04:26] scan: checking subtitle 4
[19:04:26] scan: id=0x27bd, lang=Francais, 3cc=fra ext=1
[19:04:26] scan: checking subtitle 5
[19:04:26] scan: id=0x29bd, lang=español, 3cc=spa ext=1
[19:04:26] scan: title 47 has 21 chapters
[19:04:26] scan: chap 1 c=0->8, b=7->253809 (253838), 530234 ms
[19:04:26] scan: chap 2 c=9->9, b=253810->407909 (154100), 363000 ms
[19:04:26] scan: chap 3 c=10->11, b=407910->505234 (97325), 205167 ms
[19:04:26] scan: chap 4 c=12->13, b=505235->686671 (181437), 409167 ms
[19:04:26] scan: chap 5 c=14->15, b=686672->901461 (214790), 472366 ms
[19:04:26] scan: chap 6 c=16->16, b=901462->1005056 (103595), 247000 ms
[19:04:26] scan: chap 7 c=17->18, b=1005057->1173012 (167956), 385501 ms
[19:04:26] scan: chap 8 c=19->21, b=1173013->1486344 (313332), 682300 ms
[19:04:26] scan: chap 9 c=22->24, b=1486345->1722969 (236625), 506832 ms
[19:04:26] scan: chap 10 c=25->27, b=1722970->1951850 (228881), 541501 ms
[19:04:26] scan: chap 11 c=28->29, b=1951851->2130926 (179076), 465700 ms
[19:04:26] scan: chap 12 c=30->31, b=2130927->2292178 (161252), 382500 ms
[19:04:26] scan: chap 13 c=32->34, b=2292179->2509621 (217443), 545499 ms
[19:04:26] scan: chap 14 c=35->36, b=2509622->2744112 (234491), 552332 ms
[19:04:26] scan: chap 15 c=37->38, b=2744113->2885051 (140939), 340333 ms
[19:04:26] scan: chap 16 c=39->42, b=2885052->3103274 (218223), 506499 ms
[19:04:26] scan: chap 17 c=43->47, b=3103275->3306127 (202853), 491500 ms
[19:04:26] scan: chap 18 c=48->49, b=3306128->3499911 (193784), 471034 ms
[19:04:26] scan: chap 19 c=50->51, b=3499912->3698963 (199052), 429133 ms
[19:04:26] scan: chap 20 c=52->54, b=3698964->3866087 (167124), 458001 ms
[19:04:26] scan: chap 21 c=55->55, b=0->6 (7), 400 ms
[19:04:26] scan: aspect = 16:9
[19:04:26] scan: decoding previews for title 47
[19:04:26] scan: title angle(s) 1
[ac3 @ 0000000023635140] frame sync error
[ac3 @ 0000000023635140] frame sync error
[ac3 @ 0000000023635140] frame sync error
[ac3 @ 0000000023635140] frame sync error
[19:04:26] scan: audio 0x80bd: ac3, rate=48000Hz, bitrate=448000 English (AC3) (5.1 ch)
[ac3 @ 0000000023635140] frame sync error
[19:04:26] scan: audio 0x81bd: ac3, rate=48000Hz, bitrate=448000 Francais (AC3) (5.1 ch)
[ac3 @ 0000000023635140] frame sync error
[19:04:26] scan: audio 0x82bd: ac3, rate=48000Hz, bitrate=448000 español (AC3) (5.1 ch)
[19:04:26] scan: 10 previews, 720x480, 23.976 fps, autocrop = 58/62/0/2, aspect 16:9, PAR 32:27
[19:04:26] libhb: scan thread found 1 valid title(s)
[19:04:26] starting job
[19:04:26] decomb filter thread started for segment 0
[19:04:26] decomb filter thread started for segment 1
[19:04:26] decomb filter thread started for segment 2
[19:04:26] decomb filter thread started for segment 3
[19:04:26] decomb check thread started for segment 0
[19:04:26] decomb check thread started for segment 1
[19:04:26] decomb check thread started for segment 2
[19:04:26] decomb check thread started for segment 3
[19:04:26] mask filter thread started for segment 0
[19:04:26] mask filter thread started for segment 1
[19:04:26] mask filter thread started for segment 2
[19:04:26] mask filter thread started for segment 3
[19:04:26] mask erode thread started for segment 0
[19:04:26] mask erode thread started for segment 1
[19:04:26] mask erode thread started for segment 2
[19:04:26] mask erode thread started for segment 3
[19:04:26] mask dilate thread started for segment 0
[19:04:26] mask dilate thread started for segment 1
[19:04:26] mask dilate thread started for segment 2
[19:04:26] mask dilate thread started for segment 3
[19:04:26] yadif thread started for segment 0
[19:04:26] yadif thread started for segment 1
[19:04:26] yadif thread started for segment 2
[19:04:26] yadif thread started for segment 3
[19:04:26] job configuration:
[19:04:26]  * source
[19:04:26]    + C:\Users\someone\Videos\FullDisc\TRANSFORMERS2
[19:04:26]    + title 47, chapter(s) 1 to 21
[19:04:26]  * destination
[19:04:26]    + C:\Users\someone\Videos\Compressed\TRANSFORMERS2.m4v
[19:04:26]    + container: MPEG-4 (libavformat)
[19:04:26]      + chapter markers
[19:04:26]  * video track
[19:04:26]    + decoder: mpeg2video
[19:04:26]      + bitrate 9800 kbps
[19:04:26]    + filters
[19:04:26]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[19:04:26]      + Decomb (mode=39)
[19:04:26]      + Framerate Shaper (mode=1)
[19:04:26]        + frame rate: 23.976 fps -> constant 23.976 fps
[19:04:26]      + Crop and Scale (width=718:height=360:crop-top=58:crop-bottom=62:crop-left=0:crop-right=2)
[19:04:26]        + source: 720 * 480, crop (58/62/0/2): 718 * 360, scale: 718 * 360
[19:04:26]    + Output geometry
[19:04:26]      + storage dimensions: 718 x 360
[19:04:26]      + pixel aspect ratio: 32 : 27
[19:04:26]      + display dimensions: 850 x 360
[19:04:26]  * Foreign Audio Search: Render/Burn-in, Forced Only
[19:04:26]    + subtitle, English (track 0, id 0x21bd) Picture [VOBSUB]
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open C:\Users\someone\Videos\FullDisc\TRANSFORMERS2 for reading
libdvdread: Device C:\Users\someone\Videos\FullDisc\TRANSFORMERS2 inaccessible, CSS authentication not available.
[19:04:26] sync: expecting 215448 video frames
[19:04:26] dvd: end of cell 0 at block 7
[19:04:26] dvd: end of cell 1 at block 0
[19:04:26] dvd: end of cell 2 at block 0
[19:04:26] dvd: end of cell 3 at block 0
[19:04:26] dvd: end of cell 4 at block 0
[19:04:26] dvd: end of cell 5 at block 0
[19:06:52] dvd: end of cell 55 at block 0
[19:06:52] reader: done. 4 scr changes
[19:06:52] work: average encoding speed for job is 0.000000 fps
[19:06:52] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[19:06:52] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[19:06:52] vfr: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[19:06:52] vfr: lost time: 0 (0 frames)
[19:06:52] vfr: gained time: 0 (0 frames) (0 not accounted for)
[19:06:53] sync: got 0 frames, 215448 expected
[19:06:53] Subtitle track 0 (id 0x21bd) 'English': 1877 hits (0 forced)
[19:06:53] No candidate detected during subtitle scan
[19:06:53] starting job
[19:06:53] decomb filter thread started for segment 0
[19:06:53] decomb filter thread started for segment 1
[19:06:53] decomb filter thread started for segment 2
[19:06:53] decomb filter thread started for segment 3
[19:06:53] decomb check thread started for segment 0
[19:06:53] decomb check thread started for segment 1
[19:06:53] decomb check thread started for segment 2
[19:06:53] decomb check thread started for segment 3
[19:06:53] mask filter thread started for segment 0
[19:06:53] mask filter thread started for segment 1
[19:06:53] mask filter thread started for segment 2
[19:06:53] mask filter thread started for segment 3
[19:06:53] mask erode thread started for segment 0
[19:06:53] mask erode thread started for segment 1
[19:06:53] mask erode thread started for segment 2
[19:06:53] mask erode thread started for segment 3
[19:06:53] mask dilate thread started for segment 0
[19:06:53] mask dilate thread started for segment 1
[19:06:53] mask dilate thread started for segment 2
[19:06:53] mask dilate thread started for segment 3
[19:06:53] yadif thread started for segment 0
[19:06:53] yadif thread started for segment 1
[19:06:53] yadif thread started for segment 2
[19:06:53] work: track 1, dithering not supported by codec
[19:06:53] yadif thread started for segment 3
[19:06:53] job configuration:
[19:06:53]  * source
[19:06:53]    + C:\Users\someone\Videos\FullDisc\TRANSFORMERS2
[19:06:53]    + title 47, chapter(s) 1 to 21
[19:06:53]  * destination
[19:06:53]    + C:\Users\someone\Videos\Compressed\TRANSFORMERS2.m4v
[19:06:53]    + container: MPEG-4 (libavformat)
[19:06:53]      + chapter markers
[19:06:53]  * video track
[19:06:53]    + decoder: mpeg2video
[19:06:53]      + bitrate 9800 kbps
[19:06:53]    + filters
[19:06:53]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[19:06:53]      + Decomb (mode=39)
[19:06:53]      + Framerate Shaper (mode=1)
[19:06:53]        + frame rate: 23.976 fps -> constant 23.976 fps
[19:06:53]      + Crop and Scale (width=718:height=360:crop-top=58:crop-bottom=62:crop-left=0:crop-right=2)
[19:06:53]        + source: 720 * 480, crop (58/62/0/2): 718 * 360, scale: 718 * 360
[19:06:53]    + Output geometry
[19:06:53]      + storage dimensions: 718 x 360
[19:06:53]      + pixel aspect ratio: 32 : 27
[19:06:53]      + display dimensions: 850 x 360
[19:06:53]    + encoder: H.264 (libx264)
[19:06:53]      + preset:  fast
[19:06:53]      + profile: main
[19:06:53]      + level:   4.0
[19:06:53]      + quality: 22.00 (RF)
[19:06:53]  * audio track 1
[19:06:53]    + decoder: English (AC3) (5.1 ch) (track 1, id 0x80bd)
[19:06:53]      + bitrate: 448 kbps, samplerate: 48000 Hz
[19:06:53]    + mixdown: Dolby Pro Logic II
[19:06:53]    + encoder: AAC (libavcodec)
[19:06:53]      + bitrate: 160 kbps, samplerate: 48000 Hz
libdvdread: Encrypted DVD support unavailable.
libdvdread: Can't open C:\Users\someone\Videos\FullDisc\TRANSFORMERS2 for reading
libdvdread: Device C:\Users\someone\Videos\FullDisc\TRANSFORMERS2 inaccessible, CSS authentication not available.
[19:06:53] sync: expecting 215448 video frames
[19:06:53] encx264: min-keyint: 24, keyint: 240
[19:06:53] encx264: encoding at constant RF 22.000000
[19:06:53] encx264: unparsed options: level=4.0:ref=2:vbv-maxrate=20000:8x8dct=0:subme=6:weightp=1:vbv-bufsize=25000:rc-lookahead=30
x264 [info]: using SAR=32/27
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
x264 [info]: profile Main, level 4.0
[19:06:53] dvd: end of cell 0 at block 7
[19:06:53] dvd: end of cell 1 at block 0
[19:06:53] dvd: end of cell 2 at block 0
[19:06:53] dvd: end of cell 3 at block 0
[19:06:53] dvd: end of cell 4 at block 0
[19:06:53] dvd: end of cell 5 at block 0
[19:06:53] sync: first pts video is 0
[19:06:53] sync: "Chapter 1" (1) at frame 1 time 0
[19:06:53] sync: "Chapter 21" (21) at frame 12 time 41291
[19:06:53] sync: video time went backwards 125 ms, dropped 3 frames. PTS 90090
[19:06:53] sync: video time went backwards 291 ms, dropped 7 frames. PTS 96006
[19:06:53] sync: video time went backwards 83 ms, dropped 2 frames. PTS 102012
[19:06:53] sync: video time went backwards 125 ms, dropped 3 frames. PTS 108018
[19:06:53] sync: first pts audio 0x80bd is 83441
[19:06:53] sync: video time went backwards 375 ms, dropped 9 frames. PTS 111021
[19:06:53] sync: video time went backwards 333 ms, dropped 8 frames. PTS 117027
[19:06:53] sync: video time went backwards 125 ms, dropped 3 frames. PTS 123033
[20:03:33] dvd: end of cell 55 at block 0
[20:03:33] reader: done. 4 scr changes
[20:03:34] work: average encoding speed for job is 63.394173 fps
[20:03:34] comb detect: heavy 13664 | light 39123 | uncombed 162854 | total 215641
[20:03:34] decomb: deinterlaced 13664 | blended 39123 | unfiltered 162854 | total 215641
[20:03:34] vfr: 215628 frames output, 13 dropped and 0 duped for CFR/PFR
[20:03:34] vfr: lost time: 198 (0 frames)
[20:03:34] vfr: gained time: 198 (8 frames) (0 not accounted for)
[20:03:34] ac3-decoder done: 281007 frames, 0 decoder errors
[20:03:34] mpeg2video-decoder done: 215678 frames, 0 decoder errors
[20:03:34] sync: got 215643 frames, 215448 expected
[20:03:34] sync: framerate min 23.981 fps, max 1000.000 fps, avg 23.978 fps
x264 [info]: frame I:3322  Avg QP:20.78  size: 34022
x264 [info]: frame P:60855 Avg QP:23.83  size: 13683
x264 [info]: frame B:151451 Avg QP:25.90  size:  4857
x264 [info]: consecutive B-frames:  4.7%  3.0%  5.6% 86.6%
x264 [info]: mb I  I16..4: 24.4%  0.0% 75.6%
x264 [info]: mb P  I16..4:  5.2%  0.0% 18.1%  P16..4: 33.5% 20.7% 11.8%  0.0%  0.0%    skip:10.8%
x264 [info]: mb B  I16..4:  3.8%  0.0%  4.4%  B16..8: 28.4% 13.1%  2.1%  direct:14.3%  skip:33.9%  L0:36.1% L1:41.2% BI:22.6%
x264 [info]: coded y,uvDC,uvAC intra: 68.6% 84.2% 53.0% inter: 22.3% 32.8% 4.1%
x264 [info]: i16 v,h,dc,p: 32% 26% 17% 25%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 16% 16%  7%  8%  8%  7%  7%  6%
x264 [info]: i8c dc,h,v,p: 47% 20% 23% 10%
x264 [info]: Weighted P-Frames: Y:7.2% UV:3.7%
x264 [info]: ref P L0: 73.4% 26.6%
x264 [info]: ref B L0: 89.4% 10.6%
x264 [info]: ref B L1: 96.9%  3.1%
x264 [info]: kb/s:1495.59
[20:03:34] mux: track 0, 215628 frames, 1681200409 bytes, 1495.48 kbps, fifo 4096
[20:03:34] mux: track 1, 421511 frames, 180015336 bytes, 160.13 kbps, fifo 8192
[20:03:34] libhb: work result = 0

# Encode Completed ...


# Encode Stopped
Last edited by Anonymous on Wed Apr 04, 2018 12:47 pm, edited 1 time in total.
Reason: Logs in [code][/code] blocks please
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: audio/video out of sync

Post by rollin_eng »

Try ripping with makemkv first instead of dvdfab.
basic_user
Posts: 7
Joined: Thu Mar 29, 2018 3:26 am

Re: audio/video out of sync

Post by basic_user »

That did the trick, thank you.

MakeMKV to rip it to mkv format then HandBrake to convert to mv4 and all worked great.
Post Reply