audio sync on dvd/mkv to m4v

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
scootermini
Posts: 3
Joined: Wed Jan 29, 2020 11:51 pm

audio sync on dvd/mkv to m4v

Post by scootermini »

Description of problem or question:
I'm trying to transcode an MKV file I made using MakeMKV from a DVD to an mp4 file using H.264. I've consistently had audio sync issues and everything I've tried has been unsuccessful in resolving this. I've tried the current 1.3.1, 1.2.1, and the currently nightly build (today/Jan 29 2020). The video is about 1:56, and the first 20min or so there's no noticeable sync issues, but 30-40min in it degrades significantly - 10-50+ seconds.


Steps to reproduce the problem (If Applicable):
I've seen it on all the above versions, I've tried Variable Frame Rate, Constant Frame rate, h.264, h.265, Fast 1080p 30, HQ 1080P Surround. I've tried choosing the 5.1 audio track, as well as the straight stereo track.



HandBrake version (e.g., 1.0.0):
1.2.1, 1.3.1, Jan29 nightly build.



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
MacOS Mojave / 10.14



HandBrake Activity Log ***required*** (see How-to get an activity log)
https://drive.google.com/drive/folders/ ... sp=sharing

Code: Select all

HandBrake Activity Log for Session: 2020-01-29T19:47:58Z
Handbrake Version: 20200123075500-ef16eb2-master (2020012401)
Country Music Disc 1.m4v
Preset: Fast 1080p30 (Modified)
[13:47:58] macgui: QueueCore scanning specifically for title: 1
[13:47:58] CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
[13:47:58]  - Intel microarchitecture Haswell
[13:47:58]  - logical processor count: 8
[13:47:58] hb_scan: path=/Users/scottcaudell/Movies/_Country Music Disc 1_9C9C/title_t05.mkv, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:323: failed opening UDF image /Users/scottcaudell/Movies/_Country Music Disc 1_9C9C/title_t05.mkv
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/Users/scottcaudell/Movies/_Country Music Disc 1_9C9C/title_t05.mkv/) failed
[13:47:58] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[13:47:58] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Users/scottcaudell/Movies/_Country Music Disc 1_9C9C/title_t05.mkv':
  Metadata:
    encoder         : libmakemkv v1.14.7 (1.3.5/1.4.7) darwin(x64-release)
    creation_time   : 2020-01-29T03:05:45.000000Z
  Duration: 01:53:06.25, start: 0.000000, bitrate: 6865 kb/s
    Chapter #0:0: start 0.000000, end 214.964750
    Metadata:
      title           : Chapter 01
    Chapter #0:1: start 214.964750, end 2081.412667
    Metadata:
      title           : Chapter 02
    Chapter #0:2: start 2081.412667, end 2583.380800
    Metadata:
      title           : Chapter 03
    Chapter #0:3: start 2583.380800, end 2819.149667
    Metadata:
      title           : Chapter 04
    Chapter #0:4: start 2819.149667, end 3023.920900
    Metadata:
      title           : Chapter 05
    Chapter #0:5: start 3023.920900, end 3502.932767
    Metadata:
      title           : Chapter 06
    Chapter #0:6: start 3502.932767, end 4015.511500
    Metadata:
      title           : Chapter 07
    Chapter #0:7: start 4015.511500, end 4554.850300
    Metadata:
      title           : Chapter 08
    Chapter #0:8: start 4554.850300, end 5188.249733
    Metadata:
      title           : Chapter 09
    Chapter #0:9: start 5188.249733, end 5779.240133
    Metadata:
      title           : Chapter 10
    Chapter #0:10: start 5779.240133, end 6523.049867
    Metadata:
      title           : Chapter 11
    Chapter #0:11: start 6523.049867, end 6786.246133
    Metadata:
      title           : Chapter 12
    Stream #0:0(eng): Video: mpeg2video (Main), yuv420p(tv, top first), 720x480 [SAR 32:27 DAR 16:9], SAR 186:157 DAR 279:157, 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc
    Metadata:
      BPS-eng         : 6033772
      DURATION-eng    : 01:53:06.246133333
      NUMBER_OF_FRAMES-eng: 199161
      NUMBER_OF_BYTES-eng: 5118333176
      SOURCE_ID-eng   : 0100E0
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.7 darwin(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-01-29 03:05:45
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:1(eng): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s (default)
    Metadata:
      title           : Surround 5.1
      BPS-eng         : 376022
      DURATION-eng    : 01:53:06.166066666
      NUMBER_OF_FRAMES-eng: 207662
      NUMBER_OF_BYTES-eng: 318968832
      SOURCE_ID-eng   : 0180BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.7 darwin(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-01-29 03:05:45
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:2(eng): Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 219346
      DURATION-eng    : 01:53:06.166066666
      NUMBER_OF_FRAMES-eng: 207662
      NUMBER_OF_BYTES-eng: 186065152
      SOURCE_ID-eng   : 0181BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.7 darwin(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-01-29 03:05:45
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, fltp, 224 kb/s
    Metadata:
      title           : Stereo
      BPS-eng         : 219346
      DURATION-eng    : 01:53:06.166066666
      NUMBER_OF_FRAMES-eng: 207662
      NUMBER_OF_BYTES-eng: 186065152
      SOURCE_ID-eng   : 0183BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.7 darwin(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-01-29 03:05:45
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
    Stream #0:4(eng): Subtitle: dvd_subtitle, 720x480 (default)
    Metadata:
      BPS-eng         : 9455
      DURATION-eng    : 01:53:03.365466666
      NUMBER_OF_FRAMES-eng: 2094
      NUMBER_OF_BYTES-eng: 8017548
      SOURCE_ID-eng   : 0120BD
      _STATISTICS_WRITING_APP-eng: MakeMKV v1.14.7 darwin(x64-release)
      _STATISTICS_WRITING_DATE_UTC-eng: 2020-01-29 03:05:45
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES SOURCE_ID
[13:47:58] scan: decoding previews for title 1
[13:47:58] scan: audio 0x1: ac3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch) (384 kbps)
[13:47:58] scan: audio 0x2: ac3, rate=48000Hz, bitrate=224000 English (AC3) (2.0 ch) (224 kbps)
[13:47:58] scan: audio 0x3: ac3, rate=48000Hz, bitrate=224000 English (AC3) (2.0 ch) (224 kbps)
[13:47:58] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 32:27
[13:47:58] libhb: scan thread found 1 valid title(s)
[13:47:58] macgui: QueueCore scan done
[13:47:58] macgui: QueueCore started encoding Country Music Disc 1.m4v
[13:47:58] macgui: QueueCore with preset Fast 1080p30 (Modified)
[13:47:58] Starting work at: Wed Jan 29 13:47:58 2020

[13:47:58] 1 job(s) to process
[13:47:58] Starting Task: Subtitle Scan
[13:47:58] Skipping crop/scale filter
[13:47:58] job configuration:
[13:47:58]  * source
[13:47:58]    + /Users/scottcaudell/Movies/_Country Music Disc 1_9C9C/title_t05.mkv
[13:47:58]    + title 1, chapter(s) 1 to 12
[13:47:58]    + container: matroska,webm
[13:47:58]    + data rate: 6865 kbps
[13:47:58]  * destination
[13:47:58]    + /Users/scottcaudell/Library/Containers/fr.handbrake.HandBrake/Data/Movies/Country Music Disc 1.m4v
[13:47:58]    + container: MPEG-4 (libavformat)
[13:47:58]      + align initial A/V stream timestamps
[13:47:58]      + chapter markers
[13:47:58]  * video track
[13:47:58]    + decoder: mpeg2video
[13:47:58]    + filters
[13:47:58]      + 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)
[13:47:58]      + Decomb (mode=39)
[13:47:58]      + Framerate Shaper (mode=1:rate=27000000/900000)
[13:47:58]        + frame rate: 29.970 fps -> constant 30.000 fps
[13:47:58]    + Output geometry
[13:47:58]      + storage dimensions: 720 x 480
[13:47:58]      + pixel aspect ratio: 32 : 27
[13:47:58]      + display dimensions: 853 x 480
[13:47:58]  * Foreign Audio Search: Render/Burn-in, Forced Only
[13:47:58]    + subtitle, English [VOBSUB] (track 0, id 0x4, Picture)
[13:47:58] sync: expecting 203383 video frames
[13:48:04] reader: done. 1 scr changes
[13:48:04] work: average encoding speed for job is 0.000000 fps
[13:48:04] comb detect: heavy 0 | light 0 | uncombed 0 | total 0
[13:48:04] decomb: deinterlaced 0 | blended 0 | unfiltered 0 | total 0
[13:48:04] vfr: 0 frames output, 0 dropped and 0 duped for CFR/PFR
[13:48:04] vfr: lost time: 0 (0 frames)
[13:48:04] vfr: gained time: 0 (0 frames) (0 not accounted for)
[13:48:04] mpeg2video-decoder done: 0 frames, 0 decoder errors
[13:48:04] sync: got 0 frames, 203383 expected
[13:48:04] Subtitle track 0 (id 0x4) 'English [VOBSUB]': 2094 hits (0 forced)
[13:48:04] No candidate detected during subtitle scan
[13:48:04] Starting Task: Encoding Pass
[13:48:04] Skipping crop/scale filter
[13:48:04] job configuration:
[13:48:04]  * source
[13:48:04]    + /Users/scottcaudell/Movies/_Country Music Disc 1_9C9C/title_t05.mkv
[13:48:04]    + title 1, chapter(s) 1 to 12
[13:48:04]    + container: matroska,webm
[13:48:04]    + data rate: 6865 kbps
[13:48:04]  * destination
[13:48:04]    + /Users/scottcaudell/Library/Containers/fr.handbrake.HandBrake/Data/Movies/Country Music Disc 1.m4v
[13:48:04]    + container: MPEG-4 (libavformat)
[13:48:04]      + align initial A/V stream timestamps
[13:48:04]      + chapter markers
[13:48:04]  * video track
[13:48:04]    + decoder: mpeg2video
[13:48:04]    + filters
[13:48:04]      + 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)
[13:48:04]      + Decomb (mode=39)
[13:48:04]      + Framerate Shaper (mode=1:rate=27000000/900000)
[13:48:04]        + frame rate: 29.970 fps -> constant 30.000 fps
[13:48:04]    + Output geometry
[13:48:04]      + storage dimensions: 720 x 480
[13:48:04]      + pixel aspect ratio: 32 : 27
[13:48:04]      + display dimensions: 853 x 480
[13:48:04]    + encoder: H.264 (libx264)
[13:48:04]      + preset:  fast
[13:48:04]      + profile: main
[13:48:04]      + level:   4.0
[13:48:04]      + quality: 22.00 (RF)
[13:48:04]      + color profile: 6-1-6
[13:48:04]  * audio track 1
[13:48:04]    + decoder: English (AC3) (2.0 ch) (224 kbps) (track 2, id 0x2)
[13:48:04]      + bitrate: 224 kbps, samplerate: 48000 Hz
[13:48:04]    + mixdown: Stereo
[13:48:04]    + dither: triangular
[13:48:04]    + encoder: AAC (Apple AudioToolbox)
[13:48:04]      + bitrate: 160 kbps, samplerate: 48000 Hz
[13:48:04] sync: expecting 203383 video frames
[13:48:04] encx264: min-keyint: 30, keyint: 300
[13:48:04] encx264: encoding at constant RF 22.000000
[13:48:04] encx264: unparsed options: level=4.0:ref=2:8x8dct=0:weightp=1:subme=6:vbv-bufsize=25000:vbv-maxrate=20000:rc-lookahead=30
x264 [info]: using SAR=32/27
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
x264 [info]: profile Main, level 4.0, 4:2:0, 8-bit
[13:48:04] sync: first pts video is 0
[13:48:04] sync: "Introduction" (1) at frame 1 time 0
[13:48:04] sync: first pts audio 0x2 is 0
[ac3 @ 0x7fd41e80d400] invalid coupling range (14 >= 8)
[ac3 @ 0x7fd41e80d400] error decoding the audio block
[13:48:31] sync: "Musical Melting Pot" (2) at frame 6438 time 19346850
[13:52:49] sync: "Tuning In" (3) at frame 58158 time 187327137
[13:53:56] sync: "Fox Chase" (4) at frame 73202 time 232504269
[13:54:28] sync: "Grand Ole Opry" (5) at frame 80268 time 253723467
[13:54:54] sync: "The Road to Bristol" (6) at frame 86405 time 272152878
[13:56:02] sync: "Keep on the Sunny Side" (7) at frame 100761 time 315263946
[13:57:09] sync: "The Singing Brakeman" (8) at frame 116123 time 361396032
[13:58:16] sync: "The Blue Yodeler" (9) at frame 132289 time 409942530
[13:59:30] sync: "Wildwood Flower" (10) at frame 151270 time 466942473
[14:00:46] sync: "TB Blues" (11) at frame 168984 time 520137615
[14:02:17] sync: "Credits" (12) at frame 191274 time 587074485
[14:02:44] reader: done. 1 scr changes
[14:02:44] work: average encoding speed for job is 226.204514 fps
[14:02:44] comb detect: heavy 973 | light 4454 | uncombed 193734 | total 199161
[14:02:44] decomb: deinterlaced 973 | blended 4454 | unfiltered 193734 | total 199161
[14:02:44] vfr: 203587 frames output, 0 dropped and 4426 duped for CFR/PFR
[14:02:44] vfr: lost time: 0 (0 frames)
[14:02:44] vfr: gained time: 0 (0 frames) (0 not accounted for)
[14:02:45] ac3-decoder done: 207662 frames, 0 decoder errors
[14:02:45] mpeg2video-decoder done: 199161 frames, 0 decoder errors
[14:02:45] sync: got 199161 frames, 203383 expected
[14:02:45] sync: framerate min 0.007 fps, max 29.970 fps, avg 29.348 fps
x264 [info]: frame I:1106  Avg QP:18.39  size: 52100
x264 [info]: frame P:61620 Avg QP:21.29  size:  5236
x264 [info]: frame B:140861 Avg QP:25.98  size:   819
x264 [info]: consecutive B-frames:  2.5%  7.6% 24.4% 65.5%
x264 [info]: mb I  I16..4: 14.5%  0.0% 85.5%
x264 [info]: mb P  I16..4:  0.4%  0.0%  1.3%  P16..4: 30.4% 12.0%  8.3%  0.0%  0.0%    skip:47.5%
x264 [info]: mb B  I16..4:  0.6%  0.0%  0.2%  B16..8: 12.0%  2.0%  0.1%  direct: 3.8%  skip:81.4%  L0:39.6% L1:48.6% BI:11.8%
x264 [info]: coded y,uvDC,uvAC intra: 77.9% 26.9% 9.1% inter: 8.7% 4.8% 0.1%
x264 [info]: i16 v,h,dc,p: 30% 18% 35% 18%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 14% 16%  8%  9%  9%  7%  8%  7%
x264 [info]: i8c dc,h,v,p: 76% 10% 11%  2%
x264 [info]: Weighted P-Frames: Y:8.0% UV:1.1%
x264 [info]: ref P L0: 72.2% 27.8%
x264 [info]: ref B L0: 82.2% 17.8%
x264 [info]: ref B L1: 94.4%  5.6%
x264 [info]: kb/s:584.19
[14:02:45] mux: track 0, 203587 frames, 495512386 bytes, 584.14 kbps, fifo 16384
[14:02:45] mux: track 1, 311496 frames, 128139595 bytes, 151.06 kbps, fifo 8192
[14:02:45] Finished work at: Wed Jan 29 14:02:45 2020
[14:02:45] libhb: work result = 0
scootermini
Posts: 3
Joined: Wed Jan 29, 2020 11:51 pm

Re: audio sync on dvd/mkv to m4v

Post by scootermini »

Just for clarification - I have confirmed the source file has no apparent audio sync issues.
scootermini
Posts: 3
Joined: Wed Jan 29, 2020 11:51 pm

Re: audio sync on dvd/mkv to m4v

Post by scootermini »

Anyone have any advice here? I feel like i've tried everything possible that I can think of, any ideas on how to proceed would be greatly appreciated!
Post Reply