Stream Live HDTV from Your Mac
Subject:   transcoding
Date:   2007-02-21 09:00:59
From:   safari2832
I've been doing something similar for a couple of months and found it works well. But my networks isn't up to streaming full bandwith video - particularly because one of the players is connected via Ethernet over mains. So I have to transcode it to a lower bitrate.

The good news is that VLC can do that - it makes your EyeTV server work harder, but it's fine on my Mac Mini.

Here's my script to do the streaming. It first uses AppleScript to work out which program is currently recording, then passes it to VLC to transcode and stream (in this example video bitrate of 1536k, audio bitrate 64k). The VLC command line also adds the web interface automatically, which I then call (via curl) to position the video position to 95% of the way through (so that it streams "nearly live" rather than from the beginning).

#! /bin/bash

cd "/Users/username/Movies/EyeTV Archive"
eyetvr=`osascript -e 'tell application "EyeTV"' -e "repeat with r in recordings" -e "if busy of r then set a to path of r" -e "end repeat" -e "end tell" -e "POSIX path of a"`
echo $mpg
$vlc "$mpg" --sout "#transcode{vcodec=mp2v,vb=1536,acodec=mpga,ab=64}:standard{access=http,mux=ps,dst=}" --intf=http --http-host --quiet vlc:quit &
sleep 5
curl "http://bungo:8081/requests/status.xml?command=seek&val=95%25" > /dev/null