Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd July 2018, 19:30   #1  |  Link
tppytel
Registered User
 
Join Date: Feb 2017
Posts: 29
Speeding up encodes of soft transfers?

I HEVC encode my bluray rips to save space on my Plex server. After some testing of various clips, I've mostly settled on crf17-18 slow for getting very high quality encodes at a file size and encode time I can live with. For older, grainier clips I usually run the video through smdegrain with light settings in avisynth to increase efficiency. I'm sure I could dig further at the settings and thoroughly test each and every source, but I'm happy enough with this in general even if it's not perfectly efficient.

However, I've noticed that encoding is extremely slow with softer sources like typical 70's and early 80's films. I was trying to encode Dog Day Afternoon (a mediocre ~22mbps VC-1 transfer) at crf18 slow and was getting only ~2.5fps. In comparison, It (2017) at crf17 slow got ~4.5fps. Usually I get 3-4fps on pre-digital films. Switching to crf18 medium, DDA encodes about 3 times faster (~7.5fps). This seems like a larger difference in speed between medium and slow compared to what I've seen on sharper transfers.

Is there any particular tweak I can make to the Slow preset to speed up encoding these soft transfers? I'm guessing that just dropping to Medium is too blunt an approach and that it loses quality in other areas (like motion) that have less effect on encoding time. I've looked through the various encoder options, but I'm not technically proficient enough to identify which ones would help me. Any advice is appreciated. Explanations of what precisely a given setting does and why it helps me would be fantastic, but certainly not necessary.

Thanks.

Last edited by tppytel; 22nd July 2018 at 19:32. Reason: typo
tppytel is offline   Reply With Quote
Old 24th July 2018, 22:09   #2  |  Link
RanmaCanada
Registered User
 
Join Date: May 2009
Posts: 48
I would strongly recommend a faster CPU. It's not something you want to hear, as most people don't like to hear that their hardware is not sufficient, but newer, faster, is better. Sadly, you haven't let us know what your hardware is, so we can not know if your hardware truly is a limiting factor. The other option is to encode heavy grain/noisy sources as x264, as it can handle grain/noise far better than x265 can, currently.
RanmaCanada is offline   Reply With Quote
Old 25th July 2018, 04:27   #3  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,001
Your observation is pretty close to mine. The recommended equivalent of x264 crf 18 in x265 is crf 21, but on my tests, crf 21 medium gave me artifact on one particular scene. Raising the preset to slow fixed it, but it nearly doubled my encoding time. Lowering crf to 18 medium also fixed it with only a very small increase in encoding time.

So crf 18 medium is the better of the two. Only use slow preset if you have a very fast machine.
lansing is offline   Reply With Quote
Old 25th July 2018, 19:01   #4  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,644
I'm somewhat skeptical that a CRF encode would get that much slower based on content type. A soft film should have a lower average bitrate, and thus less CABAC. And trigger early exits more often. I'd guess the reported speed differential is more likely from a slower decode or preprocessing (like if you're only doing degrain on softer sources).

Differences between medium and slow that might cause bigger perf differences than quality differences
* --lookahead-slices 4 instead of 8 could slow things down if you have lots of available cores.
* --rect isn't likely to change quality that much, just increase bitrate some

The other differences seem more likely to impact quality AND bitrate.

Personally, I feel --preset slower is where HEVC starts to really strut its stuff.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Instant Video

My Compression Book

Amazon Instant Video is hiring! PM me if you're interested.
benwaggoner is offline   Reply With Quote
Old 25th July 2018, 20:33   #5  |  Link
tppytel
Registered User
 
Join Date: Feb 2017
Posts: 29
Quote:
Originally Posted by benwaggoner View Post
I'm somewhat skeptical that a CRF encode would get that much slower based on content type.
I'm fairly confident my numbers are in the ballpark but it's possible there was another app running or something else going on with my PC. I'll check more carefully tonight after my current encode is finished. Thanks for the suggestions in the meantime.

edit: Also...

Quote:
Originally Posted by benwaggoner View Post
Personally, I feel --preset slower is where HEVC starts to really strut its stuff.
In the sense of quality per bitrate? If you were looking for near-transparent encodes of typical film material (not too damaged, grainy, soft, etc.), what crf range would you recommend testing? edit2: On Slower, that is.

I think I'd definitely need newer hardware to go with slower. I've only got an i5-6500 Skylake. On Slow, I can set an encode running before going to bed and it will be done by the time I get home from work the next day, which is reasonably convenient.

Last edited by tppytel; 25th July 2018 at 23:51.
tppytel is offline   Reply With Quote
Old 27th July 2018, 06:24   #6  |  Link
RanmaCanada
Registered User
 
Join Date: May 2009
Posts: 48
Well with an i5, yes you are severely limited. I would say wait until the TR-2 comes out and forces Intel to change their price points. If you want to upgrade, it would be a good opportunity for you make some changes, either by going AMD, or by staying in the Intel camp. Know that if you go Ryzen, rumour is that Ryzen 2 will have up to 16 cores, or Threadripper a max of 32 (for now) and if you go Intel they are segmenting the market even more and are doing away with hyperthreading for i7's altogether with the new line of chips. Ben is of course correct though that x265 really starts to shine at slower.

It's really a tough call on what to upgrade to as your machine is perfectly fine for everything else except for encoding! Encoders always wish they had more power haha
RanmaCanada is offline   Reply With Quote
Old 28th July 2018, 17:17   #7  |  Link
tppytel
Registered User
 
Join Date: Feb 2017
Posts: 29
Quote:
Originally Posted by benwaggoner View Post
I'm somewhat skeptical that a CRF encode would get that much slower based on content type.
If you have a copy of the Alien Anthology, check out the extended version of Aliens. (Might be the only transfer out there, not sure.) I ran an encode at crf18 slow - it averaged under 2 fps and took over 32 hours to complete. The result? A 24GB HEVC file compared to the original 28GB AVC from the disc. Whee! By comparison, I'm running an encode with the same settings for Live and Let Die - comparable bitrate, a relatively nice transfer for a 1973 film but certainly not pin-sharp. It's averaging a little over 4 fps at the moment. edit: Now that I'm a third of the way through the file it's dropped to 3.41 fps. Still a pretty big difference from the 1.88 Aliens was getting.

Also, I did a 5 minute clip from Aliens after a reboot with no other apps open in order to rule out other PC problems. The results were consistent with the above - averaged a hair over 2 fps for crf18 slow.

Last edited by tppytel; 28th July 2018 at 21:29.
tppytel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 15:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.