handbrake encode failing - MacRumors Forums
Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Hardware > Apple TV and Home Theater

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 5, 2012, 04:05 AM   #1
chenks
macrumors 6502a
 
Join Date: Oct 2007
Location: UK
handbrake encode failing

converting a 1080p MKV to ATV2 format using the latest new release of Handbrake, but is appears to be bombing out of the encode after a few seconds.

any ideas why? (i attached the log)

Code:
[10:01:04] hb_init: starting libhb thread
[10:01:04] macgui: Handbrake Version: 0.9.6 x86_64 (2012022800)
[10:01:04] hb_init: starting libhb thread
[10:01:04] hb_init: starting libhb thread
[10:01:04] macgui: hbInstances path to this instance: /Applications/HandBrake.app
[10:01:04] macgui: hbInstance found instance pidnum:36626 at path: /Applications/HandBrake.app
[10:01:04] macgui: hbInstance MATCH FOUND, our pidnum is:36626
[10:01:04] macgui: Pid for this instance:36626
[10:01:04] macgui: HBQueueController : My Pidnum is 36626
[10:01:14] macgui: trying to open video_ts folder (parent directory chosen)
[10:01:14] macgui: Preview: Disabling HUD Controls
[10:01:14] macgui: Minimum length of title for scan: 900000
[10:01:14] hb_scan: path=/Users/media/Desktop/file.mkv, title_index=0
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening /Users/media/Desktop/file.mkv/BDMV/index.bdmv
libbluray/bluray.c:1471: nav_get_title_list(/Users/media/Desktop/file.mkv) failed (0x102110400)
[10:01:14] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
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:01:14] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Users/media/Desktop/file.mkv':
  Duration: 01:42:44.16, start: 0.000000, bitrate: 1536 kb/s
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080, PAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0.1(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s (default)
[10:01:14] scan: decoding previews for title 1
[10:01:14] scan: audio 0x1: DCA, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
[10:01:15] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[10:01:15] scan: title (0) job->width:1920, job->height:1072
[10:01:15] libhb: scan thread found 1 valid title(s)
[10:01:15] macgui: showNewScan: This is a new source item scan
[10:01:15] macgui: Preview: Enabling HUD Controls
[10:01:47] macgui: Rip: Pending queue count is 0
[10:01:47] macgui: createQueueFileItem: Getting Audio from prepareAudioForQueueFileJob ...
[10:01:47] macgui: createQueueFileItem: Returned getting audio from prepareAudioForQueueFileJob
[10:01:47] macgui: getNextPendingQueueIndex next pending encode index is:0
[10:01:47] macgui: scanning specifically for title: 1
[10:01:47] hb_scan: path=/Users/media/Desktop/file.mkv, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening /Users/media/Desktop/the.muppets.2011.1080p.bluray.x264-sparks.mkv/BDMV/index.bdmv
libbluray/bluray.c:1471: nav_get_title_list(/Users/media/Desktop/file.mkv) failed (0x102270400)
[10:01:47] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Using libdvdcss version 1.2.10 for DVD access
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:01:47] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Users/media/Desktop/file.mkv':
  Duration: 01:42:44.16, start: 0.000000, bitrate: 1536 kb/s
    Stream #0.0(eng): Video: h264 (High), yuv420p, 1920x1080, PAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
    Stream #0.1(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s (default)
[10:01:47] scan: decoding previews for title 1
[10:01:47] scan: audio 0x1: DCA, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
[10:01:47] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[10:01:47] scan: title (0) job->width:1920, job->height:1072
[10:01:47] libhb: scan thread found 1 valid title(s)
[10:01:47] macgui: ScanDone state received from fQueueEncodeLibhb
[10:01:47] macgui: Preset: Custom
[10:01:47] macgui: processNewQueueEncode number of passes expected is: 1
[10:01:47] macgui: Start / Stop set to chapters
[10:01:47] macgui: prepareJob exiting
[10:01:47] 1 job(s) to process
[10:01:47] starting job
[10:01:47] sync: expecting 147816 video frames
[10:01:47] job configuration:
[10:01:47]  * source
[10:01:47]    + /Users/media/Desktop/file.mkv
[10:01:47]    + title 1, chapter(s) 1 to 1
[10:01:47]    + container: matroska,webm
[10:01:47]    + data rate: 1536 kbps
[10:01:47]  * destination
[10:01:47]    + /Users/media/Desktop/file.m4v
[10:01:47]    + container: MPEG-4 (.mp4 and .m4v)
[10:01:47]      + 64-bit formatting
[10:01:47]  * video track
[10:01:47]    + decoder: h264
[10:01:47]    + frame rate: 23.976 fps -> peak rate limited to 29.970 fps
[10:01:47]    + dimensions: 1920 * 1080 -> 1280 * 720, crop 0/0/0/0, mod 16
[10:01:47]    + encoder: H.264 (x264)
[10:01:47]      + quality: 18.00 (RF)
[10:01:47]  * audio track 1
[10:01:47]    + decoder: English (DTS) (5.1 ch) (track 1, id 0x1)
[10:01:47]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[10:01:47]    + mixdown: Dolby Pro Logic II
[10:01:47]    + encoder: AAC (CoreAudio)
[10:01:47]      + bitrate: 160 kbps, samplerate: 48000 Hz
[10:01:47]  * audio track 2
[10:01:47]    + decoder: English (DTS) (5.1 ch) (track 1, id 0x1)
[10:01:47]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[10:01:47]    + mixdown: 6-channel discrete
[10:01:47]    + encoder: AC3 (ffmpeg)
[10:01:47]      + bitrate: 640 kbps, samplerate: 48000 Hz
[10:01:47] reader: first SCR 0 id 0x0 DTS 0
[10:01:47] encx264: min-keyint: 24, keyint: 240
[10:01:47] encx264: Encoding at constant RF 18.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 cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2 AVX
x264 [info]: profile High, level 3.1
Stream with high frequencies VQ coding
Stream with high frequencies VQ coding
[matroska,webm @ 0x102111c00] Read error at pos. 18671682 (0x11ce842)
[10:02:03] reader: done. 1 scr changes
[10:02:14] work: average encoding speed for job is 16.510355 fps
[10:02:14] sync: got 341 frames, 147816 expected
[10:02:14] h264-decoder done: 341 frames, 0 decoder errors, 0 drops
[10:02:14] render: 341 frames output, 0 dropped and 0 duped for CFR/PFR
[10:02:14] render: lost time: 0 (0 frames)
[10:02:14] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:3     Avg QP:11.16  size: 43845  PSNR Mean Y:66.68 U:67.66 V:67.94 Avg:67.00 Global:51.32
x264 [info]: frame P:217   Avg QP:16.87  size: 19705  PSNR Mean Y:51.30 U:53.48 V:53.49 Avg:51.89 Global:49.30
x264 [info]: frame B:121   Avg QP:19.43  size:  5689  PSNR Mean Y:55.76 U:57.53 V:58.20 Avg:56.33 Global:49.17
x264 [info]: consecutive B-frames: 40.5% 32.3% 13.2% 14.1%
x264 [info]: mb I  I16..4: 39.5% 45.6% 15.0%
x264 [info]: mb P  I16..4:  7.0%  8.8%  2.7%  P16..4: 45.4% 16.2%  7.6%  0.0%  0.0%    skip:12.4%
x264 [info]: mb B  I16..4:  0.1%  0.5%  0.2%  B16..8: 44.6%  3.5%  0.5%  direct: 1.5%  skip:49.2%  L0:36.6% L1:59.6% BI: 3.8%
x264 [info]: 8x8 transform intra:48.0% inter:80.5%
x264 [info]: coded y,uvDC,uvAC intra: 37.5% 57.9% 29.5% inter: 24.2% 31.9% 3.5%
x264 [info]: i16 v,h,dc,p: 56% 18%  8% 18%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 19% 33%  4%  6%  6%  7%  4%  6%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 20% 31%  4%  6%  5%  5%  2%  3%
x264 [info]: i8c dc,h,v,p: 61% 21% 13%  6%
x264 [info]: Weighted P-Frames: Y:10.6% UV:5.5%
x264 [info]: ref P L0: 68.0%  7.6% 17.6%  6.6%  0.2%
x264 [info]: ref B L0: 86.4% 12.9%  0.7%
x264 [info]: ref B L1: 94.7%  5.3%
x264 [info]: SSIM Mean Y:0.9900467 (20.020db)
x264 [info]: PSNR Mean Y:53.011 U:55.031 V:55.274 Avg:53.588 Global:49.269 kb/s:2849.48
[10:02:14] mux: track 0, 341 frames, 5095820 bytes, 2857.95 kbps, fifo 512
[10:02:14] mux: track 1, 669 frames, 335406 bytes, 188.11 kbps, fifo 1024
[10:02:14] mux: track 2, 445 frames, 1139200 bytes, 638.91 kbps, fifo 512
[10:02:14] libhb: work result = 0
[10:02:15] macgui: incrementQueueItemDone there are no more pending encodes
chenks is offline   0 Reply With Quote
Old Mar 5, 2012, 09:06 AM   #2
dynaflash
macrumors 68020
 
Join Date: Mar 2003
Here is the relevant part of the log:

Code:
[matroska,webm @ 0x102111c00] Read error at pos. 18671682 (0x11ce842)
... and right below it:

Code:
[10:02:14] sync: got 341 frames, 147816 expected
[10:02:14] h264-decoder done: 341 frames, 0 decoder errors, 0 drops
Basically its a crappy source ... or at least one that libav cannot read properly .. How does it play back with vlc or mplayer ?
dynaflash is offline   0 Reply With Quote
Old Mar 5, 2012, 10:16 AM   #3
chenks
Thread Starter
macrumors 6502a
 
Join Date: Oct 2007
Location: UK
VLC seems to play it OK, well it starts and ends as it should.
if the logs could tell me at what particular point it's having a problem at then i could skip to there and see what happens.
chenks is offline   0 Reply With Quote
Old Mar 5, 2012, 10:32 AM   #4
Gjwilly
macrumors 68000
 
Join Date: May 2011
Maybe try converting it to an MP4 and then seeing if Handbrake can handle it.
http://sourceforge.net/projects/mkv2mp4/

If it's a simple problem with the container then the conversion should solve that without losing any additional quality by eliminating the need to re-encode.
Gjwilly is offline   0 Reply With Quote
Old Mar 5, 2012, 12:09 PM   #5
dynaflash
macrumors 68020
 
Join Date: Mar 2003
Quote:
Originally Posted by chenks View Post
VLC seems to play it OK, well it starts and ends as it should.
if the logs could tell me at what particular point it's having a problem at then i could skip to there and see what happens.
er, read the log, it bails out at frame 341
dynaflash is offline   0 Reply With Quote
Old Mar 5, 2012, 12:13 PM   #6
chenks
Thread Starter
macrumors 6502a
 
Join Date: Oct 2007
Location: UK
Quote:
Originally Posted by dynaflash View Post
er, read the log, it bails out at frame 341
right, but when playing it back it shows me time stamps, not frames.
chenks is offline   0 Reply With Quote
Old Mar 5, 2012, 12:16 PM   #7
Zwhaler
macrumors 603
 
Zwhaler's Avatar
 
Join Date: Jun 2006
Handbrake encodes by frames, so if you know the framerate then simply calculate 341/framerate to find where it is in seconds.
__________________
Mac Pro 2x2.93 24GB 25TB 2x1TB 840EVO
Check Out My YouTube Channel~~~~~~~~~~~~~~~~~~~
Zwhaler is offline   0 Reply With Quote
Old Mar 10, 2012, 05:59 AM   #8
chenks
Thread Starter
macrumors 6502a
 
Join Date: Oct 2007
Location: UK
Quote:
Originally Posted by Gjwilly View Post
Maybe try converting it to an MP4 and then seeing if Handbrake can handle it.
http://sourceforge.net/projects/mkv2mp4/

If it's a simple problem with the container then the conversion should solve that without losing any additional quality by eliminating the need to re-encode.
trying to use mkv2mp4 just now and getting the following error when using it.

Code:
Insecure $ENV{PATH} while running with -t switch at /usr/local/bin/mkv2mp4.pl line 46.
Insecure EXEC while running with -t switch at /usr/local/bin/mkv2mp4.pl line 46.
no mkvinfo found at /usr/local/bin/mkv2mp4.pl line 46.
any ideas?
chenks is offline   -1 Reply With Quote
Old Mar 14, 2012, 07:29 PM   #9
tentales
macrumors member
 
Join Date: Dec 2010
Location: the road...
I'm seeing the same error as the OP since about 2 weeks on my MacMini Lion 10.7.3 with handbrake 0.9.6 and even some of the recent nightly builds.

If it's source related, why is it not repeatable ? It exits at different points throughout the file, but upon retrying a few times, it would eventually finish properly.
Memory leak? cpu limits when competing with other tasks ?

I'm still searching and trying different permutations. The only thing I can say so far, I haven't seen a short encode on Snow Leopard, using the same handbrake version and the same source files (tried 10 so far on both SL & Lion) .

However, since Lion was released months, I have successfully encoded 100+ files. Never seen this type of problem. This "dropout" issue is quite recent.
tentales is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Hardware > Apple TV and Home Theater

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
OSX Crash with Video Encode dfuerpo OS X 3 Feb 13, 2014 12:24 PM
Resolved: encode/decode custom object erdinc27 iPhone/iPad Programming 3 Jan 21, 2014 01:38 AM
How to encode many files with handbrake, changing the audio bitrate darshie76 Digital Video 1 Nov 26, 2013 06:59 PM
AAC Encode Settings [XLD] Dnix Digital Audio 10 Sep 9, 2013 08:00 PM
Handbrake Prematurely Ends Encode and Video is Scrambled El Maestro Apple TV and Home Theater 4 Feb 25, 2013 01:04 PM

Forum Jump

All times are GMT -5. The time now is 09:13 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC