1080p to 720p results in much lager filesize

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
DJQuad
Posts: 14
Joined: Sun Mar 25, 2018 3:37 pm

1080p to 720p results in much lager filesize

Post by DJQuad »

Hey all, I'm converting a bunch of 1080p videos to the "Fast 720p30" preset and the resulting files are considerably larger. Shouldn't they be smaller without losing quality?

The only difference I see is that the 1080p videos are 24 fps and the output is 30 fps, but it still doesn't make sense to me that the 720p files are considerably larger with lower resolution.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: 1080p to 720p results in much lager filesize

Post by mduell »

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.
DJQuad
Posts: 14
Joined: Sun Mar 25, 2018 3:37 pm

Re: 1080p to 720p results in much lager filesize

Post by DJQuad »

Apologies, I assumed that wasn't needed for this type of request.

Code: Select all

HandBrake 1.0.7 (2017040900) - 64bit
OS: Microsoft Windows NT 10.0.16299.0 - 64bit
CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
Ram: 16283 MB, 
GPU Information:
  NVIDIA GeForce GTX 1060 6GB - 22.21.13.8167
  Intel(R) HD Graphics 630 - 23.20.16.4849
Screen: 1920x1080
Temp Dir: C:\Users\DELLPC\AppData\Local\Temp\
Install Dir: D:\Program Files\HandBrake
Data Dir: C:\Users\DELLPC\AppData\Roaming\HandBrake Team\HandBrake\1.0.7.0

-------------------------------------------


# Starting Encode ...

[17:43:04] hb_init: starting libhb thread
[17:43:04] 1 job(s) to process
[17:43:04] json job:
{
  "Audio": {
    "AudioList": [
      {
        "Bitrate": 160,
        "DRC": 0.0,
        "Encoder": 65536,
        "Gain": 0.0,
        "Mixdown": 4,
        "NormalizeMixLevel": false,
        "Samplerate": 0,
        "Track": 0,
        "DitherMethod": 0
      }
    ],
    "CopyMask": [
      1073807360,
      1073743872,
      1074003968,
      1073750016,
      1090519040,
      1074790400,
      1074266112,
      1107296256
    ],
    "FallbackEncoder": 2048
  },
  "Destination": {
    "ChapterList": [
      {
        "Name": "Chapter 1"
      }
    ],
    "ChapterMarkers": true,
    "File": "D:\\Booger\\Movies\\Commentaries\\720p\\Star Wars The Last Jedi (2017).m4v",
    "Mp4Options": {
      "IpodAtom": false,
      "Mp4Optimize": false
    },
    "Mux": 131072
  },
  "Filters": {
    "FilterList": [
      {
        "ID": 4,
        "Settings": {
          "mode": "7"
        }
      },
      {
        "ID": 3,
        "Settings": {
          "block-height": "16",
          "block-thresh": "40",
          "block-width": "16",
          "filter-mode": "2",
          "mode": "3",
          "motion-thresh": "1",
          "spatial-metric": "2",
          "spatial-thresh": "1"
        }
      },
      {
        "ID": 11,
        "Settings": {
          "crop-bottom": "0",
          "crop-left": "0",
          "crop-right": "0",
          "crop-top": "0",
          "height": "720",
          "width": "1280"
        }
      },
      {
        "ID": 6,
        "Settings": {
          "mode": "2",
          "rate": "27000000/900000"
        }
      }
    ]
  },
  "PAR": {
    "Num": 27,
    "Den": 20
  },
  "Metadata": {},
  "SequenceID": 0,
  "Source": {
    "Angle": 1,
    "Range": {
      "Type": "chapter",
      "Start": 1,
      "End": 1
    },
    "Title": 9,
    "Path": "D:\\Booger\\Movies\\Commentaries\\1080p\\Star Wars The Last Jedi (2017).mp4"
  },
  "Subtitle": {
    "Search": {
      "Burn": true,
      "Default": false,
      "Enable": true,
      "Forced": true
    },
    "SubtitleList": []
  },
  "Video": {
    "Encoder": 65536,
    "Level": "3.1",
    "TwoPass": false,
    "Turbo": false,
    "ColorMatrixCode": 0,
    "Options": "",
    "Preset": "fast",
    "Profile": "main",
    "Quality": 21.0,
    "OpenCL": false,
    "HWDecode": false,
    "QSV": {
      "Decode": false,
      "AsyncDepth": 0
    }
  }
}
[17:43:04] CPU: Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
[17:43:04]  - Intel microarchitecture Kaby Lake
[17:43:04]  - logical processor count: 8
[17:43:04] Intel Quick Sync Video support: yes
[17:43:04]  - Intel Media SDK hardware: API 1.25 (minimum: 1.3)
[17:43:04]  - H.264 encoder: yes
[17:43:04]     - preferred implementation: hardware (any)
[17:43:04]     - capabilities (hardware):  breftype icq+la+i+downs vsinfo opt1 opt2+mbbrc+extbrc+trellis+ib_adapt+nmpslice
[17:43:04]  - H.265 encoder: yes
[17:43:04]     - preferred implementation: hardware (any)
[17:43:04]     - capabilities (hardware):  bpyramid vsinfo opt1
[17:43:04] hb_scan: path=D:\Booger\Movies\Commentaries\1080p\Star Wars The Last Jedi (2017).mp4, title_index=9
udfread ERROR: ECMA 167 Volume Recognition failed
src/libbluray/disc/disc.c:274: failed opening UDF image D:\Booger\Movies\Commentaries\1080p\Star Wars The Last Jedi (2017).mp4
src/libbluray/disc/disc.c:352: error opening file BDMV\index.bdmv
src/libbluray/disc/disc.c:352: error opening file BDMV\BACKUP\index.bdmv
[17:43:04] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Encrypted DVD support unavailable.
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.IFO failed
libdvdread:DVDOpenFileUDF:UDFFindFile /VIDEO_TS/VIDEO_TS.BUP failed
libdvdread: Can't open file VIDEO_TS.IFO.
libdvdnav: vm: failed to read VIDEO_TS.IFO
[17:43:04] dvd: not a dvd - trying as a stream/file instead
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Booger\Movies\Commentaries\1080p\Star Wars The Last Jedi (2017).mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.9.100
  Duration: 02:31:51.65, start: 0.042667, bitrate: 2296 kb/s
    Stream #0:0(und): Video: h264 (High) [avc1 / 0x31637661]
      yuv420p, 1920x800 [PAR 1:1 DAR 12:5], 2149 kb/s, PAR 1:1 DAR 12:5
      23.98 fps, 13978 tbn (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) [mp4a / 0x6134706D]
      48000 Hz, stereo, fltp, 139 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[17:43:04] scan: decoding previews for title 9
[17:43:04] scan: audio 0x1: aac, rate=48000Hz, bitrate=139581 Unknown (AAC) (2.0 ch)
[17:43:05] scan: 10 previews, 1920x800, 23.976 fps, autocrop = 0/0/0/0, aspect 2.40:1, PAR 1:1
[17:43:05] scan: supported video decoders: avcodec qsv
[17:43:05] libhb: scan thread found 1 valid title(s)
[17:43:05] Skipping subtitle scan.  No suitable subtitle tracks.
[17:43:05] starting job
[17:43:05] decomb filter thread started for segment 0
[17:43:05] decomb filter thread started for segment 1
[17:43:05] decomb filter thread started for segment 3
[17:43:05] mask filter thread started for segment 3
[17:43:05] decomb filter thread started for segment 4
[17:43:05] mask erode thread started for segment 3
[17:43:05] decomb filter thread started for segment 7
[17:43:05] decomb filter thread started for segment 5
[17:43:05] mask dilate thread started for segment 4
[17:43:05] yadif thread started for segment 0
[17:43:05] decomb check thread started for segment 2
[17:43:05] decomb check thread started for segment 3
[17:43:05] work: track 1, dithering not supported by codec
[17:43:05] decomb check thread started for segment 6
[17:43:05] work: only 1 chapter, disabling chapter markers
[17:43:05] job configuration:
[17:43:05]  * source
[17:43:05]    + D:\Booger\Movies\Commentaries\1080p\Star Wars The Last Jedi (2017).mp4
[17:43:05]    + title 9, chapter(s) 1 to 1
[17:43:05]    + container: mov,mp4,m4a,3gp,3g2,mj2
[17:43:05]    + data rate: 2296 kbps
[17:43:05]  * destination
[17:43:05]    + D:\Booger\Movies\Commentaries\720p\Star Wars The Last Jedi (2017).m4v
[17:43:05]    + container: MPEG-4 (libavformat)
[17:43:05]  * video track
[17:43:05]    + decoder: h264
[17:43:05]      + bitrate 2149 kbps
[17:43:05]    + filters
[17:43:05]      + Comb Detect (mode=3:spatial-metric=2:motion-thresh=1:spatial-thresh=1:filter-mode=2:block-thresh=40:block-width=16:block-height=16)
[17:43:05]      + Decomb (mode=39)
[17:43:05] decomb check thread started for segment 5
[17:43:05]      + Framerate Shaper (mode=2:rate=27000000/900000)
[17:43:05]        + frame rate: 23.976 fps -> peak rate limited to 30.000 fps
[17:43:05] decomb check thread started for segment 4
[17:43:05]      + Crop and Scale (width=1280:height=720:crop-top=0:crop-bottom=0:crop-left=0:crop-right=0)
[17:43:05]        + source: 1920 * 800, crop (0/0/0/0): 1920 * 800, scale: 1280 * 720
[17:43:05]    + Output geometry
[17:43:05]      + storage dimensions: 1280 x 720
[17:43:05]      + pixel aspect ratio: 27 : 20
[17:43:05]      + display dimensions: 1728 x 720
[17:43:05]    + encoder: H.264 (libx264)
[17:43:05]      + preset:  fast
[17:43:05]      + profile: main
[17:43:05]      + level:   3.1
[17:43:05]      + quality: 21.00 (RF)
[17:43:05]  * audio track 1
[17:43:05]    + decoder: Unknown (AAC) (2.0 ch) (track 1, id 0x1)
[17:43:05]      + bitrate: 139 kbps, samplerate: 48000 Hz
[17:43:05]    + mixdown: Stereo
[17:43:05]    + encoder: AAC (libavcodec)
[17:43:05]      + bitrate: 160 kbps, samplerate: 48000 Hz
[17:43:05] decomb check thread started for segment 7
[17:43:05] mask filter thread started for segment 0
[17:43:05] mask filter thread started for segment 2
[17:43:05] mask filter thread started for segment 1
[17:43:05] mask filter thread started for segment 4
[17:43:05] decomb filter thread started for segment 2
[17:43:05] mask filter thread started for segment 6
[17:43:05] mask filter thread started for segment 5
[17:43:05] mask filter thread started for segment 7
[17:43:05] mask erode thread started for segment 1
[17:43:05] mask erode thread started for segment 2
[17:43:05] mask erode thread started for segment 0
[17:43:05] mask erode thread started for segment 4
[17:43:05] decomb filter thread started for segment 6
[17:43:05] mask erode thread started for segment 6
[17:43:05] mask erode thread started for segment 5
[17:43:05] mask erode thread started for segment 7
[17:43:05] mask dilate thread started for segment 1
[17:43:05] mask dilate thread started for segment 0
[17:43:05] mask dilate thread started for segment 3
[17:43:05] mask dilate thread started for segment 2
[17:43:05] mask dilate thread started for segment 5
[17:43:05] decomb check thread started for segment 0
[17:43:05] mask dilate thread started for segment 6
[17:43:05] decomb check thread started for segment 1
[17:43:05] yadif thread started for segment 1
[17:43:05] mask dilate thread started for segment 7
[17:43:05] yadif thread started for segment 2
[17:43:05] yadif thread started for segment 3
[17:43:05] yadif thread started for segment 4
[17:43:05] yadif thread started for segment 5
[17:43:05] yadif thread started for segment 6
[17:43:05] yadif thread started for segment 7
[17:43:05] sync: expecting 218461 video frames
[17:43:05] encx264: min-keyint: 24, keyint: 240
[17:43:05] encx264: encoding at constant RF 21.000000
[17:43:05] encx264: unparsed options: 8x8dct=0:level=3.1:vbv-maxrate=14000:ref=2:weightp=1:subme=6:vbv-bufsize=14000:rc-lookahead=30
x264 [info]: using SAR=27/20
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
x264 [info]: profile Main, level 3.1
[17:43:05] sync: first pts audio 0x1 is 0
[17:43:05] sync: first pts video is 3840
[17:43:05] sync: "Chapter 1" (1) at frame 1 time 3840

# Encode Paused


# Encode Resumed

[18:41:04] reader: done. 1 scr changes
[18:41:05] work: average encoding speed for job is 83.518608 fps
[18:41:05] comb detect: heavy 417 | light 2187 | uncombed 215856 | total 218460
[18:41:05] decomb: deinterlaced 417 | blended 2187 | unfiltered 215856 | total 218460
[18:41:05] vfr: 218460 frames output, 0 dropped and 0 duped for CFR/PFR
[18:41:05] vfr: lost time: 0 (0 frames)
[18:41:05] vfr: gained time: 0 (0 frames) (0 not accounted for)
[18:41:05] aac-decoder done: 427109 frames, 0 decoder errors
[18:41:05] h264-decoder done: 218460 frames, 0 decoder errors
[18:41:05] sync: got 218460 frames, 218461 expected
[18:41:05] sync: framerate min 17.982 fps, max 23.981 fps, avg 23.976 fps
x264 [info]: frame I:3358  Avg QP:16.50  size: 68706
x264 [info]: frame P:63973 Avg QP:19.20  size: 17437
x264 [info]: frame B:151129 Avg QP:21.11  size:  5635
x264 [info]: consecutive B-frames:  5.4%  5.3%  5.1% 84.2%
x264 [info]: mb I  I16..4: 27.6%  0.0% 72.4%
x264 [info]: mb P  I16..4: 10.6%  0.0%  8.0%  P16..4: 38.7% 15.0%  7.6%  0.0%  0.0%    skip:20.0%
x264 [info]: mb B  I16..4:  4.8%  0.0%  1.3%  B16..8: 22.9%  6.3%  0.3%  direct:10.3%  skip:54.1%  L0:43.1% L1:49.9% BI: 7.0%
x264 [info]: coded y,uvDC,uvAC intra: 39.0% 65.7% 21.5% inter: 9.3% 22.7% 0.6%
x264 [info]: i16 v,h,dc,p: 41% 22% 17% 20%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 17% 19%  6%  7%  7%  6%  6%  4%
x264 [info]: i8c dc,h,v,p: 54% 18% 23%  5%
x264 [info]: Weighted P-Frames: Y:5.2% UV:3.6%
x264 [info]: ref P L0: 69.7% 30.3%
x264 [info]: ref B L0: 82.5% 17.5%
x264 [info]: ref B L1: 95.7%  4.3%
x264 [info]: kb/s:1929.71
[18:41:05] mux: track 0, 218460 frames, 2197724968 bytes, 1929.59 kbps, fifo 4096
[18:41:05] mux: track 1, 427109 frames, 182315008 bytes, 160.07 kbps, fifo 8192
[18:41:05] libhb: work result = 0

# Encode Completed ...


# Encode Stopped
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: 1080p to 720p results in much lager filesize

Post by mduell »

I see the source bitrate at ~2300 kbps and output at ~2100 kbps, so it should be smaller if only 10%.

Highly compressed source, fast (low efficiency) encode, and high quality target will do that.
DJQuad
Posts: 14
Joined: Sun Mar 25, 2018 3:37 pm

Re: 1080p to 720p results in much lager filesize

Post by DJQuad »

So use the very fast (or another?) preset? Here are the file sizes if it helps -

1080p:

2016.mp4 - 2,198,078,513
1999.mp4 - 1,933,473,888
2002.mp4 - 1,410,670,591
2005.mp4 - 1,460,426,253
1977.mp4 - 1,826,970,305
1980.mp4 - 1,827,173,482
1983.mp4 - 1,934,756,288
2015.mkv - 3,735,920,155
2017.mp4 - 2,615,494,170

720p:

2016.m4v - 2,060,634,441
1999.m4v - 2,113,698,712
2002.m4v - 1,994,284,730
2005.m4v - 2,190,481,902
1977.m4v - 2,052,617,486
1980.m4v - 1,952,524,949
1983.m4v - 2,477,023,269
2015.m4v - 2,728,425,767
2017.m4v - 2,387,794,205
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: 1080p to 720p results in much lager filesize

Post by Woodstock »

You are starting with a compressed source, which is then decompressed, resized, and compressed again.

Depending on how aggressively the original was compressed, the output size could be smaller or larger. If "2015.MP4" refers to The Force Awakens, the RF=20 compressed version of that is about 5.2GB, so your 3.7GB file was already compressed with a higher RF value, probably in the range of 23-24. You asked for the 720p version to be compressed at RF=21, so it WILL be bigger.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: 1080p to 720p results in much lager filesize

Post by mduell »

DJQuad wrote: Thu Apr 19, 2018 2:57 pmSo use the very fast (or another?) preset? Here are the file sizes if it helps -
Use a slower preset with a higher RF target if you want smaller files.
DJQuad
Posts: 14
Joined: Sun Mar 25, 2018 3:37 pm

Re: 1080p to 720p results in much lager filesize

Post by DJQuad »

Thanks, I'll try adjusting the output RF. How can I tell the RF of the source file?
llaffer
Posts: 10
Joined: Wed Oct 29, 2014 2:11 pm

Re: 1080p to 720p results in much lager filesize

Post by llaffer »

Sounds like that's how it's "fast", is there is less compression than normal 720p. So try the normal 720p and see what that looks like.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: 1080p to 720p results in much lager filesize

Post by mduell »

In the metadata if it was encoded using x264, but if you're changing the settings it's irrelevant.
DJQuad
Posts: 14
Joined: Sun Mar 25, 2018 3:37 pm

Re: 1080p to 720p results in much lager filesize

Post by DJQuad »

Which preset is normal?

It's H264 but I'm not seeing RF in the metadata. Without knowing that I don't know if I'm changing the settings or not when I convert.
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: 1080p to 720p results in much lager filesize

Post by Woodstock »

DJQuad, the normal "from the disk" size of Last Jedi is 41GB, so your "original" version has been highly compressed already.
DJQuad
Posts: 14
Joined: Sun Mar 25, 2018 3:37 pm

Re: 1080p to 720p results in much lager filesize

Post by DJQuad »

Yes I know that. It's 1080p and I'm trying to convert it to 720p and do some further editing from there. All I need to know is how to determine the source file's RF.
Woodstock
Veteran User
Posts: 4619
Joined: Tue Aug 27, 2013 6:39 am

Re: 1080p to 720p results in much lager filesize

Post by Woodstock »

No, you don't have to determine the source's original RF, because it's irrelevant; the "damage" to your source (lossy encoding) is already done.

When you are encoding with handbrake, the first thing done is to decompress the source. It's now "full size" again, just with a lot of missing detail resulting from the compression already applied.

Based on the results I'm getting with RF=20 on the original BD rip, the file size is going to be 10GB. To have a 2.6GB file, the RF was set much higher, so your RF=21 is trying to preserve the detail of the artifacts created in the original encode.

You are far better off going back to an original rip to do your encode, if you have any concern about quality.
DJQuad
Posts: 14
Joined: Sun Mar 25, 2018 3:37 pm

Re: 1080p to 720p results in much lager filesize

Post by DJQuad »

That makes much more sense. Thanks!

I was assuming an RF on the 1080p source at 20 for example, setting the RF to the 720p output at 20 would always make it smaller. I didn't want to make the RF higher or lower to keep the quality without making it larger than it needed to be, if that makes sense.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: 1080p to 720p results in much lager filesize

Post by mduell »

No, that doesn't make sense, due to the vagarities of RF and quality (objective or perceived).
DJQuad
Posts: 14
Joined: Sun Mar 25, 2018 3:37 pm

Re: 1080p to 720p results in much lager filesize

Post by DJQuad »

So here's what I don't get...

I downloaded https://www.youtube.com/watch?v=dNsqLyYDats which saves as a 1270x720 file. I used Handbrake to convert it to 1280x720 to make it uniform. That made it go from a 1.1GB file to a 12GB file and the audio starts desyncing after about 10 minutes.

I'm trying to take my original movie files (1080p) and downscale them to 720p to match the commentary's resulution. I batch converted the 1080p movies using the "Fast720p30" preset. I then load both files in Adobe Premiere, do some scaling/resizing, and the end result should look like https://imgur.com/a/TVtmbkK

All movies are 1080p (I batch converted them to 720p) and all commentaries are 720p. A few worked fine like the above image, but some result in really wacky file sizes and desync issues.

My end goal is to sort of embed the movie in the corner of the commentary. The commentaries are 720p so that's the resolution I'm stuck at for the output. I was thinking making everything a uniform 720p would be a great start, but something is obviously very wrong with my workflow :(
Post Reply