FAQ  •  Register  •  Login

Detect if media is streamiing

<<

vlowe

Serviio newbie

Posts: 3

Joined: Thu Jan 03, 2013 3:11 pm

Post Thu Jan 03, 2013 3:17 pm

Detect if media is streamiing

Hi,

I am wondering if it possible to check if serviio is streaming/playing media or if it is idle?

I am running on ubuntu and have a bash script which is scheduled to run every minute, it contains an rsync which occasionally transfers large files and IF streaming can cause the playback to suffer and jump.

I want to check if serviio is streaming something and if it is, don't run the rsync.

Thanks,

Vince
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17215

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Jan 03, 2013 4:54 pm

Re: Detect if media is streamiing

Not possible ATM
<<

vlowe

Serviio newbie

Posts: 3

Joined: Thu Jan 03, 2013 3:11 pm

Post Fri Jan 04, 2013 1:11 pm

Re: Detect if media is streamiing

no worries, modified the script to check eth0 tx speed in kb/s, and only run sync if under 50kb/s
<<

r-win

User avatar

DLNA master

Posts: 100

Joined: Sun May 22, 2011 6:16 am

Location: Lelystad, Netherlands

Post Fri Jan 04, 2013 5:27 pm

Re: Detect if media is streamiing

I think using lsof -p <Serviio pid> would be a better way. If Serviio is streaming a file, it'll show up with lsof.

Something like:
  Code:
 
lsof $(ppid serviio)

should give you the info you need when running bash. Note: when he library is updated, files may show up here as well.
Linksys WRT320N | Samsung PS-50C7700 | Microsoft XBOX 360 | Windows 8.1 | Linux Ubuntu 13.04
<<

vlowe

Serviio newbie

Posts: 3

Joined: Thu Jan 03, 2013 3:11 pm

Post Fri Jan 04, 2013 5:43 pm

Re: Detect if media is streamiing

cheers.

would also be nice to be able to call a script once serviio starts to stream. So can stop rsync and some less important procceses to ensure an uninterrupted playback.
<<

r-win

User avatar

DLNA master

Posts: 100

Joined: Sun May 22, 2011 6:16 am

Location: Lelystad, Netherlands

Post Fri Jan 04, 2013 5:45 pm

Re: Detect if media is streamiing

I agree, with some arguments, so I can log the view on trakt.tv ;-)
Linksys WRT320N | Samsung PS-50C7700 | Microsoft XBOX 360 | Windows 8.1 | Linux Ubuntu 13.04

Return to Serviio Support & Help

Who is online

Users browsing this forum: Google [Bot] and 45 guests

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