Jump to content

FFmpeg process stuck at 25% CPU load, no transcoding possible


NSGMajor

Recommended Posts

NSGMajor

Hello Guys,

I am using Emby on my Synology 920+ for quite some time now and had no issues. But unfortunately since a few weeks I get overall performance issues with Emby, especially when I want to watch a movie which requires transcoding.

After a lot of troubleshooting I may have found the issue. FFmpeg process which is performing the task of transcoding is only using 25% of max CPU usage. This issue is not related to upgrading from DSM 6.2.4 to DSM 7.0. It happened on both system versions.

I also have another Synology 920+ with the exact same configuration and on this Emby works as expected and ffmpeg hits close to 80%-90% of CPU usage. I could find no differences between those to either in Synology settings or Emby settings. The only difference is that I am using Emby Premiere, while the other does not.

It looks like the is some kind of limiter active for the transcoding process, but for the life of me I can't find any thing regarding this in my settings. Also my research in our World Wide Web came back empty.

 

Does anyone have suggestion for me or maybe a solution for this problem? I am currently not able to use Emby at all since, transcoding does not work properly (too slow).

 

Regards

ffmpeg-transcode-de41db24-82d2-4c38-9ca0-ba5645fc3367_1.txt

Edited by NSGMajor
Link to comment
Share on other sites

Hi, try comparing the info on the transcoding menu between your two 920+ boxes. Set "Enable hardware acceleration when available:" to Advanced on both so you can see the selections made for hardware use.

Let us know what you find.

Link to comment
Share on other sites

NSGMajor

@Luke @cayars Sorry I was busy the last week and couldn't check until now.

I switched both to advanced and both have exact same selection. The only difference is I am using DSM 7.0 while the other uses DSM 6.2.4, but that shouldn't make a real difference because I had the same issue on DSM 6.2.4 too.

I played the same movie on both systems and on mine 25% ffmpeg max cpu, while at the other it is about 80-90% (see screenshots).

I also attached both transcoding logs. I hope that you can help me out there, I am not that proficient with media encoding etc :) 

Screenshot 2021-08-15 at 14.06.22.png

Screenshot 2021-08-15 at 14.06.31.png

ffmpeg-transcode-bad.txt ffmpeg-transcode-good.txt

Link to comment
Share on other sites

One transcode is using Hardware and the other is using Software which is why you see such a difference in CPU use.

I would double check your transcode settings (set to advanced in first option) to look for differences between the two.

Link to comment
Share on other sites

NSGMajor

I doubled checked them. They are exactly the same. Why is one using Hardware transcoding and the other software?

Also the DSM920+ supports up to 4K hardware transcoding, shouldn't that be more performant than the software one?

Link to comment
Share on other sites

There would likely have to be some difference between the two if the same media played back the same way on the same client produces different results with one NAS using hardware and the other using software.

If you like I could do a remote session with you to look over both setups.

Link to comment
Share on other sites

NSGMajor

Yeah I know there should be a difference. Either Im that stupid and blind or there is none.

I set Transcoding => Enable Hardware acceleration to false on my system and now I get the same behaviour as the other. I checked logs to confirm it.

It looks like while both have the same settings when hardware acceleration is enabled only my system (system1 named in screenshots) is respecting this setting. The other will still use software transcoding. It's strange.

But shouldn't be hardware transcoding better than the software one?

 

system1-decoder.png

system1-encoder.png

system2-decoder.png

system2-encoder.png

Link to comment
Share on other sites

Try moving the QuickSync to the top for each codec and see if this will use hardware transcoding.

Yes using hardware should be better overall.

Link to comment
Share on other sites

MateyTate

Having the same issue... or very similar only when I use a specific device it seems.

When my son uses his Samsung TV, it says its direct playing, yet my DS916+ suddenly jumps to 25% CPU (+/- 2% every time) and then stays there - even when the TV is turned off it still sits at 25%. It then becomes unusable until I reboot the server, and then its fine again until he watches something. 

You can see in the images, I've stopped playing everything yet the usage is stuck at 25%. It will stay like that for hours until I reboot the server. Not sure if its the server or the app? I've attached logs as well.

 

ffmpeg-directstream-550d2c77-1e6a-4b36-a41d-da946692fb80_1.txt embyserver.txt

Capture.JPG

Edited by MateyTate
Link to comment
Share on other sites

MateyTate

Didn’t do anything, just tried on my Shield as well. It seems as soon as I play anything, even Direct Play where it’s not transcoding, it ramps up the CPU up to 25% and will not go down. Even if I stop playing everything and quit all the clients. 
 

Do the logs show anything strange?

Link to comment
Share on other sites

MateyTate

I just downgraded to the official release and it’s fine now. Something strange with the Beta. Anyway, you have the logs. Thanks. 

Link to comment
Share on other sites

Your server log is showing you were running Beta with debug logging turned on which will take more resources than normal and more IO as well.

You can turn debug logging off unless asked to turn it on.

Link to comment
Share on other sites

NSGMajor

@cayars Thank you for your suggestion. I tried it and it worked. Hardware transcoding is active and I have no issues while playing a movie that is in need for transcoding

  • Like 1
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...