FAQ  •  Register  •  Login

Livestreamer integration?

<<

kylecooper

Serviio newbie

Posts: 1

Joined: Sat Oct 24, 2015 3:19 am

Post Sat Oct 24, 2015 3:28 am

Livestreamer integration?

While Serviio works very well for files (MKV, TS, MP4, AVI, etc...) I have incredible difficulty getting livestreaming sources to play consistently. They usually play for a few minutes, then freeze... then play again, eventually they'll stop playing and I'll have to reopen the stream on my player (Samsung TV in this case). If i watch the same stream on my computer, it will play fine in Livestreamer, but ffplay studders.

If i understand correctly, Serviio uses ffmpeg to open the video, then "pipe" it into serviio where it turns in into a DLNA stream...

Is it possible to use livestreamer instead of ffmpeg and pipe out from that? I don't mean to replace FFmpeg, just use this as an optional streamer. It works much better for live streams for me.

Here's the livestreamer homepage
http://docs.livestreamer.io/
<<

jhb50

DLNA master

Posts: 2843

Joined: Thu Jun 30, 2011 9:32 pm

Post Sat Oct 24, 2015 5:36 pm

Re: Livestreamer integration?

You need a wrapper.

For Linux see viewtopic.php?f=11&t=6688

For windows you need to write and compile a wrapper ffmpegalt.exe and invoke it by adding the ffmpeg location system parameter
  Code:
-Dffmpeg.location=C:\Program Files\Serviio\lib\ffmpegalt.exe
in C:\Program Files\Serviio\bin\ServiioService.exe.vmoptions
You can write the wrapper in basic (see viewtopic.php?f=7&t=8481&p=101935)or perl (see viewtopic.php?f=7&t=15065&p=87496) or visual basic (ffmpegalt.vbs) and invoke it with an ffmpegalt.bat

The wrapper will then receive the Serviio ffmpeg command, which you can then parse (handling any special characters) and create and execute a command that calls livestreamer and pipes its output to ffmpeg with its original parameters to provide the required format stream back to Serviio.

This is quite complex since the wrapper needs to handle all the various ffmpeg calls like the null call where Serviio confirms ffmpeg on start-up, regular file calls, and all the supported ffmpeg on-line stream formats like rtmp, http, https, mms, rtmp, plus the additional formats like hls that livestreamer supports, as well as retaining and repeating the ffmpeg parameters Serviio has added. You might also consider invoking KSV's rtmpdump in order to access many rtmp streams that the normal Serviio ffmpeg librtmp cannot, and this will also require the reformatting of the rtmp url parameters to those required by rtmpdump (eg: playpath=xxx to -y xxx)

While there are examples of wrappers as referenced above posted on the forum, none seem to be of this complexity. Once you get this wrapper working the door is open to anything you want, like fixing some serviio playback bugs, changing aspect ratios (eg: making any 4:3 videos play as 16:9 either by zooming and cropping or stretching), selecting alternate audio streams, logging the wrappers changes etc.

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 29 guests

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