I noticed yesterday that my Plex Media Server had a hard time transcoding a movie file in HEVC format (specs: see below).
It’s the first time I noticed that my server was stuttering and CPU continue at 100 %.
I tried to play the file directly on a RPI3 with kodi, but here also problems (movie not playing smooth)
Finally played on a PC with VLC. Even here CPU was high and I noticed stuttering.
All clients connect wired on Gbit network, so this is not the problem.
Is this codec so hard to play?
Kind regards,
Bart
General
Format : Matroska
Format version : Version 4 / Version 2
File size : 1.14 GiB
Duration : 1h 31mn
Overall bit rate : 1 781 Kbps
Writing application : Lavf57.25.100
Writing library : Lavf57.25.100 / Lavf57.25.100
so what do you recommend: recode the file? Or are there other settings that can influence this?
Has somebody experience with hardware needed on server to transcode this without to much issues?
When on RASPLEX, my server gets 100CPU.No problem, but video is stuttering
When on WINDOWPHONE with app, same CPU usage, but video is still playing (lower resolution)
Is it possible to influence this behavior from within RASPLEX? Select resolution/bitrate? Other settings on server?
@bart.plessers said:
so what do you recommend: recode the file? Or are there other settings that can influence this?
Has somebody experience with hardware needed on server to transcode this without to much issues?
When on RASPLEX, my server gets 100CPU.No problem, but video is stuttering
When on WINDOWPHONE with app, same CPU usage, but video is still playing (lower resolution)
Is it possible to influence this behavior from within RASPLEX? Select resolution/bitrate? Other settings on server?
regards,
B
Run it through cayars python script. search the forums for cayars thread and check out his 1st post. it will convert to h.264 with 256 2.0 aac in a .mp4 container with the moov atom, probably the most direct playable file ever.
Yes, HEVC is more difficult to deal with. My i5-3570S with transcoder set to “prefer higher-quality” will transcode 1080p HEVC to H264 at around 1.5x realtime. H264->H264 is typically transcoded at around 2.5x. The usual “2000 cpu benchmark per 1080p transcode” doesn’t apply to HEVC material…you’ll probably need 3000-3500 for each HEVC 1080p transcode.
The easiest way to play it would be to just use the optimizer. Using the “Optimize for TV” will transcode it to H264, and also pass through the 5.1 AAC, if I remember correctly. You’ll just need to make sure that your client then selects the optimized version. Some clients have issues deciding between HEVC originals and H264 optimized versions because the optimized versions often end up with a higher bitrate.
Hi @DFury
It’s a Intel Core 2 Duo CPU E8400@ 3.00GHz
Not a modern machine, but it did the job for me past years…
I’m just wondering why this HEVC format uses so much resources. Even playing in on a new laptop, it consumes 30%cpu in VLC.
Is this normal, or is there something wrong with the file…?
h.264 has been around long enough that most devices have hardware specifically dedicated to decoding it, so it doesn’t tax the CPU. HEVC hasn’t been around long enough to have dedicated hardware on even newer devices, so the CPU has to do all that work itself. New hardware with HEVC decoders will happen eventually, but for now, HEVC will pretty much peg any CPU you try to decode it on.
I don’t have any reason to think that there’s anything wrong with the file. Like camnchair mentioned…it’s a new codec, so devices generally aren’t optimized to play it. I have quite a bit of HEVC material now, but I also have to Roku 4’s that can direct-play HEVC. Works great…but it is pretty taxing on my server when I try to play the HEVC stuff on my Roku 3’s (which don’t have HEVC support). What you describe is to be expected given the capabilities of your CPU (passmark score of 2178)…which is right at the recommended score for 1x 1080p transcode from H264 material. As I mentioned before, however, HEVC material requires significantly more CPU. Probably more than your CPU can provide,
I’d definitely recommend utilizing the optimizer to pre-build a direct-playable version.
@bart.plessers said:
I’m just wondering why this HEVC format uses so much resources. Even playing in on a new laptop, it consumes 30%cpu in VLC.
Is this normal, or is there something wrong with the file…?
This new codec doesn’t achieve its bigger compression efficiency by magic. It makes the computer decoding the video work harder.
(And let’s not talk about encoding HEVC, that has even higher cpu requirements.)
With HEVC transcoding on a Core2Duo you won’t achieve Plex-happiness.
This requires serious cpu power.
And the Raspberry Pi cannot decode HEVC, it has only a hardware decoder for AVC.
No way, its ‘smart phone class’ cpu could decode full HD HEVC in software…
You should really adapt the handbrake parameters to the source video.
Your source video is progressive, so you don’t need the ‘decomb’ filter. It just adds more processing time plus it may degrade video quality sometimes.
Your source video is also not anamorphic. Only use the ‘anamorphic’ option with source videos which are actually anamorphic. Otherwise the plex transcoder may kick in at playback time unnecessarily (under some circumstances).
I am not that familar with handbrake’s CLI options, which ‘speed’ setting did you use? This has a great influence on encoding time.
Higher compression efficiency = slower encoding time = smaller file
^^^ this is exactly what the plex transcoder doesn’t do. It defaults to “quick” (and dirty)
The speed parameter is called ‘x264 Preset’ and is set to ‘medium’ in your screen shot.
So it’s set to the default. I’m not sure that an encoding time of 3x playback time is a typical on this cpu.
My i7 would take significantly less.
But just try to disable the two options I mentioned, Maybe this helps already to reduce encoding time.
And Handbrake may be written to behave ‘nice’. Meaning if another software runs in parallel on the same computer, Handbrake will dial its computing cycles back and grant other software precedence. This prolongs encoding time of course.
The two options I was referring to are on the ‘Filters’ and the ‘Video’ tab.
Decomb is on ‘Filters’. Set the dropdown under the ‘Decomb’ radio button to ‘off’.
‘Picture’ has the ‘Anamorphic’ option. Set the dropdown to ‘None’
Both these options are usually only needed when dealing with OTA recorded video or DVD rips. But careful: not all DVD have interlaced video. So I recommend you check alway the source video file with mediainfo and pick the options in Handbrake accordingly.
Unfoirtunately, there is no ‘magic bullet’ and no set of options that works with all video files.
@astrofisher, @danjames92: thanx a lot for the tip. Long time ago I played with HandBrake CLI and all it settings. Drove me nuts. Cayars script running now, I will see what output is tomorrow
@OttoKerner: I will give this Cayars script a try. The output of Handbrake of yesterday was useless
File wouldn’t play, and info (generated by MediaInfo)
General
\Safety First The Movie (2015).mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (isom/iso2/avc1/mp41)
File size : 1.48 GiB
Finaly coverted my file with Cayars script.
Result: see below.
File is playing well now on plex, but size 1 Gb --> 2;7 Gb.
Even without any audio track, it still was 2Gb.
Is this a normal ratio?
Also: conversion took 7h30 on a Intel i5 2;67Ghz. Is this normal?
I never had this long conversion times with HandBrake (but never transcoded a x265 either…)
many thanx for your comments!
B
General
Complete name : N:\MEDIA\FILM\KINDEREN_NEW\Safety First The Movie (2015)\safety.first.the.movie.2015.1080p.bluray.6ch.hevc.x265.rmteam.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom/iso2/avc1/mp41)
File size : 2.54 GiB
Duration : 1h 31mn
Overall bit rate : 3 961 Kbps
Writing application : Lavf56.33.101
@bart.plessers said:
File is playing well now on plex, but size 1 Gb → 2;7 Gb.
Even without any audio track, it still was 2Gb.
Is this a normal ratio?
for a fullHD picture, this is still relatively small.
Also: conversion took 7h30 on a Intel i5 2;67Ghz. Is this normal?
I never had this long conversion times with HandBrake (but never transcoded a x265 either…)
Same here. I never attempted to transcode a HEVC video. Maybe Handbrake doesn’t have a very good optimized HEVC decoder.