Jump to content

100% CPU Usage


Blatherscribe

Recommended Posts

Blatherscribe

Greetings,

My Emby server has updated to version 4.7.4.0, and now when I play a video through my Roku device, my computer suddenly hits 100% CPU usage. The culprit is ffmpeg.exe. I've checked the knowledge base, and the file format is supported (.mkv, H264 1080p). The bitrate for one of the files for which I'm seeing this problem is 192 kbps. Given that I can set the Roku app as high as 60 Mbps, this should not require transcoding. My wifi network is definitely up to the task. I've attached the log files.

This has never happened before. How do I stop it?

Thank you for fixing the problem with subtitles displaying in the letterbox area, by the way.

Edit: I checked something I should've checked first, and found that subtitles are what's forcing the transcode. If I disable transcoding, everything runs normally, but no subtitles. Is there any way to avoid this?

embyserver.txt ffmpeg-transcode-64ee337a-62cf-4846-81a4-11d0ebecaa5c_1.txt

Edited by Blatherscribe
Link to comment
Share on other sites

GrimReaper
1 hour ago, Blatherscribe said:

Is there any way to avoid this?

Yes. Obtain external text based subs (you can use Emby's inbuilt subtitle download feature) as burning-in graphical subs is quite CPU-heavy process that can tax even modern processors. 

Link to comment
Share on other sites

Blatherscribe

But why has Emby suddenly started maxing out my CPU when I play videos with subtitles? I tried turning on throttling, and unchecking and then rechecking the option to allow subtitle extraction on the fly, and neither helped. According to the help text for these options, throttling reduces CPU load (it did not), and on-the-fly extraction prevents transcoding (it does not). So it's transcoding when it shouldn't, not throttling, and always running the CPU at max load. These are all new behaviors. What can I do to prevent them from happening? I've been using Emby for several years now, and never before has it caused major CPU load like this. I've watched movies in Emby while playing computer games, and there was never a problem before.

Link to comment
Share on other sites

GrimReaper
5 hours ago, Blatherscribe said:

now when I play a video through my Roku device

 

17 minutes ago, Blatherscribe said:

But why has Emby suddenly started maxing out my CPU when I play videos with subtitles?

AFAIK Roku does not support PGSSUB (graphical) subs so they have to be burned-in. Maybe you just didn't stumble upon an item that had those subs but SUBRIP (text) embedded, which are supported and would DirectPlay, same as if you provided external text subs, as suggested above. 

20 minutes ago, Blatherscribe said:

I tried turning on throttling, and unchecking and then rechecking the option to allow subtitle extraction on the fly, and neither helped. According to the help text for these options, throttling reduces CPU load (it did not), and on-the-fly extraction prevents transcoding (it does not). So it's transcoding when it shouldn't, not throttling, and always running the CPU at max load.

Throttling would come in force if your CPU had excess power - in your current scenario, where you don't have Premiere subscription hence no Hardware Accelleration, transcoding is done in completely in software, in addition to burning-in subs which is, as stated, heavy CPU process by itself, so it might be taxing it a lot. 

@softworkz might have some more insight. 

Link to comment
Share on other sites

Hi.  Yes, it is the subtitles causing the transcoding.  This isn't new so  you must have just never attempted to play an item with PGS subs before - or you just didn't notice it before.

Does this answer your questions?

Link to comment
Share on other sites

Blatherscribe

No, I've been playing these same videos for years. Some of them are my favorite movies, I've watched them many times. But 100% CPU load is brand new. Trust me, most of the time when I watch one of these videos, I'm sitting right next to my computer. I would notice if the fan suddenly sped up and I couldn't start up a game without both things bogging down. I didn't check the CPU load when nothing unusual was happening, so I don't have a percentage, but previously it wasn't enough to make the fans audible, let alone have them running at top capacity.

I know it's Roku's fault for not accepting PGS subtitles, but something must have changed, because this is definitely a new issue.

In the transcoding options, I have "Enable Throttling" checked. It says this will reduce CPU utilization. Has this changed so that it no longer works?

I also have "Allow subtitle extraction on the fly" checked, which says, "Embedded subtitles can be extracted from videos and delivered to Emby apps in plain text in order to help prevent video transcoding." Does this no longer work?

I'm sorry to belabor this, but *something* is definitely different, and not in a good way. Sending videos to my TV through Emby has gone from something that my computer just does without noticeably altering its performance, to something that causes it to run as hot as it possibly can the entire time.

Link to comment
Share on other sites

We apologize for the problem. But we have tested this and the "enable throttling" does work. It requires you get far enough ahead in transcoding that it is safe to pause for a moment. If you never get that far enough ahead, the throttling will never happen. Instead it will act like throttling can never happen. It will pound your CPU 6 feet into solid bedrock. In other words, the transcoding might get so brutal that it will kill your CPU and cause some serious lag and hang processes. 100% CPU usage for ffmpeg during that time sounds right especially with only software encoding happening encoding PGSSUBS.

What likely happened is you accidentally changed the subtitle pre-play drop down on the detail screen prior to playback. Once that is done it will believe it should always be done. Anytime a user makes a manual change to a title such as changes subtitles or changes the audio stream that change is remembered for that item for that user. So that the next time you attempt to play it you are treated the same as you left it. This is by design.

The Roku will also respect the "default" flag if this is shown on an item. It may do this even when you do not want the subtitles shown. You may not be able to change from the default. They may be stuck on. This is a problem inherited with the recent Roku firmware update to 11.0. You may need to use MKVToolNix GUI (assuming it is an MKV) and remove the default/forced flags from showing next to any subtitles and remux that item. That will correct the problem firmware 11.0 has introduced. Some Roku models have the problem with default/forced corrected. Some do not.

 

 

The subtitles which can be extracted on-the-fly are text based such as SUBRIP (internal SRT), and ASS/SSA (internal). The PGSSUB are graphical and timed to be burned in at the moment.

Edited by speechles
Link to comment
Share on other sites

rbjtech
Quote

Warning: Hardware acceleration is not available as it requires a valid Premiere Subscription

Do you have emby premier ?  Maybe the transcoding was done in the GPU hardware before - but for some reason this is no longer available, thus it falls back to CPU ?

Edited by rbjtech
Link to comment
Share on other sites

Blatherscribe

I haven't changed any subtitle options in the Roku app. I want subtitles to be displayed, and have them enabled by default, and always have.

I don't have Emby Premiere, but if I did I would also notice if the GPU suddenly went to max load and ran the fans at gale force. :)

What I don't understand is why everything has been fine, apart from some early issues with transcoding for subtitles reducing image quality, the entire time I've had Emby... until yesterday. Every other time I've watched a movie, it's been no big deal. Yesterday and today, as you say, it's pounding my CPU into the bedrock. I was also having problems with pausing and rewinding causing playback to glitch, with artifacts like unscheduled freeze-frames and audio and video getting out of sync. Normally these things only happen if I do a lot of rewinding and fast forwarding, or do the 10-second skip back too many times in a row.

Link to comment
Share on other sites

Regarding subtitle extraction, that is only used for text subtitles 

Pgs subtitles are image based and therefore can only be added via video transcoding if the device doesn't support the subtitle format, which Roku does not.

Link to comment
Share on other sites

Blatherscribe

Right, thanks, understood. :)

My question is: Why did the 100% CPU load when playing any video with subtitles start yesterday, after years of working just fine as something that runs in the background, and how can I get back to the way things used to be?

Link to comment
Share on other sites

7 minutes ago, Blatherscribe said:

Right, thanks, understood. :)

My question is: Why did the 100% CPU load when playing any video with subtitles start yesterday, after years of working just fine as something that runs in the background, and how can I get back to the way things used to be?

Probably because they were a different format subtitles such as plain text that could be displayed in more efficient ways.

If you have a specific example of a playback session that we can look at that performed better, then we can answer in more detail.

Link to comment
Share on other sites

Blatherscribe

Unfortunately, I hadn't used Emby for a while because of the issue with subtitles disappearing into the letterbox area (which, again, thanks for fixing that!). So I don't have any older log files. I've been thinking about this, though, and I have a possible answer. While I did not have Emby Premiere at the time videos played with much less CPU strain, I have in the past (and do now, as of a couple of minutes ago). Is it possible the transcoding settings only available to Premiere members never deactivated until this latest update, so I was getting better performance than I should have?

In any case, thank you very much for your help. I'm going to work around the issue by using downloaded subtitles. And I'll hope the Roku people add support for the subtitles that actually come with DVDs. :)

Link to comment
Share on other sites

18 hours ago, Blatherscribe said:

Unfortunately, I hadn't used Emby for a while because of the issue with subtitles disappearing into the letterbox area (which, again, thanks for fixing that!). So I don't have any older log files. I've been thinking about this, though, and I have a possible answer. While I did not have Emby Premiere at the time videos played with much less CPU strain, I have in the past (and do now, as of a couple of minutes ago). Is it possible the transcoding settings only available to Premiere members never deactivated until this latest update, so I was getting better performance than I should have?

In any case, thank you very much for your help. I'm going to work around the issue by using downloaded subtitles. And I'll hope the Roku people add support for the subtitles that actually come with DVDs. :)

Hi, do you mean hardware transcoding support? That has always required Emby Premiere.

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