Odd Transcode Behaviour

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
jphastings
Posts: 6
Joined: Sat Jun 23, 2007 1:08 pm

Odd Transcode Behaviour

Post by jphastings »

I sometimes download the BBC iPlayer flash streams here in the UK using a top notch app called 'get_iplayer'. It now spits out an mp4 with everything stuck together ready for me to use. Unfortunately Quicktime can't decode the h264 in the way its supposed to and the playback is jerky and unordered (I read somewhere that this is due to the order in which frames are required for Quictime as opposed to elsewhere) - this isn't a huge problem as there is always VLC.

My issue with Handbrake arises when I try to transcode these videos for use on my iPod Touch. Once its done the video is jerky in exactly the way Quicktime playback is. I even used an old copy of VisualHub set to Quicktime, and then to ffmpeg decoding methods to confirm that this is caused by using Quicktime to decode the video. This leads me to believe that Handbrake also uses Quicktime to decode its video. Is this the case? Can it be overridden?

Many thanks!
jphastings
Posts: 6
Joined: Sat Jun 23, 2007 1:08 pm

Re: Odd Transcode Behaviour

Post by jphastings »

Oops, some specs - this is the file I tested with:

mp4info Reggie\ Perrin\ -\ 1x01.bbc.m4v
mp4info version 1.5.0.1
Reggie Perrin - 1x01.bbc.m4v:
Track Type Info
1 video H264 Main@3, 1703.040 secs, 1401 kbps, 832x468 @ 25.000000 fps
2 audio MPEG-4 AAC LC, 1703.061 secs, 125 kbps, 48000 Hz
4 sbtl

If you need more - shout!
User avatar
s55
HandBrake Team
Posts: 10357
Joined: Sun Dec 24, 2006 1:05 pm

Re: Odd Transcode Behaviour

Post by s55 »

HB does not use Quicktime for decoding.
hunterk
Bright Spark User
Posts: 179
Joined: Tue Jun 03, 2008 2:27 pm

Re: Odd Transcode Behaviour

Post by hunterk »

I believe HB uses ffmpeg for decoding. You're right that quicktime is awful for playback of complex h.264 files, but it's not handbrake's fault. Are your encodes dropping frames (check your activity log to find out)? Is the HB-transcoded file jerky in VLC as well as your ipod/quicktime?

regardless of what the case is, we'll be able to tell more if you post an activity log from one of your encodes (see the big red box at the top of the forums for details on how to find/post the log).
jphastings
Posts: 6
Joined: Sat Jun 23, 2007 1:08 pm

Re: Odd Transcode Behaviour

Post by jphastings »

(Sorry for the delay!)

Here's an activity log of an encode I've just completed of one of the Glastonbury iPlayer recordings - more details afterwards:

Code: Select all

[19:00:35] macgui: Handbrake Version: 0.9.3 (2008112300)
[19:00:35] hb_init: checking cpu count
[19:00:35] hb_init: starting libhb thread
[19:00:35] hb_init: checking cpu count
[19:00:35] hb_init: starting libhb thread
[19:00:40] macgui: Rip: Pending queue count is 1
[19:00:40] macgui: scanning specifically for title: 1
[19:00:40] macgui: performNewQueueScan currentQueueEncodeIndex is: 0
[19:00:40] hb_scan: path=/Users/jp/Dropbox/Public/Original.mp4, title_index=1
[19:00:40] scan: trying to open with libdvdread
[19:00:40] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/jp/Dropbox/Public/Original.mp4':
  Duration: 00:00:34.00, start: 0.000000, bitrate: 1533 kb/s
    Stream #0.0(und): Video: h264, yuv420p, 832x468, 25.00 tb(r)
    Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16
[19:00:40] scan: decoding previews for title 1
[19:00:40] scan: 10 previews, 832x468, 25.000 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 117:117
[19:00:40] scan: title (0) job->width:832, job->height:464
[19:00:40] libhb: scan thread found 1 valid title(s)
[19:00:40] macgui: currentScanCount received from fQueueEncodeLibhb
[19:00:40] macgui: ScanDone state received from fQueueEncodeLibhb
[19:00:40] macgui: processNewQueueEncode title list is: 1
[19:00:40] macgui: Preset: JP Film
[19:00:40] macgui: processNewQueueEncode number of passes expected is: 1
[19:00:40] macgui: prepareJob audiotrack 2 is: 0
[19:00:40] macgui: prepareJob exiting
[19:00:40] 1 job(s) to process
[19:00:40] starting job
[19:00:40] job configuration:
[19:00:40]  * source
[19:00:40]    + /Users/jp/Dropbox/Public/Original.mp4
[19:00:40]    + title 1, chapter(s) 1 to 1
[19:00:40]    + container: mov,mp4,m4a,3gp,3g2,mj2
[19:00:40]    + data rate: 1533 kbps
[19:00:40]  * destination
[19:00:40]    + /Users/jp/Finished Transcodes/Original.m4v
[19:00:40]    + container: MPEG-4 (.mp4 and .m4v)
[19:00:40]  * video track
[19:00:40]    + decoder: h264
[19:00:40]    + frame rate: same as source (around 25.000 fps)
[19:00:40]    + dimensions: 832 * 468 -> 832 * 464, crop 0/0/0/0
[19:00:40]    + encoder: x264
[19:00:40]      + 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
[19:00:40]      + quality: 0.59
[19:00:40]  * audio track 0
[19:00:40]    + decoder: Unknown (AAC) (track 1, id 1)
[19:00:40]    + mixdown: Stereo
[19:00:40]    + encoder: faac
[19:00:40]      + bitrate: 160 kbps, samplerate: 48000 Hz
[19:00:40]  * audio track 1
[19:00:40]    + decoder: Unknown (AAC) (track 1, id 1)
[19:00:40]    + mixdown: Stereo
[19:00:40]    + encoder: faac
[19:00:40]      + bitrate: 128 kbps, samplerate: 48000 Hz
[19:00:40] dvd: not a dvd - trying as a stream/file instead
[19:00:40] encx264: Encoding at constant RF 20.910002
x264 [info]: using cpu capabilities: MMX2 Cache64
x264 [info]: profile Main, level 3.0
[19:00:40] reader: first SCR 0
[19:00:40] sync: expecting 875 video frames
[aac @ 0x10c9600]Number of bands (41) exceeds limit (40).
[aac @ 0x10c9600]invalid band type
[aac @ 0x10c9600]Number of bands (51) exceeds limit (40).
[aac @ 0x10c9600]Number of bands (48) exceeds limit (40).
[aac @ 0x10c9600]Number of bands (51) exceeds limit (40).
[19:01:07] sync: adding 106 ms of silence to audio 0  start 2165760, next 2156160
[aac @ 0x10c9600]Number of bands (48) exceeds limit (40).
[19:01:44] reader: done. 1 scr changes
[19:02:27] sync: got 849 frames, 875 expected
[19:02:27] work: average encoding speed for job is 7.957137 fps
[19:02:39] h264-decoder done: 850 frames, 0 decoder errors, 0 drops
[19:02:39] render: lost time: 0 (0 frames)
[19:02:39] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: slice I:5     Avg QP:21.15  size: 53995  PSNR Mean Y:42.65 U:46.16 V:46.88 Avg:43.56 Global:43.43
x264 [info]: slice P:308   Avg QP:23.06  size: 11663  PSNR Mean Y:40.65 U:43.46 V:44.35 Avg:41.48 Global:41.03
x264 [info]: slice B:536   Avg QP:25.80  size:  2472  PSNR Mean Y:40.55 U:43.36 V:44.41 Avg:41.39 Global:41.01
x264 [info]: consecutive B-frames:  4.1% 12.3% 63.6% 19.9%  0.0%  0.0%  0.0%
x264 [info]: mb I  I16..4: 15.3%  0.0% 84.7%
x264 [info]: mb P  I16..4:  1.5%  0.0%  1.7%  P16..4: 51.2% 17.9%  9.6%  1.2%  1.1%    skip:15.9%
x264 [info]: mb B  I16..4:  0.1%  0.0%  0.2%  B16..8: 39.3%  1.7%  2.0%  direct: 3.0%  skip:53.8%  L0:28.1% L1:60.0% BI:11.9%
x264 [info]: direct mvs  spatial:97.2%  temporal:2.8%
x264 [info]: ref P L0  85.7%  9.4%  4.9%
x264 [info]: ref B L0  90.4%  9.6%
x264 [info]: SSIM Mean Y:0.9843340
x264 [info]: PSNR Mean Y:40.598 U:43.411 V:44.402 Avg:41.435 Global:41.025 kb/s:1221.92
[19:02:39] aac-decoder done: 0 frames, 0 decoder errors, 0 drops
[19:02:39] libhb: work result = 0
[19:02:40] macgui: incrementQueueItemDone currentQueueEncodeIndex is incremented to: 1
[19:02:40] macgui: incrementQueueItemDone the 0 item queue is complete
(first 34 seconds of some of BBC Three's Glastonbury coverage, no music I'm afriad! :P)
Original: http://files.getdropbox.com/u/1355384/Original.mp4
Handbrake Encode: http://files.getdropbox.com/u/1355384/H ... encode.m4v

The Original is fine when played in VLC (its an h264 FLV pushed into an MP4 container by ffmpeg after being ripped) and all forms of strange when played in QuickTime (yeah, QT is poo).
However the HB encode (same settings as I use to encode things that work fine in QT) neither works in QT nor VLC! (You can hear audio blips at the very least) Any ideas whats going on?

By no means is this vital, it just seems like its a curious quirk that may be the result of something interesting elsewhere.
And if anyone knows how to make QT decode x264 with Perian so as to avoid all of this, let me know!
Post Reply