Jump to content

x264 to x265


strugglez

Recommended Posts

strugglez

Heya

 

Does anyone know whether or not a straight conversion of x264 (AVC) to x265 (HEVC) reduces quality at all, or it will just have better efficiency in compression?
I don't mean re-encoding, or does that actual process have to involve re-encoding?
Also, what would be best for this, as it's my understanding software such as handbrake only re-encodes.

 

I would like to shrink my collection as it makes sense to? or does it not?

Pros and cons would also be much appreciated. :)

 

 

Cheers,

Mike

Link to comment
Share on other sites

AdrianW

To convert from one codec to another always involves re-encoding. Whether it reduces quality or not, depends on the settings used during the process. The main benefit to re-encode to x265 is to save space, but generally you're not going to save heaps of space, unless you also lose some quality. I think you could estimate that x265 is 50% of the size of x264 for similar quality.

 

There's also a downside to converting to x265 - you need more powerful hardware for playback, and there are fewer devices out there that can even play it at all. And if you're streaming from an Emby server to something like an iOS device, Emby server will need to use more CPU power whilst transcoding an x265 file compared to an x264 file.

 

Some of my downloaded TV episodes I consider to be far too large for their length (3.5GB for a 50 minute show seems too big to me) - so I re-encode those to x265 just to save space on my NAS.

Link to comment
Share on other sites

MSattler

To convert from one codec to another always involves re-encoding. Whether it reduces quality or not, depends on the settings used during the process. The main benefit to re-encode to x265 is to save space, but generally you're not going to save heaps of space, unless you also lose some quality. I think you could estimate that x265 is 50% of the size of x264 for similar quality.

 

There's also a downside to converting to x265 - you need more powerful hardware for playback, and there are fewer devices out there that can even play it at all. And if you're streaming from an Emby server to something like an iOS device, Emby server will need to use more CPU power whilst transcoding an x265 file compared to an x264 file.

 

Some of my downloaded TV episodes I consider to be far too large for their length (3.5GB for a 50 minute show seems too big to me) - so I re-encode those to x265 just to save space on my NAS.

I actually looked at this a few weeks ago and here is what I came to:

 

1)  Space savings can be huge, typically around 50%.  

2)  Re-Encoding is time-consuming, about 6-7 hours or longer for BluRay movies.

3)  Rpi2's, which I use as home HTPC's, can only playback 720p h265 content.

4)  For Remote users, all that h265 content is just transcoded to h264 again, so now you have extra transcoding, just to get back to h264 you started with to begin with.  I am assuming that just as with playback, transcoding h265 will consume more resources than transcoding h264.

Link to comment
Share on other sites

strugglez

Well, I have done a fair bit of playing around and looking into it myself, even done some encodes from full blue-ray which do take time a bit of extra time. I do however rather want to future proof and put up with my media being transcoded back to x264 for the devices I currently have as in the near future, most devices will be able to natively play this format as it is my understanding all recent UHD TV's seem to be able to natively play now?

Also, in regards to Rpi's, I will be building a new PC/server/HTPC next year some time to be able handle the load of encoding and trans-coding to older devices where needed.

 

Back to my orginal question though, you guys have given some very useful information but I need to clarify - would their be any substantial loss from RE-ENCODING to x265 that would be considered a huge drawback in terms of quality in comparison to say encoding to x265 straight from the source? I am just seeing if it's worth while to re-encode what I have of x264 to x265 and what would be the best solution for this as I wouldn't know how to go about this in handbrake. Is their something that can re-encode with keeping the compression to a minimum apart from the compression that takes place from x264 to x265 to reduce the file size. (hopefully that makes sense). 

 

Cheers

Link to comment
Share on other sites

AdrianW

 would their be any substantial loss from RE-ENCODING to x265 that would be considered a huge drawback in terms of quality in comparison to say encoding to x265 straight from the source?

 

If you're already happy with the x264 encodes and you're not worried about file size - then just leave them as x264. No one will be removing x264 support at any time in the future, so converting to x265 is not going to "future-proof" anything.

 

But, to answer your question - no you're not going to lose quality, as long as you use appropriate settings when encoding to x265. There's lots of ridiculously small x265 stuff out there - and the quality is atrocious, but they've just used far too aggressive compression. I think the default quality setting for x265 is 26 which is great for significantly reducing size but terrible for retaining quality.

 

I'd suggest you try a conversion or two - and then compare before and after on a quality screen. When I encode to x265 I use a quality setting of 19 which gives very good results. There are many, many different encoder settings that can be adjusted - but I leave them alone. Other users spend ages fiddling with them to get the best quality the can (read some of the replies in this thread).

 

(I use MeGUI for my encoding, but I'm sure Handbrake will also do what you want).

Link to comment
Share on other sites

  • 3 weeks later...
rckoegel

I'm new to Emby, but I've been testing the crap outta x265 over the past couple weeks... I even let a 48hr x265 supa slow encode complete to see the result. Don't do that!

 

As for your original question: Generally it's a bad idea to re-encode your x264 into x265. the quality loss might be fairly small, but there will be some loss. Of course, if you have 4,000kbps+ x264 1080p video files, go for it... Just stay between Constant Quality 24 and 18. You might have to try a few times to find the sweet spot for your encodes. And download the Handbrake Nightly, it has an up to date x265 encoder that beats the last stable release by a mile (losta improvements between v1.5 and v1.8).

 

StaxRip lets you update x265 encoder on the fly, btw, but it's got a bit of a learning curve. I tested both, Stax would be preferable if you want to tweak the hell outta your x265 encodes. Handbrake allows command line passthrough, which is currently undocumented, but it's otherwise very limited.

 

You didn't say what kinda quality your original files were. more info gets ya better answers. I could give you a good idea of what Bitrate to shoot for with x265.

 

Personally, I'm okay with sub 4,000kbps x264 archive video, so I rip BR-2-x265 at Constant Quality 25-22 Medium Main, with 5.1 HE-AAC. I get between 15-23FPS for the encode on my i5 6600k, that's less than 4 hours (as long as I don't use any filters).

Link to comment
Share on other sites

  • 3 weeks later...
strugglez

Sorry for the late reply, Busy leading up to Christmas and been avoiding using my PC while encoding.

 

The quality is source material apart from the encodes I have done. Anything New I do I am going to go with x265, I feel as if at the level I want to encode at in terms of file size and quality seems to make sense to me.

So I have taken your advice and gone with CQ22. I don't have a surround sound system yet but have been re-encoding them to AC3. Only reason for AC3 has been due to compatibility etc from what I have read up. Can I still get true surround using HE-AAC? I just dunno where receivers are at these days with all these new codecs coming out etc.

Link to comment
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
×
×
  • Create New...