Large difference in size for encoded movies

HandBrake for Windows 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
gonzus
Posts: 21
Joined: Wed Feb 18, 2009 8:28 pm

Large difference in size for encoded movies

Post by gonzus »

I am using the High Profile to encode my movies to MKV. I usually leave sound as AC3 (passthru) except for things such as Director's Comments, which I convert into AAC. My encoded movies end up in the 1 GB size range. Today I followed the same procedure with Fantasia and ended up with an almost 2 GB MKV file (and it took a lot longer, too). Is this to be expected for any logical reason? Maybe the soundtracks are somehow "larger" or "heavier"? Or perhaps the video is somehow higher quality, or more difficult to encode into H.264?

Here is the encoding log. Thanks for any comments; I am just curious why this would happen.

Code: Select all

### CLI Query:  -i "K:\rips\Fantasia\MainMovie\Fantasia" -t 1 --angle 1 -c 1-18 -o "K:\rips\mkv\Fantasia.mkv" -f mkv -w 720 --loose-anamorphic  --detelecine --decomb -e x264 -q 20 -a 1,2 -E ac3,ac3 -6 auto,auto -R Auto,Auto -B 32,32 -D 0,0 --subtitle 1,2 --subtitle-default=2 --markers="C:\Documents and Settings\XXX\Local Settings\Temp\Fantasia-1-chapters.csv" -x b-adapt=2:rc-lookahead=50 -v 1

### User Query: False

#########################################

[12:10:19] hb_init: checking cpu count
[12:10:19] hb_init: starting libhb thread
HandBrake 0.9.4 (2009112300) - MinGW i386 - http://handbrake.fr
2 CPUs detected
Opening K:\rips\Fantasia\MainMovie\Fantasia...
[12:10:19] hb_scan: path=K:\rips\Fantasia\MainMovie\Fantasia, title_index=1
[12:10:19] scan: trying to open with libdvdread
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
NAME OPEN FAILED
libdvdnav: Unable to find map file 'C:\cygwin\home\gonzo/.dvdnav/.map'
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
[12:10:19] scan: DVD has 1 title(s)
[12:10:19] scan: scanning title 1
[12:10:19] scan: opening IFO for VTS 1
[12:10:19] pgc_id: 1, pgn: 1: pgc: 0x157d1c8
[12:10:19] scan: vts=1, ttn=1, cells=0->32, blocks=0->2195806, 2195807 blocks
[12:10:19] scan: duration is 01:56:58 (7018300 ms)
[12:10:19] scan: checking audio 1
[12:10:19] scan: id=80bd, lang=English (AC3), 3cc=eng ext=1
[12:10:19] scan: checking audio 2
[12:10:19] scan: id=81bd, lang=Espanol (AC3), 3cc=spa ext=1
[12:10:19] scan: checking subtitle 1
[12:10:19] scan: id=20bd, lang=English, 3cc=eng
[12:10:19] scan: checking subtitle 2
[12:10:19] scan: id=21bd, lang=Espanol, 3cc=spa
[12:10:19] scan: title 1 has 18 chapters
[12:10:19] scan: chap 1 c=0->2, b=0->36708 (36709), 120329 ms
[12:10:19] scan: chap 2 c=3->4, b=36709->199597 (162889), 571324 ms
[12:10:19] scan: chap 3 c=5->5, b=199598->206802 (7205), 24306 ms
[12:10:19] scan: chap 4 c=6->7, b=206803->485121 (278319), 867505 ms
[12:10:19] scan: chap 5 c=8->8, b=485122->492901 (7780), 26096 ms
[12:10:19] scan: chap 6 c=9->10, b=492902->673463 (180562), 583464 ms
[12:10:19] scan: chap 7 c=11->11, b=673464->685245 (11782), 45074 ms
[12:10:19] scan: chap 8 c=12->15, b=685246->1114908 (429663), 1433939 ms
[12:10:19] scan: chap 9 c=16->16, b=1114909->1174449 (59541), 194342 ms
[12:10:19] scan: chap 10 c=17->17, b=1174450->1183002 (8553), 29258 ms
[12:10:19] scan: chap 11 c=18->20, b=1183003->1613071 (430069), 1327699 ms
[12:10:19] scan: chap 12 c=21->21, b=1613072->1617673 (4602), 22036 ms
[12:10:19] scan: chap 13 c=22->23, b=1617674->1867495 (249822), 738431 ms
[12:10:19] scan: chap 14 c=24->24, b=1867496->1878401 (10906), 38229 ms
[12:10:19] scan: chap 15 c=25->27, b=1878402->2038097 (159696), 479168 ms
[12:10:19] scan: chap 16 c=28->29, b=2038098->2151410 (113313), 352625 ms
[12:10:19] scan: chap 17 c=30->31, b=2151411->2195801 (44391), 164292 ms
[12:10:19] scan: chap 18 c=32->32, b=2195802->2195806 (5), 176 ms
[12:10:19] scan: aspect = 0
[12:10:19] scan: decoding previews for title 1
[12:10:19] scan: title angle(s) 1
[12:10:19] scan: audio 0x80bd: AC-3, rate=48000Hz, bitrate=384000 English (AC3) (5.0 ch)
[12:10:19] scan: audio 0x81bd: AC-3, rate=48000Hz, bitrate=192000 Espanol (AC3) (Dolby Surround)
Scanning title 1...
Scanning title 1...
[12:10:19] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/0/0/2, aspect 4:3, PAR 8:9
[12:10:19] scan: title (0) job->width:640, job->height:480
[12:10:19] libhb: scan thread found 1 valid title(s)
+ title 1:
  + vts 1, ttn 1, cells 0->32 (2195807 blocks)
  + angle(s) 1
  + duration: 01:56:58
  + size: 720x480, pixel aspect: 8/9, display aspect: 1.33, 23.976 fps
  + autocrop: 0/0/0/2
  + chapters:
    + 1: cells 0->2, 36709 blocks, duration 00:02:00
    + 2: cells 3->4, 162889 blocks, duration 00:09:31
    + 3: cells 5->5, 7205 blocks, duration 00:00:24
    + 4: cells 6->7, 278319 blocks, duration 00:14:28
    + 5: cells 8->8, 7780 blocks, duration 00:00:26
    + 6: cells 9->10, 180562 blocks, duration 00:09:43
    + 7: cells 11->11, 11782 blocks, duration 00:00:45
    + 8: cells 12->15, 429663 blocks, duration 00:23:54
    + 9: cells 16->16, 59541 blocks, duration 00:03:14
    + 10: cells 17->17, 8553 blocks, duration 00:00:29
    + 11: cells 18->20, 430069 blocks, duration 00:22:08
    + 12: cells 21->21, 4602 blocks, duration 00:00:22
    + 13: cells 22->23, 249822 blocks, duration 00:12:18
    + 14: cells 24->24, 10906 blocks, duration 00:00:38
    + 15: cells 25->27, 159696 blocks, duration 00:07:59
    + 16: cells 28->29, 113313 blocks, duration 00:05:53
    + 17: cells 30->31, 44391 blocks, duration 00:02:44
    + 18: cells 32->32, 5 blocks, duration 00:00:00
  + audio tracks:
    + 1, English (AC3) (5.0 ch) (iso639-2: eng), 48000Hz, 384000bps
    + 2, Espanol (AC3) (Dolby Surround) (iso639-2: spa), 48000Hz, 192000bps
  + subtitle tracks:
    + 1, English (iso639-2: eng) (Bitmap)
    + 2, Espanol (iso639-2: spa) (Bitmap)
Reading chapter markers from file C:\Documents and Settings\XXX\Local Settings\Temp\Fantasia-1-chapters.csv
Invalid sample rate 0, using input rate 48000
Invalid sample rate 0, using input rate 48000
[12:10:19] 1 job(s) to process
[12:10:19] starting job
[12:10:19] job configuration:
[12:10:19]  * source
[12:10:19]    + K:\rips\Fantasia\MainMovie\Fantasia
[12:10:19]    + title 1, chapter(s) 1 to 18
[12:10:19]  * destination
[12:10:19]    + K:\rips\mkv\Fantasia.mkv
[12:10:19]    + container: Matroska (.mkv)
[12:10:19]      + chapter markers
[12:10:19]  * video track
[12:10:19]    + decoder: mpeg2
[12:10:19]      + bitrate 9800 kbps
[12:10:19]    + frame rate: same as source (around 23.976 fps)
[12:10:19]    + loose anamorphic
[12:10:19]      + modulus: 0
[12:10:19]      + storage dimensions: 720 * 480 -> 720 * 480, crop 0/0/0/2
[12:10:19]      + pixel aspect ratio: 319 / 360
[12:10:19]      + display dimensions: 638 * 480
[12:10:19]    + filters
[12:10:19]      + Detelecine (pullup) (default settings)
[12:10:19]      + Decomb (default settings)
[12:10:19]    + encoder: x264
[12:10:19]      + options: b-adapt=2:rc-lookahead=50
[12:10:19]      + quality: 20.00 (RF)
[12:10:19]  * subtitle track 1, English (id 20bd) Picture [VOBSUB] -> Pass-Through 
[12:10:19]  * subtitle track 2, Espanol (id 21bd) Picture [VOBSUB] -> Pass-Through 
[12:10:19]  * audio track 0
[12:10:19]    + decoder: English (AC3) (5.0 ch) (track 1, id 80bd)
[12:10:19]      + bitrate: 384 kbps, samplerate: 48000 Hz
[12:10:19]    + AC3 passthrough
[12:10:19]  * audio track 1
[12:10:19]    + decoder: Espanol (AC3) (Dolby Surround) (track 2, id 81bd)
[12:10:19]      + bitrate: 192 kbps, samplerate: 48000 Hz
[12:10:19]    + AC3 passthrough
libdvdnav: Using dvdnav version 4.1.3
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
NAME OPEN FAILED
libdvdnav: Unable to find map file 'C:\cygwin\home\gonzo/.dvdnav/.map'
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
libdvdread: Encrypted DVD support unavailable.
libdvdread: Device (null) inaccessible, CSS authentication not available.
[12:10:19] yadif thread started for segment 0
[12:10:19] encx264: keyint-min: 24, keyint-max: 240
[12:10:19] encx264: encoding with stored aspect 319/360
[12:10:19] encx264: Encoding at constant RF 20.000000
x264 [info]: using SAR=319/360
[12:10:19] yadif thread started for segment 1
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
[12:10:19] decomb thread started for segment 0
[12:10:19] decomb thread started for segment 1
[12:10:19] reader: first SCR 146 id 224 DTS 15140
x264 [info]: profile High, level 3.0
No accelerated IMDCT transform found
No accelerated IMDCT transform found
[12:10:19] sync: expecting 168294 video frames
[ac3 @ 0x3e90690]No channel layout specified. The encoder will guess the layout, but it might be incorrect.
[12:10:19] mpeg2: "Chapter 1" (1) at frame 0 time 3003
[12:10:19] sync: first pts is 3003
[12:14:43] mpeg2: "Chapter 2" (2) at frame 2914 time 10911808
[12:26:33] sync: adding 81 ms of silence to audio 0  start 36502672, next 36495360
[12:32:26] output track 0: ac3 in sync after skipping 1536 bytes
[12:35:02] output track 0: ac3 in sync after skipping 1536 bytes
[12:38:40] sync: adding 73 ms of silence to audio 0  start 62314095, next 62307472
[12:38:43] mpeg2: "Chapter 3" (3) at frame 16610 time 62325562
[12:39:34] mpeg2: "Chapter 4" (4) at frame 17193 time 64515612
[12:52:35] sync: adding 83 ms of silence to audio 0  start 94032454, next 94024912
[12:52:35] sync: audio 0 time went backwards 0 ms, dropped 1 frames (next 94033552, current 94033552)
[12:55:37] sync: adding 78 ms of silence to audio 1  start 100271403, next 100264320
[12:57:35] output track 1: ac3 in sync after skipping 768 bytes
[13:00:39] output track 1: ac3 in sync after skipping 768 bytes
[13:00:39] sync: adding 78 ms of silence to audio 1  start 111710763, next 111703680
[13:14:37] mpeg2: "Chapter 5" (5) at frame 37980 time 142538344
[13:15:27] mpeg2: "Chapter 6" (6) at frame 38621 time 144944743
[13:22:39] output track 1: ac3 in sync after skipping 768 bytes
[13:22:39] sync: adding 74 ms of silence to audio 1  start 164203425, next 164196757
[13:23:52] output track 0: ac3 in sync after skipping 1536 bytes
[13:27:50] output track 0: ac3 in sync after skipping 1536 bytes
[13:27:50] sync: adding 74 ms of silence to audio 0  start 176449185, next 176442517
[13:36:44] mpeg2: "Chapter 7" (7) at frame 52630 time 197509540
[13:38:14] mpeg2: "Chapter 8" (8) at frame 53710 time 201562086
[13:47:46] output track 0: ac3 in sync after skipping 1536 bytes
[13:47:46] sync: adding 94 ms of silence to audio 0  start 227893551, next 227885077
[13:49:15] output track 0: ac3 in sync after skipping 1536 bytes
[13:49:56] output track 0: ac3 in sync after skipping 1536 bytes
[13:52:10] sync: adding 96 ms of silence to audio 0  start 238157871, next 238149231
[13:53:21] sync: adding 71 ms of silence to audio 1  start 240621155, next 240614677
[14:04:28] output track 1: ac3 in sync after skipping 768 bytes
[14:04:43] output track 0: ac3 in sync after skipping 1536 bytes
[14:04:43] sync: adding 73 ms of silence to audio 0  start 269769635, next 269762991
[14:08:10] sync: audio 0 time went backwards 0 ms, dropped 1 frames (next 277904751, current 277904751)
[14:11:57] output track 0: ac3 in sync after skipping 1536 bytes
[14:12:38] output track 0: ac3 in sync after skipping 1536 bytes
[14:25:50] sync: adding 74 ms of silence to audio 0  start 319255601, next 319248904
[14:28:46] output track 1: ac3 in sync after skipping 768 bytes
[14:29:31] output track 1: ac3 in sync after skipping 768 bytes
[14:29:31] sync: adding 92 ms of silence to audio 1  start 329355761, next 329347477
[14:30:02] mpeg2: "Chapter 9" (9) at frame 88221 time 330708347
[14:36:00] output track 1: ac3 in sync after skipping 768 bytes
[14:37:00] mpeg2: "Chapter 10" (10) at frame 92895 time 348245867
[14:37:57] mpeg2: "Chapter 11" (11) at frame 93605 time 350906523
[14:46:21] output track 1: ac3 in sync after skipping 768 bytes
[14:46:21] sync: adding 74 ms of silence to audio 1  start 368985487, next 368978801
[14:52:11] sync: adding 84 ms of silence to audio 0  start 381792847, next 381785224
[15:07:33] output track 0: ac3 in sync after skipping 1536 bytes
[15:21:30] output track 1: ac3 in sync after skipping 768 bytes
[15:29:58] sync: adding 72 ms of silence to audio 1  start 470398784, next 470392241
[15:30:02] mpeg2: "Chapter 12" (12) at frame 125442 time 470409140
[15:30:40] mpeg2: "Chapter 13" (13) at frame 125970 time 472393550
[15:37:03] output track 0: ac3 in sync after skipping 1536 bytes
[15:37:03] sync: adding 94 ms of silence to audio 0  start 486423104, next 486414607
[15:39:48] output track 0: ac3 in sync after skipping 1536 bytes
[15:40:16] output track 1: ac3 in sync after skipping 768 bytes
[16:00:31] sync: adding 83 ms of silence to audio 1  start 538318761, next 538311281
[16:00:32] sync: audio 1 time went backwards 0 ms, dropped 1 frames (next 538319921, current 538319921)
[16:00:49] mpeg2: "Chapter 14" (14) at frame 143697 time 538925952
[16:02:08] mpeg2: "Chapter 15" (15) at frame 144613 time 542364387
[16:21:01] mpeg2: "Chapter 16" (16) at frame 156125 time 585576436
[16:23:26] output track 0: ac3 in sync after skipping 1536 bytes
[16:28:04] output track 1: ac3 in sync after skipping 768 bytes
[16:28:44] sync: adding 71 ms of silence to audio 0  start 603913411, next 603906944
[16:33:48] sync: audio 0 time went backwards 0 ms, dropped 1 frames (next 617391104, current 617391104)
[16:33:53] mpeg2: "Chapter 17" (17) at frame 164609 time 617415128
[16:38:15] reader: done. 24 scr changes
[16:38:17] mpeg2: "Chapter 18" (18) at frame 168559 time 632242825
[16:38:19] sync: got 168559 frames, 168294 expected
[16:38:19] work: average encoding speed for job is 10.482969 fps
[16:38:25] mux: track 0, 168508 frames, 1517466650 bytes, 1728.10 kbps, fifo 64
[16:38:25] mux: track 1, 219527 frames, 337193472 bytes, 384.00 kbps, fifo 512
[16:38:25] mux: track 2, 219528 frames, 168597504 bytes, 192.00 kbps, fifo 512
[16:38:25] mux: track 3, 102 frames, 224398 bytes, 0.26 kbps, fifo 8
[16:38:25] mux: track 4, 101 frames, 218474 bytes, 0.25 kbps, fifo 8
[16:38:25] mpeg2 done: 168560 frames
[16:38:25] render: lost time: 151651 (50 frames)
[16:38:25] render: gained time: 151651 (194 frames) (0 not accounted for)
[16:38:25] render: average dropped frame duration: 3033
x264 [info]: frame I:1277  Avg QP:16.36  size: 27760  PSNR Mean Y:47.89 U:50.92 V:51.82 Avg:48.66 Global:48.00
x264 [info]: frame P:67893 Avg QP:20.52  size: 13013  PSNR Mean Y:44.11 U:46.84 V:47.50 Avg:44.82 Global:44.13
x264 [info]: frame B:99338 Avg QP:21.88  size:  6025  PSNR Mean Y:43.34 U:46.45 V:47.18 Avg:44.15 Global:43.38
x264 [info]: consecutive B-frames:  4.5% 29.8% 57.8%  8.0%
x264 [info]: mb I  I16..4:  7.8% 83.0%  9.1%
x264 [info]: mb P  I16..4:  1.6% 13.4%  2.2%  P16..4: 46.4% 17.1% 10.0%  0.0%  0.0%    skip: 9.3%
x264 [info]: mb B  I16..4:  0.2%  2.7%  0.5%  B16..8: 52.1%  1.3%  1.9%  direct: 8.5%  skip:32.7%  L0:48.7% L1:44.7% BI: 6.6%
x264 [info]: 8x8 transform intra:78.5% inter:80.3%
x264 [info]: coded y,uvDC,uvAC intra: 79.7% 84.9% 49.9% inter: 32.6% 47.1% 4.7%
x264 [info]: i16 v,h,dc,p: 34% 21% 14% 30%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 16% 33%  5%  6%  6%  8%  5% 10%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 21% 20%  6%  8%  7%  9%  5%  8%
x264 [info]: Weighted P-Frames: Y:17.7%
x264 [info]: ref P L0: 53.7% 17.2% 17.2%  9.3%  2.5%
x264 [info]: ref B L0: 81.2% 18.8%
x264 [info]: SSIM Mean Y:0.9740386
x264 [info]: PSNR Mean Y:43.687 U:46.640 V:47.340 Avg:44.456 Global:43.694 kb/s:1727.36
[16:38:25] deca52: 219502 frames decoded, 9 crc errors, 21504 bytes dropped
[16:38:25] deca52: 219511 frames decoded, 3 crc errors, 8448 bytes dropped
[16:38:25] decomb: deinterlaced 0 | blended 219 | unfiltered 168289 | total 168508
[16:38:25] libhb: work result = 0

Rip done!
HandBrake has exited.

nightstrm
Veteran User
Posts: 1887
Joined: Fri Mar 23, 2007 5:43 am

Re: Large difference in size for encoded movies

Post by nightstrm »

Welcome to the world of CRF. Some movies require the encoder to use a higher bitrate to give you the quality level you have selected. Fantasia is an old movie, and if I remember correctly my encode came out larger than average as well.
gonzus
Posts: 21
Joined: Wed Feb 18, 2009 8:28 pm

Re: Large difference in size for encoded movies

Post by gonzus »

nightstrm wrote:Welcome to the world of CRF. Some movies require the encoder to use a higher bitrate to give you the quality level you have selected. Fantasia is an old movie, and if I remember correctly my encode came out larger than average as well.
Well, I don't mind some movies ending up larger than others, and CRF is my choice. But I would like to understand the technical reason for this. You mention Fantasia as being an old movie (which it is); why would this fact cause the encoding to be larger than usual? Is it because it was "hand-painted", and not computer graphics? Just trying to educate myself.
creamyhorror
Enlightened
Posts: 134
Joined: Mon Jan 04, 2010 2:00 pm

Re: Large difference in size for encoded movies

Post by creamyhorror »

Movies are harder to encode when they're more complex. Complexity comes in many forms: high motion, detailed patterns, noise and grain. Your source may be complex due to any of these. The bitrate requirements for preserving certain forms of complexity can be very high. (For example, I like to filter chroma noise from certain sources for a significant reduction in the required bitrate.)
ascianti
Posts: 42
Joined: Wed Dec 30, 2009 5:13 pm

Re: Large difference in size for encoded movies

Post by ascianti »

Because there may be noise from the original source which was not cleaned up when they made the DVD transfer of it.

Noise is *hard* to encode.
gonzus
Posts: 21
Joined: Wed Feb 18, 2009 8:28 pm

Re: Large difference in size for encoded movies

Post by gonzus »

Got it, thanks for the replies. The guide talks about four levels for denoising (and I quote from http://trac.handbrake.fr/wiki/PictureSettings#filters):
  • "Custom" will allow you to enter parameters for the denoise filter in a text field.
  • "Weak" is acceptable for general use. Too much denoising kills the picture quality, "Weak" only gives it a bloody nose.
  • "Medium" will leave behind some artifacts (a little blocking) but is still useful for many more difficult sources.
  • "Strong" should only be used on animation -- especially simple cartoons or cheaply produced anime.
[/i]
What settings would you suggest for the particular case of Fantasia? It would seem Weak is the safe bet, but Strong could apply specifically to this case, or not?
creamyhorror
Enlightened
Posts: 134
Joined: Mon Jan 04, 2010 2:00 pm

Re: Large difference in size for encoded movies

Post by creamyhorror »

I don't have advice, since I use Avisynth.
ascianti
Posts: 42
Joined: Wed Dec 30, 2009 5:13 pm

Re: Large difference in size for encoded movies

Post by ascianti »

Fantasia isn't exactly a simple cartoon or cheaply produced anime. I'd go with weak and see if it gives the result you are looking for, if not bump it up to medium.

I'm not a fan of noise, however I dislike blocking more.
Post Reply