Jump to content

Transcoding really slow


cparadela

Recommended Posts

cparadela

Hello,

 

I have a qnap TS-877 with the firmware version 4.4.1.0978 with Nvidia GPU Driver 2.1.3 and NvKernelDriver 4.4.1.0978 my.

I'm using Emby Version 4.1.1.0 installed .qpkg provided by emby.media.

 

Emby detects my graphics card with I recently bought ZOTAC GeForce GTX 1070 Ti MINI 8GB GDDR5 256-bit

 

 

My problem is the bitrate starts super slow and and the movie stops every few seconds. If I paused the movie after a while the bitrate goes up slowly but keeps stopping. I tried without subtitles, with subtitles in .srt and with the embedded subtitles and the result is always the same. 

 

I must say this is from my Samsung Smart TV and is ethernet connected to avoid any kind of bottleneck and I'm trying to play the movie in 4k - 40mbps.

 

If I forget something or you guys have questions I'll try to answer them as much as I can.

 

Please I need help to determine why this is happening.

5d1ac35abefd9_Annotation20190701193641.p

 

5d1ac5021ae13_Annotation20190701194347.p

5d1ac75e29637_Annotation20190701194727.p

embyserver.txt

ffmpeg-transcoder-1.txt

ffmpeg-transcoder-2.txt

Edited by cparadela
Link to comment
Share on other sites

Hi, what you're trying to transcode here is probably the most expensive example you could possibly try, in terms of resources. This is 4K 10-bit HDR HEVC and you're also burning in subtitles. This is not a lightweight task by any means, even for very powerful machines.

 

The best way you can do better is to turn off the subtitles, and/or play videos that don't have PGS format subtitles. Samsung TV's do not support these subtitles, so anytime you play them they are going to be burned in with server transcoding. This will consume a lot of resources.

 

If you must have subtitles, try acquiring external text subtitles. Our subtitle download features can help with that.

 

Please let us know if this helps. Thanks.

Link to comment
Share on other sites

cparadela

Thanks for your quick answer. My question is:

 

If the box can handle the video if I disable the hardware transcoding acceleration and then also use my bluray player UBD-M9700 and by the way, I also try to play the movie with it and got the same result. But, like I mentioned before I disabled the hardware acceleration and now the movie can be reproduced without any lag or buffering. I also tried to play the movie without subtitles and still received the same problem with HW acceleration enabled and also tried with external txt subtitles and the same. My question is the graphics card can't support that heavy task and only the processor of the box yes, is that something normal?

Hi, what you're trying to transcode here is probably the most expensive example you could possibly try, in terms of resources. This is 4K 10-bit HDR HEVC and you're also burning in subtitles. This is not a lightweight task by any means, even for very powerful machines.

 

The best way you can do better is to turn off the subtitles, and/or play videos that don't have PGS format subtitles. Samsung TV's do not support these subtitles, so anytime you play them they are going to be burned in with server transcoding. This will consume a lot of resources.

 

If you must have subtitles, try acquiring external text subtitles. Our subtitle download features can help with that.

 

Please let us know if this helps. Thanks.

Link to comment
Share on other sites

First of all - with external subtitles or no subtitles, that video might direct play to the Samsung app, in which case there would be no transcoding at all. That is the best case scenario.

 

But yes, it is possible that in this example your cpu might actually be able to handle this task better?

 

Why? Because some operations such as burning in subtitles can't fully be done on the GPU anyway. This means that even though you have hardware transcoding enabled, the transcoder has to copy the video data back and forth between the GPU and CPU in order to perform certain parts of it on one vs. the other. This is a big part of the reason why it performs so slowly. To get the best possible performance you want the data to be able to stay on the GPU the entire time. But with certain features such as burning in subtitles, HDR, 10-bit, etc, if the GPU doesn't support all of these then it gets transferred back to CPU and then back again.

Link to comment
Share on other sites

  • 4 weeks later...
raven-au

Hi,

 

Thanks for your quick answer. My question is:

 

If the box can handle the video if I disable the hardware transcoding acceleration and then also use my bluray player UBD-M9700 and by the way, I also try to play the movie with it and got the same result. But, like I mentioned before I disabled the hardware acceleration and now the movie can be reproduced without any lag or buffering. I also tried to play the movie without subtitles and still received the same problem with HW acceleration enabled and also tried with external txt subtitles and the same. My question is the graphics card can't support that heavy task and only the processor of the box yes, is that something normal?

 

I also have a TS-877, very impressive device IMHO.

 

I recently got a 1050 Ti for it too.

 

I can tell you that in a Windows VM DvdFab can transcode (GPU hardware assisted) a UHD HDR Bluray movie (HEVC to HEVC) at between 40 and 120 fps depending on the movie.

That's the fastest hardware trancoding I've ever seen, those Nvidia cards are great.

 

But this isn't what your asking, your trancoding from HEVC to H264.

 

The H264 encode should be no effort for your graphics card whatsoever, even the Intel hardware encoding for H264 is really fast and the Nvidia is, by the look of it, way faster than the Intel GPU in the NUC8i7HNK I have.

 

The bigger question is the HEVC decoding which both your card and mine can do fine because those really fast encodes above that I mention use the so called DvdFab Lightening-Shrink, which I think is sales speak for decode and encode all within the GPU.

 

Along the way I have noticed that ffmpeg seems to be bad at decoding using hardware, now I don't really know what I mean by that, but it might mean that doing HW decoding and passing it on to do HW encoding for a different codec might not work too well.

 

Which (I think) means what might be being done is, copy frames to GPU memory, process, copy frame (or group of frames, not sure about that either) back to CPU memory, copy frame back to GPU memory and convert, finally copy frame back to CPU memory, and I believe these copies are expensive so that could be part of the problem.

 

Perhaps there's a specific set of ffmpeg options needed to do it right when converting to a different codec entirely in the GPU hardware which aren't being used, I don't know.

 

I've seen ffmpeg doing fairly well with hardware encoding HEVC too (haven't used hardware H264) but this has all been in a Windows VM (on the NAS). Don't have details but I'm think of the order of 40 to 60 fps. But I don't use it for this because ffmpeg basically still doesn't support HDR encoding for "any" hardware assisted encoding and about 1.1 to 1.8 fps is about all I can get on any of my hardware using software encoding.

 

I can't remember now what options are present in the Emby transoding config page but if you can disable just HEVC hardware decoding that might help.

 

Ian

Link to comment
Share on other sites

raven-au

Right, looking at your transcode log above I didn't see options anything like what I would expect for using an internal format so it could be done all in the GPU, but I'm not nearly knowledgeable enough about that to know what that even means, ;)

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