[Fixed] 1.0.2 for Mac - Bad A/V 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
paleGreen1
Posts: 2
Joined: Wed Jan 25, 2017 5:20 pm

[Fixed] 1.0.2 for Mac - Bad A/V Sync

Post by paleGreen1 »

Please describe the problem in as much detail as possible:
I use Handbrake on the Mac to re-encode MP4s created by Telestream Wirecast Pro for Mac. Before re-encoding, I trim the Wirecast recordings (cut out the extra at the beginning and ending) using Quicktime Player (version 10.4). When I re-encode these trimmed files using version 0.10.5 x86_64, there is no problem. When using version 1.0.2, the audio is about one second (very rough guess) ahead of the video.

What are the steps to reproduce this problem:
1. Record a 2 mbps 720p30 H.264 MP4 using Wirecast Pro 7.3 for Mac (free trial should work too).
2. Cut out some of the video at the beginning and end using Quicktime Player) (command-Y, delete segments from start and end, save as)
3. Re-encode the trimmed video using Handbrake 1.0.2 for Mac enabling the following options:
a. Web optimized
b. Framerate: 30
c. Constant Framerate
d. Constant Quality RF: 20
e: Cropping: Custom 0 0 0 0
4. Play the re-encoded video and notice the audio and video are not in sync.

What version of HandBrake you are running:
1.0.2 for Mac

What operating system and version and you running (e.g. OSX 10.11, Windows 7, Ubuntu 14):
OSX 10.10.5

If there was any exception or error displayed, please copy it and paste it here:
none displayed

Please include the scan or encode log:

Code: Select all

HandBrake Activity Log for Session: 2017-01-25 11:29:30 -0500
Handbrake Version: 1.0.2 (2017012200)
webcast_367_wirecast_rec_trimmed_HB.mp4
Preset: My MP4 720p30 CFR30 RF20
[11:29:30] macgui: QueueCore scanning specifically for title: 1
[11:29:30] CPU: Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
[11:29:30]  - Intel microarchitecture Haswell
[11:29:30]  - logical processor count: 8
[11:29:30] hb_scan: path=/Users/Prod/Documents/Projects/Webcast Week - Jan 2017/webcast_367_wirecast_rec_trimmed.mp4, title_index=1
udfread ERROR: ECMA 167 Volume Recognition failed
disc.c:274: failed opening UDF image /Users/Prod/Documents/Projects/Webcast Week - Jan 2017/webcast_367_wirecast_rec_trimmed.mp4
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[11:29:30] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
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
[11:29:30] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/Prod/Documents/Projects/Webcast Week - Jan 2017/webcast_367_wirecast_rec_trimmed.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp41mp42isom
    creation_time   : 2017-01-25 16:28:22
  Duration: 00:59:39.30, start: 0.422000, bitrate: 2770 kb/s
    Stream #0:0(und): Video: h264 (Main) [avc1 / 0x31637661]
      yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 2511 kb/s
      30 fps, 3k tbn (default)
    Metadata:
      creation_time   : 2017-01-25 16:28:22
      handler_name    : Core Media Video
      encoder         : AVC
    Stream #0:1(und): Audio: aac (LC) [mp4a / 0x6134706D]
      44100 Hz, stereo, fltp, 255 kb/s (default)
    Metadata:
      creation_time   : 2017-01-25 16:28:22
      handler_name    : Core Media Audio
[11:29:30] scan: decoding previews for title 1
[11:29:30] scan: audio 0x1: aac, rate=44100Hz, bitrate=255999 Unknown (AAC) (2.0 ch)
[11:29:30] scan: 10 previews, 1280x720, 30.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[11:29:30] libhb: scan thread found 1 valid title(s)
[11:29:30] macgui: QueueCore scan done
[11:29:30] macgui: QueueCore started encoding webcast_367_wirecast_rec_trimmed_HB.mp4
[11:29:30] macgui: QueueCore with preset My MP4 720p30 CFR30 RF20
[11:29:30] 1 job(s) to process
[11:29:30] starting job
[11:29:30] work: only 1 chapter, disabling chapter markers
[11:29:30] job configuration:
[11:29:30]  * source
[11:29:30]    + /Users/Prod/Documents/Projects/Webcast Week - Jan 2017/webcast_367_wirecast_rec_trimmed.mp4
[11:29:30]    + title 1, chapter(s) 1 to 1
[11:29:30]    + container: mov,mp4,m4a,3gp,3g2,mj2
[11:29:30]    + data rate: 2770 kbps
[11:29:30]  * destination
[11:29:30]    + /Users/Prod/Documents/Projects/Webcast Week - Jan 2017/webcast_367_wirecast_rec_trimmed_HB.mp4
[11:29:30]    + container: MPEG-4 (libavformat)
[11:29:30]      + optimized for HTTP streaming (fast start)
[11:29:30]  * video track
[11:29:30]    + decoder: h264
[11:29:30]      + bitrate 2511 kbps
[11:29:30]    + filters
[11:29:30]      + Framerate Shaper (mode=1:rate=27000000/900000)
[11:29:30]        + frame rate: 30.000 fps -> constant 30.000 fps
[11:29:30]      + Crop and Scale (width=1280:height=720:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[11:29:30]        + source: 1280 * 720, crop (0/0/0/0): 1280 * 720, scale: 1280 * 720
[11:29:30]    + Output geometry
[11:29:30]      + storage dimensions: 1280 x 720
[11:29:30]      + pixel aspect ratio: 1 : 1
[11:29:30]      + display dimensions: 1280 x 720
[11:29:30]    + encoder: H.264 (libx264)
[11:29:30]      + preset:  veryfast
[11:29:30]      + profile: main
[11:29:30]      + level:   4.0
[11:29:30]      + quality: 20.00 (RF)
[11:29:30]  * audio track 1
[11:29:30]    + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[11:29:30]      + bitrate: 255 kbps, samplerate: 44100 Hz
[11:29:30]    + mixdown: Stereo
[11:29:30]    + encoder: AAC (Apple AudioToolbox)
[11:29:30]      + bitrate: 160 kbps, samplerate: 44100 Hz
[11:29:31] sync: expecting 107379 video frames
[11:29:31] encx264: min-keyint: 30, keyint: 300
[11:29:31] encx264: encoding at constant RF 20.000000
[11:29:31] encx264: unparsed options: ref=1:level=4.0:8x8dct=0:vbv-bufsize=25000:weightp=1:subme=2:mixed-refs=0:trellis=0:rc-lookahead=10:vbv-maxrate=20000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile Main, level 4.0
[11:29:31] sync: first pts video is 0
[11:29:31] sync: "Chapter 1" (1) at frame 1 time 0
[11:29:31] sync: first pts audio 0x1 is 34211
[11:37:00] reader: done. 1 scr changes
[11:37:01] work: average encoding speed for job is 238.718094 fps
[11:37:01] vfr: 107378 frames output, 0 dropped and 0 duped for CFR/PFR
[11:37:01] vfr: lost time: 0 (0 frames)
[11:37:01] vfr: gained time: 0 (0 frames) (0 not accounted for)
[11:37:01] aac-decoder done: 154131 frames, 0 decoder errors
[11:37:01] h264-decoder done: 107378 frames, 0 decoder errors
[11:37:01] sync: got 107378 frames, 107379 expected
[11:37:01] sync: framerate min 30.000 fps, max 30.000 fps, avg 30.000 fps
x264 [info]: frame I:471   Avg QP:14.34  size: 54588
x264 [info]: frame P:30262 Avg QP:18.31  size:  8189
x264 [info]: frame B:76645 Avg QP:20.85  size:  2572
x264 [info]: consecutive B-frames:  1.1% 10.3%  2.3% 86.3%
x264 [info]: mb I  I16..4: 56.2%  0.0% 43.8%
x264 [info]: mb P  I16..4: 15.2%  0.0%  0.6%  P16..4: 24.3%  8.4%  4.0%  0.0%  0.0%    skip:47.5%
x264 [info]: mb B  I16..4:  3.1%  0.0%  0.0%  B16..8: 11.9%  2.5%  0.1%  direct: 9.4%  skip:73.0%  L0:47.8% L1:45.3% BI: 7.0%
x264 [info]: coded y,uvDC,uvAC intra: 10.5% 52.3% 17.2% inter: 3.9% 14.7% 0.2%
x264 [info]: i16 v,h,dc,p: 46% 31% 18%  5%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 23% 21%  4%  5%  5%  4%  4%  4%
x264 [info]: i8c dc,h,v,p: 58% 19% 21%  2%
x264 [info]: Weighted P-Frames: Y:1.6% UV:0.8%
x264 [info]: kb/s:1051.92
[11:37:02] mux: track 0, 107378 frames, 470622015 bytes, 1051.87 kbps, fifo 8192
[11:37:02] mux: track 1, 154132 frames, 59793200 bytes, 133.64 kbps, fifo 8192
[11:37:02] libhb: work result = 0
 
User avatar
Ritsuka
HandBrake Team
Posts: 1656
Joined: Fri Jan 12, 2007 11:29 am

Re: 1.0.2 for Mac - Bad A/V Sync

Post by Ritsuka »

User avatar
Ritsuka
HandBrake Team
Posts: 1656
Joined: Fri Jan 12, 2007 11:29 am

Re: 1.0.2 for Mac - Bad A/V Sync

Post by Ritsuka »

Try the next nightly build tomorrow, should be fixed.
paleGreen1
Posts: 2
Joined: Wed Jan 25, 2017 5:20 pm

Re: [Fixed] 1.0.2 for Mac - Bad A/V Sync

Post by paleGreen1 »

Well that was fast! :D

Thank you so much!
Post Reply