Page 1 of 1

CPU stays high (transcoding) even when disconnected

PostPosted: Thu Nov 14, 2013 10:27 am
by uglymug11
Hi All,

I am new to serviio (and dlna streaming) so I hope this isn't a dumb question.

I set up serviio very quickly and easily (very impressed) and it works fine with my Panny (Panasonic Vierra 2010 profile)

I have set to transcode, otherwise most of my files won't play. My quad core 2Ghz laptop serves the stream fine (all cores running upto 80% though). My problem is this:

When I stop playback on the panny, and even when the panel is turned off (no other devices attached), my laptop is still churning away at full CPU (ffmpeg process consuming all the cycles). This means I can't use the laptop.

stopping and starting the server in the control panel does not help, killing the ffmpeg process does.

Is this normal behaviour? Can I configure serviio to stop transcoding if the client disconnects?

Any help appreciated.

thanks in advance

Ian

Re: CPU stays high (transcoding) even when disconnected

PostPosted: Thu Nov 14, 2013 11:06 am
by Illico
uglymug11 wrote:...
Is this normal behaviour? Can I configure serviio to stop transcoding if the client disconnects?
Any help appreciated.

Yes.

After first install, when you add a new folder path to build or update the serviio library, depending on library size, the process can be long and cpu load high.

Serviio / ffmpeg always transcode the entire file until the end. The process is stopped only when the Serviio service is stopped.

Re: CPU stays high (transcoding) even when disconnected

PostPosted: Thu Nov 14, 2013 11:31 am
by uglymug11
Many thanks for the quick response.

does that man that the next time I watch the movie it won't need to transcode again?

cheers

Ian

Re: CPU stays high (transcoding) even when disconnected

PostPosted: Thu Nov 14, 2013 1:24 pm
by Illico
uglymug11 wrote:does that man that the next time I watch the movie it won't need to transcode again?

Not exactly...
The transcoding "cache" is cleared when serviio services are stopped, or when an other stream is starting.
Zip, you confirm ?

Re: CPU stays high (transcoding) even when disconnected

PostPosted: Fri Nov 15, 2013 3:43 pm
by zip
Yes, that is correct

Re: CPU stays high (transcoding) even when disconnected

PostPosted: Tue Nov 26, 2013 3:47 am
by payas
are there any plans to change serviio so transcoding stops when playback stops?

Re: CPU stays high (transcoding) even when disconnected

PostPosted: Tue Nov 26, 2013 5:08 am
by DenyAll
Asked and answered many times I believe... no, unfortunately the server cannot tell if the movie has been stopped or simply paused (limitation of DLNA/how it's implemented by many a TV). Deleting the transcoded file because it's been paused would likely make a lot of people unhappy ;)

Re: CPU stays high (transcoding) even when disconnected

PostPosted: Mon Dec 16, 2013 5:08 pm
by mightymouse2045
zip wrote:Yes, that is correct


I've seen the response regarding ffmpeg continuing to transcode even though the person has stopped the movie.

The reasoning is due to a limitation in DLNA not being able to distinguish between a paused file and one that's been stopped playing, as "DenyAll" mentions above....

What about this as an alternative:

1. The Device starts playing a movie that rquires transcoding. This job is registered to that client already in serviio.
2. While watching the movie there are no further requests to or from that device except if time seeking. Even pausing and restarting the movie generates no further interaction with the server and client.
3. If the person stops playing the movie, again there are no further messages, UNLESS they then browse other folders, the client will start generating traffic with the server again. Or if they exit certain DLNA clients you will get the following:

"2013-12-17 00:57:51,608 DEBUG [DiscoverySSDPMessageListener] Received a valid NOTIFY (ssdp:byebye) message from Renderer e2d1cc01-b580-24f6-ffff-ffffb50e54f8 from address /10.5.0.25:58599"

Couldn't you do it so ffmpeg is killed on a trigger event - ie if an ffmpeg job is running but either an ssdp:byebye message or folder browsing messages start coming from the client with the job running, then that job is killed?

That seems like a better alternative as opposed to leaving the job running till the end... I mean quite a few times I just watch a bit of a movie, don't feel like watching it and just put my tablet away, but the job keeps running so I have to ssh into my machine and kill it manually. it's a bit of a pain in the ass to tell the truth :P