Wednesday, July 24, 2013

Multicast HDHomeRun Content with VLC

Below is bash script to tune your HDHomeRun device to a channel and multicast the video with VLC. You can then consume the video throughout your house or business with XBMC clients or VLC clients.

Copy and paste the script into your favorite editor. Update the HDHOMERUN variable with your device's ID. Save the script. I named mine Make the script executable chmod +x Execute the script passing the tuner number (0 through 2 for HDHomeRun Prime), the EIA channel number, and the program number. For example: ./ 0 73 2.

# Tune HDHomeRun and multicast the video
# Example ./ 0 73 2
if [[ -z "$TUNER" ]]
 echo "Missing the tuner number. Please pass a tuner number."
 exit 1
if [[ -z "$CHANNEL" ]]
 echo "Missing a channel. Please pass a channel number."
 exit 1
if [[ -z "$PROGRAM" ]]
 echo "Missing program number. Please pass a program number."
 exit 1
echo "Setting HDHomeRun device: $HDHOMERUN to channel: $CHANNEL program: $PROGRAM"
hdhomerun_config $HDHOMERUN set /tuner$TUNER/channel $CHANNEL
hdhomerun_config $HDHOMERUN set /tuner$TUNER/program $PROGRAM
hdhomerun_config $HDHOMERUN save /tuner$TUNER - | cvlc --sout udp: -
hdhomerun_config $HDHOMERUN set /tuner$TUNER/channel none

You'll need the HDHomeRun configure command. If running Ubuntu you can get it with: sudo apt-get install hdhomerun-config.

To consume the video using VLC open a network stream to URL: udp://@ To consume the video using XBMC use steps 1 and 3 from my Multicast Video to XBMC using VLC blog post.

Saturday, July 20, 2013

Multicast Video to XBMC using VLC

XBMC is capable of playing multicast video. It is a simple set-up.

  1. Create a text file called Stream.strm on your XBMC client with this line udp://
  2. On your server start the multicast with this command cvlc --sout udp: /mnt/disk0/mythtv/pretty/Fringe_2013-01-11_9-00_PM_The_Boy_Must_Live.mpg
  3. On your XBMC client go to Videos, Files, Add Videos, Browse and select the text file you created in step 1.

With this set-up you could watch a video on multiple XBMC clients in your home or business.