Encoding to h.265

criggs

Member
As I understand it, h.265 is roughly twice as good as h.264 and about four times as good as mpeg-2.

This means that if I have an mpeg-2 file, and I wish to convert it to h.265, if I set a bit rate one quarter the speed of the mpeg-2 file, I will probably wind up with a file that roughly maintains the quality of the original file, is that correct?

I have many large mpeg-2 files, and I'm bumping into a storage space problem. I'd love to convert them all to h.265, without any visible loss in quality. My initial supposition was that this was an ideal job for VideoReDo's Intelligent Recode feature. This way, I wouldn't have to guess as to the ideal bit rate, the ideal parameters within the encoding, etc. etc. VideoReDo has this ability, with Intelligent Recode, to figure out how to encode something with the minimum quality loss, which is ideal for this particular task.

However, when I went to do a trial conversion on one of my mpeg-2 files to 265, I discovered that VideoReDo does not yet offer encoding to 265, unless I'm doing something stupid. I did a little searching through the VideoReDo forum and discovered the following thread: http://www.videoredo.net/msgBoard/showthread.php?36133-Can-t-edit-DVB-T2-recordings-(TS-Streams)-in-Germany-(Codec-H-265-HEVC) . In that thread, you indicate that encoding to h.265 will be available in version 6, and that version 6 will be coming out this year. Do you have an estimate yet as to how soon v. 6 and/or h.265 encoding support will be available in VideoReDo?

As always, thanks muchly for your amazing product!
 

Dan203

Senior Developer
Staff member
No exact time frame, sorry.

Also 1/4 MPEG-2 bitrate is probably not realistic. H.265 get's it's best compression results with prestine 4K content. When converting already compressed TV content, especially interlaced content, you'll likely only be able to reduce the size by 1/2-2/3 while still maintaining the same quality. We haven't done enough testing yet to settle on the exact ratios we're going to use for default. That's something I plan to do when we've got all the codecs finalized.
 

criggs

Member
you'll likely only be able to reduce the size by 1/2-2/3 while still maintaining the same quality.
Thanks for the guidance. For now, someone recommended I use Handbrake for the conversion. If I left all the parameters alone and accepted Handbrake's default settings for 265, I end up with a playback speed which is roughly one third of the original. The original runs at 15 megs a second and the default Handbrake settings for 265 ended up with a file that ran at 6 megs a second, so that's a 1/3 ratio which, I gather from you, is really a bit low, meaning I should really shoot for a higher bit rate.

We haven't done enough testing yet to settle on the exact ratios we're going to use for default. That's something I plan to do when we've got all the codecs finalized.
Gotta say that it is reassuring that you will be doing all the heavy lifting on that, so I won't have to make all those decisions! But I can imagine that the hours and hours you will spend to figure out the formulas for Intelligent Recode with 265 will be daunting. Thanks again.

By the way, I just used VideoReDo to convert a snippet of a 265 video to 264. The original ran at 5 megs a second and the default VRD conversion ran at 13 megs, so I gather you went with slightly less than a 3/1 ratio when downconverting from 265 to 264 as your default. Interesting and educational.
 
Last edited:

Dan203

Senior Developer
Staff member
The current version of VRD doesn't understand H.265 at all, so it treats it as uncompressed video. Which means it falls back to the hard coded bitrates in the advanced dialog instead of using the Quality Factor calculation. For now the QF calculation only works for MPEG-2 and H.264 source files.
 

criggs

Member
The current version of VRD doesn't understand H.265 at all, so it treats it as uncompressed video. Which means it falls back to the hard coded bitrates in the advanced dialog instead of using the Quality Factor calculation. For now the QF calculation only works for MPEG-2 and H.264 source files.
Ah! Thanks for the explanation. So it would not be accurate to say that you guys have adopted a 3/1 ratio for conversion from 265 to 264, as I erroneously said previously. Thank you for the correction.

This whole 265 thing has got me going. Thinking about converting my library and saving all that space got me thinking about how things would work out if I tried editing with 265 files in the editors I use, VideoReDo and Adobe Premiere Elements. I have a 265 5.1 source. So far, it looks like I can edit the files with VideoReDo and spit out edited masters in 264, no problem, as outlined above. But that's more of an intellectual exercise than anything else, since my goal is the opposite, to convert from mpeg-2 or 264 to 265. I was trying to get a feel for what the conversion rate would be for 264 to 265 and I figured I could derive that from doing a conversion in the opposite direction in VideoReDo. Oops. Wrong. Thanks for correcting me on that.

You've already given me guidance on the conversion rate for mpeg-2 to 265. What would be your guidance on the conversion rate for 264 to 265?

And thanks again for all this help! Much appreciated.
 

Dan203

Senior Developer
Staff member
H264 to H265 I wouldn't go more then 20-30% lower, especially for 1080i content. H265 is really designed for progressive video, so it doesn't offer much savings for interlaced content. In fact even for progressive content it doesn't offer it's full, theoretical, 50% over H264 except for 4K video at 60fps. The lower the resolution, the less it's able to save. H265 was developed for 4K so a lot of it's technology is based around 4K and doesn't scale perfectly to lower resolutions.
 

criggs

Member
H264 to H265 I wouldn't go more then 20-30% lower
Thanks again for getting back to me, and for helping me with this.

To tell you the truth, I'm starting to cool on this whole thing. I've been doing test renders of my mpeg-2 and 264 material to 265 using Handbrake, and the times are really daunting. There seems to be roughly a 2/1 ratio, meaning a one-minute clip takes two minutes to render, a five-minute clip takes ten minutes to render, etc. etc. Unless I can find software that converts much more quickly, I will probably drop the idea. Still, it is useful to have these rules of thumb, so thanks for providing me with them.
 

jmc

Active member
Thanks again for getting back to me, and for helping me with this.

To tell you the truth, I'm starting to cool on this whole thing. I've been doing test renders of my mpeg-2 and 264 material to 265 using Handbrake, and the times are really daunting. There seems to be roughly a 2/1 ratio, meaning a one-minute clip takes two minutes to render, a five-minute clip takes ten minutes to render, etc. etc. Unless I can find software that converts much more quickly, I will probably drop the idea. Still, it is useful to have these rules of thumb, so thanks for providing me with them.
Yep, I may get 200 fps going MPG > X264 but X265 drops into the teens.
I've never had a built in GPU or is that IGP. So I don't get any QuickSync options.

You may find this interesting...
------------------------------------------------------------
http://www.videoredo.net/msgBoard/showthread.php?36140-AMD-Ryzen&highlight=Hevc

Dan203
"FYI I just ran the same 720p test using NVEncode on an NVidia GTX1050 GPU and it got 590fps! That's nearly 8x faster then CPU x265. Insane! (yes we're working on adding NVEncode to v6 as well) "

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

jmc
 

Dan203

Senior Developer
Staff member
H.265 is still pretty new so it's not up to it's full potential just yet. H.264 is much more mature, so if you have a bunch of MPEG-2 recordings and you want to save space I'd recommend using it instead. You can cut the size of MPEG-2 by 50% when converting to H.264 if you use two pass encoding. If you just want to do single pass then you could probably still do 30-40% without a noticeable loss of quality.
 

criggs

Member
H.264 is much more mature, so if you have a bunch of MPEG-2 recordings and you want to save space I'd recommend using it instead. You can cut the size of MPEG-2 by 50% when converting to H.264 if you use two pass encoding. If you just want to do single pass then you could probably still do 30-40% without a noticeable loss of quality.
Well, you're nothing if not consistent. I just experimented with your suggestion. I pulled one of my mpeg 2 videos into VideoReDo and converted 30 seconds of it to 264. The original mpeg-2 had a bit rate of 14 megs a second. The default VideoReDo bit rate for the 264 conversion turned out to be 10 megs a second, which is just about a 30% reduction. And the default VideoReDo 264 conversion is single pass encoding. So you practice what you preach, I see! As for the render time, it was roughly half the time for a Handbrake conversion to 265, about 25 frames a second, the rate of the mpeg-2 original. In other words, the render speed is roughly real time, meaning 30 seconds took about 30 seconds to render. Definitely more practical, though still a bit time-consuming.
 

Dan203

Senior Developer
Staff member
Yeah we error on the high side with our automatic calculation becuase some broadcasters over compress their MPEG-2 and if you go too low it'll look even worse. If you have a file that you know is high quality and not over compressed you can manually adjust the % in the advanced section.
 

cp2

Member
I too have been experimenting with H265 in Handbrake using one chapter from blu-ray rips, predominantly with files that have already been ripped and compressed but also from an uncompressed rips. I chucked in a couple of full film too. I started out using the H265/x265 option/ average bit rate setting which is two pass and the time taken is off-putting - in excess of 5 hours for a full film.
I have an i7 Kaby Lake processor so I then invoked Intel QSV which really reduced processing time (and CPU load!). If you use the Quality setting rather than average bit rate the processing time reduced to around 30 minutes. However, you may have to process the file a couple of times to achieve an acceptable quality/ file size result.
I'm still evaluating the various compression ratios that i tried to decide the optimum level but a Handbrake average bit rate setting of 6,000 (equates to an overall MediaInfo overall bit rate of around 8,000) seems OK.
I look forward to VideoRedo supporting H265 as I can then seriously consider using H265 rather than H264 for my TV programmes.
Incidentally, i was pleasantly surprised that both of my Smart TVs played back the H265 files: my blu-ray player did not. All very well switching to H265 provided your playback devices are compatible.
 

criggs

Member
H.265 is still pretty new so it's not up to it's full potential just yet.
How close are you, do you think, to adding H.265 to VideoReDo TV Suite? While we're on the subject, there's a few Youtube downloads I've grabbed recently which are coming in as VP9 with some of my download aps. While there are other downloaders that will download them as 264 mp4's, I've heard that VP9 is a slightly superior newer codec than 264, so, for quality reasons, I'm thinking I should get ready for both 265 and VP9. What do you think? How soon might 265 and VP9 show up in VideoReDo? Let me apologize in advance if they've already shown up and I just didn't notice.
 

Dan203

Senior Developer
Staff member
H.265 will be in v6. VP9 smart edit support is not a planned feature. You can open the files in VideoReDo but you'll have to recode to one of our supported formats on output.
 

jmc

Active member
Is AC3 audio encoding planned for V6?
Believe I heard that the "rights" to AC3 will expire very soon if not already.

Unless I got confused in my "messing about", VRD Pro now comes with AC3. YAY!

jmc
 
Last edited:
Top Bottom