Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

General questions or discussion about HandBrake, Video and/or audio transcoding, trends etc.
glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

Hi everyone, i have a short (51 second) 4k/50p MPEG-TS HEVC (10bit 4:2:2) sample video which is 71Mbps, and my new 6 core Metabox laptop will not play using any media player, so i want to convert this to 4k/50p AVC MP4 using the x264 encoder so i can play it, but i am not sure what settings i should use, especially the RF Quality Factor and the Encoder Profile (Main or High @ 5.1 or 5.2)

I tried doing this using High/5.2 and RF factor of 18, and the output file ended up at 45Mbps, and it took almost 5 minutes to encode, using 100% CPU and 60% of my 16gb of ram.

I ended up with a 4k/50p AVC file of 45Mbps which i am now able to play, but can someone tell me the ideal setting for such a file.

This is the sample file i refer to.

https://cp.sync.com/dl/17679e090/et9r59 ... k-up4eugm9

Cheers

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by BradleyS »

Start with one of the 4K presets, perhaps the Apple 2160p60 4K HEVC Surround preset or similar, and adjust quality according to https://handbrake.fr/docs/en/1.3.0/work ... ality.html

18 is a very high setting for 4K; we recommend 22-28 as a starting point.

glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

Hi, thanks for the reply, however when you select to convert a 4k/50p HEVC (h265) to 4k/50p AVC (H264) i am advised by the developers of my Editing Software that i should use an output bitrate that is approx 1.5 times the size of the HEVC source file for it to be of a similar quality.

The developers of my Software have many output presets to select from, which we can use, or customize to suit our own needs, and in their 4k HEVC to 4K AVC profile the bitrate setting it is preset to 167% as standard, so if i output a 4k/50p HEVC that has a bitrate of say 60Mbps, the output 4k/50p AVC file will be somewhere around 100Mbps, and it will be quite a bit higher in file size as well.

mduell
Veteran User
Posts: 7138
Joined: Sat Apr 21, 2007 8:54 pm

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by mduell »

Your editor developers are providing very generic advice, not knowing what encoder or settings you're using. A lot of them are crap.

For editing, use the Production presets, probably Production Standard.

As long as you're using reasonable settings like that you shouldn't worry about the bitrate.

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by BradleyS »

For editing or production delivery, that may make sense for their product as repeated transcoding can introduce losses. Regardless, it's somewhat arbitrary, especially applied to HandBrake as different encoders vary in their efficiency. Bit rate is only a measure of quality efficiency for a single encoder, not across encoders.

If you're using HandBrake for post-production and intermediates, you might rather look at the Production presets, which ensure short GOP and no b-frames for editing purposes, and very high bit rate via quality-based encoding, which you're welcome to switch to 2-pass ABR if you prefer.

If you're using HandBrake for final compression for personal viewing, it's better to use the specifications I previously mentioned, which optimize viewing quality while creating smaller file sizes. I realize now you're only focused on AVC and not HEVC; perhaps try the Playstation 2160p preset which creates 4K AVC.

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by BradleyS »

Also, for H.264/AVC you do need Level 5.2 to support your frame rate (5.1 only does 4K up to about 30 fps): https://en.wikipedia.org/wiki/Advanced_ ... ing#Levels

I would expect no home media player (other than on a computer reading from local storage) to handle more than about 20-25 Mbit/s video, which is also approaching the max I would stream over 100 Mbit/s Ethernet due to protocol and application protocol overhead, and is pushing it a bit for all but the best wireless connections.

glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

Hi, i was using Video ReDo Professional to edit and recode (smart render) and i always use software encoding (x264/x265) as the NVEnc and Intel QS outputs create very high bitrates and much larger file sizes, but both are more that twice as fast as the software encoders, and i won't trade off quality over speed.

I do not use HEVC as a rule, the short sample video i posted above was a file given to me for testing purposes with VRD Pro, however VRD will not handle it for editing or recoding to AVC, and VLC and MPC-hc will not play it properly either, on my 6 core Metabox laptop with the Intel 630 graphics and GTX-1050 graphics as well.

I do use a GoPro 7 for travel and i usually shoot in 4k/60p (59.940) HEVC in an MP4 container, and unfortunately after a lot of frustration with VRD Pro not being able to edit or recode the file to 4k/60p AVC without crashing, i am now forced to use Handbrake to encode these HEVC files to 4k/60p AVC first, and then take them into VRD Pro to edit them, and then smart render them back to the 4k/60p AVC, meaning the smart render tool does not need to recode the whole file after the edits and titles/credits have been done.

VRD seems to have a lot of issues with their new version 6 not wanting to play properly with some file types, but not being able to recode a 4k/60p HEVC MP4 file to 4k/60p AVC is a big issue for me.

I just can't seem to get the Bitrate thing sorted out in my head, and i just used Handbrake to recode that 4k/50p 10bit 4:2:2 HEVC file (61Mbps) to 4k/50p AVC (8BIT 4:2:0) and using an RF-24 setting the output bitrate was only 18Mbps, using an RF-22 factor it was 24Mbps, which seems to be very low for AVC given the original HEVC file was 61Mbps.

glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

I do try and use High @ 5.2 in my outputs, but my 4k/60p HEVC files from my GoPro show as Main @ 5.1 in MediaInfo, same as that 4k/50p (10bit 4:2:2 HEVC file above, it shows up as High @ 5.1

glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

So for Editing (just cutting unwanted bits from the video) it is better to have a short GOP and no B frames, so is this only available in the production presets (Max and Standard) and if so, why do the other presets not do this as well.

Just recoded the 4k/50p 4:2:2 10bit HEVC file to 4k/50p AVC using Production Standard preset, with the RF factor of 10 (default) and the output Bitrate was 265Mbps, an RF factor of 20 gave me 71Mbps.

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by BradleyS »

Apologies, I linked the H.264/AVC levels, for which you will need 5.2. The source file is compliant to H.265/HEVC Level 5.1: https://en.wikipedia.org/wiki/High_Effi ... els#Levels

HandBrake's primary purpose is not to create editor-friendly encodes, though the Production presets were added to facilitate that. For final compression for viewing, you generally want long GOP and possibly B frames.

The bit rate reduction you're seeing with the above RF values is normal, and one of the primary reasons people use HandBrake. Hardware encoders like that on your camera are generally similar to NVENC/QSV/VCE in the sense that they are lower efficiency compared to software encoders, so more bit rate is required to preserve quality because they can't in realtime employ more advanced coding techniques. Likewise, the only reason to continue using high bit rate as the other developers suggested is to reduce generational encoding loss and preserve the ability to edit (read: color correction and grading, pro stuff) the resulting encode later.

I suggest you watch the video encoded at RF 22, 24, and so on and see at what point you can visually tell a difference in a normal viewing environment, then use the next best setting.

User avatar
BradleyS
Moderator
Posts: 1859
Joined: Thu Aug 09, 2007 12:16 pm

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by BradleyS »

I tested your source here, looks excellent on a 4K display using the Playstation 2160p60 4K Surround preset (the only 4K preset we have that makes H.264/AVC). The average bit rate is 18 Mbit/s with peaks up to 39 Mbit/s. If your devices play this well, this is a good starting point.

Don't get too hung up on the bit rate numbers here. The guidance in the documentation is correct. You probably want somewhere between RF 22-28 for 4K output, depending on the source and what looks good to you. This is what HandBrake's software encoders do well: make high quality encodes in generally much smaller files than hardware encoders.

Note also that with quality-based encoding, bit rate is dependent on the complexity of the video, so for very high motion, noisy/grainy, or otherwise complex sources, bit rate may be higher. In those cases you will need to denoise, reduce quality, or use average bit rate in 2-pass mode to achieve reasonable bit rates.

musicvid
Veteran User
Posts: 3597
Joined: Sat Jun 27, 2009 1:19 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by musicvid »

1. [Edited]
2. [Edited]

3. For handoff to Handbrake, which I still do for advanced Rate Control, just mux it out of VRD as a Program stream, same as input. That's still the most reliable route afaiac.

4. If you're not making cuts or scenes, just Quickstream Fix in VRD first, in order to sanitize your transport stream before introduction to Handbrake. @BradleyS says your file opens in Handbrake without this step.

5. I've thoroughly tested QSV alongside software encoders in several editors, and except at much higher bitrates, they are sucky. That's a technical term.

6. If one of the VRD devs gave you the 1.5x figure, that's the correct, conservative "linear math" answer based on compression, at sane Rate factors. For overkill such as you are doing at RF 18 with 4k, I wouldn't think it would make that much difference, and there are many other factors flavoring the soup.
Last edited by musicvid on Tue Nov 26, 2019 2:14 pm, edited 1 time in total.

palmerwallace
New User
Posts: 1
Joined: Thu Nov 21, 2019 2:41 pm

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by palmerwallace »

Has anyone used these settings for UHD disc rips to retain the BT 2020 color space and HDR?

Thanks

User avatar
JohnAStebbins
HandBrake Team
Posts: 5581
Joined: Sat Feb 09, 2008 7:21 pm

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by JohnAStebbins »

palmerwallace wrote:
Thu Nov 21, 2019 2:44 pm
Has anyone used these settings for UHD disc rips to retain the BT 2020 color space and HDR?

Thanks
HandBrake will preserve the BT2020 colorspace. But it drops HDR metadata.

mduell
Veteran User
Posts: 7138
Joined: Sat Apr 21, 2007 8:54 pm

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by mduell »

glenpinn wrote:
Thu Nov 21, 2019 3:16 am
So for Editing (just cutting unwanted bits from the video) it is better to have a short GOP and no B frames, so is this only available in the production presets (Max and Standard) and if so, why do the other presets not do this as well.
Short GOP and no B frames isn't very efficient, but it's easy to decode for the editor.
glenpinn wrote:
Thu Nov 21, 2019 3:16 am
Just recoded the 4k/50p 4:2:2 10bit HEVC file to 4k/50p AVC using Production Standard preset, with the RF factor of 10 (default) and the output Bitrate was 265Mbps, an RF factor of 20 gave me 71Mbps.
That's about the expected proportions. Not every video will be the same.
Don't put much emphasis on bitrate. Pick what looks good to you with acceptable size.
Last edited by mduell on Tue Nov 26, 2019 5:22 pm, edited 1 time in total.

glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

@ musicvid............. thanks for your post regarding VRD Pro version 6 (beta 809b) yes i am updating to every beta version as they are released, and this new version 6 is still plagued with many bugs that the Developers just don't seem interested in fixing, heck some of us have been posting new topics about our issues and they are not going into the forum to respond, i can't even get any replies to my emails, which i have to say is very disappointing, given these guys used to help in the forums all he time.

I use a GoPro 7 black, i shoot in 4k/60p HEVC and the recording bitrate is around 61Mbps, i can import these files into VRD Pro 6.0 but cutting stuff out is very slow to the point where it becomes very time consuming, but my real issue is that i have created a custom profile to recode the file to 4k/60p AVC and it simply fails to run, always giving me an Error Code "LargeBufferMalloc, no more memory" and i also noticed that when i created that profile, i select to save the output AVC file using the same resolution as the source file, and when i save the profile setting, it will not save the resolution preset.

I can however output the 4k/60p HEVC files to 1080/60p AVC and the bitrate is 25Mbps.

I have also cut bits from many of my GoPro files (@ 61Mbps) and have successfully smart rendered them back to 4k/60p HEVC (at the same bitrate) without any issues, but outputting to 4k AVC fails, which is frustrating.

musicvid
Veteran User
Posts: 3597
Joined: Sat Jun 27, 2009 1:19 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by musicvid »

@glenpinn
Looking at this thread with my morning eyes, I can see that my attempt to be helpful with understanding and integrating the two tools looks more like an advertisement, and that is not my intention.

Neither is getting into a discussion about another software's beta progress and developers. If you would like to pursue this branch of discussion further, feel free to post it in the Tiki Bar. I don't do PM. That said, I am quite happy with their responses to concerns, personal expectations notwithstanding.

As nearly as I can tell, the on-topic portion of this discussion concluded with this statement:
JohnAStebbins wrote:
Thu Nov 21, 2019 5:38 pm
palmerwallace wrote:
Thu Nov 21, 2019 2:44 pm
Has anyone used these settings for UHD disc rips to retain the BT 2020 color space and HDR?

Thanks
HandBrake will preserve the BT2020 colorspace. But it drops HDR metadata.

glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

It was not my intention to get involved in discussions about other softwares, so i apologize for side tracking this topic like i did, all i want is to understand a bit more about how Handbrake works and which output presets and quality factors i should use in certain scenarios.

I won't be raising any discussion about VRD in the Tiki Bar as i don't see any reason for doing so, just going to focus on Handbrake to convert my GoPro files from HEVC to AVC so i can then do my editing in VRD and smart render them back to AVC for viewing purposes and youtube uploads.

musicvid
Veteran User
Posts: 3597
Joined: Sat Jun 27, 2009 1:19 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by musicvid »

Thank you. I'm sure the Handbrake moderators will appreciate that sign of discretion from both of us.

Guess I missed something. Why again do you need to convert first in Handbrake? VRD has no less decoding capabilities than Handbrake that I've run across. If you have trouble outputting 4k or 1080 60p, rest assured that I do not have such an issue. I'm sure that you know that AVC 10 bit is not a format, Hi10p having arrived DOA in the wild.
just going to focus on Handbrake to convert my GoPro files from HEVC to AVC so i can then do my editing in VRD
Perhaps if you uploaded your pristine source sample to their forum, we could help you figure out how to save a whole encoding pass, that being a very worthy alternative to what you are trying. See you there.
Last edited by musicvid on Tue Nov 26, 2019 4:57 pm, edited 4 times in total.

glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

I already created a discussion topic in the VRD forum (VRD Pro section) some time ago using that 4k/50p HEVC MPEG-TS sample file (and others) which others attempted to convert, with poor success in most cases, and the results for me and others who tried still remain unresolved.

Look for a Topic titled VRD Pro 6.0 Test Results

musicvid
Veteran User
Posts: 3597
Joined: Sat Jun 27, 2009 1:19 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by musicvid »

Got a link?

glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

musicvid wrote:
Tue Nov 26, 2019 5:00 pm
Got a link?
I thought we were meant to avoid talking about VRD ?

I was going to post the Topic link but thought it best not to, you can find it easily by going to the VRD forum and head to the Pro forum.

https://www.videoredo.net/msgBoard/inde ... lts.36899/

glenpinn
Posts: 39
Joined: Wed Mar 14, 2012 2:26 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by glenpinn »

I also meant to ask why we can't edit our posts once posted to the board, sometimes i may type something that i need to change, or need to add more content.

The reason for having to recode my 4k/60p HEVC GoPro files to 4k/60p AVC in Handbrake prior to editing is because VRD will not convert my edited files to AVC, been an ongoing issue for a long time.

The good thing about VRD is that after i have recoded the 4k/60p MEVC files in Handbrake to to desired bitrate/quality, after editing in VRD i simply select to output back to 4k/60p AVC and VRD uses its Smart Rendering feature, which means that most of the file is not recoded again, something that other software doesn't have, so the file is still only recoded the one time in Handbrake.

If i select to output the 4k/60p AVC to say 1080p using VRD then the file is Recoded at the preset bitrate for the profile i use, or i can select a custom bitrate.

Woodstock
Veteran User
Posts: 3663
Joined: Tue Aug 27, 2013 6:39 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by Woodstock »

glenpinn wrote:
Wed Nov 27, 2019 2:39 pm
I also meant to ask why we can't edit our posts once posted to the board, sometimes i may type something that i need to change, or need to add more content.
Blame spammers. Some boards continue to allow unlimited edits, so a post that seemed OK ten days ago, may morph into 3 screens of [Censored]/drug/ED links.

musicvid
Veteran User
Posts: 3597
Joined: Sat Jun 27, 2009 1:19 am

Re: Converting 4k/50p 10 BIT HEVC MPEG-TS 4:2:2

Post by musicvid »

I thought we were meant to avoid talking about VRD ?
Yes we were. Didn't work, did it?
Best of luck.

Post Reply