[NUUG video] Creating a web based TV station using liquidsoap and SOAP (Was: [Savonet-users] Bug#574628: liquidsoap: Drop video when processing Ogg Theora file)

Petter Reinholdtsen pere at hungry.com
Mon Apr 12 22:40:57 CEST 2010


[David Baelde]
> Hi Petter,
> 
> I'm not sure of what you want exactly, and where you are right now.
> But let me confirm that we'd be happy to help you experiment with
> liquidsoap SVN: getting the video in a production state is our goal
> right now.

Very good.

To got you a quick overview.  We got a web based TV station, where
everyone can upload video, schedule it and get it broadcasted on the
national TV network, and on an Internet stream.  This is the norwegian
open channel (<URL: http://www.frikanalen.no >).  The current
implementation is built around a set of SOAP services, handling
creation of events, scheduling and exporting the schedule to the
playout system.  It is windows based and Windows media based, and we
are trying to make a solution based on open standards for users that
prefer it.

The playout system issues a SOAP call to get a list of XML files with
the schedule information, and uses this to generate a TV broadcast
stream.  This is the part we are working on at the moment, and where I
consider liquidsoap as the platform.  One part will be for creating
the Internet stream version of the channel using Ogg Theora video via
icecast, while another part will be to play the full size DV-AVI PAL
files send vis SDI to the broadcast network.

In the XML file is a reference (ID) to a video and timing information
(start and stop).  The reference is used to issue another SOAP call to
get the URL to the video file, which is downloaded every night to have
it stored locally when playing the days events.  The playout system
then uses the schedule to play the scheduled videos at the correct
time, to produce the TV station.  Between the scheduled video a info
screen listing the future entries is shown.

The perl implementation I sent you earlier implemnt this using
ezstream and vlc, which both have had the problem of causing the video
client to stop playing when an event is done and the stream switches
to the info screen.

Since my first email, I've succeeded in using the liquidsoap package
in Debian/unstable to stream three of the Ogg Theora video files in
sequence via an icecast server to a vlc client without the problems we
have seen with vlc ending the video playing between events.  The
resolution and bandwith usage is not as expected (see
<URL: http://bugs.debian.org/577076 >), but I expect that this is
solvable by tweaking some configuration options if the defaults do not
become more sensible. :)

Now the problem is to see how liquidsoap can use the information
available via the SOAP api to schedule programs at the correct time
instead of using a sequencial playlist.  I have not had time to look
into how that can be implemented in liquidsoap yet, but am curious how
we can make sure the SOAP api is only called once per day instead of
very time a program is about to start.  Calling the SOAP api and
parsing the XML files it points to is too expencive to do all the
time.

Also, I am curious if it is possible to generate the program info
screen shown between events using liquidsoap.  Can liquidsoap generate
video from an image directly?  A video with animations (like a clock
or some scrolling text) would be nice to have on the info screen. :)

> The main limitation is efficiency. Many operators haven't been
> optimized yet, so we don't know exactly what's possible. But I
> wouldn't expect to decode and encode in real time larger than around
> 500x500, and even that will require a good CPU.

Would recoding be needed if the resolution do not change?  I hope not,
to avoid costly operations.  The Ogg Theora files are pregenerated,
and I hope we can get away with only coding the video once. :)

> If you have a script that gives the current file to play you can
> directly use it with liquidsoap using the request.dynamic() operator
> combined with get_process_output(). You'll find examples in the doc.

This seem to require parsing the XML files every time a new event
should be scheduled, which I really would like to avoid.

> This is all rather vague, but please be more specific about what
> you're doing and what you currently cannot do with liquidsoap.

It is rather vague, as I am new to liquidsoap and do not really know
what it can do nor if it is the right tool for my problem.

Happy hacking,
-- 
Petter Reinholdtsen


More information about the video mailing list