AppleTV2 Audio Sync Issues

Discuss encoding for devices and presets.
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.
Locked
pylos

AppleTV2 Audio Sync Issues

Post by pylos »

I've been using Handbrake to convert files to a file type that is supported by iTunes so I can stream movies from my PC to my Apple TV2 (The 720p model). For the most part this has worked out great. I recently came across some files that were giving me audio sync issues when I tried to stream them via Airplay to my AppleTV2. However, the part that is confusing me, is the fact that these files, both the original and the new file created by handbrake, playback fine with no sync issues on my PC. I'm only getting audio sync issues when I start to stream them. I've never had issues with streaming in the past, so I know it isn't my connection or anything of that nature. I usually use the AppleTV2 presets, although I usually change the frame rate to same as source, because I've had issues with framerates while streaming. When I noticed the issue I tried tweaking some of the settings, but couldn't find one that fixed this problem.

Code: Select all

HandBrake 0.9.8 2012071700
OS: Microsoft Windows NT 6.1.7601 Service Pack 1
CPU: Intel(R) Core(TM) i7 CPU         960  @ 3.20GHz
Ram: 12278 MB, Screen: 1920x1080
Temp Dir: C:\Users\Josiah\AppData\Local\Temp\
Install Dir: C:\Program Files\Handbrake
Data Dir: C:\Users\Josiah\AppData\Roaming\HandBrake\HandBrake\0.9.8.4861

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

CLI Query:  -i "F:\test.avi" -t 1 -c 1 -o "F:\Convert\Test-1.m4v"  -f mp4 -4  -w 536 --loose-anamorphic  -e x264 -q 20 --vfr  -a 1,1 -E faac,ffac3 -B 160,0 -6 dpl2,auto -R Auto,Auto -D 0,0 --gain=0,0 --audio-copy-mask none --audio-fallback ffac3 --markers="C:\Users\Josiah\AppData\Local\Temp\Test-1-1-chapters.csv" --verbose=1
User Query: False

[19:06:22] hb_init: starting libhb thread
HandBrake 0.9.8 (2012071700) - MinGW x86_64 - http://handbrake.fr
8 CPUs detected
Opening F:\test.avi...
[19:06:22] hb_scan: path=F:\test.avi, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening F:\test.avi/BDMV/index.bdmv
libbluray/bluray.c:1471: nav_get_title_list(F:\test.avi) failed (000000000034E0C0)
[19:06:22] bd: not a bd - trying as a stream/file instead
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
[19:06:22] dvd: not a dvd - trying as a stream/file instead
[mp3 @ 00000000003525C0] Header missing
Input #0, avi, from 'F:\test.avi':
  Duration: 00:43:01.41, start: 0.000000, bitrate: 972 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 536x360 [PAR 1:1 DAR 67:45], 29.97 fps, 29.97 tbr, 29.97 tbn, 30k tbc
    Stream #0.1: Audio: mp3, 44100 Hz, stereo, s16, 192 kb/s
    Metadata:
      title           : Audio Stream
[19:06:22] scan: decoding previews for title 1
[19:06:22] scan: 10 previews, 536x360, 29.970 fps, autocrop = 0/0/4/0, aspect 1.49:1, PAR 1:1
[19:06:22] scan: title (0) job->width:528, job->height:352
[19:06:22] libhb: scan thread found 1 valid title(s)
+ title 1:
  + stream: F:\test.avi
  + duration: 00:43:01
  + size: 536x360, pixel aspect: 1/1, display aspect: 1.49, 29.970 fps
  + autocrop: 0/0/4/0
  + chapters:
    + 1: cells 0->0, 0 blocks, duration 00:43:01
  + audio tracks:
    + 1, Unknown (mp3) (2.0 ch) (iso639-2: und)
  + subtitle tracks:
Reading chapter markers from file C:\Users\Josiah\AppData\Local\Temp\Test-1-1-chapters.csv
[19:06:22] 1 job(s) to process
[19:06:22] starting job
[19:06:22] work: sanitizing track 1 mixdown Dolby Pro Logic II to Stereo
[19:06:22] work: mixdown not specified, track 2 setting mixdown Stereo
[19:06:22] work: bitrate not specified, track 2 setting bitrate 224
[19:06:22] sync: expecting 77365 video frames
[19:06:22] work: only 1 chapter, disabling chapter markers
[19:06:22] job configuration:
[19:06:22]  * source
[19:06:22]    + F:\test.avi
[19:06:22]    + title 1, chapter(s) 1 to 1
[19:06:22]    + container: avi
[19:06:22]    + data rate: 972 kbps
[19:06:22]  * destination
[19:06:22]    + F:\Convert\Test-1.m4v
[19:06:22]    + container: MPEG-4 (.mp4 and .m4v)
[19:06:22]      + 64-bit formatting
[19:06:22]  * video track
[19:06:22]    + decoder: mpeg4
[19:06:22]    + frame rate: same as source (around 29.970 fps)
[19:06:22]    + loose anamorphic
[19:06:22]      + storage dimensions: 536 * 360 -> 528 * 352, crop 0/0/4/0, mod 0
[19:06:22]      + pixel aspect ratio: 133 / 135
[19:06:22]      + display dimensions: 520 * 352
[19:06:22]    + encoder: H.264 (x264)
[19:06:22]      + quality: 20.00 (RF)
[19:06:22]  * audio track 1
[19:06:22]    + decoder: Unknown (mp3) (2.0 ch) (track 1, id 0x1)
[19:06:22]    + mixdown: Stereo
[19:06:22]    + encoder: AAC (faac)
[19:06:22]      + bitrate: 160 kbps, samplerate: 44100 Hz
[19:06:22]  * audio track 2
[19:06:22]    + decoder: Unknown (mp3) (2.0 ch) (track 1, id 0x1)
[19:06:22]    + mixdown: Stereo
[19:06:22]    + encoder: AC3 (ffmpeg)
[19:06:22]      + bitrate: 224 kbps, samplerate: 44100 Hz
[mp3 @ 0000000000352520] Header missing
[19:06:22] reader: first SCR 0 id 0x0 DTS 0
[19:06:22] encx264: min-keyint: 30, keyint: 300
[19:06:22] encx264: encoding with stored aspect 133/135
[19:06:22] encx264: Encoding at constant RF 20.000000
x264 [warning]: --psnr used with psy on: results will be invalid!
x264 [warning]: --tune psnr should be used if attempting to benchmark psnr!
x264 [info]: using SAR=133/135
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 3.0
[mp3 @ 000000000932DC20] Header missing
[mp3 @ 00000000093C1660] Header missing
[19:12:07] reader: done. 1 scr changes
[19:12:08] work: average encoding speed for job is 223.844238 fps
[19:12:08] sync: got 77364 frames, 77365 expected
[19:12:09] mpeg4-decoder done: 77364 frames, 0 decoder errors, 0 drops
[19:12:09] render: lost time: 0 (0 frames)
[19:12:09] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:696   Avg QP:16.58  size: 15027  PSNR Mean Y:48.56 U:51.99 V:51.83 Avg:49.38 Global:48.80
x264 [info]: frame P:26132 Avg QP:19.94  size:  4427  PSNR Mean Y:45.62 U:49.38 V:49.37 Avg:46.51 Global:46.01
x264 [info]: frame B:50536 Avg QP:23.56  size:   758  PSNR Mean Y:45.38 U:49.26 V:49.42 Avg:46.31 Global:45.81
x264 [info]: consecutive B-frames:  6.0% 16.2% 14.0% 63.9%
x264 [info]: mb I  I16..4: 12.8% 66.3% 20.9%
x264 [info]: mb P  I16..4:  2.2%  6.0%  0.8%  P16..4: 43.0% 21.4% 10.6%  0.0%  0.0%    skip:16.1%
x264 [info]: mb B  I16..4:  0.0%  0.1%  0.0%  B16..8: 30.7%  3.0%  0.5%  direct: 1.7%  skip:63.8%  L0:35.7% L1:56.5% BI: 7.8%
x264 [info]: 8x8 transform intra:66.5% inter:76.8%
x264 [info]: coded y,uvDC,uvAC intra: 59.7% 80.5% 45.7% inter: 14.4% 21.2% 1.0%
x264 [info]: i16 v,h,dc,p: 59% 15%  9% 17%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 14% 19%  5%  7%  9%  7%  8%  6%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 17% 10%  5%  9%  9%  7%  7%  5%
x264 [info]: i8c dc,h,v,p: 52% 18% 22%  8%
x264 [info]: Weighted P-Frames: Y:2.6% UV:1.0%
x264 [info]: ref P L0: 61.2% 13.2% 19.8%  5.7%  0.1%
x264 [info]: ref B L0: 90.3%  8.1%  1.6%
x264 [info]: ref B L1: 96.8%  3.2%
x264 [info]: SSIM Mean Y:0.9879147 (19.177db)
x264 [info]: PSNR Mean Y:45.490 U:49.326 V:49.422 Avg:46.406 Global:45.898 kb/s:509.55
[19:12:09] mp3-decoder done: 0 frames, 0 decoder errors, 0 drops
[19:12:09] mp3-decoder done: 0 frames, 0 decoder errors, 0 drops
[19:12:09] mux: track 0, 77364 frames, 164392012 bytes, 509.46 kbps, fifo 4096
[19:12:09] mux: track 1, 111170 frames, 51621486 bytes, 159.98 kbps, fifo 8192
[19:12:09] mux: track 2, 74112 frames, 72276846 bytes, 223.99 kbps, fifo 4096
[19:12:09] libhb: work result = 0
Encode done!
HandBrake has exited.
Last edited by pylos on Sat Mar 02, 2013 12:18 pm, edited 1 time in total.
Reason: Logs must be placed in between [code] [/code] blocks
Deleted User 11865

Re: AppleTV2 Audio Sync Issues

Post by Deleted User 11865 »

Try forcing the samplerate to 48kHz instead of Auto.
pylos

Re: AppleTV2 Audio Sync Issues

Post by pylos »

I tried the recommended samplerate of 48kHz and that didn't resolve the issue. Any other ideas?
GregiBoy
Veteran User
Posts: 908
Joined: Sat Feb 12, 2011 9:23 pm

Re: AppleTV2 Audio Sync Issues

Post by GregiBoy »

Are you sure your wireless networking is fine?
pylos

Re: AppleTV2 Audio Sync Issues

Post by pylos »

Yes I'm sure. I can stream other files through my AppleTV2 just fine. For some reason these particular files keep giving out of sync audio. Is there something that the AppleTV2 can do to files that can cause this sync issue? As I said, the files play fine and in sync on my pc, just not when streaming.
kfreeb
Novice
Posts: 68
Joined: Wed Sep 01, 2010 4:10 pm

Re: AppleTV2 Audio Sync Issues

Post by kfreeb »

Are these file you keep referring to from a camcorder, or from a professional video source like DVD/Blu-ray? A little more info on the source files could be helpful.
pylos

Re: AppleTV2 Audio Sync Issues

Post by pylos »

They are dvd rips of a tv show that I downloaded. They are AVI files that I'm converting to a format supported by itunes.
GregiBoy
Veteran User
Posts: 908
Joined: Sat Feb 12, 2011 9:23 pm

Re: AppleTV2 Audio Sync Issues

Post by GregiBoy »

We do not discuss piracy on this forum.
Locked