Page 1 of 1

ffmpeg runs in high CPU after video has stopped

PostPosted: Sun May 25, 2014 8:15 pm
by tluttig
Hi Folks,

I have serviio-1.4.1.2 on windows 7 ultimate 64 bit on a Petium Dual Core(1.87 MHz x 2). So far so good with everything except for this behaviour:

When I start an video(specially when using external subtitles), i see that ffmpeg starts and keeps a high CPU usage(which should be expected due to the transcoding feature). However if i stop the video,
ffmpeg still runs with high CPU usage. Looking for the threads, this behavior seems to be 'by design' as serviio triggers the ffmpeg for the transcoding and it will run until it's done(even though the video playback has ended). Also, I see that for each video being played, I see a separate ffmpeg process. I've set the transcoding to use 1 CPU, with the hope that this would restrict the global CPU usage. In order to allow ffmpeg to end as soon as possible, would you recommend to set the CPU to Optimal instead of 1(or even 2 in my case as i have a dual core processor) ?

I'm really new at the serviio world(being using it for a week or so) but I really enjoy it really much that i decided to buy the pro license. So far, this is the only thing that has drawn my attention so far in the downside.

What do you recommend in this scenario ?

Thanks in advance :)

Re: ffmpeg runs in high CPU after video has stopped

PostPosted: Wed Jul 09, 2014 8:19 pm
by Rapper_skull
After you stop the video the transcoding will continue so that you can play the same video without buffering and move back/forward without lags. But I think one should have an option to disable this behavior because it takes also space on disk.

Re: ffmpeg runs in high CPU after video has stopped

PostPosted: Thu Jul 10, 2014 12:39 am
by atc98092
I believe the only thing that will happen with changing the CPU setting to something besides optimum is that it will take longer to complete the transcoding. Also note that if you stop your movie and start playing a different movie on the same player, the transcoding process for the first movie will be stopped. If you are seeing a separate ffmpeg process, it's likely it just hadn't stopped the first one yet. But it will.

Of course, what works the best is to have your videos in a format that does not require transcoding. That depends on what you are using to play them. For example, my Sony players will stream almost anything without transcoding, although older boxes still have to do some formats. My Roku will only play MP4, HLS or M2TS without transcoding. My Panasonic TV is kind of old, and only seems to do OK with MPG.