Page 1 of 1

Possibility to launch commands when playback starts

PostPosted: Sun Jan 09, 2011 11:15 am
by Willems
I really like Serviio as a DLNA package it is not as complicated to make it work with my DLNA equipment, on top of that I really like the active development of the product.

I use the product on a Windows Home Server, Windows Home Server has a storage pool which is balanced using the Demigrator service. When the service kicks in processor usage is about 90%. This results into stuttering when playing movies. The solution is to turn of the demigrator service when a movie starts.

Now it would be very nice if it were possible o launch system commands, when a movie starts reproducing. Besides this it actually can be used for other services such as macros for home automation etc. :) I Believe possibilities are endless!

Re: Possibility to launch commands when playback starts

PostPosted: Sun Jan 09, 2011 12:27 pm
by zip
Interesting idea. The problem is it's actually quite hard to figure out when movie starts playing, as the player can send multiple requests, e.g. for byte ranges. But I guess it could be done.

How would you envision that? A hook to run a Groovy (or another language) script?

Re: Possibility to launch commands when playback starts

PostPosted: Sun Jan 09, 2011 3:15 pm
by Willems
Unfortunately I do not have any knowledge of groovy scripts.

I was thinking of using a simple .cmd file containing the commands necessary to stop the service. And at the end starting it again.
If it is impossible to invoke this at the start of playing a file. Another option is to create an options menu. I have tried DLNA servers with these menu options, for example to renew the database etc.

Possible it would be a nice point to invoke a command at this point: (At the start of the delivery of video)

2010-12-16 21:39:20,109 DEBUG [VideoDeliveryEngine] Delivering item '29412' for client 'IPAddress=/192.168.1.8, Profile=Sony BD Player'

Re: Possibility to launch commands when playback starts

PostPosted: Sun Jan 09, 2011 4:58 pm
by zip
Yes, but that can happen many times for a movie, e.g. when you fast-forward. Also Serviio doesn't know about when a movie stopped being streamed, as it's handled by Java/OS on a lower level.

On another note,I'm also using WHS and I haven't seen any stuttering yet. But it's true that I don't have duplication of movies set up.