Page 1 of 1

Using VLC as an IPTV receiver

Posted: 28 Sep 2009 10:08
by Tony M
I have an IPTV system and use VLC to play streams. Currently, I launch VLC and open a network stream using a UDP multicast address.
Not very friendly for other users! :(

As part of the IPTV system, I have access to a channel list in XML, with a format as below:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<channel-list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<channel number="1">
<name>BBC One</name>
<multicast ip="226.0.18.92" port="10000"/>
</channel>
<channel number="2">
<name>BBC Two</name>
<multicast ip="226.0.18.93" port="10000"/>
</channel>
</channel-list>

Is there any way VLC media player can load the XML file so users can select the channel to play? 8)

Thanks

Re: Using VLC as an IPTV receiver

Posted: 28 Sep 2009 10:26
by Jean-Baptiste Kempf
Transform it to xspf ?

Re: Using VLC as an IPTV receiver

Posted: 28 Sep 2009 16:08
by Tony M
Thanks - I'll give that a go, based on what's here:

http://wiki.videolan.org/XSPF#Example_o ... extensions

Re: Using VLC as an IPTV receiver

Posted: 01 Oct 2009 21:43
by Tony M
I now have a working solution using xspf. Here is a sample generated by importing an example XSPF file to Excel, editing the tracks and then exporting. This allows you to edit the entries in a table format:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<title>IPTV Channels</title>
<trackList>
<track>
<title>BBC One</title>
<trackNum>1</trackNum>
<location>udp://@226.0.19.50:10000</location>
</track>
<track>
<title>BBC Two</title>
<trackNum>2</trackNum>
<location>udp://@226.0.19.51:10000</location>
</track>
### etc... ###
</trackList>
</playlist>

One note: the channels list correctly on VLC v1.0.1 but VLC v0.9.2 just shows the title and no tracks. I tried playing around with some of the VLC extensions but they didn't significantly improve the presentation so I decided to keep it simple.

I dropped the xspf file on a web server, copied the VLC shortcut and added "http://<server>/channels.xspf" to the command line. Now, when the user opens the shortcut, VLC loads, opens the first stream and starts playing it. Clicking on the playlist button open the channel list; double clicking an entry switches to the selected channel. Nice!

Thanks for the hint. :D