aTV not syncing...i know..again. But this is interesting.

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.
Post Reply
ron2812
Posts: 3
Joined: Tue Apr 28, 2009 8:56 pm

aTV not syncing...i know..again. But this is interesting.

Post by ron2812 »

Hi everybody.

I'm writing this thread because I am converting the same video over and over again since 2 days. Searched in this forum for some information about that i understand, but didn't find anything :-)

I'm converting a mkv File using Handbrake svn2354 (cos finally 2 audiotracks work on a Mac with that version).

Here's what i did:
1) I selected the Apple TV preset and increased the resolution to 1280x528 (720p)
2) Lowered "Constant quality" to make sure I'm below a 5M bitrate
3) Selected the 2 Audio tracks
4) startet and waited 3 hours (did this maybe 10 times now :-))

The source is a mkv with 720p and 24fps (and i kept the framerate from the original).

So this is how my mp4 video looks like after converting:
size: 3,92 GB
bitrate: 4408
resolution: 1280x528
video codec: H.265
framerate: like the original..24fps

Basically everything seems like it should be able to play on an Apple TV.
BUT: It's not syncinc it..."apple tv can't play that video"

From what i read, the aTV specs are basically:
> 24fps for 720p
> Bitrate has to be below 5Mb


Where am i going wrong? Any ideas anybody?


PS: I've tried to give you all the infos about the video and what i did in Handbrake. I'm a newbie with Handbrake and video converting, so I hope I didn't miss anything important.
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: aTV not syncing...i know..again. But this is interesting.

Post by TedJ »

Well, you did miss the activity log we require. See the red box above.
ron2812
Posts: 3
Joined: Tue Apr 28, 2009 8:56 pm

Re: aTV not syncing...i know..again. But this is interesting.

Post by ron2812 »

Here it is:

HandBrake Activity Log for /Users/ron/Desktop/.mp4: 2009-04-28 17:41:28 +0200
Handbrake Version: svn2354 i386 (2009042601)

[17:41:28] macgui: Rip: Pending queue count is 0
[17:41:28] macgui: Rip: No pending jobs, so sending this one to doAddToQueue
[17:41:28] macgui: Rip: Going right to performNewQueueScan
[17:41:28] macgui: scanning specifically for title: 1
[17:41:28] macgui: performNewQueueScan currentQueueEncodeIndex is: 0
[17:41:28] hb_scan: path=/Volumes/Daten/Movies to convert/indianajones.mkv, title_index=1
[17:41:28] scan: trying to open with libdvdread
[17:41:28] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska, from '/Volumes/Daten/Movies to convert/indianajones.mkv':
Duration: 02:06:50.08, start: 0.000000, bitrate: N/A
Stream #0.0(eng): Video: h264, yuv420p, 1280x528, PAR 1:1 DAR 80:33, 24 tbr, 1k tbn, 47.95 tbc
Stream #0.1: Audio: ac3, 48000 Hz, 5.0, s16
Stream #0.2(ger): Audio: ac3, 48000 Hz, 5.1, s16
[17:41:28] scan: decoding previews for title 1
[17:41:28] scan: audio 0x2: AC-3, rate=48000Hz, bitrate=384000 Deutsch (AC3) (5.1 ch)
[17:41:28] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=448000 Unknown (AC3) (5.1 ch)
[17:41:28] scan: 10 previews, 1280x528, 24.000 fps, autocrop = 0/0/0/0, aspect 2.42:1, PAR 1:1
[17:41:28] scan: title (0) job->width:1280, job->height:528
[17:41:28] libhb: scan thread found 1 valid title(s)
[17:41:29] macgui: ScanDone state received from fQueueEncodeLibhb
[17:41:29] macgui: processNewQueueEncode title list is: 1
[17:41:29] macgui: Preset: Custom
[17:41:29] macgui: processNewQueueEncode number of passes expected is: 1
[17:41:29] macgui: prepareJob audiotrack 2 is: 1
[17:41:29] macgui: prepareJob exiting
[17:41:29] 1 job(s) to process
[17:41:29] starting job
[17:41:29] job configuration:
[17:41:29] * source
[17:41:29] + /Volumes/Daten/Movies to convert/indianajones.mkv
[17:41:29] + title 1, chapter(s) 1 to 1
[17:41:29] + container: matroska
[17:41:29] * destination
[17:41:29] + /Users/ron/Desktop/indianajones.mp4
[17:41:29] + container: MPEG-4 (.mp4 and .m4v)
[17:41:29] + 64-bit formatting
[17:41:29] * video track
[17:41:29] + decoder: h264
[17:41:29] + frame rate: same as source (around 24.000 fps)
[17:41:29] + dimensions: 1280 * 528 -> 1280 * 528, crop 0/0/0/0
[17:41:29] + encoder: x264
[17:41:29] + options: level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all
[17:41:29] + quality: 23.00 (RF)
[17:41:29] * audio track 0
[17:41:29] + decoder: Unknown (AC3) (5.1 ch) (track 1, id 1)
[17:41:29] + bitrate: 448 kbps, samplerate: 48000 Hz
[17:41:29] + mixdown: Dolby Pro Logic II
[17:41:29] + dynamic range compression: 1.000000
[17:41:29] + encoder: faac
[17:41:29] + bitrate: 128 kbps, samplerate: 48000 Hz
[17:41:29] * audio track 1
[17:41:29] + decoder: Deutsch (AC3) (5.1 ch) (track 1, id 2)
[17:41:29] + bitrate: 384 kbps, samplerate: 48000 Hz
[17:41:29] + mixdown: Dolby Pro Logic II
[17:41:29] + dynamic range compression: 1.000000
[17:41:29] + encoder: faac
[17:41:29] + bitrate: 128 kbps, samplerate: 48000 Hz
[17:41:29] encx264: keyint-min: 24, keyint-max: 240
[17:41:29] encx264: Encoding at constant RF 23.000000
x264 [warning]: frame MB size (80x33) > level limit (1620)
x264 [warning]: MB rate (63360) > level limit (40500)
[17:41:29] dvd: not a dvd - trying as a stream/file instead
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Main, level 3.0
No accelerated IMDCT transform found
[17:41:29] reader: first SCR 0
No accelerated IMDCT transform found
[17:41:29] sync: expecting 182665 video frames
[22:02:57] reader: done. 1 scr changes
[22:02:57] sync: got 175602 frames, 182665 expected
[22:02:57] work: average encoding speed for job is 11.192807 fps
[22:02:58] mux: track 0, 299994 frames, 3950490232 bytes, 4152.90 kbps, fifo 64
[22:02:58] mux: track 1, 356686 frames, 121497307 bytes, 127.72 kbps, fifo 16384
[22:02:58] mux: track 2, 356723 frames, 121732820 bytes, 127.97 kbps, fifo 16384
[22:02:58] h264-decoder done: 175603 frames, 0 decoder errors, 0 drops
[22:02:58] render: lost time: 0 (0 frames)
[22:02:58] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:2455 Avg QP:18.18 size: 73721 PSNR Mean Y:44.96 U:55.08 V:55.21 Avg:46.46 Global:45.44
x264 [info]: slice P:222103 Avg QP:20.78 size: 15086 PSNR Mean Y:41.80 U:51.35 V:51.33 Avg:43.30 Global:42.39
x264 [info]: slice B:75436 Avg QP:23.21 size: 5554 PSNR Mean Y:41.52 U:52.06 V:51.92 Avg:43.04 Global:42.32
x264 [info]: consecutive B-frames: 61.3% 12.2% 10.6% 10.0% 5.7% 0.1% 0.0%
x264 [info]: mb I I16..4: 18.1% 0.0% 81.9%
x264 [info]: mb P I16..4: 1.3% 0.0% 3.1% P16..4: 44.1% 14.6% 5.4% 0.2% 0.2% skip:31.1%
x264 [info]: mb B I16..4: 0.1% 0.0% 0.3% B16..8: 43.9% 1.1% 1.2% direct: 4.0% skip:49.5% L0:36.0% L1:58.1% BI: 5.9%
x264 [info]: direct mvs spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra:81.1% 63.8% 16.6% inter:19.8% 14.1% 0.2%
x264 [info]: ref P L0 78.8% 10.4% 10.8%
x264 [info]: ref B L0 73.9% 26.1%
x264 [info]: SSIM Mean Y:0.9703594
x264 [info]: PSNR Mean Y:41.755 U:51.559 V:51.511 Avg:43.259 Global:42.393 kb/s:2528.36
[22:03:00] libhb: work result = 0
van
Veteran User
Posts: 417
Joined: Wed Aug 29, 2007 6:35 am

Re: aTV not syncing...i know..again. But this is interesting.

Post by van »

This line says that the frame rate in the output file is around 40fps

Code: Select all

[22:02:58] mux: track 0, 299994 frames, 3950490232 bytes, 4152.90 kbps, fifo 64
but this lines says the input rate was under 24fps:

Code: Select all

[22:02:58] h264-decoder done: 175603 frames, 0 decoder errors, 0 drops
If the first number is right the file won't sync with an ATV.

Something like this can happen because a lot of mkv's (stupidly) use a really coarse clock (1ms) that makes the interframe times inaccurate which then causes the x264 encoder's b-frame delay to be too small to allow frame reordering so it has to dup frames.

You might try applying this patch and setting the output framerate to 24 fps.
ron2812
Posts: 3
Joined: Tue Apr 28, 2009 8:56 pm

Re: aTV not syncing...i know..again. But this is interesting.

Post by ron2812 »

Wow! Thanks alot!
I'm trying to set a fixed framerate.

Can you tell me how to apply this patch? I'm really new to this, so i'm thankfull for any advice!
van
Veteran User
Posts: 417
Joined: Wed Aug 29, 2007 6:35 am

Re: aTV not syncing...i know..again. But this is interesting.

Post by van »

Click the download button on the patch page and download the patch to your desktop (should result in a file called 562.diff unless you rename it).

Do a fresh HandBrake source checkout, cd to the top level of that checkout and apply the patch:

Code: Select all

svn co svn://svn.handbrake.fr/HandBrake/trunk hb.patched
cd hb.patched
patch -p0 < ~/Desktop/562.diff
Then build Handbrake following the normal build instructions.
Post Reply