H.265 resolution, bitrate and tips

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
Post Reply
sentinelaeon
Posts: 8
Joined: Wed Jan 06, 2021 7:51 pm

H.265 resolution, bitrate and tips

Post by sentinelaeon »

Description of the question:
I am encoding various video files into H.265 to reduce it's size on my hdd. It's different formats of files and various resolutions/bitrate. With some i wan't close quality to original, with others i can drasticaly lower the quality and live with it. I would like to find the best way to store those files using HandBrake. Right now this is how i lower the size of files, encoding into H.265:

1) I set the resolution: i either leave it at original or i lower it, for instance from 1080p -> 720p, etc.
2) I leave fps at original and set variable fps
3) i set video codec to H.265 10-bit
4) i set encoder preset to Fast
5) depending on the quality i wan't the video to be, i set 22, 25 or 28 RF constant quality

Questions:

Image

1) I have been wondering many times about what is better: resolution or bitrate ? For instance, is it better to set resolution to 1080p and live with lower bitrate, or set it to 720p and have higher bitrate for same file size ? What will give me better image quality ? My screen is 1080p but i never watch video full screen, usualy looking at it at only half the size. I will give you an example:

I did a test encoding of very short video clip. Setting 22 RF got me average bitrate of 1443 kb/s at 1280x720. So i am wondering, would i get better quality at same file size if i used lower resolution but a lower RF of like 18 ..
Also another short clip i did was 28 RF and 600 kb/s average bitrate at 1280x720. Would it make sense to lower the resolution at such low bitrate and set RF to 18 ?

2) Could you point me into a direction to get some extra tips and tricks to get the best quality per size of file, i know certain advanced options can be manualy typed in but i am completely new in this teritory. I will do the reading, just point me in the right direction.

HandBrake version:
I am using HandBrake 1.3.3


Operating system and PC:
Windows 8.1 x64, i5 2500K @4.0, 12GB DDR3 ram, R9 390
mduell
Veteran User
Posts: 7370
Joined: Sat Apr 21, 2007 8:54 pm

Re: H.265 resolution, bitrate and tips

Post by mduell »

x265 only really excels over x264 if you're at 4K or higher resolution, or targeting mid to low quality levels (low to very low bitrates). So using x265 on fast settings for HD content really isn't going to improve meaningfully over what you could get from x264.

For your two questions:

1) Lower the quality target (raise the RF) to a point (low 30s is a reasonable limit), then start dropping resolution (with, say, RF 30) if that's not small enough for you.

2) The slowest encoder preset you can tolerate is going to be the best balance of settings, instead of just configuring specific settings. The encoder presets are balanced sets of changes chosen by the encoder developers to offer the best tradeoffs between speed and efficiency (quality for size).
musicvid
Veteran User
Posts: 3914
Joined: Sat Jun 27, 2009 1:19 am

Re: H.265 resolution, bitrate and tips

Post by musicvid »

You lower your file size by rendering 10 bit?
How do you do that?
sentinelaeon
Posts: 8
Joined: Wed Jan 06, 2021 7:51 pm

Re: H.265 resolution, bitrate and tips

Post by sentinelaeon »

musicvid wrote: Thu Jan 07, 2021 3:02 am You lower your file size by rendering 10 bit?
How do you do that?
I do not know to be honest - i am simply using it because i read it in some HEVC guide, this is the quote from it:
10 produces slightly smaller files, and prevents banding from 8-bit compressions.
https://kokomins.wordpress.com/2019/10/ ... -or-12-bit

I have another question. Yesterday after converting 1080p into 720p i said, lets try to go a little lower. And i entered 720x480 because i found that resolution online. And i was happy with the quality at 720x480 22 RF and file size was tiny. But i failed to see that this is not a 16:9 resolution. So now it says storage 720x480, display 853x480. Then i tried to manualy set 853x480. Obviously i do not notice the difference between quality in the two, 720x480 is more than 10% smaller. I read a bit online about that 720x480 resolution, square/rectangular pixels, etc.
QUESTION: Can someone explain to me in the easy terms what happens when i set 720x480 anamorphic: Automatic - 720x480 storage, 853x480 display ? What am i losing compared to setting 853x480 right away ? Quality obviously, but how ? I would like to note that the video remains 16:9 and identical, no cropping, i checked it many times. I cannot spot the difference using my eye.
musicvid
Veteran User
Posts: 3914
Joined: Sat Jun 27, 2009 1:19 am

Re: H.265 resolution, bitrate and tips

Post by musicvid »

I do not know to be honest - i am simply using it because i read it in some HEVC guide, this is the quote from it:
10 produces slightly smaller files, and prevents banding from 8-bit compressions.
https://kokomins.wordpress.com/2019/10/ ... -or-12-bit
I find it helpful to test the things I read before taking them for granted. I would expect a 33% increase in file size, and 2x-3x more encoding time with the 10 bit codec, all else being equal.
mduell
Veteran User
Posts: 7370
Joined: Sat Apr 21, 2007 8:54 pm

Re: H.265 resolution, bitrate and tips

Post by mduell »

musicvid wrote: Thu Jan 07, 2021 4:15 pmI find it helpful to test the things I read before taking them for granted. I would expect a 33% increase in file size, and 2x-3x more encoding time with the 10 bit codec, all else being equal.
You should probably test those expectations before taking them for granted. :idea:
rollin_eng
Veteran User
Posts: 3834
Joined: Wed May 04, 2011 11:06 pm

Re: H.265 resolution, bitrate and tips

Post by rollin_eng »

musicvid wrote: Thu Jan 07, 2021 4:15 pm
I do not know to be honest - i am simply using it because i read it in some HEVC guide, this is the quote from it:
10 produces slightly smaller files, and prevents banding from 8-bit compressions.
https://kokomins.wordpress.com/2019/10/ ... -or-12-bit
I find it helpful to test the things I read before taking them for granted. I would expect a 33% increase in file size, and 2x-3x more encoding time with the 10 bit codec, all else being equal.
Any tests for these numbers?
rollin_eng
Veteran User
Posts: 3834
Joined: Wed May 04, 2011 11:06 pm

Re: H.265 resolution, bitrate and tips

Post by rollin_eng »

mduell wrote: Thu Jan 07, 2021 6:37 pm
musicvid wrote: Thu Jan 07, 2021 4:15 pmI find it helpful to test the things I read before taking them for granted. I would expect a 33% increase in file size, and 2x-3x more encoding time with the 10 bit codec, all else being equal.
You should probably test those expectations before taking them for granted. :idea:
Jinx. You win by a minute.
sentinelaeon
Posts: 8
Joined: Wed Jan 06, 2021 7:51 pm

Re: H.265 resolution, bitrate and tips

Post by sentinelaeon »

I will test it and report it :)
sentinelaeon
Posts: 8
Joined: Wed Jan 06, 2021 7:51 pm

Re: H.265 resolution, bitrate and tips

Post by sentinelaeon »

I did a simple testing. Converting a screen recording of me playing a video game at 1920x1080. I converted it to 853x480 using fast preset and 28 RF. This is interesting. While the guide said 10-bit is the sweet spot, this would point to 12-bit being worth it, at least in this case. Could someone explain what is going on here ?

Image
sentinelaeon
Posts: 8
Joined: Wed Jan 06, 2021 7:51 pm

Re: H.265 resolution, bitrate and tips

Post by sentinelaeon »

Here is the link to the comparison, i do not know why img tag is not working for me ..

https://i.imgur.com/JeZ7fQl.jpg
Woodstock
Veteran User
Posts: 4026
Joined: Tue Aug 27, 2013 6:39 am

Re: H.265 resolution, bitrate and tips

Post by Woodstock »

Image tag does not allow off-site links.
sentinelaeon
Posts: 8
Joined: Wed Jan 06, 2021 7:51 pm

Re: H.265 resolution, bitrate and tips

Post by sentinelaeon »

Woodstock wrote: Fri Jan 08, 2021 6:07 pm Image tag does not allow off-site links.
How should i include an image then ?
Woodstock
Veteran User
Posts: 4026
Joined: Tue Aug 27, 2013 6:39 am

Re: H.265 resolution, bitrate and tips

Post by Woodstock »

Upload it as an attachment, then you can include it "inline".

Otherwise, like you've already done, post the image location as a link.

A lot of people get links from [insert popular social media site here] and get surprised that the links don't live very long as image tags, because [insert popular social media site here] generates the link to only work when you're logged in to [insert popular social media site here]. And even imgur.com links can be transient.
sentinelaeon
Posts: 8
Joined: Wed Jan 06, 2021 7:51 pm

Re: H.265 resolution, bitrate and tips

Post by sentinelaeon »

Hmm, i dont see any option to upload attachment on this forum. Could it be because i just registered and do not have enough posts ?
Woodstock
Veteran User
Posts: 4026
Joined: Tue Aug 27, 2013 6:39 am

Re: H.265 resolution, bitrate and tips

Post by Woodstock »

Quick reply doesn't have that option, you have to go to "Full Editor & Preview" to find the Attachments tab.
sentinelaeon
Posts: 8
Joined: Wed Jan 06, 2021 7:51 pm

Re: H.265 resolution, bitrate and tips

Post by sentinelaeon »

Yep, i did that, but the tab is missing for me, otherwise i would have used that option in the first place. I read the FAQ and it says certain groups can have the option to attach images disabled. It would make sense for it to be disabled for new users to prevent bots and such from using space.

Anyway, anyone cares to comment 8 vs 10 vs 12 bit ? About 10% space saving using 12 bit vs 8 bit doesn't sound that bad:

https://i.imgur.com/JeZ7fQl.jpg
Devore
Posts: 34
Joined: Thu Sep 26, 2013 3:57 pm

Re: H.265 resolution, bitrate and tips

Post by Devore »

sentinelaeon wrote: Thu Jan 07, 2021 3:32 pm
I have another question. Yesterday after converting 1080p into 720p i said, lets try to go a little lower. And i entered 720x480 because i found that resolution online. And i was happy with the quality at 720x480 22 RF and file size was tiny. But i failed to see that this is not a 16:9 resolution. So now it says storage 720x480, display 853x480. Then i tried to manualy set 853x480. Obviously i do not notice the difference between quality in the two, 720x480 is more than 10% smaller. I read a bit online about that 720x480 resolution, square/rectangular pixels, etc.
QUESTION: Can someone explain to me in the easy terms what happens when i set 720x480 anamorphic: Automatic - 720x480 storage, 853x480 display ? What am i losing compared to setting 853x480 right away ? Quality obviously, but how ? I would like to note that the video remains 16:9 and identical, no cropping, i checked it many times. I cannot spot the difference using my eye.
Anamorphic just means the storage format (whether digital or on film) does not match the intended display format.

720x480 is not 16:9. 720x480 is used for DVD video storage (for NTSC, PAL gets 720x576), and, if anamorphic, it gets stretched to 16:9 for display purposes. That's usually indicated by 853x480 display size, ie, 16:9. If you're re-coding FROM a DVD source you usually use 720x406 (or 720x404) for 1:1 pixels, since encoding from 720x480 to 853x480 is mostly pointless; you can't create extra detail/pixels out of thin air, so it's a waste of bits. If you're downcoding, ex, from a Blu Ray to DVD-quality, you may want to resize to 853x480 or 720x406, depending on your needs and preferences.

Also, you may not notice the difference, but it's there. Usually, for personal use purposes, use whatever settings make you happy while giving you a satisfactory encode times.
Devore
Posts: 34
Joined: Thu Sep 26, 2013 3:57 pm

Re: H.265 resolution, bitrate and tips

Post by Devore »

The benefit of 10-bit formats is that you have more color space, so there is less dithering needed by the encoder, thus you get smoother color gradients and better compression. Theorycrafting, I would expect the benefits to be greatest when resizing from the source, and the additional gradients created from resizing and smoothing will gain more from 10-bits? The drawback is more limited options for direct playback. I put everything on Plex, and playing back 10-bit encodes on my tablet forces a server-side re-encode, it won't be streamed directly.
Post Reply