SVN 3309 - 3339 Audio out of sync

Archive of historical bug reports.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
JVHB
Posts: 30
Joined: Thu Jan 08, 2009 6:03 pm

SVN 3309 - 3339 Audio out of sync

Post by JVHB »

Hi

I have been testing out the new subtitle feature in the nightly builds (which works great by the way). However, I have noticed that the audio is out of sync when comparing the exact same encode with 0.94. I noticed it first with 3309 and it is still present in the latest nightly build 3339. I always test my final encodes for audio synchronicity with quicktime and there is a definite difference between encodes with the nightly builds compared to 0.94.

SVN 3339 ACTIVITY LOG

Code: Select all

HandBrake Activity Log for /Users/James/No Backup/Movies (HQ)/GT.m4v: 2010-05-31 09:44:18 +0100
Handbrake Version: svn3339 x86_64 (2010053101)

[09:44:18] macgui: Rip: Pending queue count is 0
[09:44:18] macgui: scanning specifically for title: 1
[09:44:18] hb_scan: path=/Volumes/HITACHI/Blu-ray/Subtitles/Gran Torino/title00 (1).mkv, title_index=1
[09:44:18] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[09:44:18] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska, from '/Volumes/HITACHI/Blu-ray/Subtitles/Gran Torino/title00 (1).mkv':
  Duration: 01:56:40.64, start: 0.000000, bitrate: 1280 kb/s
    Chapter #0.0: start 0.000000, end 234.525956
    Metadata:
      title           : Chapter 00
    Chapter #0.1: start 234.525956, end 525.358156
    Metadata:
      title           : Chapter 01
    Chapter #0.2: start 525.358156, end 794.126667
    Metadata:
      title           : Chapter 02
    Chapter #0.3: start 794.126667, end 1088.378956
    Metadata:
      title           : Chapter 03
    Chapter #0.4: start 1088.378956, end 1257.005733
    Metadata:
      title           : Chapter 04
    Chapter #0.5: start 1257.005733, end 1460.750956
    Metadata:
      title           : Chapter 05
    Chapter #0.6: start 1460.750956, end 1729.060667
    Metadata:
      title           : Chapter 06
    Chapter #0.7: start 1729.060667, end 1901.649733
    Metadata:
      title           : Chapter 07
    Chapter #0.8: start 1901.649733, end 2178.050867
    Metadata:
      title           : Chapter 08
    Chapter #0.9: start 2178.050867, end 2413.744667
    Metadata:
      title           : Chapter 09
    Chapter #0.10: start 2413.744667, end 2626.290333
    Metadata:
      title           : Chapter 10
    Chapter #0.11: start 2626.290333, end 2924.379778
    Metadata:
      title           : Chapter 11
    Chapter #0.12: start 2924.379778, end 3235.899333
    Metadata:
      title           : Chapter 12
    Chapter #0.13: start 3235.899333, end 3424.421000
    Metadata:
      title           : Chapter 13
    Chapter #0.14: start 3424.421000, end 3665.662000
    Metadata:
      title           : Chapter 14
    Chapter #0.15: start 3665.662000, end 3861.691156
    Metadata:
      title           : Chapter 15
    Chapter #0.16: start 3861.691156, end 4243.113867
    Metadata:
      title           : Chapter 16
    Chapter #0.17: start 4243.113867, end 4588.125200
    Metadata:
      title           : Chapter 17
    Chapter #0.18: start 4588.125200, end 4804.758289
    Metadata:
      title           : Chapter 18
    Chapter #0.19: start 4804.758289, end 4975.136822
    Metadata:
      title           : Chapter 19
    Chapter #0.20: start 4975.136822, end 5174.210689
    Metadata:
      title           : Chapter 20
    Chapter #0.21: start 5174.210689, end 5355.475111
    Metadata:
      title           : Chapter 21
    Chapter #0.22: start 5355.475111, end 5610.062778
    Metadata:
      title           : Chapter 22
    Chapter #0.23: start 5610.062778, end 5791.786000
    Metadata:
      title           : Chapter 23
    Chapter #0.24: start 5791.786000, end 5921.582333
    Metadata:
      title           : Chapter 24
    Chapter #0.25: start 5921.582333, end 6225.427533
    Metadata:
      title           : Chapter 25
    Chapter #0.26: start 6225.427533, end 6369.112733
    Metadata:
      title           : Chapter 26
    Chapter #0.27: start 6369.112733, end 6664.407733
    Metadata:
      title           : Chapter 27
    Chapter #0.28: start 6664.407733, end 7000.640000
    Metadata:
      title           : Chapter 28
    Stream #0.0(eng): Video: vc1, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 24.39 fps, 23.98 tbr, 1k tbn, 23.98 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
    Metadata:
      title           : 3/2+1
    Stream #0.2(eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
    Metadata:
      title           : 3/2+1
    Stream #0.3(eng): Subtitle: dvdsub
    Stream #0.4(eng): Subtitle: pgssub
    Stream #0.5(eng): Subtitle: pgssub
[09:44:19] add_ffmpeg_subtitle: unknown subtitle stream type: 0x17006
[09:44:19] add_ffmpeg_subtitle: unknown subtitle stream type: 0x17006
[09:44:19] scan: decoding previews for title 1
[09:44:19] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[09:44:19] scan: audio 0x2: AC-3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[09:44:20] scan: 10 previews, 1920x1080, 24.390 fps, autocrop = 140/140/0/0, aspect 16:9, PAR 1:1
[09:44:20] scan: title (0) job->width:1920, job->height:800
[09:44:20] libhb: scan thread found 1 valid title(s)
[09:44:20] macgui: ScanDone state received from fQueueEncodeLibhb
[09:44:20] macgui: Preset: BLU
[09:44:20] macgui: processNewQueueEncode number of passes expected is: 1
[09:44:20] macgui: Start / Stop set to chapters
[09:44:20] macgui: prepareJob audiotrack 2 is: 0
[09:44:20] macgui: prepareJob exiting
[09:44:20] 1 job(s) to process
[09:44:20] starting job
[09:44:20] sync: expecting 6579 video frames
[09:44:20] job configuration:
[09:44:20]  * source
[09:44:20]    + /Volumes/HITACHI/Blu-ray/Subtitles/Gran Torino/title00 (1).mkv
[09:44:20]    + title 1, chapter(s) 3 to 3
[09:44:20]    + container: matroska
[09:44:20]    + data rate: 1280 kbps
[09:44:20]  * destination
[09:44:20]    + /Users/James/No Backup/Movies (HQ)/GT.m4v
[09:44:20]    + container: MPEG-4 (.mp4 and .m4v)
[09:44:20]      + 64-bit formatting
[09:44:20]  * video track
[09:44:20]    + decoder: vc1
[09:44:20]    + frame rate: same as source (around 24.390 fps)
[09:44:20]    + dimensions: 1920 * 1080 -> 1280 * 528, crop 140/140/0/0
[09:44:20]    + encoder: x264
[09:44:20]      + options: me=umh:b-adapt=2:weightp=0:direct=auto:analyse=all:no-fast-pskip=1:weightp=0
[09:44:20]      + quality: 23.00 (RF)
[09:44:20]  * subtitle track 0, English (id 3) Picture [VOBSUB] -> Render/Burn in 
[09:44:20]  * audio track 0
[09:44:20]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[09:44:20]      + bitrate: 640 kbps, samplerate: 48000 Hz
[09:44:20]    + AC3 passthrough
[09:44:20]  * audio track 1
[09:44:20]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[09:44:20]      + bitrate: 640 kbps, samplerate: 48000 Hz
[09:44:20]    + mixdown: Stereo
[09:44:20]    + encoder: ca_aac
[09:44:20]      + bitrate: 320 kbps, samplerate: 48000 Hz
[09:44:20] encx264: min-keyint: 24, keyint: 244
[09:44:20] encx264: Encoding at constant RF 23.000000
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile High, level 3.1
No accelerated IMDCT transform found
No accelerated IMDCT transform found
[09:44:20] reader: first SCR 47282220 id 0 DTS 47282220
[09:54:55] reader: end of chapter 3 (media 3) reached at media chapter 4
[09:54:55] reader: done. 1 scr changes
[09:55:03] work: average encoding speed for job is 10.106136 fps
[09:55:03] sync: got 6446 frames, 6579 expected
[09:55:03] vc1-decoder done: 6446 frames, 0 decoder errors, 0 drops
[09:55:03] render: lost time: 0 (0 frames)
[09:55:03] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:56    Avg QP:20.55  size: 54482  PSNR Mean Y:44.45 U:49.14 V:49.82 Avg:45.57 Global:45.24
x264 [info]: frame P:2227  Avg QP:23.61  size: 11676  PSNR Mean Y:42.25 U:48.04 V:48.80 Avg:43.50 Global:43.22
x264 [info]: frame B:4163  Avg QP:26.85  size:  2458  PSNR Mean Y:41.87 U:48.05 V:48.77 Avg:43.16 Global:42.86
x264 [info]: consecutive B-frames:  1.6% 15.8% 56.7% 25.9%
x264 [info]: mb I  I16..4: 11.1% 67.1% 21.8%
x264 [info]: mb P  I16..4:  1.0%  3.8%  0.8%  P16..4: 55.9% 11.5%  3.4%  0.3%  0.3%    skip:22.9%
x264 [info]: mb B  I16..4:  0.1%  0.2%  0.0%  B16..8: 37.7%  3.0%  0.6%  direct: 0.8%  skip:57.6%  L0:38.1% L1:57.9% BI: 4.1%
x264 [info]: 8x8 transform intra:67.6% inter:76.3%
x264 [info]: direct mvs  spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 67.6% 57.7% 20.8% inter: 12.8% 7.3% 0.1%
x264 [info]: i16 v,h,dc,p: 36% 22%  4% 38%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 15% 15%  6%  9% 10%  9%  8%  8%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 18% 12%  6%  9%  9%  9%  6%  6%
x264 [info]: i8c dc,h,v,p: 56% 17% 22%  4%
x264 [info]: ref P L0: 76.0% 14.0% 10.1%
x264 [info]: ref B L0: 87.4% 12.6%
x264 [info]: SSIM Mean Y:0.9754575
x264 [info]: PSNR Mean Y:42.021 U:48.053 V:48.791 Avg:43.297 Global:42.996 kb/s:1169.07
[09:55:03] mux: track 0, 6446 frames, 39285832 bytes, 1168.88 kbps, fifo 16
[09:55:03] mux: track 1, 8397 frames, 21496320 bytes, 639.59 kbps, fifo 256
[09:55:03] mux: track 2, 12596 frames, 11016738 bytes, 327.78 kbps, fifo 256
[09:55:03] libhb: work result = 0




0.94 ACTIVITY LOG

HandBrake Activity Log for /Users/James/No Backup/Movies (HQ)/GT 0.94.m4v: 2010-05-31 10:00:45 +0100
Handbrake Version: 0.9.4 x86_64 (2009112300)

[10:00:45] macgui: Rip: Pending queue count is 0
[10:00:45] macgui: scanning specifically for title: 1
[10:00:45] macgui: performNewQueueScan currentQueueEncodeIndex is: 0
[10:00:45] hb_scan: path=/Volumes/HITACHI/Blu-ray/Subtitles/Gran Torino/title00 (1).mkv, title_index=1
[10:00:45] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[10:00:45] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska, from '/Volumes/HITACHI/Blu-ray/Subtitles/Gran Torino/title00 (1).mkv':
  Duration: 01:56:40.64, start: 0.000000, bitrate: N/A
    Stream #0.0(eng): Video: vc1, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 tbr, 1k tbn, 23.98 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16
    Stream #0.2(eng): Audio: ac3, 48000 Hz, 5.1, s16
    Stream #0.3(eng): Subtitle: dvdsub
    Stream #0.4(eng): Subtitle: 0x0000
    Stream #0.5(eng): Subtitle: 0x0000
[10:00:46] scan: decoding previews for title 1
[10:00:46] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[10:00:46] scan: audio 0x2: AC-3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[10:00:47] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 140/140/0/0, aspect 16:9, PAR 1:1
[10:00:47] scan: title (0) job->width:1920, job->height:800
[10:00:47] libhb: scan thread found 1 valid title(s)
[10:00:47] macgui: ScanDone state received from fQueueEncodeLibhb
[10:00:47] macgui: Preset: BLU
[10:00:47] macgui: processNewQueueEncode number of passes expected is: 1
[10:00:47] macgui: prepareJob audiotrack 2 is: 0
[10:00:47] macgui: prepareJob exiting
[10:00:47] 1 job(s) to process
[10:00:47] starting job
[10:00:47] job configuration:
[10:00:47]  * source
[10:00:47]    + /Volumes/HITACHI/Blu-ray/Subtitles/Gran Torino/title00 (1).mkv
[10:00:47]    + title 1, chapter(s) 3 to 3
[10:00:47]    + container: matroska
[10:00:47]  * destination
[10:00:47]    + /Users/James/No Backup/Movies (HQ)/GT 0.94.m4v
[10:00:47]    + container: MPEG-4 (.mp4 and .m4v)
[10:00:47]      + 64-bit formatting
[10:00:47]  * video track
[10:00:47]    + decoder: vc1
[10:00:47]    + frame rate: same as source (around 23.976 fps)
[10:00:47]    + dimensions: 1920 * 1080 -> 1264 * 528, crop 140/140/0/0
[10:00:47]    + encoder: x264
[10:00:47]      + options: me=umh:b-adapt=2:weightp=0:direct=auto:analyse=all:no-fast-pskip=1:weightp=0
[10:00:47]      + quality: 23.00 (RF)
[10:00:47]  * audio track 0
[10:00:47]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[10:00:47]      + bitrate: 640 kbps, samplerate: 48000 Hz
[10:00:47]    + AC3 passthrough
[10:00:47]  * audio track 1
[10:00:47]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[10:00:47]      + bitrate: 640 kbps, samplerate: 48000 Hz
[10:00:47]    + mixdown: Stereo
[10:00:47]    + encoder: ca_aac
[10:00:47]      + bitrate: 320 kbps, samplerate: 48000 Hz
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdnav:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[10:00:47] dvd: not a dvd - trying as a stream/file instead
[10:00:47] encx264: keyint-min: 24, keyint-max: 240
[10:00:47] encx264: Encoding at constant RF 23.000000
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.1 Cache64
x264 [info]: profile High, level 3.1
No accelerated IMDCT transform found
No accelerated IMDCT transform found
[10:00:47] sync: expecting 6467 video frames
[10:00:47] reader: first SCR 47282220 id 0 DTS 47282220
[10:00:47] sync: adding 114 ms of silence to audio 0  start 10260, next 0
[10:00:47] sync: adding 114 ms of silence to audio 1  start 10260, next 0
[10:11:07] reader: end of chapter 3 (media 3) reached at media chapter 4
[10:11:07] reader: done. 1 scr changes
[10:11:33] sync: got 6445 frames, 6467 expected
[10:11:33] work: average encoding speed for job is 9.985549 fps
[10:11:38] mux: track 0, 6445 frames, 39176593 bytes, 1165.93 kbps, fifo 64
[10:11:38] mux: track 1, 8401 frames, 21506560 bytes, 640.05 kbps, fifo 512
[10:11:38] mux: track 2, 12601 frames, 11017890 bytes, 327.90 kbps, fifo 1024
[10:11:38] vc1-decoder done: 6446 frames, 0 decoder errors, 0 drops
[10:11:38] render: lost time: 0 (0 frames)
[10:11:38] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:58    Avg QP:20.15  size: 56693  PSNR Mean Y:44.66 U:49.23 V:49.91 Avg:45.76 Global:45.40
x264 [info]: frame P:2224  Avg QP:23.59  size: 11503  PSNR Mean Y:42.34 U:48.11 V:48.86 Avg:43.59 Global:43.30
x264 [info]: frame B:4163  Avg QP:26.67  size:  2476  PSNR Mean Y:41.99 U:48.13 V:48.84 Avg:43.27 Global:42.96
x264 [info]: consecutive B-frames:  1.9% 15.4% 54.8% 27.9%
x264 [info]: mb I  I16..4: 10.9% 66.6% 22.5%
x264 [info]: mb P  I16..4:  0.9%  3.6%  0.7%  P16..4: 48.8%  9.6% 12.9%  0.3%  0.3%    skip:22.8%
x264 [info]: mb B  I16..4:  0.1%  0.2%  0.0%  B16..8: 39.5%  0.8%  1.0%  direct: 1.0%  skip:57.4%  L0:38.1% L1:58.2% BI: 3.7%
x264 [info]: 8x8 transform intra:68.2% inter:75.7%
x264 [info]: direct mvs  spatial:99.9% temporal:0.1%
x264 [info]: coded y,uvDC,uvAC intra: 68.7% 58.4% 22.2% inter: 12.9% 7.2% 0.1%
x264 [info]: i16 v,h,dc,p: 38% 21%  4% 37%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 15% 15%  6%  9% 10%  9%  8%  8%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 17% 12%  6% 10% 10%  9%  7%  6%
x264 [info]: ref P L0: 78.2% 12.7%  9.1%
x264 [info]: ref B L0: 87.5% 12.5%
x264 [info]: SSIM Mean Y:0.9754318
x264 [info]: PSNR Mean Y:42.133 U:48.136 V:48.854 Avg:43.404 Global:43.087 kb/s:1165.99
[10:11:38] libhb: work result = 0
User avatar
JohnAStebbins
HandBrake Team
Posts: 5724
Joined: Sat Feb 09, 2008 7:21 pm

Re: SVN 3309 - 3339 Audio out of sync

Post by JohnAStebbins »

Can you supply a clip of the first 30 seconds of a source that causes this problem?
JVHB
Posts: 30
Joined: Thu Jan 08, 2009 6:03 pm

Re: SVN 3309 - 3339 Audio out of sync

Post by JVHB »

Hi

After further testing I have found that this problem disappears when encoding the film from the very beginning. I was encoding a specific chapter of a movie to test the new subtitle feature. For some reason it still happens when encoding that specific chapter though. Sorry to have wasted your time.

Thanks
Post Reply