If you haven’t, you are slacking a bit, as they’ve been up for a while and are the top 3 posts ever on here by pageviews. According to the WordPress.com stats, #2 has been viewed more than 33,000 times, which is frankly a ridiculous number.

Anyway, after all that reading, you might be thinking yo yourself “well, multicast streaming is all nice and fancy, but what I want is some good old-fashioned unicast”. It’s a question that has come up a few times, especially as dvblast will only output multicast streams, so if you want multiple channels per tuner, you are stuck with multicast. There are a few reasons this might not suit your needs, however:

Not all of your network supports multicast (especially true if you have cheap and nasty edge switches).

You want to view the streams on clients that don’t have multicast software available (e.g. smartphones).

You want to access the streams from a different network (e.g. streaming from one location to another over the Internet or a WAN/VPN).

Well, you are in luck. There is another bit of totally free open-source software that will make that conversion for you.

udpxy

udpxy is a piece of software that can site on your network (either on the same box as dvblast or any other Linux client tat can see the streams) that will convert the RTP multicast stream to HTTP unicast.

Like dvblast, it’s very small with low CPU and memory usage, and it doesn’t do any transcoding: all it does is strip the RTP headers and spit out the MPEG transport stream over HTTP. This means it won’t le you view the stream with something like Windows Media Player, but it does open up the options to some software that doesn’t support multicast.

Step 1: Download and compile

There are no packages for udpxy (yet), so download the source to your Linux box and extract it like so:

tar -xzvf udpxy.1.0.23-0-prod.tar.gz

Now change directory into the new udpxy-1.0.23-0 directory and compile & install the software like so:

sudo make install

This will install two new programs into /usr/local/bin – udpxy and udpxrec. I’m only dealing with udpxy here, but feel free to run udpxrec later with no parameters and have a play.

Step 2: Run udpxy

Unless you have an unusual setup with more than 1 network card, all you should need to do now is start udpxy running with a port of your choosing. I use port 4022 since it’s used in the examples when you run udpxy without any parameters, and ports above 1024 don’t require any special permissions:

udpxy -p 4022

There are more configuration options available: run udpxy with no parameters for a list.

Now, if all is well, you should be able to browse to the following address in your browser

http://192.168.1.1:4022/status

If it’s working, you should see something like this (click to enlarge):

Step 3: Tuning in

If you’ve paid attention to the above status screen, you should already be able to tell how to tune in. In my example setup, I can open the following in VLC:

http://192.168.1.1:4022/rtp/239.255.1.1:5044

This will start receiving an RTP multicast stream from 239.255.1.1 on port 5004 (which is BBC One in my setup) and will relay it over HTTP.

Step 4: Schedule udpxy to start automatically

As per my previous guides, here is an upstart script to start udpxy when the machine boots and the network card (eth0) comes up:

I’ve added the -c 50 here to change the maximum number of supported clients to 50 (the default is 3). You will need a gigabit ethernet card if you hope to support even nearly this many clients, and I haven’t tested it under load yet, so don’t come crying to me if it all goes wrong.

Step 5: Do something interesting

For testing I was just opening the stream in VLC, but I can do that with the multicast stream. What about something that couldn’t pick up the multicast stream? Say, my Android smartphone?

Note to self: clean my screen more often

It’s worth noting that my HTC One X is fairly new and a higher spec than a lot of current phones, and while it runs SD streams with no problems, HD streams are too much for it, so your results may vary. I also needed some additional software as the included video player couldn’t decode MPEG/TS. I tested a few free ones but they all had audio sync problems, so I sprang for VPlayer in the end, which works perfectly. On iOS devices, the AnyPlayerAD app works quite well.Update: As of January 2014, I would recommend VLC on iOS, or GoodPlayer for Android (which has both an ad-supported and a paid Pro version). VLC on Android also worked for me, but is an early beta so no UPnP support (see below).

If your outgoing bandwidth will handle it, you could also forward a port from your router to the internal Linux box and watch over the Internet. Note that there is no authentication involved, so I wouldn’t recommend leaving it configured this way for any long amount of time. A more sensible approach to remote viewing would be to use a VPN.

Step 6: Advertising the feeds

You won’t be able to use SAP announcements for the HTTP streams as SAP is specifically designed to advertise multicast streams. You could distribute the stream URLs via an internal webpage (though you may have to copy the links via a long-press and paste into the app), or you could install the MediaTomb UPnP server on your Linux box to advertise the streams as External URLs.

I’m not going to go into this in detail, but it’s not as hard as the documentation makes it seem (especially if you install it on Ubuntu via Synaptic), and frankly, I’m not doing all your work for you. One hint I will give you is that for some devices (e.g. iOS running AnyPlayerAD), you’ll need to add a fake /stream.mpg suffix to the end of the stream URL to get your player software to recognise the stream correctly. udpxy will ignore the suffix, so it will still play just fine.

…and finally

I’ve recently been directed to the MuMuDVB package which is based on dvblast and attempts to automate some/all of the setup of my DVB streaming guides (including this one). I haven’t tested it myself but it is reported to work well. You’ll still need to do some work if you want to be picky about your channels, so it’s still not completely a point-and-click setup.

Brilliant Stuff!!!!
Will be on this tonight, thanks for the guide, will this be able to transcode the stream into anything other than mpeg2 as im using a raspberry pi for my front end, i can currently broadcast externally using vlc on http with transcoding h.264 with good results but obviously one instance of vlc per channel, so was hoping to use the dvblast method to get the stream externally.

For a connecting across the Internet from another machine with vlc can you give an example of the network address to be used?
I tried a couple of things and got a login for null but no luck. Would it be http:-//public ip:forwarded port/udpxy ip:port/rtp/stream ip:port ??

All you should have to do is substitute the internal servername and port for the external hostname and forwarded port. You do not need to reference the internal server namer or IP at all, only the multicast IP.

hi, angry technician! I love your work! I’m using mumudvb with unicast works very well in the lan, but why is it so choppy over the internet? even only radio stations are choppy. I can’t figure it out..

Hi, thanks for a very good tutorial. I’m using udpxy to take IPTV steams and the plan is to play them on my Samsung SmartTV using the MediaTomb UPnP. I know that the TV can play MPEG TS steam (I have recorded the stream with VLC and played the file on the TV).
My problem is that my TV doesn’t like the mediatomb url, I get unsupported file type blabla.

Which mime type did you use in mediatomb to get the playback working on your devices?