Jump to content

Emby Server has 100 % cpu usage when casting any media on Chromecast.


MisterkhJe
Go to solution Solved by MisterkhJe,

Recommended Posts

MisterkhJe

I have Emby server running on Ubuntu Server 20.04 LTS. As soon as I start casting some media on chromecast CPU reaches 100%. And system shutsdown.

 

emby_server_cpu_100_usage.png

embyserver.txt embyserver-63768111740.txt ffmpeg-transcode-f4e27dc1-319d-4252-abbe-e1b10bfd7d77_1.txt ffmpeg-transcode-f8f5f3e3-bf17-4c41-9fc3-f9b5b96823e6_1.txt hardware_detection-63768111755.txt

Link to comment
Share on other sites

Happy2Play

To me it looks normal as your man in middle device requires transcode of the media.

App: Emby for Android 3.2.11
Samsung Galaxy S7 Edge

&TranscodeReasons=VideoCodecNotSupported

Do you not see this same behavior while playing this media on that device?

Link to comment
Share on other sites

MisterkhJe

I mean to say when I am playing this media directly on my phone using emby app, the cpu usage is low. But as soon as I start casting it to Chromecast using emby app, I can see spikes on cpu usage and then system shutdowns.

Have a look at cpu usage when playing media on my phone on Emby app:

 

Screenshot_20210925-015018_Chrome.png

Link to comment
Share on other sites

Happy2Play

So that would suggest the device you are casting to doesn't like the codec forcing the server to Transcode.  But don't really know how Chromecast works as the cast device is always in the middle.

Link to comment
Share on other sites

Q-Droid

Does playback on Chromecast still transcode the full file ignoring the throttle setting? This was an issue not too long ago.

 

Link to comment
Share on other sites

Happy2Play
3 minutes ago, Q-Droid said:

Does playback on Chromecast still transcode the full file ignoring the throttle setting? This was an issue not too long ago.

 

Would appear so.

>> ThrottleBySegmentRequest: Latest request position unknown

 

Link to comment
Share on other sites

MisterkhJe

From this link I came to know that since I am having Google Chromecast 2 so, the supported video codecs are:

Chromecast 1st and 2nd Gen.

  • H.264 High Profile up to level 4.1 (720p/60fps or 1080p/30fps)
  • VP8 (720p/60fps or 1080p/30fps)

 

And media with video codec x265 would need video transcoding. I confirmed that he media that I was playing had x265 codec hence transcoding was required.

But what I don't get is that is transcoding such a cpu intensive task that my system shutdowns after few minutes or is my CPU (AMD-10 8700p APU ) not good enough to handle transcoding?

Edited by MisterkhJe
grammar mistake
Link to comment
Share on other sites

Q-Droid

Two things - it's transcoding in software and doing the whole thing as fast as it can. I don't know why your server would shutdown from the load, could be any of a number of reasons.

You could try:

- Getting the drivers and setup needed for HW acceleration working. I have no idea how well supported your APU is.

- If the server setting Transcoding Thread Count is set to Auto then change it to a lower value, 3 or even 2. If it's already set to a higher number or Max then try Auto.

These are meant to reduce the CPU load but the playback on Chromecast will still try to convert the entire file. Lower threads would slow that down but still faster than playback fps so you shouldn't see a difference.

 

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Happy2Play

That is just the nature of ffmpeg as it uses as much power as it takes to get the job done.  Also as mentioned throttling fails when casting to Chromecast so the entire file gets transcoded all at once, instead of as needed.  

21 minutes ago, MisterkhJe said:

But what I don't get is that is transcoding such a cpu intensive task that my system shutdowns after few minutes or is my CPU (AMD-10 8700p APU ) not good enough to handle transcoding?

If you system is shutting down with this intensive task then yes it may not be up to the task.  A guess is it maybe overheating and shutting down to prevent hardware damage.

  • Thanks 1
Link to comment
Share on other sites

sfatula

I agree that it's likely your CPU cooler isn't up to the task, or fans. x265 transcoding in software is slow. If you had a supported video card that allows hardware transcoding, you would be in much better shape.

Link to comment
Share on other sites

  • Solution
MisterkhJe

I would wind up my problem with the following conclusions:

  • If a device doesn't support the codec of the media file, it would ask the emby server for transcoding.
  • Transcoding is a resource hungry task and therefore requires good hardware.
  • Even after setting the transcoding thread count to 1 I saw no improvement.
  • And in my case my system is shutting down due to poor performance and poor heat management.
  • Like 1
Link to comment
Share on other sites

  • 2 years later...
Guest

I just started using Emby and am on my first month.  I'm using a Dell Poweredge R230 with Windows Server 2019 and things have been working well...until this morning, the fans on the server go crazy when I play a Blu-Ray or 4K movie to a Roku TV.  On the server, ffmpeg is at 100% cpu use.  Is this a known problem?

Link to comment
Share on other sites

GrimReaper
16 minutes ago, TroyL said:

the fans on the server go crazy when I play a Blu-Ray or 4K movie to a Roku TV.  On the server, ffmpeg is at 100% cpu use.  Is this a known problem?

Why do you think there is a problem? Most likely your item is transcoding and your server's having hard time keeping with it (in particular if no HWA), server and/or ffmpeg logs would show more. 

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