FAQ  •  Register  •  Login

ffmpeg 100% cpu usage since 1.2

<<

wont_start

Serviio newbie

Posts: 7

Joined: Sun Nov 25, 2012 6:19 pm

Post Sun Mar 17, 2013 7:00 am

ffmpeg 100% cpu usage since 1.2

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

will

DLNA master

Posts: 2120

Joined: Mon Aug 30, 2010 11:18 am

Location: UK

Post Sun Mar 17, 2013 7:38 am

Re: ffmpeg 100% cpu usage since 1.2

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.
Will
Beta Tester Group
ServiiDroid (Android Console) Developer: Download | Home | Support
ServiiGo (Android 3G/4G/WiFi Playback App) Developer: More info

Player: Sony BDP S370 | Server: Debian 6.0 x86
HowTo: Provide supported formats of a device HowTo: Record a new ticket on Bitbucket
HowTo: Provide details of a video file that doesn't play
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16475

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Mar 17, 2013 7:30 pm

Re: ffmpeg 100% cpu usage since 1.2

<<

wont_start

Serviio newbie

Posts: 7

Joined: Sun Nov 25, 2012 6:19 pm

Post Mon Mar 18, 2013 12:07 am

Re: ffmpeg 100% cpu usage since 1.2

i understand this right the video always must been transcoded on a sony device equal if the sub is in the mkv or external?
<<

jhb50

DLNA master

Posts: 2854

Joined: Thu Jun 30, 2011 9:32 pm

Post Mon Mar 18, 2013 2:44 am

Re: ffmpeg 100% cpu usage since 1.2

you understand right.
<<

wont_start

Serviio newbie

Posts: 7

Joined: Sun Nov 25, 2012 6:19 pm

Post Mon Mar 18, 2013 6:18 am

Re: ffmpeg 100% cpu usage since 1.2

pity :/

thx for the info!
<<

CarlosC

Streaming enthusiast

Posts: 27

Joined: Fri Jun 17, 2011 11:31 am

Post Tue Mar 19, 2013 12:44 am

Re: ffmpeg 100% cpu usage since 1.2

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

zip

User avatar

Serviio developer / Site Admin

Posts: 16475

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Tue Mar 19, 2013 8:11 pm

Re: ffmpeg 100% cpu usage since 1.2

This is by design and discussed many times.
<<

S222NEY

User avatar

Serviio newbie

Posts: 18

Joined: Tue Feb 05, 2013 11:42 pm

Location: Surrey, UK

Post Sun Mar 24, 2013 11:44 am

Re: ffmpeg 100% cpu usage since 1.2

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.
Servio 1.2.1 [Windows XP MCE SP3]

SONY | KDL-46HX803 | BDP-S470 | PS3 [CECH-2503B] | Xperia Tablet S [SGPT121GB] | Xperia GO [ST27i]
<<

yaro

Streaming enthusiast

Posts: 41

Joined: Fri Jul 20, 2012 2:16 pm

Post Sun Mar 24, 2013 7:00 pm

ffmpeg 100% cpu usage since 1.2

I found out that this issue is actually a result of faulty coding of the plugin. Remove the offending plugin.
<<

Jack Hidley

Serviio newbie

Posts: 6

Joined: Thu Nov 15, 2012 12:38 am

Post Sat Feb 15, 2014 12:26 pm

Re: ffmpeg 100% cpu usage since 1.2

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

mactho

Serviio newbie

Posts: 1

Joined: Thu Aug 04, 2016 7:49 am

Post Thu Aug 04, 2016 8:01 am

Re: ffmpeg 100% cpu usage since 1.2

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

TonyB

Serviio newbie

Posts: 2

Joined: Tue Mar 28, 2017 5:55 pm

Post Tue Mar 28, 2017 6:38 pm

Re: ffmpeg 100% cpu usage since 1.2

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

atc98092

User avatar

DLNA master

Posts: 2178

Joined: Fri Aug 17, 2012 10:22 pm

Location: Washington (the state) - temporary assignment to Washington DC

Post Wed Mar 29, 2017 12:29 pm

Re: ffmpeg 100% cpu usage since 1.2

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

Panasonic ST30 Plasma, Samsung JU7100 4K TV, Samsung UN24H4500 TV, Sony BDP-S3500, Insignia Roku TV, Sharp 4K Roku TV, Roku 2 XS, 4, Ultra and Stick, Yamaha RX-V679 AVR.
Primary server: Intel i5-6400, 8 gig ram, Windows 10 Pro, 18 TB hard drive space | Test server Windows 7 Home Premium, AMD Phenom II X4 965, 8 gig ram

Enable debug logging

Return to Sony

Who is online

Users browsing this forum: No registered users and 8 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.