Jump to content

I'm looking to start ripping my DVD and Blu-ray library and would like the newest standard HEVC due to the file size it can produce (I don't mind that it is slower than X264). I'm looking for a program that has a GUI and is simple enough to fly through the set up of what I want. I have been using handbrake but I was curious if there is anything out there that would speed this process up. (Running a i7-7700k and a 1070 GTX).

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/
Share on other sites

Link to post
Share on other sites

4 minutes ago, Vergil2501 said:

I'm looking to start ripping my DVD and Blu-ray library and would like the newest standard HEVC due to the file size it can produce (I don't mind that it is slower than X264). I'm looking for a program that has a GUI and is simple enough to fly through the set up of what I want. I have been using handbrake but I was curious if there is anything out there that would speed this process up. (Running a i7-7700k and a 1070 GTX).

You could try a different program, such as divx decoder http://www.divx.com/en/software/divx

 

It depends on whether handbrake or other software can leverage the GPU to also help with converting.

Please quote my post, or put @paddy-stone if you want me to respond to you.

Spoiler
  • PCs:- 
  • Main PC build  https://uk.pcpartpicker.com/list/2K6Q7X
  • ASUS x53e  - i7 2670QM / Sony BD writer x8 / Win 10, Elemetary OS, Ubuntu/ Samsung 830 SSD
  • Lenovo G50 - 8Gb RAM - Samsung 860 Evo 250GB SSD - DVD writer
  •  
  • Displays:-
  • Philips 55 OLED 754 model
  • Panasonic 55" 4k TV
  • LG 29" Ultrawide
  • Philips 24" 1080p monitor as backup
  •  
  • Storage/NAS/Servers:-
  • ESXI/test build  https://uk.pcpartpicker.com/list/4wyR9G
  • Main Server https://uk.pcpartpicker.com/list/3Qftyk
  • Backup server - HP Proliant Gen 8 4 bay NAS running FreeNAS ZFS striped 3x3TiB WD reds
  • HP ProLiant G6 Server SE316M1 Twin Hex Core Intel Xeon E5645 2.40GHz 48GB RAM
  •  
  • Gaming/Tablets etc:-
  • Xbox One S 500GB + 2TB HDD
  • PS4
  • Nvidia Shield TV
  • Xiaomi/Pocafone F2 pro 8GB/256GB
  • Xiaomi Redmi Note 4

 

  • Unused Hardware currently :-
  • 4670K MSI mobo 16GB ram
  • i7 6700K  b250 mobo
  • Zotac GTX 1060 6GB Amp! edition
  • Zotac GTX 1050 mini

 

 

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10520389
Share on other sites

Link to post
Share on other sites

If it's slower than X264, it's most likely using software to do the encoding. At which point, you'll need a hardware encoder to see significant improvements. From what I can find, both QuickSync on Kaby Lake and NVENC on Pascal support hardware H.265 encoding.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10520392
Share on other sites

Link to post
Share on other sites

x.265/h.265 HEVC takes significantly longer to encode then encoding h.264, this is part of why it hasn't completely replaced h.264 already, I haven't had a chance to test if Handbrake can use the 1080ti to do the encoded now that I have that, but not a fan of QuickSync H.264 encoder, the quality is crap for the file size using Handbrake.

 

to the OP, the big thing to learn is the optimal settings, to low a bitrate and to low a some other random setting and the quality isn't worth it, gotta find that balance between file size and quality.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10520431
Share on other sites

Link to post
Share on other sites

hevc isn't really suitable for anything below 1080p or higher content. It won't be better quality tha h264 at DVD rips (720x80, 720x576 with different aspect ratios)

it's also not really much better .. at 720p or 1080 you're looking at maybe 10-20% less disk space but at 5-10 times increase in encoding times, if you use software encoders

software encoders like x265 will reach 3-5 fps while x264 will do 20-40fps depending on quality settings.

There are cards that cand encode hevc in real time (gtx1060 or higher i think), polaris from amd (rx 470, 480, 560 i think and higher, vega)

But all these hardware encoders focus on SPEED, to get at least 25-30fps , caring less about quality.

You'd need to set a bitrate higher than what you'd use to encode with x264 (handbrake) just to get close to same quality.

 

My advice .. stick to x264.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10520434
Share on other sites

Link to post
Share on other sites

OP, which version of Handbrake do you use? Handbrake has included the x265 encoder for several versions now.

Check under the video tab and then click on the video codec option. It should give you the option to use x265.

 

 

6 hours ago, paddy-stone said:

You could try a different program, such as divx decoder http://www.divx.com/en/software/divx

 

It depends on whether handbrake or other software can leverage the GPU to also help with converting.

Please, no. Don't recommend DivX.

 

6 hours ago, M.Yurizaki said:

If it's slower than X264, it's most likely using software to do the encoding. At which point, you'll need a hardware encoder to see significant improvements. From what I can find, both QuickSync on Kaby Lake and NVENC on Pascal support hardware H.265 encoding.

You do NOT want to use hardware accelerated encoding for things like archiving. It might be faster, but it also looks significantly worse.

You want to to encode the slow way.

 

6 hours ago, mariushm said:

It won't be better quality tha h264 at DVD rips (720x80, 720x576 with different aspect ratios)

It should be better quality at a given file size, or a smaller file if you aim for quality parity.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10521734
Share on other sites

Link to post
Share on other sites

@LAwLz   HEVC is mostly better due to bigger maximum blocks ( 64 x 64  compared to h264's 16x16) which can be more efficiently split into smaller sub-blocks and also help reduce bitrate. There's also more complex intra prediction compared to h264 (33 modes vs 8 for h264) but most are disabled anyway on fast presets in order to increase encoding speed, and better motion compensation.

 

The problem is that at low resolutions like the ones DVD have, there's rarely a chance for the encoder to actually get to use up to 64x64 CTUs , it will mostly stick to 16x16 just like h264. There's too much stuff changing in a 64x64 pixel block in a DVD frame to be able to use such CTUs. So.. you don't get to use the thing that gives the most disk space reductions. The DVDs are also way more blurrier or grainier so the better intra prediction and motion compensation won't do much to improve compression.

 

You can try it... find some 2.35:1 DVD , encode 10-20 minutes of it with x264 with "veryslow" preset at let's say CRF16 (pretty much archival quality).. even with very slow preset, on a good cpu you'd probably encode faster than real time with x264 and will definitely be faster than x265. Then play with x265 until you get the same file size at the end or some file size slightly smaller. Then compare them visually, i'm sure there won't be any noticeable improvement with x265 or x265 encoded content will look even worse.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10521843
Share on other sites

Link to post
Share on other sites

51 minutes ago, mariushm said:

but most are disabled anyway on fast presets in order to increase encoding speed

If you're using the fast presets for archiving then you're doing it wrong.

 

 

52 minutes ago, mariushm said:

You can try it... find some 2.35:1 DVD , encode 10-20 minutes of it with x264 with "veryslow" preset at let's say CRF16 (pretty much archival quality).. even with very slow preset, on a good cpu you'd probably encode faster than real time with x264 and will definitely be faster than x265. Then play with x265 until you get the same file size at the end or some file size slightly smaller. Then compare them visually, i'm sure there won't be any noticeable improvement with x265 or x265 encoded content will look even worse.

I'll get back to you on that. I don't have a DVD reader anymore though so I'll have to use one of my already encoded videos as the source. Probably won't use the things you suggested either (veryslow and CRF16).

I don't usually deal with DVD quality so it will be interesting to see the results.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10521970
Share on other sites

Link to post
Share on other sites

7 minutes ago, LAwLz said:

If you're using the fast presets for archiving then you're doing it wrong.

 

In x265, a lot of the things that are unique to hevc compared to x264 (h264 standard actually) are by default disabled, or set to off on presets like "fast" or "faster"

It's to speed up encoding. If you'd let it perform all motion searching specific to hevc and let it use all other features unique to hevc you'd see encoding speed drop from 3-5 fps to 0.5 fps or something like that.

x264 even on placebo preset is much faster than x265 and will retain more quality. And, if you don't care about compatibility with TVs (some don't play h264 10bit) you can go nuts encoding with 10bit (even if the original is 8bit, it still helps) and it will further improve quality (more quality at a particular bitrate) in most movies.

Really, if we're talking archival quality .. i'm thinking going with x265 will reduce encoding speed so much that you'll use so much more time and electricity encoding content for days and weeks that it would probably be cheaper to just buy another 4-6 TB hard drive, or more hard drives, depending on how big your collection is.

 

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10522003
Share on other sites

Link to post
Share on other sites

1 hour ago, mariushm said:

In x265, a lot of the things that are unique to hevc compared to x264 (h264 standard actually) are by default disabled, or set to off on presets like "fast" or "faster"

Thanks captain obvious!

 

1 hour ago, mariushm said:

x264 even on placebo preset is much faster than x265 and will retain more quality.

Depends on what settings you use for x265.

 

1 hour ago, mariushm said:

And, if you don't care about compatibility with TVs (some don't play h264 10bit) you can go nuts encoding with 10bit (even if the original is 8bit, it still helps) and it will further improve quality (more quality at a particular bitrate) in most movies.

You can do that with HEVC too, with the added benefit of hardware accelerated 10bit decoding being fairly widely supported (for things that actually supports HEVC that is).

 

1 hour ago, mariushm said:

Really, if we're talking archival quality .. i'm thinking going with x265 will reduce encoding speed so much that you'll use so much more time and electricity encoding content for days and weeks that it would probably be cheaper to just buy another 4-6 TB hard drive, or more hard drives, depending on how big your collection is.

I think that's the wrong way of looking at things, but right now I am just curious if your claim that H.264 will look better than HEVC for low resolution content is true or not, and how big the difference is.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10522244
Share on other sites

Link to post
Share on other sites

3 minutes ago, LAwLz said:

You can do that with HEVC too, with the added benefit of hardware accelerated 10bit decoding being fairly widely supported.

What i was trying to say ...

 

From memory, I think x265 works internally with at least 10 bit precision, so even if you say you want the output to be HEVC 4:2:0 8bit , internally x265 will do all the computations using 10bit (or maybe 12bit, I don't know, haven't kept up with the development) and assembly code optimized for that.

 

In contrast, x264 has assembly routines optimized for 8bit and different assembly routines optimized for 10 bit.  Even if the original content is 8 bit, x264 will benefit from working with the data on 10 bit because there will be less rounding errors during various calculations over frames, better precision, less issues with banding, better compression over multiple sequential frames. So basically, you lose some speed (because 10 bit assembly is a bit slower than 8 bit assembly) but you gain more quality per bitrate. 

 

Problem is hardware decoders of h264 content are not required to support 10bit, majority will only support 8 bit.

Software decoding is easy though, especially if we're talking DVD resolutions. Hell, I can play h264 8bit SD content on an old IBM T40 with an Intel Centrino 1.5 Ghz single core processor (using an older CoreAVC codec) with no help from the ATI Rage card it comes with, so if that ancient piece of technology can play, any computer in the last 5-10 years or so will play h264 10 bit content just fine.

So maybe you won't get to play movies directly from a usb stick or network attached storage on your tv, but you can easily use a computer or laptop or phone to play them through hdmi cables or wireless or something like that on your TV.

 

Have fun with those experiments and let me know, I'm curious as well.  I admit that what i said was valid maybe 6-8 months ago when i did the last tests, but x265 was updated quite a lot since then. Still, I don't have high hopes, low resolutions was never something Multicoreware was focused on.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10522274
Share on other sites

Link to post
Share on other sites

34 minutes ago, mariushm said:

In contrast, x264 has assembly routines optimized for 8bit and different assembly routines optimized for 10 bit.  Even if the original content is 8 bit, x264 will benefit from working with the data on 10 bit because there will be less rounding errors during various calculations over frames, better precision, less issues with banding, better compression over multiple sequential frames. So basically, you lose some speed (because 10 bit assembly is a bit slower than 8 bit assembly) but you gain more quality per bitrate. 

I know the difference between 8bit and 10bit video encoding, and nothing in my post indicated that I needed you to explain it, so I am not sure why you are bringing it up.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10522394
Share on other sites

Link to post
Share on other sites

I think something went wrong with my H.264 encode because the colors are off. Gonna upload it anyway for now.

The H.264 file is 13% larger and has slightly worse quality.

 

Judging from this I'd say HEVC is better even for DVD material. It offers better image quality at a lower file size. It is much slower though... I was getting about 1 frame per second with my settings on a 1700X.

 

ScreenshotCompare 1

ScreenshotCompare 2

ScreenshotCompare 3

ScreenshotCompare 4

ScreenshotCompare 5

ScreenshotCompare 6

ScreenshotCompare 7

ScreenshotCompare 8

 

 

H.264 download

HEVC download

(Download the files, don't watch in browser)

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10524617
Share on other sites

Link to post
Share on other sites

There's a problem with what you're showing above. I don't know what settings you've used to create the movies from which the pictures are taken, and I don't know the bitrates used. In addition to that, you can't really tell about a video quality from some screenshots, i don't know if they're keyframes or if they're some predicted frames, don't know if aspect ratio is screwed up or not and so on..

 

So I took the liberty of grabbing a genuine H2O Just Add Water DVD from the shelf and cut a one minute segment out of an episode where there's multiple and different scenes (closeups, static background with people talking, underwater action which would use more bitrate)... see screenshot at bottom.

This sequence has an average bitrate of 5.1 mbps and a peak bitrate of 7.45 mbps, it's 720x576 pal (25fps) with 16:9 aspect ratio ...

 

I could have just used random CRF settings until i'd get something close to the desired bitrate, but for the sake of tests i just used 2 pass encoding and set the desired bitrate from the start.

I used 4 mbps as I thought it would be what an average user would choose for some dvd rip, high quality personal backup. DVDs are limited to maximum 9.8 mbps for video part, so half of that max bitrate seems right. It would result in 1.8 GB per hour or 3.6 GB per 2h movie, leaving room for a couple audio tracks and some subtitles yet making it possible to backup everything on a 4.3 GB  DVD +/- R 

 

For fun, I also used 1mbps and 2 mbps as target bitrates, just to see how HEVC is much better at these lower presets.

 

You can download and compare all video files from here :  FTP LINK (you can enter this in a ftp client to get all files easily or open in browser)

 

So results:

 

x264  8bit: 22.85 fps at 1 mbps , 17.38 fps at 2 mbps , 13.30 fps at 4 mbps
x264 10bit: 12.55 fps at 1 mbps , 10.07 fps at 2 mbps , 08.02 fps at 4 mbps 

x265  8bit: 03.05 fps at 1 mbps , 03.05 fps at 2 mbps , 02.26 fps at 4 mbps
x265 10bit: 03.12 fps at 1 mbps , 02.44 fps at 2 mbps , 01.81 fps at 4 mbps 

Notes: 
* x264 uses preset "veryslow". Preset "slower" would be significantly faster with minimal quality loss.
* x265 uses preset "slower"

Comparing x264 10bit to x265 10 bit...

 

At 4 mbps  both videos look the same, to me i'm trying not to be biased but really can't tell. 

At 2 mbps, x264 versions may be a bit worse during a few seconds in the water with the light rays and the skin on the girls seems a bit more blurrier but not bothersome

At 1mbps, there's noticeable loss of quality on the skin and the underwater scenes are crap, x265 retains more detail

 

So is it worth the 4-6 times slower encoding speed (at least on this FX-8320 cpu) to encode using x265?

I guess you could say yeah it's worth the 3-6x slowdown because I'll encode in 3 to 3.5 mbps and get same quality x264 produces at 4 mbps so I save disk space.

 

Just for fun, I encoded using my RX 470 video card, you have the 2mbps and 4 mbps versions uploaded as well.

Got 714.29 fps for both the 2 mbps version and the 4mbps version.. the 4mbps version is almost watchable.

 

x264 command line :

 


x264-r2851-[10bit-]ba24899.exe --pass [1|2] --bitrate [2048|4096] --preset veryslow --tune film --sar 64:45 --no-interlaced --videoformat pal --colorprim bt470bg --colormatrix bt470bg --transfer bt470bg -o d:\temp\test\file_[8|10]bit_[2|4]mbps_veryslow.mkv d:\Temp\test\file.y4m

 

hevc command line :

 

x265.exe --preset slower --output-depth [8|10] --bitrate [2048|4096] --pass [1|2] --sar 64:45 --videoformat pal --colorprim bt470bg --transfer bt470bg --input d:\Temp\test\file.y4m -o d:\Temp\test\file_[8|10]bit_[2|4]mbps_slower.hevc

 

AMF  hardware encoding :

 

VCEEncC64.exe --codec hevc --quality slow --tier high --vbr [2048|4096] --input-res 720x576 --fps 25/1 --sar 64:45 --y4m -i "d:\Temp\test\file.y4m" -o "d:\Temp\test\file_[2|4]mbps_AMF.mp4"

 

 

where you use only one of the two options between brackets.

I used --preset slower because i wanted to finish today and there were simply too many tests.

 

 

59d836b8201f7_file.y4m_thumbs_2017_10.07_05_05_38.jpg.c78851ada0bbc17aab993d26ddcc2427.jpg

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10525353
Share on other sites

Link to post
Share on other sites

8 hours ago, mariushm said:

There's a problem with what you're showing above. I don't know what settings you've used to create the movies from which the pictures are taken, and I don't know the bitrates used. In addition to that, you can't really tell about a video quality from some screenshots, i don't know if they're keyframes or if they're some predicted frames, don't know if aspect ratio is screwed up or not and so on..

The encoding settings are embedded in the video metadata if you want to check but it's just CRF 18 at the placebo preset (for both x264 and x265). Don't think I changed anything as far as the video goes.

The aspect ratio is not screwed up but the color seems to be too saturated in the H.264 version. Can't really be bothered to look into why though.

I selected the frames at random but if you want you could always download the files and seek to a keyframe if you want.

 

Anyway, our results seems to match each other so I don't think further investigation is necessary.

HEVC will look better and/or have a smaller file size at the same quality as H.264, even with low resolution videos (and in your case, even at a speedier preset). It is a lot slower to encode though (even at the speedier preset). With my settings I was getting 1 frame per second on a 1700X, but I could have gotten more if I tweaked the slices and frame threads. Can't remember how many FPS I got with H.264 but it was probably between 5 and 10 (guessing).

 

For archival purposes I think it is worth the extra time, but I guess it depends on what your situation looks like. I got slightly over 4 terabytes of videos saved, so a 20% space saving (which are fairly conservative numbers) would be about 800 gigabytes.

If you are planning on deleting the video then sure, don't spend all that extra time encoding it. But if you plan on keeping it around then I think letting your computer run overnight with the best encoding settings you can get is worth it.

Link to comment
https://linustechtips.com/topic/842975-hevc-encoders/#findComment-10526481
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×