Auto Crop...?

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
Bobcat37
Posts: 39
Joined: Tue Nov 25, 2008 5:51 am

Auto Crop...?

Post by Bobcat37 »

Hey all. So I've been ripping all my blurays into MKV files by using MakeMKV and then running that resulting file through Handbrake to knock them down to reasonable file sizes. During this process I have stumbled upon another question...

I have Cropping set to Automatic, but what exactly does that do? Because from what I can tell, so far out of the 20 blurays I've done, it has done nothing 95% of the time... my rips still come out with black bars on the top and bottom of the film... isn't auto crop supposed to take these out?

Strangely enough I didn't realize this until just now because when I ripped V for Vendetta, the black bars WERE REMOVED... but it's been the only one so far where that has happened... So what's the deal with this auto crop? Should I be custom cropping my movies to get rid of the black bars, or is there no reason to? Any Pros/Cons?

Thanks again. [PS - I'm running nightly build 3703 and could provide any encode logs if someone thinks that's needed?]
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Auto Crop...?

Post by TedJ »

It does exactly what you think... it removes the black bars (matting) used to pad a film's original aspect ratio out to fill a 16x9 frame. What it doesn't do is crop the sides of the picture so it fills a 16x9 screen entirely. As such, on playback you'd be hard pressed to tell the difference until you fiddle with your player and/or TV's zoom settings. For a 2.40:1 cinemascope feature, your resulting encode will be 1920x800... check your logs for yourself.

The pros of autocropping to remove matting is it improves encoder efficiency... that hard border is difficult to encode cleanly. Manually cropping to fill your TV's screen is not recommended - it is destructive and irreversible. Much better to zoom on playback.
Bobcat37
Posts: 39
Joined: Tue Nov 25, 2008 5:51 am

Re: Auto Crop...?

Post by Bobcat37 »

I guess I'm still a little confused Ted... so is removing the black bars an anomaly to 2.40:1 features? Because on V for Vendetta and Watchmen this happened... but on my other blurays it has left black bars. For instance, when setting crop to Auto I get these two settings

Tropic Thunder
Source: 1920x1080, Output: 1920x1080, Anamorphic: 1920x1080 Strict
Image

V for Vendetta
Source: 1920x1080, Output: 1916x800, Anamorphic: 1916x800 Strict
Image

It might be hard to see the settings in those screenshots, but you can see how the black bars on V are removed (grey) and the black bars in Tropic remain. Is that normal then? And my apologies in advance if I'm missing something obvious here, I just got confused when they were removed on V when this didn't happen on 20 movies before it.

Or perhaps the whole question is moot and I just should stick with auto crop and trust whatever it decides to do?
TedJ
Veteran User
Posts: 5388
Joined: Wed Feb 20, 2008 11:25 pm

Re: Auto Crop...?

Post by TedJ »

With Tropic Thunder, are the majority of the preview images clean? I've noticed that occasionally I'll encounter a title where most of the images are slightly corrupted with a grey wash... this throws off the edge detection for autocropping. In this case, you'll need to manually adjust the cropping yourself.
Bobcat37
Posts: 39
Joined: Tue Nov 25, 2008 5:51 am

Re: Auto Crop...?

Post by Bobcat37 »

TedJ wrote:occasionally I'll encounter a title where most of the images are slightly corrupted with a grey wash... this throws off the edge detection for autocropping. In this case, you'll need to manually adjust the cropping yourself.
Ah ha, I have noticed that... sounds like that's exactly my issue. However, it doesn't seem like it has been 'occasional' at all for me, but fairly frequent. Perhaps MakeMKV is to blame for something in the files it's outputting, no idea?

So I re-ripped Tropic Thunder and manually cropped the black bars, and the resulting file was the exact same size as the one with black bars... so now that begs the question, what's the point? If it didn't change file size, does it just help with encoding speed/efficiency or what?

I'm hoping there isn't a huge reason I should go back and RE-DO all the ones that didn't auto-crop...?

Thanks Ted.
mduell
Veteran User
Posts: 7329
Joined: Sat Apr 21, 2007 8:54 pm

Re: Auto Crop...?

Post by mduell »

What's your ratecontrol method?

If you posted an encoding log we wouldn't have to ask...
Bobcat37
Posts: 39
Joined: Tue Nov 25, 2008 5:51 am

Re: Auto Crop...?

Post by Bobcat37 »

Tropic Thunder w/ black bars:

Code: Select all

HandBrake Activity Log for /Users/Bryan/Desktop/Tropic Thunder TC.mkv: 2010-12-19 01:28:44 -0700
Handbrake Version: svn3703 x86_64 (2010120601)

[01:28:44] macgui: getNextPendingQueueIndex next pending encode index is:12
[01:28:44] macgui: incrementQueueItemDone new pending items found: 12
[01:28:44] macgui: scanning specifically for title: 1
[01:28:44] hb_scan: path=/Users/Bryan/Desktop/Tropic Thunder Orig.mkv, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening /Users/Bryan/Desktop/Tropic Thunder Orig.mkv/BDMV/index.bdmv
libbluray/bluray.c:960: nav_get_title_list(/Users/Bryan/Desktop/Tropic Thunder Orig.mkv) failed (0x11c43b800)
[01:28:44] 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
[01:28:44] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Users/Bryan/Desktop/Tropic Thunder Orig.mkv':
  Duration: 02:01:08.67, start: 0.000000, bitrate: 640 kb/s
    Chapter #0.0: start 0.000000, end 238.154578
    Metadata:
      title           : Chapter 00
    Chapter #0.1: start 238.154578, end 617.533578
    Metadata:
      title           : Chapter 01
    Chapter #0.2: start 617.533578, end 946.779156
    Metadata:
      title           : Chapter 02
    Chapter #0.3: start 946.779156, end 1244.660067
    Metadata:
      title           : Chapter 03
    Chapter #0.4: start 1244.660067, end 1723.179778
    Metadata:
      title           : Chapter 04
    Chapter #0.5: start 1723.179778, end 2107.563778
    Metadata:
      title           : Chapter 05
    Chapter #0.6: start 2107.563778, end 2476.348867
    Metadata:
      title           : Chapter 06
    Chapter #0.7: start 2476.348867, end 2836.124956
    Metadata:
      title           : Chapter 07
    Chapter #0.8: start 2836.124956, end 3050.964578
    Metadata:
      title           : Chapter 08
    Chapter #0.9: start 3050.964578, end 3345.508822
    Metadata:
      title           : Chapter 09
    Chapter #0.10: start 3345.508822, end 3571.234333
    Metadata:
      title           : Chapter 10
    Chapter #0.11: start 3571.234333, end 3827.198356
    Metadata:
      title           : Chapter 11
    Chapter #0.12: start 3827.198356, end 4231.852622
    Metadata:
      title           : Chapter 12
    Chapter #0.13: start 4231.852622, end 4379.416689
    Metadata:
      title           : Chapter 13
    Chapter #0.14: start 4379.416689, end 4614.610000
    Metadata:
      title           : Chapter 14
    Chapter #0.15: start 4614.610000, end 4889.134244
    Metadata:
      title           : Chapter 15
    Chapter #0.16: start 4889.134244, end 5142.637489
    Metadata:
      title           : Chapter 16
    Chapter #0.17: start 5142.637489, end 5339.792778
    Metadata:
      title           : Chapter 17
    Chapter #0.18: start 5339.792778, end 5681.342333
    Metadata:
      title           : Chapter 18
    Chapter #0.19: start 5681.342333, end 5924.251667
    Metadata:
      title           : Chapter 19
    Chapter #0.20: start 5924.251667, end 6307.551244
    Metadata:
      title           : Chapter 20
    Chapter #0.21: start 6307.551244, end 6674.209200
    Metadata:
      title           : Chapter 21
    Chapter #0.22: start 6674.209200, end 6777.353911
    Metadata:
      title           : Chapter 22
    Chapter #0.23: start 6777.353911, end 7268.678000
    Metadata:
      title           : Chapter 23
    Stream #0.0(eng): Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
    Metadata:
      title           : 3/2+1
[01:28:44] scan: decoding previews for title 1
[01:28:44] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[01:28:47] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[01:28:47] scan: title (0) job->width:1920, job->height:1072
[01:28:47] libhb: scan thread found 1 valid title(s)
[01:28:47] macgui: ScanDone state received from fQueueEncodeLibhb
[01:28:47] macgui: Preset: 1080p DTS BluRay
[01:28:47] macgui: processNewQueueEncode number of passes expected is: 1
[01:28:47] macgui: Start / Stop set to chapters
[01:28:47] macgui: prepareJob exiting
[01:28:47] 1 job(s) to process
[01:28:47] starting job
[01:28:47] sync: expecting 174298 video frames
[01:28:47] job configuration:
[01:28:47]  * source
[01:28:47]    + /Users/Bryan/Desktop/Tropic Thunder Orig.mkv
[01:28:47]    + title 1, chapter(s) 1 to 24
[01:28:47]    + container: matroska,webm
[01:28:47]    + data rate: 640 kbps
[01:28:47]  * destination
[01:28:47]    + /Users/Bryan/Desktop/Tropic Thunder TC.mkv
[01:28:47]    + container: Matroska (.mkv)
[01:28:47]      + chapter markers
[01:28:47]  * video track
[01:28:47]    + decoder: h264
[01:28:47]    + frame rate: same as source (around 23.976 fps)
[01:28:47]    + strict anamorphic
[01:28:47]      + storage dimensions: 1920 * 1080 -> 1920 * 1080, crop 0/0/0/0, mod 16
[01:28:47]      + pixel aspect ratio: 1 / 1
[01:28:47]      + display dimensions: 1920 * 1080
[01:28:47]    + encoder: x264
[01:28:47]      + options: rc-lookahead=50:ref=4:b-pyramid=strict:b-adapt=2:me=umh:subq=9:merange=32:direct=auto:analyse=all
[01:28:47]      + quality: 22.00 (RF)
[01:28:47]  * audio track 0
[01:28:47]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[01:28:47]      + bitrate: 640 kbps, samplerate: 48000 Hz
[01:28:47]    + AC3 passthrough
[01:28:47] encx264: min-keyint: auto (23), keyint: 240
[01:28:47] encx264: encoding with stored aspect 1/1
[01:28:47] encx264: Encoding at constant RF 22.000000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 4.0
No accelerated IMDCT transform found
[01:28:47] reader: first SCR 0 id 1 DTS 0
[01:36:49] h264: "Chapter 01" (2) at frame 5720 time 21441420
[01:52:47] h264: "Chapter 02" (3) at frame 14815 time 55581750
[02:04:54] h264: "Chapter 03" (4) at frame 22709 time 85213800
[02:14:04] h264: "Chapter 04" (5) at frame 29851 time 112023090
[02:32:25] h264: "Chapter 05" (6) at frame 41324 time 155089890
[02:51:39] h264: "Chapter 06" (7) at frame 50540 time 189684450
[03:07:16] h264: "Chapter 07" (8) at frame 59384 time 222882660
[03:20:00] h264: "Chapter 08" (9) at frame 68010 time 255262500
[03:27:15] h264: "Chapter 09" (10) at frame 73160 time 274594320
[03:39:03] h264: "Chapter 10" (11) at frame 80221 time 301099500
[03:46:30] h264: "Chapter 11" (12) at frame 85633 time 321414840
[03:56:31] h264: "Chapter 12" (13) at frame 91771 time 344455290
[04:10:58] h264: "Chapter 13" (14) at frame 101472 time 380870460
[04:16:07] h264: "Chapter 14" (15) at frame 105012 time 394158690
[04:23:05] h264: "Chapter 15" (16) at frame 110648 time 415314900
[04:32:35] h264: "Chapter 16" (17) at frame 117233 time 440033310
[04:39:43] h264: "Chapter 17" (18) at frame 123310 time 462844800
[04:44:45] h264: "Chapter 18" (19) at frame 128038 time 480592530
[04:57:20] h264: "Chapter 19" (20) at frame 136227 time 511332030
[05:06:26] h264: "Chapter 20" (21) at frame 142051 time 533193840
[05:21:49] h264: "Chapter 21" (22) at frame 151240 time 567687060
[05:39:10] h264: "Chapter 22" (23) at frame 160032 time 600690060
[05:42:43] h264: "Chapter 23" (24) at frame 162505 time 609973110
[05:51:50] reader: done. 1 scr changes
[05:51:52] work: average encoding speed for job is 11.036935 fps
[05:51:52] sync: got 174274 frames, 174298 expected
[05:51:52] h264-decoder done: 174274 frames, 0 decoder errors, 0 drops
[05:51:52] render: lost time: 0 (0 frames)
[05:51:52] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:2183  Avg QP:16.71  size:172863  PSNR Mean Y:48.03 U:50.64 V:52.03 Avg:48.77 Global:48.28
x264 [info]: frame P:51107 Avg QP:23.28  size: 48598  PSNR Mean Y:44.83 U:48.00 V:50.43 Avg:45.56 Global:44.62
x264 [info]: frame B:120984 Avg QP:25.73  size: 17973  PSNR Mean Y:43.44 U:47.11 V:49.96 Avg:44.24 Global:43.59
x264 [info]: consecutive B-frames:  1.6%  3.9% 30.0% 64.5%
x264 [info]: mb I  I16..4: 29.6% 67.1%  3.4%
x264 [info]: mb P  I16..4:  3.6% 12.1%  0.8%  P16..4: 35.7%  8.3%  1.8%  0.1%  0.1%    skip:37.5%
x264 [info]: mb B  I16..4:  0.7%  2.4%  0.1%  B16..8: 32.6%  3.5%  0.9%  direct: 2.5%  skip:57.3%  L0:42.9% L1:50.2% BI: 6.9%
x264 [info]: 8x8 transform intra:72.9% inter:80.6%
x264 [info]: direct mvs  spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 68.7% 76.5% 57.9% inter: 14.6% 19.1% 3.6%
x264 [info]: i16 v,h,dc,p: 62% 14%  9% 15%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  8%  9%  9% 10% 14% 13% 13% 11% 13%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  7% 12%  2%  9% 15% 15% 15% 11% 13%
x264 [info]: i8c dc,h,v,p: 58% 16% 13% 13%
x264 [info]: Weighted P-Frames: Y:3.2% UV:1.9%
x264 [info]: ref P L0: 66.2% 14.4% 18.4%  0.9%  0.0%
x264 [info]: ref B L0: 89.5% 10.5%
x264 [info]: ref B L1: 93.2%  6.8%
x264 [info]: SSIM Mean Y:0.9764743 (16.285db)
x264 [info]: PSNR Mean Y:43.905 U:47.418 V:50.127 Avg:44.687 Global:43.903 kb/s:5542.12
[05:51:52] mux: track 0, 174274 frames, 5035399229 bytes, 5542.00 kbps, fifo 8
[05:51:52] mux: track 1, 227147 frames, 581496320 bytes, 640.00 kbps, fifo 256
[05:51:52] libhb: work result = 0
Tropic Thunder w/o black bars (custom cropped):

Code: Select all

HandBrake Activity Log for /Users/Bryan/Desktop/Tropic Thunder TC3.mkv: 2010-12-19 23:35:49 -0700
Handbrake Version: svn3703 x86_64 (2010120601)

[23:35:49] macgui: Rip: Pending queue count is 2
[23:35:49] macgui: getNextPendingQueueIndex next pending encode index is:3
[23:35:49] macgui: scanning specifically for title: 1
[23:35:49] hb_scan: path=/Users/Bryan/Desktop/Tropic Thunder Orig.mkv, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening /Users/Bryan/Desktop/Tropic Thunder Orig.mkv/BDMV/index.bdmv
libbluray/bluray.c:960: nav_get_title_list(/Users/Bryan/Desktop/Tropic Thunder Orig.mkv) failed (0x103218200)
[23:35:49] 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
[23:35:49] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Users/Bryan/Desktop/Tropic Thunder Orig.mkv':
  Duration: 02:01:08.67, start: 0.000000, bitrate: 640 kb/s
    Chapter #0.0: start 0.000000, end 238.154578
    Metadata:
      title           : Chapter 00
    Chapter #0.1: start 238.154578, end 617.533578
    Metadata:
      title           : Chapter 01
    Chapter #0.2: start 617.533578, end 946.779156
    Metadata:
      title           : Chapter 02
    Chapter #0.3: start 946.779156, end 1244.660067
    Metadata:
      title           : Chapter 03
    Chapter #0.4: start 1244.660067, end 1723.179778
    Metadata:
      title           : Chapter 04
    Chapter #0.5: start 1723.179778, end 2107.563778
    Metadata:
      title           : Chapter 05
    Chapter #0.6: start 2107.563778, end 2476.348867
    Metadata:
      title           : Chapter 06
    Chapter #0.7: start 2476.348867, end 2836.124956
    Metadata:
      title           : Chapter 07
    Chapter #0.8: start 2836.124956, end 3050.964578
    Metadata:
      title           : Chapter 08
    Chapter #0.9: start 3050.964578, end 3345.508822
    Metadata:
      title           : Chapter 09
    Chapter #0.10: start 3345.508822, end 3571.234333
    Metadata:
      title           : Chapter 10
    Chapter #0.11: start 3571.234333, end 3827.198356
    Metadata:
      title           : Chapter 11
    Chapter #0.12: start 3827.198356, end 4231.852622
    Metadata:
      title           : Chapter 12
    Chapter #0.13: start 4231.852622, end 4379.416689
    Metadata:
      title           : Chapter 13
    Chapter #0.14: start 4379.416689, end 4614.610000
    Metadata:
      title           : Chapter 14
    Chapter #0.15: start 4614.610000, end 4889.134244
    Metadata:
      title           : Chapter 15
    Chapter #0.16: start 4889.134244, end 5142.637489
    Metadata:
      title           : Chapter 16
    Chapter #0.17: start 5142.637489, end 5339.792778
    Metadata:
      title           : Chapter 17
    Chapter #0.18: start 5339.792778, end 5681.342333
    Metadata:
      title           : Chapter 18
    Chapter #0.19: start 5681.342333, end 5924.251667
    Metadata:
      title           : Chapter 19
    Chapter #0.20: start 5924.251667, end 6307.551244
    Metadata:
      title           : Chapter 20
    Chapter #0.21: start 6307.551244, end 6674.209200
    Metadata:
      title           : Chapter 21
    Chapter #0.22: start 6674.209200, end 6777.353911
    Metadata:
      title           : Chapter 22
    Chapter #0.23: start 6777.353911, end 7268.678000
    Metadata:
      title           : Chapter 23
    Stream #0.0(eng): Video: h264, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc
    Stream #0.1(eng): Audio: ac3, 48000 Hz, 5.1, s16, 640 kb/s
    Metadata:
      title           : 3/2+1
[23:35:49] scan: decoding previews for title 1
[23:35:49] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[23:35:52] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[23:35:52] scan: title (0) job->width:1920, job->height:1072
[23:35:52] libhb: scan thread found 1 valid title(s)
[23:35:52] macgui: ScanDone state received from fQueueEncodeLibhb
[23:35:52] macgui: Preset: 1080p DTS BluRay
[23:35:52] macgui: processNewQueueEncode number of passes expected is: 1
[23:35:52] macgui: Start / Stop set to chapters
[23:35:52] macgui: prepareJob exiting
[23:35:52] 1 job(s) to process
[23:35:52] starting job
[23:35:52] sync: expecting 174298 video frames
[23:35:52] job configuration:
[23:35:52]  * source
[23:35:52]    + /Users/Bryan/Desktop/Tropic Thunder Orig.mkv
[23:35:52]    + title 1, chapter(s) 1 to 24
[23:35:52]    + container: matroska,webm
[23:35:52]    + data rate: 640 kbps
[23:35:52]  * destination
[23:35:52]    + /Users/Bryan/Desktop/Tropic Thunder TC3.mkv
[23:35:52]    + container: Matroska (.mkv)
[23:35:52]      + chapter markers
[23:35:52]  * video track
[23:35:52]    + decoder: h264
[23:35:52]    + frame rate: same as source (around 23.976 fps)
[23:35:52]    + strict anamorphic
[23:35:52]      + storage dimensions: 1920 * 1080 -> 1920 * 822, crop 128/130/0/0, mod 16
[23:35:52]      + pixel aspect ratio: 1 / 1
[23:35:52]      + display dimensions: 1920 * 822
[23:35:52]    + encoder: x264
[23:35:52]      + options: rc-lookahead=50:ref=4:b-pyramid=strict:b-adapt=2:me=umh:subq=9:merange=32:direct=auto:analyse=all
[23:35:52]      + quality: 22.00 (RF)
[23:35:52]  * audio track 0
[23:35:52]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[23:35:52]      + bitrate: 640 kbps, samplerate: 48000 Hz
[23:35:52]    + AC3 passthrough
[23:35:52] encx264: min-keyint: auto (23), keyint: 240
[23:35:52] encx264: encoding with stored aspect 1/1
[23:35:52] encx264: Encoding at constant RF 22.000000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 4.0
No accelerated IMDCT transform found
[23:35:52] reader: first SCR 0 id 1 DTS 0
[23:43:36] h264: "Chapter 01" (2) at frame 5720 time 21441420
[23:58:57] h264: "Chapter 02" (3) at frame 14815 time 55581750
[00:10:39] h264: "Chapter 03" (4) at frame 22709 time 85213800
[00:19:23] h264: "Chapter 04" (5) at frame 29851 time 112023090
[00:36:48] h264: "Chapter 05" (6) at frame 41324 time 155089890
[00:51:03] h264: "Chapter 06" (7) at frame 50540 time 189684450
[01:05:03] h264: "Chapter 07" (8) at frame 59384 time 222882660
[01:17:22] h264: "Chapter 08" (9) at frame 68010 time 255262500
[01:24:17] h264: "Chapter 09" (10) at frame 73160 time 274594320
[01:35:38] h264: "Chapter 10" (11) at frame 80221 time 301099500
[01:42:47] h264: "Chapter 11" (12) at frame 85633 time 321414840
[01:52:27] h264: "Chapter 12" (13) at frame 91771 time 344455290
[02:06:21] h264: "Chapter 13" (14) at frame 101472 time 380870460
[02:11:18] h264: "Chapter 14" (15) at frame 105012 time 394158690
[02:17:53] h264: "Chapter 15" (16) at frame 110648 time 415314900
[02:27:00] h264: "Chapter 16" (17) at frame 117233 time 440033310
[02:33:47] h264: "Chapter 17" (18) at frame 123310 time 462844800
[02:38:33] h264: "Chapter 18" (19) at frame 128038 time 480592530
[02:50:38] h264: "Chapter 19" (20) at frame 136227 time 511332030
[02:59:21] h264: "Chapter 20" (21) at frame 142051 time 533193840
[03:14:04] h264: "Chapter 21" (22) at frame 151240 time 567687060
[03:30:59] h264: "Chapter 22" (23) at frame 160032 time 600690060
[03:34:27] h264: "Chapter 23" (24) at frame 162505 time 609973110
[03:43:24] reader: done. 1 scr changes
[03:43:25] work: average encoding speed for job is 11.733800 fps
[03:43:25] sync: got 174274 frames, 174298 expected
[03:43:25] h264-decoder done: 174274 frames, 0 decoder errors, 0 drops
[03:43:25] render: lost time: 0 (0 frames)
[03:43:25] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:2176  Avg QP:19.79  size:172564  PSNR Mean Y:46.90 U:49.55 V:50.91 Avg:47.64 Global:47.12
x264 [info]: frame P:51318 Avg QP:22.73  size: 48521  PSNR Mean Y:43.67 U:46.84 V:49.28 Avg:44.40 Global:43.45
x264 [info]: frame B:120780 Avg QP:25.21  size: 17961  PSNR Mean Y:42.26 U:45.94 V:48.80 Avg:43.07 Global:42.41
x264 [info]: consecutive B-frames:  1.7%  4.0% 30.5% 63.8%
x264 [info]: mb I  I16..4: 11.1% 84.5%  4.4%
x264 [info]: mb P  I16..4:  3.8% 15.7%  1.1%  P16..4: 46.4% 10.9%  2.4%  0.2%  0.2%    skip:19.4%
x264 [info]: mb B  I16..4:  0.4%  3.1%  0.1%  B16..8: 41.9%  4.6%  1.1%  direct: 3.3%  skip:45.3%  L0:42.8% L1:50.2% BI: 7.0%
x264 [info]: 8x8 transform intra:79.4% inter:80.7%
x264 [info]: direct mvs  spatial:100.0% temporal:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 75.8% 84.5% 63.6% inter: 19.5% 25.8% 4.9%
x264 [info]: i16 v,h,dc,p: 39% 23% 12% 25%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu:  8%  8%  9% 10% 14% 13% 14% 12% 13%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 10% 10%  2%  9% 15% 15% 15% 11% 13%
x264 [info]: i8c dc,h,v,p: 55% 17% 14% 14%
x264 [info]: Weighted P-Frames: Y:4.0% UV:2.6%
x264 [info]: ref P L0: 65.7% 14.7% 18.6%  1.0%  0.0%
x264 [info]: ref B L0: 89.8% 10.2%
x264 [info]: ref B L1: 93.2%  6.8%
x264 [info]: SSIM Mean Y:0.9692591 (15.123db)
x264 [info]: PSNR Mean Y:42.732 U:46.251 V:48.968 Avg:43.516 Global:42.730 kb/s:5541.36
[03:43:26] mux: track 0, 174274 frames, 5034706839 bytes, 5541.24 kbps, fifo 8
[03:43:26] mux: track 1, 227147 frames, 581496320 bytes, 640.00 kbps, fifo 256
[03:43:26] libhb: work result = 0
Both files ended up at 5.62 GB. Does that make sense? (FWIW, the cropped one is 700,000 bytes smaller...)
alehel
Regular User
Posts: 83
Joined: Wed Feb 14, 2007 11:08 am

Re: Auto Crop...?

Post by alehel »

I almost always have this problem when using MakeMKV. As a matter of fact, I think my blu-ray copy of Resident Evil: Extinction is the only blu-ray movie I've run through MakeMKV that doesn't present this problem. I gave up and used the backup disc function in MakeMKV instead and then use Handbrake to make an encode from that instead.
DaveyDave
Posts: 15
Joined: Tue Sep 07, 2010 5:36 pm

Re: Auto Crop...?

Post by DaveyDave »

Has anyone found a solution to this issue? I'm having the same problem. I originally thought that it only occurred when I my source was an MKV file created by MakeMKV; however, I've also found this to be an issue with MKVs created by MKVmergeGUI. When I reviewed all of the Handbrake files that I created over the past several months, the results are consistent:

- If the source file used in Handbrake is an M2TS file, auto cropping works fine.
- If the source file used in Handbrake is an MKV file, auto cropping works fine if the source file has a VC-1 video track.
- If the source file used in Handbrake is an MKV file, auto cropping does not work if the source file has an H.264/AVC video track.

It doesn't matter if the MKV files are created with MakeMKV or MKVmergeGUI - the results are the same. Thererfore, it seems that auto cropping does not work if an MKV file contains an H.264/AVC video track. (I've never made an MKV file with any other programs, so I can't be certain if MKVs created with other programs would exhibit the same behavior.)

I've found an old tread that mentions a similar (same?) problem with VC-1 video tracks:

viewtopic.php?f=5&t=12273&p=62274&hilit ... ing#p62274

According to that thread, the problem was fixed.

I'm wondering if a similar issue may be causing this problem with H.264/AVC video tracks. Has anyone else had a similar experience?

Here are two encode logs to demonstrate the problem:

King Kong created from a MakeMKV file with a VC-1 video track. Auto cropping works correctly:

Code: Select all

HandBrake Activity Log for /Users/David/Desktop/King Kong.m4v: 2011-03-31 08:25:15 -0300
Handbrake Version: svn3891 x86_64 (2011033101)

[08:25:15] macgui: Rip: Pending queue count is 0
[08:25:15] macgui: getNextPendingQueueIndex next pending encode index is:0
[08:25:15] macgui: scanning specifically for title: 1
[08:25:15] hb_scan: path=/Volumes/Public/Blu-ray Rips/King Kong.mkv, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening /Volumes/Public/Blu-ray Rips/King Kong.mkv/BDMV/index.bdmv
libbluray/bluray.c:1376: nav_get_title_list(/Volumes/Public/Blu-ray Rips/King Kong.mkv) failed (0x1030bc400)
[08:25:15] 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
[08:25:15] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Volumes/Public/Blu-ray Rips/King Kong.mkv':
  Duration: 03:20:07.88, start: 0.000000, bitrate: 1536 kb/s
    Chapter #0.0: start 0.000000, end 182.807622
    Metadata:
      title           : Chapter 00
    Chapter #0.1: start 182.807622, end 260.802200
    Metadata:
      title           : Chapter 01
    Chapter #0.2: start 260.802200, end 403.945200
    Metadata:
      title           : Chapter 02
    Chapter #0.3: start 403.945200, end 629.670689
    Metadata:
      title           : Chapter 03
    Chapter #0.4: start 629.670689, end 753.210778
    Metadata:
      title           : Chapter 04
    Chapter #0.5: start 753.210778, end 858.399200
    Metadata:
      title           : Chapter 05
    Chapter #0.6: start 858.399200, end 1060.893156
    Metadata:
      title           : Chapter 06
    Chapter #0.7: start 1060.893156, end 1225.849622
    Metadata:
      title           : Chapter 07
    Chapter #0.8: start 1225.849622, end 1453.285156
    Metadata:
      title           : Chapter 08
    Chapter #0.9: start 1453.285156, end 1555.637400
    Metadata:
      title           : Chapter 09
    Chapter #0.10: start 1555.637400, end 1573.363444
    Metadata:
      title           : Chapter 10
    Chapter #0.11: start 1573.363444, end 1680.637289
    Metadata:
      title           : Chapter 11
    Chapter #0.12: start 1680.637289, end 1829.536022
    Metadata:
      title           : Chapter 12
    Chapter #0.13: start 1829.536022, end 1867.448911
    Metadata:
      title           : Chapter 13
    Chapter #0.14: start 1867.448911, end 1987.360356
    Metadata:
      title           : Chapter 14
    Chapter #0.15: start 1987.360356, end 2054.510778
    Metadata:
      title           : Chapter 15
    Chapter #0.16: start 2054.510778, end 2215.880333
    Metadata:
      title           : Chapter 16
    Chapter #0.17: start 2215.880333, end 2385.674956
    Metadata:
      title           : Chapter 17
    Chapter #0.18: start 2385.674956, end 2467.506689
    Metadata:
      title           : Chapter 18
    Chapter #0.19: start 2467.506689, end 2551.715822
    Metadata:
      title           : Chapter 19
    Chapter #0.20: start 2551.715822, end 2625.873244
    Metadata:
      title           : Chapter 20
    Chapter #0.21: start 2625.873244, end 3140.178689
    Metadata:
      title           : Chapter 21
    Chapter #0.22: start 3140.178689, end 3349.929911
    Metadata:
      title           : Chapter 22
    Chapter #0.23: start 3349.929911, end 3727.265200
    Metadata:
      title           : Chapter 23
    Chapter #0.24: start 3727.265200, end 4052.798733
    Metadata:
      title           : Chapter 24
    Chapter #0.25: start 4052.798733, end 4359.480111
    Metadata:
      title           : Chapter 25
    Chapter #0.26: start 4359.480111, end 4454.658511
    Metadata:
      title           : Chapter 26
    Chapter #0.27: start 4454.658511, end 4618.947644
    Metadata:
      title           : Chapter 27
    Chapter #0.28: start 4618.947644, end 4823.485311
    Metadata:
      title           : Chapter 28
    Chapter #0.29: start 4823.485311, end 4962.165511
    Metadata:
      title           : Chapter 29
    Chapter #0.30: start 4962.165511, end 5360.521800
    Metadata:
      title           : Chapter 30
    Chapter #0.31: start 5360.521800, end 5416.577800
    Metadata:
      title           : Chapter 31
    Chapter #0.32: start 5416.577800, end 5529.815911
    Metadata:
      title           : Chapter 32
    Chapter #0.33: start 5529.815911, end 5935.346022
    Metadata:
      title           : Chapter 33
    Chapter #0.34: start 5935.346022, end 6284.111111
    Metadata:
      title           : Chapter 34
    Chapter #0.35: start 6284.111111, end 6377.954867
    Metadata:
      title           : Chapter 35
    Chapter #0.36: start 6377.954867, end 6602.012022
    Metadata:
      title           : Chapter 36
    Chapter #0.37: start 6602.012022, end 7301.252222
    Metadata:
      title           : Chapter 37
    Chapter #0.38: start 7301.252222, end 7748.657511
    Metadata:
      title           : Chapter 38
    Chapter #0.39: start 7748.657511, end 7998.990911
    Metadata:
      title           : Chapter 39
    Chapter #0.40: start 7998.990911, end 8151.476578
    Metadata:
      title           : Chapter 40
    Chapter #0.41: start 8151.476578, end 8496.029111
    Metadata:
      title           : Chapter 41
    Chapter #0.42: start 8496.029111, end 9016.507378
    Metadata:
      title           : Chapter 42
    Chapter #0.43: start 9016.507378, end 9131.705800
    Metadata:
      title           : Chapter 43
    Chapter #0.44: start 9131.705800, end 9242.149467
    Metadata:
      title           : Chapter 44
    Chapter #0.45: start 9242.149467, end 9794.784889
    Metadata:
      title           : Chapter 45
    Chapter #0.46: start 9794.784889, end 10070.560378
    Metadata:
      title           : Chapter 46
    Chapter #0.47: start 10070.560378, end 10343.875067
    Metadata:
      title           : Chapter 47
    Chapter #0.48: start 10343.875067, end 10445.268022
    Metadata:
      title           : Chapter 48
    Chapter #0.49: start 10445.268022, end 10583.989933
    Metadata:
      title           : Chapter 49
    Chapter #0.50: start 10583.989933, end 11037.484644
    Metadata:
      title           : Chapter 50
    Chapter #0.51: start 11037.484644, end 11436.049489
    Metadata:
      title           : Chapter 51
    Chapter #0.52: start 11436.049489, end 12007.880000
    Metadata:
      title           : Chapter 52
    Stream #0.0(eng): Video: vc1, yuv420p, 1920x1080 [PAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Stream #0.1(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s (default)
    Metadata:
      title           : 3/2+1
    Stream #0.2(eng): Subtitle: pgssub (default)
[08:25:15] add_ffmpeg_subtitle: unknown subtitle stream type: 0x17006
[08:25:15] scan: decoding previews for title 1
[08:25:15] scan: audio 0x1: DCA, rate=48000Hz, bitrate=1536000 English (DTS) (5.1 ch)
[08:25:15] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 132/132/0/0, aspect 16:9, PAR 1:1
[08:25:15] scan: title (0) job->width:1920, job->height:816
[08:25:15] libhb: scan thread found 1 valid title(s)
[08:25:16] macgui: ScanDone state received from fQueueEncodeLibhb
[08:25:16] macgui: Preset: AppleTV 2
[08:25:16] macgui: processNewQueueEncode number of passes expected is: 1
[08:25:16] macgui: Start / Stop set to chapters
[08:25:16] macgui: prepareJob exiting
[08:25:16] 1 job(s) to process
[08:25:16] starting job
[08:25:16] sync: expecting 4406 video frames
[08:25:16] job configuration:
[08:25:16]  * source
[08:25:16]    + /Volumes/Public/Blu-ray Rips/King Kong.mkv
[08:25:16]    + title 1, chapter(s) 1 to 1
[08:25:16]    + container: matroska,webm
[08:25:16]    + data rate: 1536 kbps
[08:25:16]  * destination
[08:25:16]    + /Users/David/Desktop/King Kong.m4v
[08:25:16]    + container: MPEG-4 (.mp4 and .m4v)
[08:25:16]      + 64-bit formatting
[08:25:16]  * video track
[08:25:16]    + decoder: vc1
[08:25:16]    + frame rate: 23.976 fps -> peak rate limited to 29.970 fps
[08:25:16]    + loose anamorphic
[08:25:16]      + storage dimensions: 1920 * 1080 -> 1280 * 544, crop 132/132/0/0, mod 16
[08:25:16]      + pixel aspect ratio: 1 / 1
[08:25:16]      + display dimensions: 1280 * 544
[08:25:16]    + encoder: x264
[08:25:16]      + quality: 20.00 (RF)
[08:25:16]  * audio track 0
[08:25:16]    + decoder: English (DTS) (5.1 ch) (track 1, id 1)
[08:25:16]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[08:25:16]    + mixdown: Dolby Pro Logic II
[08:25:16]    + encoder: ca_aac
[08:25:16]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:25:16]  * audio track 1
[08:25:16]    + decoder: English (DTS) (5.1 ch) (track 1, id 1)
[08:25:16]      + bitrate: 1536 kbps, samplerate: 48000 Hz
[08:25:16]    + mixdown: 6-channel discrete
[08:25:16]    + encoder: ffac3
[08:25:16]      + bitrate: 640 kbps, samplerate: 48000 Hz
[08:25:16] encx264: min-keyint: 24, keyint: 240
[08:25:16] encx264: encoding with stored aspect 1/1
[08:25:16] encx264: Encoding at constant RF 20.000000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 3.1
[08:25:16] reader: first SCR 0 id 1 DTS 0
Stream with high frequencies VQ coding
Stream with high frequencies VQ coding
[08:27:10] reader: end of chapter 1 (media 1) reached at media chapter 2
[08:27:10] reader: done. 1 scr changes
[08:27:12] work: average encoding speed for job is 38.160580 fps
[08:27:12] sync: got 4385 frames, 4406 expected
[08:27:12] vc1-decoder done: 4385 frames, 0 decoder errors, 0 drops
[08:27:12] render: 4385 frames output, 0 dropped and 0 duped for CFR/PFR
[08:27:12] render: lost time: 0 (0 frames)
[08:27:12] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:73    Avg QP:17.97  size: 92922  PSNR Mean Y:46.02 U:48.71 V:49.62 Avg:46.78 Global:45.47
x264 [info]: frame P:2466  Avg QP:21.39  size: 20985  PSNR Mean Y:44.52 U:47.42 V:48.53 Avg:45.26 Global:43.69
x264 [info]: frame B:1846  Avg QP:24.30  size:  5472  PSNR Mean Y:46.20 U:49.18 V:50.28 Avg:46.86 Global:42.67
x264 [info]: consecutive B-frames: 27.3% 47.1%  8.0% 17.6%
x264 [info]: mb I  I16..4: 10.4% 65.2% 24.4%
x264 [info]: mb P  I16..4:  2.0%  7.8%  1.6%  P16..4: 40.2% 17.6% 10.9%  0.0%  0.0%    skip:19.8%
x264 [info]: mb B  I16..4:  0.1%  0.6%  0.2%  B16..8: 36.6%  5.3%  1.6%  direct: 2.2%  skip:53.4%  L0:37.6% L1:52.5% BI: 9.9%
x264 [info]: 8x8 transform intra:67.6% inter:70.1%
x264 [info]: coded y,uvDC,uvAC intra: 74.8% 74.6% 49.8% inter: 25.3% 24.8% 6.0%
x264 [info]: i16 v,h,dc,p: 51% 15%  4% 30%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 16% 16%  6%  9%  9% 10%  8% 10%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 17% 13%  6% 11%  9% 10%  7%  7%
x264 [info]: i8c dc,h,v,p: 56% 17% 18%  9%
x264 [info]: Weighted P-Frames: Y:9.7% UV:4.9%
x264 [info]: ref P L0: 66.1% 17.6% 11.7%  4.4%  0.2%
x264 [info]: ref B L0: 90.2%  9.2%  0.5%
x264 [info]: ref B L1: 97.3%  2.7%
x264 [info]: SSIM Mean Y:0.9771616 (16.413db)
x264 [info]: PSNR Mean Y:45.254 U:48.184 V:49.286 Avg:45.960 Global:43.255 kb/s:3002.13
[08:27:12] mux: track 0, 4385 frames, 68629854 bytes, 2999.95 kbps, fifo 8
[08:27:12] mux: track 1, 8579 frames, 3565064 bytes, 155.84 kbps, fifo 256
[08:27:12] mux: track 2, 5718 frames, 14638080 bytes, 639.86 kbps, fifo 256
[08:27:12] libhb: work result = 0
Star Trek created from a MakeMKV file with an H.264/AVC video track. Auto cropping does not work:

Code: Select all

HandBrake Activity Log for /Users/David/Desktop/Star Trek 11.m4v: 2011-03-31 08:28:19 -0300
Handbrake Version: svn3891 x86_64 (2011033101)

[08:28:19] macgui: Rip: Pending queue count is 0
[08:28:19] macgui: getNextPendingQueueIndex next pending encode index is:1
[08:28:19] macgui: scanning specifically for title: 1
[08:28:19] hb_scan: path=/Volumes/Public/Blu-ray Rips/Star Trek 11.mkv, title_index=1
libbluray/bdnav/index_parse.c:157: indx_parse(): error opening /Volumes/Public/Blu-ray Rips/Star Trek 11.mkv/BDMV/index.bdmv
libbluray/bluray.c:1376: nav_get_title_list(/Volumes/Public/Blu-ray Rips/Star Trek 11.mkv) failed (0x11582e200)
[08:28:19] 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
[08:28:19] dvd: not a dvd - trying as a stream/file instead
Input #0, matroska,webm, from '/Volumes/Public/Blu-ray Rips/Star Trek 11.mkv':
  Duration: 02:06:50.26, start: 0.000000, bitrate: 640 kb/s
    Chapter #0.0: start 0.000000, end 717.216489
    Metadata:
      title           : Chapter 00
    Chapter #0.1: start 717.216489, end 1185.100578
    Metadata:
      title           : Chapter 01
    Chapter #0.2: start 1185.100578, end 1689.104067
    Metadata:
      title           : Chapter 02
    Chapter #0.3: start 1689.104067, end 2133.506356
    Metadata:
      title           : Chapter 03
    Chapter #0.4: start 2133.506356, end 2650.397733
    Metadata:
      title           : Chapter 04
    Chapter #0.5: start 2650.397733, end 3141.721911
    Metadata:
      title           : Chapter 05
    Chapter #0.6: start 3141.721911, end 3693.606578
    Metadata:
      title           : Chapter 06
    Chapter #0.7: start 3693.606578, end 4300.087444
    Metadata:
      title           : Chapter 07
    Chapter #0.8: start 4300.087444, end 4839.501333
    Metadata:
      title           : Chapter 08
    Chapter #0.9: start 4839.501333, end 5255.291689
    Metadata:
      title           : Chapter 09
    Chapter #0.10: start 5255.291689, end 5789.575444
    Metadata:
      title           : Chapter 10
    Chapter #0.11: start 5789.575444, end 6274.268000
    Metadata:
      title           : Chapter 11
    Chapter #0.12: start 6274.268000, end 6793.411622
    Metadata:
      title           : Chapter 12
    Chapter #0.13: start 6793.411622, end 7100.551778
    Metadata:
      title           : Chapter 13
    Chapter #0.14: start 7100.551778, end 7610.269000
    Metadata:
      title           : Chapter 14
    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: ac3, 48000 Hz, 5.1, s16, 640 kb/s (default)
    Metadata:
      title           : 3/2+1
    Stream #0.2(eng): Subtitle: pgssub (default)
[08:28:19] add_ffmpeg_subtitle: unknown subtitle stream type: 0x17006
[08:28:19] scan: decoding previews for title 1
[08:28:19] scan: audio 0x1: AC-3, rate=48000Hz, bitrate=640000 English (AC3) (5.1 ch)
[08:28:21] scan: 10 previews, 1920x1080, 23.976 fps, autocrop = 0/0/0/0, aspect 16:9, PAR 1:1
[08:28:21] scan: title (0) job->width:1920, job->height:1072
[08:28:21] libhb: scan thread found 1 valid title(s)
[08:28:21] macgui: ScanDone state received from fQueueEncodeLibhb
[08:28:21] macgui: Preset: AppleTV 2
[08:28:21] macgui: processNewQueueEncode number of passes expected is: 1
[08:28:21] macgui: Start / Stop set to chapters
[08:28:21] macgui: prepareJob exiting
[08:28:21] 1 job(s) to process
[08:28:21] starting job
[08:28:21] sync: expecting 17219 video frames
[08:28:21] job configuration:
[08:28:21]  * source
[08:28:21]    + /Volumes/Public/Blu-ray Rips/Star Trek 11.mkv
[08:28:21]    + title 1, chapter(s) 1 to 1
[08:28:21]    + container: matroska,webm
[08:28:21]    + data rate: 640 kbps
[08:28:21]  * destination
[08:28:21]    + /Users/David/Desktop/Star Trek 11.m4v
[08:28:21]    + container: MPEG-4 (.mp4 and .m4v)
[08:28:21]      + 64-bit formatting
[08:28:21]  * video track
[08:28:21]    + decoder: h264
[08:28:21]    + frame rate: 23.976 fps -> peak rate limited to 29.970 fps
[08:28:21]    + loose anamorphic
[08:28:21]      + storage dimensions: 1920 * 1080 -> 1280 * 720, crop 0/0/0/0, mod 16
[08:28:21]      + pixel aspect ratio: 1 / 1
[08:28:21]      + display dimensions: 1280 * 720
[08:28:21]    + encoder: x264
[08:28:21]      + quality: 20.00 (RF)
[08:28:21]  * audio track 0
[08:28:21]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[08:28:21]      + bitrate: 640 kbps, samplerate: 48000 Hz
[08:28:21]    + mixdown: Dolby Pro Logic II
[08:28:21]    + encoder: ca_aac
[08:28:21]      + bitrate: 160 kbps, samplerate: 48000 Hz
[08:28:21]  * audio track 1
[08:28:21]    + decoder: English (AC3) (5.1 ch) (track 1, id 1)
[08:28:21]      + bitrate: 640 kbps, samplerate: 48000 Hz
[08:28:21]    + AC3 passthrough
[08:28:21] encx264: min-keyint: 24, keyint: 240
[08:28:21] encx264: encoding with stored aspect 1/1
[08:28:21] encx264: Encoding at constant RF 20.000000
x264 [info]: using SAR=1/1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 FastShuffle SSE4.2
x264 [info]: profile High, level 3.1
No accelerated IMDCT transform found
No accelerated IMDCT transform found
[08:28:21] reader: first SCR 0 id 1 DTS 0
[08:37:54] reader: end of chapter 1 (media 1) reached at media chapter 2
[08:37:54] reader: done. 1 scr changes
[08:37:56] work: average encoding speed for job is 29.936779 fps
[08:37:56] sync: got 17198 frames, 17219 expected
[08:37:56] h264-decoder done: 17198 frames, 0 decoder errors, 0 drops
[08:37:56] render: 17198 frames output, 0 dropped and 0 duped for CFR/PFR
[08:37:56] render: lost time: 0 (0 frames)
[08:37:56] render: gained time: 0 (0 frames) (0 not accounted for)
x264 [info]: frame I:449   Avg QP:16.31  size: 52560  PSNR Mean Y:46.45 U:49.65 V:50.87 Avg:47.35 Global:46.76
x264 [info]: frame P:12529 Avg QP:22.10  size: 18068  PSNR Mean Y:44.99 U:48.40 V:49.64 Avg:45.89 Global:45.10
x264 [info]: frame B:4220  Avg QP:23.11  size:  4992  PSNR Mean Y:46.99 U:50.63 V:51.69 Avg:47.77 Global:45.17
x264 [info]: consecutive B-frames: 58.7% 24.7%  3.5% 13.1%
x264 [info]: mb I  I16..4: 33.0% 56.1% 10.9%
x264 [info]: mb P  I16..4:  4.3% 11.8%  1.5%  P16..4: 32.8% 10.4%  5.3%  0.0%  0.0%    skip:33.8%
x264 [info]: mb B  I16..4:  0.1%  0.3%  0.1%  B16..8: 34.0%  3.0%  0.6%  direct: 1.9%  skip:60.1%  L0:40.5% L1:53.1% BI: 6.4%
x264 [info]: 8x8 transform intra:64.9% inter:76.3%
x264 [info]: coded y,uvDC,uvAC intra: 60.0% 65.1% 35.1% inter: 21.5% 25.1% 2.0%
x264 [info]: i16 v,h,dc,p: 46% 26%  5% 24%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 13% 16% 25%  6%  8%  8%  9%  7%  8%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 17% 25% 20%  6%  8%  7%  8%  5%  5%
x264 [info]: i8c dc,h,v,p: 52% 24% 15%  9%
x264 [info]: Weighted P-Frames: Y:9.0% UV:4.5%
x264 [info]: ref P L0: 63.0% 15.9% 14.3%  6.3%  0.5%
x264 [info]: ref B L0: 86.3% 12.7%  1.0%
x264 [info]: ref B L1: 97.3%  2.7%
x264 [info]: SSIM Mean Y:0.9765489 (16.298db)
x264 [info]: PSNR Mean Y:45.518 U:48.979 V:50.172 Avg:46.393 Global:45.150 kb/s:3022.11
[08:37:56] mux: track 0, 17198 frames, 271021556 bytes, 3021.46 kbps, fifo 8
[08:37:56] mux: track 1, 33637 frames, 14792297 bytes, 164.91 kbps, fifo 512
[08:37:56] mux: track 2, 22424 frames, 57405440 bytes, 639.98 kbps, fifo 256
[08:37:56] libhb: work result = 0
I realize that I can use manual cropping; however, I'm not sure how to determine how much cropping needs to be applied to the top and bottom of the resulting output file. Any advice would be appreciated.

Note: If I remux the problematic MKVs into M2TS files, the autocropping works fine.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5583
Joined: Sat Feb 09, 2008 7:21 pm

Re: Auto Crop...?

Post by JohnAStebbins »

In order to get the cleanest preview images in the quickest time, handbrake searches for I-frames in the video. I-frames are the only frame type that will give you a complete frame in one shot. Other frame types are only partial frames. The problem is that h.264 has essentially 2 types of I-frame. The first type is called an IDR frame and is easy to detect, so this is what handbrake searches for. The second type is more difficult to detect and handbrake doesn't look for these. What I've seen with the samples that have had this problem is that they have very few IDR frames. When we can't find an IDR, we just start reading a sequence of other frame types in the hope that if we read enough of them, we will get a complete frame.

This is fixable, it's just a bit complicated.

EDIT: In addition to all this, it appears we are relying on ffmpeg to flag keyframes for us when the source is h.264. So maybe ffmpeg is doing a worse detection job than we do with m2ts files. Another thing to look into.
User avatar
JohnAStebbins
HandBrake Team
Posts: 5583
Joined: Sat Feb 09, 2008 7:21 pm

Re: Auto Crop...?

Post by JohnAStebbins »

Found the problem. Turns out to be very similar to a problem I had when reading from a BD structure. The stream is signalling a recovery point, but the decoder doesn't generate a complete frame when decoding the frame. Pushing a couple more frames through the decoder seems to always clean things up. I don't know if this is an error in the stream, or if this is some ffmpeg bug. We never see this problem with h.264 streams generated by handbrake. But handbrake always generates IDR frames, whereas these are all the other type of i-frame.

Work on a solution is in progress
https://reviews.handbrake.fr/r/63/
User avatar
JohnAStebbins
HandBrake Team
Posts: 5583
Joined: Sat Feb 09, 2008 7:21 pm

Re: Auto Crop...?

Post by JohnAStebbins »

This should be fixed and will be available in the next nightly build.
https://trac.handbrake.fr/changeset/3895
DaveyDave
Posts: 15
Joined: Tue Sep 07, 2010 5:36 pm

Re: Auto Crop...?

Post by DaveyDave »

I've just tested several clips with svn3898, and auto crop now works perfectly! Thanks for fixing this so fast!
Post Reply