handbrake encode failing

Discussion in 'Apple TV and Home Theater' started by chenks, Mar 5, 2012.

  1. macrumors 6502a

    chenks

    Joined:
    Oct 23, 2007
    Location:
    UK
    #1
    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
    
     
  2. macrumors 68020

    Joined:
    Mar 27, 2003
    #2
    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 ?
     
  3. thread starter macrumors 6502a

    chenks

    Joined:
    Oct 23, 2007
    Location:
    UK
    #3
    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.
     
  4. macrumors 68020

    Joined:
    May 1, 2011
    Location:
    SF Bay Area
    #4
    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.
     
  5. macrumors 68020

    Joined:
    Mar 27, 2003
    #5
    er, read the log, it bails out at frame 341
     
  6. thread starter macrumors 6502a

    chenks

    Joined:
    Oct 23, 2007
    Location:
    UK
    #6
    right, but when playing it back it shows me time stamps, not frames.
     
  7. macrumors demi-god

    Zwhaler

    Joined:
    Jun 10, 2006
    #7
    Handbrake encodes by frames, so if you know the framerate then simply calculate 341/framerate to find where it is in seconds.
     
  8. thread starter macrumors 6502a

    chenks

    Joined:
    Oct 23, 2007
    Location:
    UK
    #8
    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?
     
  9. macrumors 6502

    tentales

    Joined:
    Dec 6, 2010
    Location:
    ...on an island
    #9
    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.
     

Share This Page