iinthesky73 4 Posted April 2, 2020 Share Posted April 2, 2020 (edited) Been with Emby for a few years now.. Its great pretty much all around but I've never been quite happy with the GPU transcoding offload. It works but its pretty weak. When I look at the GPU load when Emby is transcoding it barely every ticks above 6% and the clocks are pretty much saying the GPU is more or less sleeping. The transcoding itself--incredibly slow. I have a pretty high end GPU and I know its capable of more than this. All the while, even ONE transcoded stream is choppy. I can only imagine what would happen if i tried 4 or 5 simultaneously. So.. I was wondering if anyone can answer a couple of questions. First, are there some settings I can play with--perhaps undocumented or otherwise--where I can tweak the transcode performance or force a greater offload to the GPU? And also, I notice that the file sizes of the transcoded stream chunks are relatively small.. looks like its random between 300k to 2MB. Is there a way to control the these chunk sizes perhaps force them to be larger chunks..i think this might delay starting the stream initially a few seconds but might help with the choppy behavior. Is there a way to control this? Edited April 2, 2020 by iinthesky73 Link to comment Share on other sites More sharing options...
Luke 37994 Posted April 2, 2020 Share Posted April 2, 2020 Hi, you might have the transcoding throttle feature enabled. You could try turning that off. There's no way to control segment sizes because they're based on time. We split the video into 3 or 6 second segments depending on the platform and other criteria. Link to comment Share on other sites More sharing options...
iinthesky73 4 Posted April 2, 2020 Author Share Posted April 2, 2020 (edited) Hi, you might have the transcoding throttle feature enabled. You could try turning that off. There's no way to control segment sizes because they're based on time. We split the video into 3 or 6 second segments depending on the platform and other criteria. Hey @@Luke -- thanks for the reply. I just checked.. Throttling is turned off/unchecked. Any other ideas? I mean.. i'm watching the transcoded segments appear on the filesystem.. the video stream seems to be coming over the wire faster than it's able to transcode, hence the occassional pause behavior but i simply can't believe that can be possible...yet i'm watching it happen. It takes sometime 3-4 seconds to spit out 1 MB or so segment. Does that sound right? I was doing some reading and from what I have seen.. the GPU cores used to render games and such are not the same hardware used to transcode/encode video. This seems to be the case with both AMD and nVidia GPUs.. is that how it works? It might explain the low utilization and clocks. I read that its possible to use the full power of the GPU but I don't think ffmpeg uses those calls to do its job I'm just guessing at this point as I've not done enough research on this. Edited April 2, 2020 by iinthesky73 Link to comment Share on other sites More sharing options...
iinthesky73 4 Posted April 2, 2020 Author Share Posted April 2, 2020 Hi, you might have the transcoding throttle feature enabled. You could try turning that off. There's no way to control segment sizes because they're based on time. We split the video into 3 or 6 second segments depending on the platform and other criteria. @@Luke --- so i just shut off the hardware encoding altogether.. the transcode speed is like 50x faster-- its not even close. This is bizarre. It seems AMF and even the nVidia equivalent are really just pieces of garbage. Quicksync is ridiculously faster. That's really disappointing. One would imagine that the encoding on a GPU with thousands of cores would actually use those cores but again, based on the information i've found so far, that's just not the way it works. Can you confirm that? Link to comment Share on other sites More sharing options...
Luke 37994 Posted April 2, 2020 Share Posted April 2, 2020 We'd have to look at some log examples. Thanks. Link to comment Share on other sites More sharing options...
iinthesky73 4 Posted April 2, 2020 Author Share Posted April 2, 2020 (edited) We'd have to look at some log examples. Thanks. @@Luke Ok.. I posted logs using AMF and using Quicksync below.. Its a quick snip of each video-- the operation using AMF is ~10x slower than Quicksync.. I'm just wondering is this really how crappy AMD or nVidia hardware encoding really is. Seems crazy but I think that's just how it is. I guess the question is whether there's any way to improve the performance or is it just something we have to relegate to these company's totally not caring to improve this in their hardware. AMF-ffmpeg-log.txt Quicksync-ffmpeg-log.txt Edited April 2, 2020 by iinthesky73 Link to comment Share on other sites More sharing options...
iinthesky73 4 Posted April 2, 2020 Author Share Posted April 2, 2020 We'd have to look at some log examples. Thanks. @@Luke Hey-- check this out. Look at the rates in the log below when I disable AMF Decoding and just use the Encoding feature alone. So I unchecked all the Decoding options for hardware accelerated transcoding.. and checked only the Encoding option. The rates are much higher than both HW Accel disabled totally and much much higher than Decoding/Encoding all offloaded to GPU. Watching the cpu/gpu iive stats i can see both the CPU and GPU are being used simultaneously with this configuration. (even though the GPU utilization is still about 6%, considering that AMF likely doesn't use the same parts of the GPU as games do, that may make sense as well). But anyhow, this is interesting-- AMF-EncodeONLY-log.txt Link to comment Share on other sites More sharing options...
Luke 37994 Posted April 2, 2020 Share Posted April 2, 2020 @@softworkz may have some thoughts. Link to comment Share on other sites More sharing options...
softworkz 3683 Posted April 3, 2020 Share Posted April 3, 2020 @@iinthesky73 - The log that you named "QuickSync" is using CPU transcoding, not QuickSync. I don't know where that specific weakness of the DXVA2 AMF decoder is coming from. But at least, transcoding is faster when using the AMF encoder compared to CPU encoding. Portions of your observations are correct: The video acceleration performance is unrelated to 3D performance of graphics adapters. Intel is very good in that area, but Nvidia is not too far away and really not as bad as you think. 1 Link to comment Share on other sites More sharing options...
iinthesky73 4 Posted April 3, 2020 Author Share Posted April 3, 2020 @@iinthesky73 - The log that you named "QuickSync" is using CPU transcoding, not QuickSync. I don't know where that specific weakness of the DXVA2 AMF decoder is coming from. But at least, transcoding is faster when using the AMF encoder compared to CPU encoding. Portions of your observations are correct: The video acceleration performance is unrelated to 3D performance of graphics adapters. Intel is very good in that area, but Nvidia is not too far away and really not as bad as you think. @@softworkz Ok thanks much for clarifying.. I was under the impression that whenever Intel CPU is involved it invokes Quicksync. My understanding of this is obviously flawed. I think based on the readings that the weakness is basically AMD's neglect of that portion of their hardware. Similarly to how they've pretty much abandoned their 'Crossfire' technology. The whole multi-GPU gaming scheme appears to have been ill conceived on the part of AMD and nVidia both which is a shame. Anyhow, thanks again. I think I've got the configuration working the best it can possibly work now considering all this. Link to comment Share on other sites More sharing options...
softworkz 3683 Posted April 3, 2020 Share Posted April 3, 2020 @@softworkz Ok thanks much for clarifying.. I was under the impression that whenever Intel CPU is involved it invokes Quicksync. My understanding of this is obviously flawed. I think based on the readings that the weakness is basically AMD's neglect of that portion of their hardware. Similarly to how they've pretty much abandoned their 'Crossfire' technology. The whole multi-GPU gaming scheme appears to have been ill conceived on the part of AMD and nVidia both which is a shame. Anyhow, thanks again. I think I've got the configuration working the best it can possibly work now considering all this. AMD started their way into video hardware acceleration some time after Intel and Nvidia and they are still a bit behind, especially regarding software support (like with ffmpeg). When you have an Intel CPU, I wonder why you aren't seeing any QuickSync hw codecs in Emby, or do you? 1 Link to comment Share on other sites More sharing options...
iinthesky73 4 Posted April 3, 2020 Author Share Posted April 3, 2020 AMD started their way into video hardware acceleration some time after Intel and Nvidia and they are still a bit behind, especially regarding software support (like with ffmpeg). When you have an Intel CPU, I wonder why you aren't seeing any QuickSync hw codecs in Emby, or do you? @@softworkz Yeah its definitely not a mystery because I disabled the on-board GPU in BIOS a long time ago when I was using these motherboards for cryptomining.. I was about to re-enable it. 1 Link to comment Share on other sites More sharing options...
softworkz 3683 Posted April 3, 2020 Share Posted April 3, 2020 I think it's worth trying. (manually assign memory in the BIOS, don't use 'auto') Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now