Hi Jungs,
ich hab hier mal ein kleines Tool dafür gebastelt ;-)
VDR Stream Switcher --- Version 0.3
VDR Stream Switcher allows you to Watch your VDR Streams on Mac OS X.
Binary:
/VDRStreamSwitcher-0.3.zip
Screenshot:
Source Code:
/VDRStreamSwitcher-source-03.zip
Changelog:
2005-11-15 Version 0.3
- Added DVB-C und DVB-T support
- Added more Channels
- Added direct pipe to mplayer
- Added Help with this text
- Known issue: Phoenix, ARD, HR does not stream with my VDR, maybe your VDR will do that.
- If something went wrong and mplayer increase a high CPU Load, open a terminal and type in "killall mplayer"
or interrupt mplayer in the activity monitor.
2005-11-11 Version 0.2.b "bugfix Version"
- There are no more Installation failures
- New Directory for channels.conf.m3u "~/Library/Preferences/channels.conf.m3u"
- Application now compiled in Release mode, the program should now start ;-)
Special thanks to hannsens and doubleselecta from vdr-portal.de for reporting the bugs. ;-)
2005-11-10 Version 0.2
- In This Version you must not modify your VDR
- You can set your own IP
- You can set your own Port
- You can set your own Channel-position
- You must not modify your mplayer config
This Tool needs mplayer for OS X
Installation:
-Just install mplayer from darwinports or fink.
-Be sure that mplayer is located in one of your executable enviroment path and is called "mplayer"
-RecEx your vdr channels.conf with your Parameter and copy the file to your Mac
!!! important RecEX output must be locatet on your Mac in "~/Library/Preferences/channels.conf.m3u"
Very Special Thanks to hannsens for his RecEx Code:
Code:
######################################################################################################
#!/bin/bash
# ---------------------------------------------
# CONFIGURE HERE
PLAYLIST_PATH="/tmp" # where the playlists should be located
PLAYLIST_BASENAME="channels.conf" # basename of the playlist-files. ".m3u", "_tv.m3u" or "_radio.m3u" will be added
VDRADRESS="192.168.0.42" # your VDRs IP
CHANNELSCONF="/etc/vdr/channels.conf" # your channels.conf
VDRPORT="3000" # port the streamdev-server is listening
TVSTREAMTYPE="PS" # kind of stream your Client likes best for TV-Channels
FIND_RADIO="YES" # get the radio channels?
RADIOSTREAMTYPE="ES" # kind of stream your Client likes best for Radio-Channels
WRITE_INTO_ONE_FILE="YES" # build one file for all Channels (Radio and TV)
WRITE_M3UTAGS="YES"
SUFFIX="m3u"
# ----------------------------------------------
if [ "$WRITE_INTO_ONE_FILE" = "YES" ] ; then
TV_SUFFIX=""
RADIO_SUFFIX=""
FILENAME=$PLAYLIST_PATH"/"$PLAYLIST_BASENAME$TV_SUFFIX"."$SUFFIX
RADIOFILENAME=$FILENAME
echo "">$FILENAME
else
TV_SUFFIX="_tv"
RADIO_SUFFIX="_radio"
touch $PLAYLIST_PATH"/"$PLAYLIST_BASENAME$RADIO_SUFFIX"."$SUFFIX
RADIOFILENAME=$PLAYLIST_PATH"/"$PLAYLIST_BASENAME$RADIO_SUFFIX"."$SUFFIX
echo "">$RADIOFILENAME
echo "">$FILENAME
fi
# build Playlist for TV-Channels
FILENAME=$PLAYLIST_PATH"/"$PLAYLIST_BASENAME$TV_SUFFIX"."$SUFFIX
URL='http:\/\/'$VDRADRESS':'$VDRPORT'\/'$TVSTREAMTYPE'\/\3-\6-\7-\5'
SEARCHPATTERN='^\([^\;^\:]*\)[^:]*\:\([^:]*\:\)\{2\}\([^:]*\)\:\([^:]*\:\)\{5\}\([^:]*\)\:\([^:]*\)\:\([^:]*\)\:.*$'
if [ "$WRITE_M3UTAGS" = "YES" ] ; then
LINEPREFIX='#EXTINF:0,\1\n'
LINESUFFIX='';
echo "#EXTM3U">$RADIOFILENAME
echo "#EXTM3U">$FILENAME
else
LINEPREFIX=''
LINESUFFIX=' \1'
fi
REGEX='s/'$SEARCHPATTERN'/'$LINEPREFIX$URL$LINESUFFIX'/g'
cat $CHANNELSCONF | egrep -v '^([^:]*\:){5}0.*$' | egrep -v '^\:.*' | sed "$REGEX" >> $FILENAME
if [ "$FIND_RADIO" = "YES" ] ; then
URL='http:\/\/'$VDRADRESS':'$VDRPORT'\/'$RADIOSTREAMTYPE'\/\3-\6-\7-\5'
REGEX='s/'$SEARCHPATTERN'/'$LINEPREFIX$URL$LINESUFFIX'/g'
cat $CHANNELSCONF | egrep '^([^:]*\:){5}0.*$' | sed "$REGEX" >> $RADIOFILENAME
fi
######################################################################################################
That`s it. enjoy the program =)
PS: if you want you can modify your /User/$user/.mplayer/config with parameters
you want to have like:
# Write your default config options here!
cache = 4096
aspect = 16:9
Gruß,
Christian