Log in

View Full Version : 4K H.265 (HEVC) advice please!!


maverickluke
5th June 2018, 21:01
I have been encoding 1080P mp4 with the H.264 codec using vidcoder with excellent quality and relatively small file size for years and have played around with the advanced settings to make my own presets. I am now wanting to do the same with 2160P mkv files and encode them to mp4. Speed is not an issue where video quality and smaller file size is my priority. I have a system I built witht the AMD Ryzen Threadripper 1950X so this will handle this very well with cpu based encoding. I've heard many people use staxrip for H.265 encoding. Both and Staxrip and H.265 encoding are foreign to me.

I would like to know what software people are using for this (Handbrake, Staxrip, etc.)

Thanks.

foxyshadis
5th June 2018, 21:31
vidcoder has HEVC, but by default only in the MKV selections (at least in the current beta; I don't think 3.x supported it at all).

Handbrake is definitely the closest you can ever get to vidcoder; it'll probably seem extremely familiar but with much more accessible customization, rather than having to create a preset to change any options. StaxRip is where you go if you want even more knobs to twiddle in the GUI, and MeGUI is where you go if you want a GUI to generate an AviSynth script that you can customize to your heart's content. I personally use Handbrake for simple things, and MeGUI for complex custom filtering, but that's only because I'm used to MeGUI's workflow, not that I think it's better or worse than Staxrip.

Gser
5th June 2018, 22:10
vidcoder has HEVC, but by default only in the MKV selections (at least in the current beta; I don't think 3.x supported it at all).

Handbrake is definitely the closest you can ever get to vidcoder; it'll probably seem extremely familiar but with much more accessible customization, rather than having to create a preset to change any options. StaxRip is where you go if you want even more knobs to twiddle in the GUI, and MeGUI is where you go if you want a GUI to generate an AviSynth script that you can customize to your heart's content. I personally use Handbrake for simple things, and MeGUI for complex custom filtering, but that's only because I'm used to MeGUI's workflow, not that I think it's better or worse than Staxrip.

Handbrake doesn't support 10bit internal depth processing thus it cannot process 10bit sources nor HDR properly. Ripbot264 seems to be a good choice for people looking at a simple program. MeGUI on the other hand is the best.

I do have to admit I am a bit flabbergasted about how ignorant handbrake users are about its 10 bit support. I had to evaluate it's suitability for encoding for a project and this deficit was one of the first things that popped up so to speak.

maverickluke
5th June 2018, 22:56
Handbrake doesn't support 10bit internal depth processing thus it cannot process 10bit sources nor HDR properly. Ripbot264 seems to be a good choice for people looking at a simple program. MeGUI on the other hand is the best.

I do have to admit I am a bit flabbergasted about how ignorant handbrake users are about its 10 bit support. I had to evaluate it's suitability for encoding for a project and this deficit was one of the first things that popped up so to speak.

I have vidcoder 3.14 and I can select the .mp4 container. There are also 3 options for the H.265 codec (H.265, H.265 10-bit, H.265 12-bit). I don't see with vidcoder or handbrake where you can customize settings in the advanced settings tab with H.265 as with H.264. I am not familiar with MeGUI or Staxrip, so can someone please share settings they use when converting mkv to mp4 2160P 4K with H.265? I have a 70GB 2160P mkv file that is 10-bit, Format profile: Main10@L5.1@ High. I would like to encode this to an mp4 file under 10GB if possible while maintaining very high quality. Is that possible and how do I do it?

foxyshadis
5th June 2018, 22:59
Handbrake doesn't support 10bit internal depth processing thus it cannot process 10bit sources nor HDR properly. Ripbot264 seems to be a good choice for people looking at a simple program. MeGUI on the other hand is the best.

I do have to admit I am a bit flabbergasted about how ignorant handbrake users are about its 10 bit support. I had to evaluate it's suitability for encoding for a project and this deficit was one of the first things that popped up so to speak.

They finally added that two months ago. Before that, I wouldn't have unilaterally recommended handbrake, but it actually does support 10-bit and (with some ffmpeg options) HDR now.

foxyshadis
5th June 2018, 23:03
I have vidcoder 3.14 and I can select the .mp4 container. There are also 3 options for the H.265 codec (H.265, H.265 10-bit, H.265 12-bit). I don't see with vidcoder or handbrake where you can customize settings in the advanced settings tab with H.265 as with H.264. I am not familiar with MeGUI or Staxrip, so can someone please share settings they use when converting mkv to mp4 2160P 4K with H.265? I have a 70GB 2160P mkv file that is 10-bit, Format profile: Main10@L5.1@ High. I would like to encode this to an mp4 file under 10GB if possible while maintaining very high quality. Is that possible and how do I do it?

You should really bump up to the 4.x beta, you won't have to deal with most of these issues; instead everything is based on the profile, instead of a customization. It's labeled beta, but I've had no issues at all with it so far. Alternately, just get Handbrake and directly set the profile options.

sneaker_ger
5th June 2018, 23:07
They finally added that two months ago.
Are you sure? AFAIK they added the 10 bit encoder dlls in the installer package but their pipeline is still 8 bit like Gser said, i.e. if you feed a 10 bit source and encode to 10 bit it will still be converted to 8 bit within the pipeline which could be very bad especially for HDR.

foxyshadis
5th June 2018, 23:25
Are you sure? AFAIK they added the 10 bit encoder dlls in the installer package but their pipeline is still 8 bit like Gser said, i.e. if you feed a 10 bit source and encode to 10 bit it will still be converted to 8 bit within the pipeline which could be very bad especially for HDR.

Handbrake doesn't have a pipeline; it's a GUI frontend for ffmpeg, which has supported HBD in some form for what, ten years now? They've had 16-bit capability with custom arguments for a few years now, but this year is the first time they've landed built-in 10-bit source-to-output (with 16-bit internals) ffmpeg commands for HEVC. I can upload some test files, if you'd like.

maverickluke
5th June 2018, 23:37
I would like to redirect the topic to advice with achieving very high quality with small file size. Handbrake and vidcoder are customizable the same. I know this because I've done this with h264. I have adjusted reference frames, adaptive b frames, maximum b-frames, motion estimated method, subpixel motion estimation, motion estimation range and trellis. I can take a 30GB 1080P mkv and convert it with vidcoder with these custom settings I just mentioned and produce a 6-10GB mp4 that in my humble opinion look almost identical to the original file while watching it on my Samsung 70 inch hd tv. I don't care what software program I use as long as I can achieve the same thing with h.265.

sneaker_ger
5th June 2018, 23:38
If you want a lower filesize increase (C)RF or decrease bitrate (depending on which mode you are using for encodings - usually (C)RF is recommended).

foxyshadis
5th June 2018, 23:59
I would like to redirect the topic to advice with achieving very high quality with small file size. Handbrake and vidcoder are customizable the same. I know this because I've done this with h264. I have adjusted reference frames, adaptive b frames, maximum b-frames, motion estimated method, subpixel motion estimation, motion estimation range and trellis. I can take a 30GB 1080P mkv and convert it with vidcoder with these custom settings I just mentioned and produce a 6-10GB mp4 that in my humble opinion look almost identical to the original file while watching it on my Samsung 70 inch hd tv. I don't care what software program I use as long as I can achieve the same thing with h.265.

The generic vidcoder/Handbrake profile for 1080p HEVC/H.265 should be enough. Shaving a few bits off isn't worth it. If your player can play 10-bit HEVC, encoding into it is all that matters.

maverickluke
7th June 2018, 16:07
OK. Does anyone have anything they add to the command line to improve 4K H.265 quality and file size? This is something I found on the web that someone added to the command line. Not sure what a lot of this means. Comments and thoughts?

pmode:rd=4:tu-intra-depth=3:rdoq-level=2:early-skip:b-intra:limit-modes:aq-mode=2:aq-strength=1.0:qg-size=16:ipratio=1.38:pbratio=1.28:me=3:max-merge=3:weightb:bframes=6:rc-lookahead=50:ref=6:psy-rdoq=1.38:no-sao

maverickluke
8th June 2018, 03:20
pmode is for increasing utilization of your CPU, recommended if you have 6+ cores.
early-skip is for speed, might be bad for quality and size.
some of the parameters are already included in presets if you don't alter them, there's no need to manually set it.
For example, preset slower has me=3, max-merge=3, weightb, b-intra, limit-modes, rdoq-level=2 as the default.
aq-strength=1.0 is the default
ipratio and pbratio are not typically manually specified

Thanks Wolfberry. I have the Ryzen Threadripper 1950X so the pmode I guess is a good thing. Maybe I'll remove these from the command line next time. I am encoding a 70GB mkv 4K H.265 with vidcoder at CQ 20 Medium setting H.265 10-bit with a 22 hour encode time and a 25GB mp4 file. Puts things into perspective for me with 4K H.265 cpu encoding: Larger file sizes (relative) and long encode times. My older system with the i7-4770K processor would take over 3 days to encode this!