Page 1 of 1

ffmpeg 100% cpu usage since 1.2

PostPosted: Sun Mar 17, 2013 7:00 am
by wont_start
hello,

i have updated to serviio 1.2 when i read it supports subtitles. since it is installed and i watch a movie in a mkv container the process ffmpeg uses nearly 100% of cpu ressources and the fans freaks out.
when i play the same file with version 1.0.1 the cpu usage is between 5% and 10%. if i kill the process the playback immediately stops. the preferences in both versions are the same except the subtitle options in version 1.2 are activated.
the os is snow leopard with all updates and the latest java version.

any clue why this is?


greets


edit: sorry i forgot to bring up that i use a 55hx855 if this is relevant.

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Sun Mar 17, 2013 7:38 am
by will
If you have hardsubs (burnt in) enabled and your device is a Sony or one that doesn't normally support subtleties over DLNA then the video has to be transcoded so that subtitles can be written into the video picture, this will result in very high cpu usage, especially for HD content.

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Sun Mar 17, 2013 7:30 pm
by zip

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Mon Mar 18, 2013 12:07 am
by wont_start
i understand this right the video always must been transcoded on a sony device equal if the sub is in the mkv or external?

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Mon Mar 18, 2013 2:44 am
by jhb50
you understand right.

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Mon Mar 18, 2013 6:18 am
by wont_start
pity :/

thx for the info!

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Tue Mar 19, 2013 12:44 am
by CarlosC
Zip, there is an issue which i don't know if it's intended or not. Serviio will not kill ffmpeg process once you stop playing a file.

It goes like this:

Select the file to play on the TV/Player/etc and press play > serviio starts transcoding the file and sending it to the device > the device starts playing the file

Then, you press stop and let's say you turn off your device and go to do something else. Serviio doesn't care, the file will still be transcoded until it's finished, hence using 100% of the CPU resources, wasting energy/electricity and making your PC kinda slow if you're short on cores.


Is there any way to "fix" this, or we just have to manually kill the ffmpeg process by ourselves?

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Tue Mar 19, 2013 8:11 pm
by zip
This is by design and discussed many times.

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Sun Mar 24, 2013 11:44 am
by S222NEY
CarlosC wrote:Zip, there is an issue which i don't know if it's intended or not. Serviio will not kill ffmpeg process once you stop playing a file.

It goes like this:

Select the file to play on the TV/Player/etc and press play > serviio starts transcoding the file and sending it to the device > the device starts playing the file

Then, you press stop and let's say you turn off your device and go to do something else. Serviio doesn't care, the file will still be transcoded until it's finished, hence using 100% of the CPU resources, wasting energy/electricity and making your PC kinda slow if you're short on cores.


Is there any way to "fix" this, or we just have to manually kill the ffmpeg process by ourselves?


Task Manager.

ffmpeg 100% cpu usage since 1.2

PostPosted: Sun Mar 24, 2013 7:00 pm
by yaro
I found out that this issue is actually a result of faulty coding of the plugin. Remove the offending plugin.

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Sat Feb 15, 2014 12:26 pm
by Jack Hidley
I have the same problem with:

Serviio 1.4
Win 7 Pro 64 bit

After using Serviio ffmpeg uses 100% of the CPU until I reboot the computer. Serviio 1.31 did not do this. I can leave the computer on for a couple hours and the CPU is still at 100%. I'm not using subtitles. I don't recall which version of ffmpeg was used with Serviio 1.31, but the ffmpeg version with Serviio 1.4 is the one included in the installation.

I see the reference above to this being normal and having been discussed before, but I am unable to find any reference to it.

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Thu Aug 04, 2016 8:01 am
by mactho
I've had similar issues with astronomical cpu usage and fan going for gold even after I've stopped watching on the client.
Admittedly I am transcoding, but with a pretty powerful machine and CPU usage is about 500 % not a typo. see attached picture.

Other than that, the software works pretty well.
regards
Screenshot_2016-08-04_17-41-21.png

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Tue Mar 28, 2017 6:38 pm
by TonyB
The same problem when I open video on iPhone/iPad but it begans on 1.8 version. On the old 1.5.2. everything was fine with it. Trascoding and Subtitles are off.

Re: ffmpeg 100% cpu usage since 1.2

PostPosted: Wed Mar 29, 2017 12:29 pm
by atc98092
When Serviio is installed over an older version, it most likely has to do a database reconfiguration. Sometimes Zip modifies the DB to support new features or resolve an issue. When that happens, it can cause CPU usage to spike to 100% for some time, usually depending on the size of the database. This is a one time occurrence, only happening after an update. It shouldn't continue indefinitely.

But if you're transcoding, ffmpeg will often cause the CPU to go to 100% and stay there until it completes the file transcode. That is normal operation. But again, it doesn't continue. If you stop playback, Serviio continues to transcode the file until one of two things happen: the transcoding is completed or a new video is selected for playback by the same player. The DLNA protocol does not offer a way for a player to tell Serviio that the file is no longer being viewed.