Jump to content

Transcoding 4K


Recommended Posts

Posted

Hi,

 

I'm currently running Emby inside the official docker image. I'm wondering if anyone has stats on the hardware requirements for 4k transcoding? It's a 4K HEVC file, 42GB for 2h 21m. I seem to be getting around 19fps with an Intel 3770. I've tried setting threads etc to max in transcoding settings.

 

Would running it outside of docker so I can use Intel QuickSync be beneficial?

Posted

Hi, are you doing this on a linux machine? It includes VAAPI support which you can try enabling.

Posted

Hi,

 

I'm currently running Emby inside the official docker image. I'm wondering if anyone has stats on the hardware requirements for 4k transcoding? It's a 4K HEVC file, 42GB for 2h 21m. I seem to be getting around 19fps with an Intel 3770. I've tried setting threads etc to max in transcoding settings.

 

Would running it outside of docker so I can use Intel QuickSync be beneficial?

 

If it's HEVC from a UHD disc, it's going to be using 10-bit, which you need Kaby Lake for full hardware encode/decode in QuickSync.  (Skylake has partial hardware support for 10-bit).  I would really doubt that QuickSync would make any difference on a 3770.  (It doesn't help much on my 4770 either.)

Posted

Okay, I've enabled it and adjusted docker container so it can use it. Seems FPS is exactly the same. Can anyone confirm whether its deffinitely using VAAPI? It looks like it to me but maybe I'm missing something!

Posted

Not sure if you were referring to the attachment which I meant to attach, but attached!

 

With further testing it does actually look like its working. With VAAPI it's actually repeatably slower!

Log.txt

Posted (edited)

I'm glad this is still on going. I am in the exact same situation. Only difference is that my server is using a Xeon D-1537. When I attempt to play a 4k video it displays but struggles to play. It plays one or two seconds pauses plays an other one or two seconds.

 

Debian 9 (Stretch )

Docker CE

Emby/Embyserver - latest

 

Luke,

 

When you say logs. I'm assuming ffmpeg-transcode-*.txt?

emby_logs_transcode.txt

Edited by zeyoner
Posted

@@zeyoner it appears your server just isn't able to convert it fast enough and that's why it plays choppy. Does this answer your question?

Posted

@@zeyoner it appears your server just isn't able to convert it fast enough and that's why it plays choppy. Does this answer your question?

 

Yes, however it leads me to an other question. What are the recommendations for 4k transcoding? 

Happy2Play
Posted

Yes, however it leads me to an other question. What are the recommendations for 4k transcoding? 

 

A beast.

 

quote from somewhere else.

 

An 80 Mbps video would need a score of 16,000.

Posted (edited)

I was hoping all you needed is a CPU that supports Intel Quick Sync.

 

I did some more research. It does not make sense to consider a build that would be capable of transcoding 4k. Convert the video and keep your media organized. 

 

Done.

Edited by zeyoner
Happy2Play
Posted

I was hoping all you needed is a CPU that supports Intel Quick Sync.

 

There are always variables but googling this, to me 4k transcoding is not realistic.

Guest asrequested
Posted (edited)

I was hoping all you needed is a CPU that supports Intel Quick Sync.

 

I did some more research. It does not make sense to consider a build that would be capable of transcoding 4k. Convert the video and keep your media organized. 

 

Done.

 

Transcoding in the server is reliant on ffmpeg. It isn't enough to simply have a GPU that can potentially support your needs. ffmpeg needs to fully support that GPU to do what you require. At present, it's hit and miss. So if you want to have stable transcoding, software transcoding is the way forward. I have a 1920X Threadripper CPU, in my server. It has 24 threads. Transcoding a 4k HDR 19Mb/s movie to 1080 8Mb/s, consumes 40% of my CPU. The i7 7700k in my HTPC, with HWA, can actually do it with greater ease...but not with ffmpeg (YET)

Edited by Doofus
Posted

My question would be, why am I transcoding in the first place? Why can't the video be Direct Played/Streamed?

 

I don't have any issues Direct Streaming my 4K content to my Shield TV.

Happy2Play
Posted

It always comes back to the devices capabilities.

Posted

My question would be, why am I transcoding in the first place? Why can't the video be Direct Played/Streamed?

 

I don't have any issues Direct Streaming my 4K content to my Shield TV.

 

I don't think anyone that's streaming media locally is going to want to transcode 4k content. That won't make too much sense on less you have a device which does not support 4k playback. That isn't my case. I too have a Nvidia Shield. I don't even use Emby to stream locally because I experience too many issues doing so. I use Kodi for local use, Emby is mainly use for streaming content externally. I was attempting to avoid having to have duplicates of the same content just so that I can stream it externally.

Guest asrequested
Posted

If you have a 1080 TV it'll need to be downscaled. Not everyone will have all 4k TVs. Some clients can handle that, but not all.

Posted

That won't make too much sense on less you have a device which does not support 4k playback.

 

I'm more interested in why Emby on my Nvidia Shield (AndroidTV) struggles to play 4k (locally) as well.

Posted

I'm more interested in why Emby on my Nvidia Shield (AndroidTV) struggles to play 4k (locally) as well.

 

Hi.  In order to answer that, we would need to see an example.  Thanks.

 

How to Report a Problem

Posted

To piggy back on a similar topic, I have a Xeon E3-1275 v3 (Haswell 4C/8T based) and am having similar difficulties.

 

I have a 4K HEVC at ~55 Mbps bitrate and the system is struggling to transcode it to 1080p H264. I am looking at the logs, and it appears the temp segments are only 14 fps. What's strange is that the total CPU load is approximately 40% (spread somewhat evenly across all cores).

 

Is it recommended to use a GPU transcode? E.g. something like a GT 1030/GTX 1050?

Posted

It's worth trying but it's hard to say which would be better between a gpu vs just getting a faster CPU.

Posted

I was hoping all you needed is a CPU that supports Intel Quick Sync.

 

I did some more research. It does not make sense to consider a build that would be capable of transcoding 4k. Convert the video and keep your media organized. 

 

Done.

 

In theory at least, Kaby Lake and Coffee Lake should be able to use Quick Sync to transcode 4k HEVC Main-10.  I haven't tried it myself since that'd require not just a CPU upgrade but also motherboard, RAM, and my OS storage, but just going by the specs.

Posted

It's worth trying but it's hard to say which would be better between a gpu vs just getting a faster CPU.

 

I would definitely agree if the CPU was being pegged, but my CPU utilization was about 30% with HT on. Perhaps there is some HEVC specific optimization to do in ffmpeg or something that I'm not setting? I've tried using lower bitrate (~10 Mbps) HEVC and it's not a problem. But once you get into original 4K UHD quality (~50 Mbps), then the shuttering begins. And from using monitoring system resource usage (CPU %, Memory Free, Disks, Network), I'm not quite sure where the hardware bottleneck is.

Posted

It could be disk related as well, but unless you have reduced the ffmpeg thread count then out of box we have ffmpeg configured to go as fast as it can.

Posted (edited)

The ffmpeg thread count is set to 'Auto', and it is using all available logical processors. Here are some performance stats, 4K HEVC 55 Mbps transcoded to 1080p H264 15 Mbps

 

System (also my storage server)

E3-1275 v3 (like a slightly lower clocked i7-4770)

4GB DDR3 with ECC

128GB Lite-On SSD (circa 2014 era)

Windows Server 2012 R2

 

CPU, ffmpeg 41 threads, ~33% across 8 logical cores

Memory, 2.7GB use, 1.3 GB free, ffmpeg using ~1GB

Disk IO, approximately 6 MB/s total (3 MB/s Read + 3 MB/s Write)

 

 

Also for those interested in getting a GPU, apparently the GT 1030 does not support HW HEVC encode. So the minimum you'd have to buy is a GTX 1050. The GTX 9xx series is Maxwell based, and IIRC does not have HW HEVC.

 

https://www.reddit.com/r/nvidia/comments/6w1rhn/gt_1030_hevc_encoding_capabilities/?st=jdhy525v&sh=2424492b

 

AMD Polaris (RX 4xx/5xx) HEVC support is apparently all over the place, but nevertheless, it should be advertised. I actually have a RX 460 in my HTPC and I can move it on my storage server and check it out.

Edited by dexvx

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...