Beiträge von breath

    ok,..........cool !!! das geht....wie gehts jetzt weiter wenn ich das gleiche per Fernbedienung machen will?
    mahlzeit:/etc/vdr/plugins/weatherng/images# /etc/vdr/scripts/shoutcast2vdr/shoutcast2vdr-0.0.8 Top10 10
    220 mahlzeit SVDRP VideoDiskRecorder 1.4.7-tt-ext30; Mon Sep 10 20:57:55 2007
    250 Message queued
    221 mahlzeit closing connection
    --20:57:57-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=827551&file=filename.pls
    => `shoutcast-playlist.pls?rn=827551&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[205.188.234.120]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 143 [audio/x-scpls]


    100%[=================================================================================================================>] 143 139.65K/s ETA 00:00


    20:57:58 (139.65 KB/s) - `shoutcast-playlist.pls?rn=827551&file=filename.pls' saved [143/143]


    --20:57:58-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=640724&file=filename.pls
    => `shoutcast-playlist.pls?rn=640724&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[207.200.98.25]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 134 [audio/x-scpls]


    100%[=================================================================================================================>] 134 130.86K/s ETA 00:00


    20:57:59 (130.86 KB/s) - `shoutcast-playlist.pls?rn=640724&file=filename.pls' saved [134/134]


    --20:57:59-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=6451&file=filename.pls
    => `shoutcast-playlist.pls?rn=6451&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[205.188.234.120]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 389 [audio/x-scpls]


    100%[=================================================================================================================>] 389 379.88K/s ETA 00:00


    20:58:00 (379.88 KB/s) - `shoutcast-playlist.pls?rn=6451&file=filename.pls' saved [389/389]


    --20:58:00-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=4124&file=filename.pls
    => `shoutcast-playlist.pls?rn=4124&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[207.200.98.25]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1,684 [audio/x-scpls]


    100%[=================================================================================================================>] 1,684 1.61M/s ETA 00:00


    20:58:02 (1.61 MB/s) - `shoutcast-playlist.pls?rn=4124&file=filename.pls' saved [1684/1684]


    --20:58:02-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=3391&file=filename.pls
    => `shoutcast-playlist.pls?rn=3391&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[205.188.234.120]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 327 [audio/x-scpls]


    100%[=================================================================================================================>] 327 319.34K/s ETA 00:00


    20:58:02 (319.34 KB/s) - `shoutcast-playlist.pls?rn=3391&file=filename.pls' saved [327/327]


    --20:58:02-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=43538&file=filename.pls
    => `shoutcast-playlist.pls?rn=43538&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[207.200.98.25]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 121 [audio/x-scpls]


    100%[=================================================================================================================>] 121 118.16K/s ETA 00:00


    20:58:03 (118.16 KB/s) - `shoutcast-playlist.pls?rn=43538&file=filename.pls' saved [121/121]


    --20:58:03-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=232879&file=filename.pls
    => `shoutcast-playlist.pls?rn=232879&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[205.188.234.120]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 199 [audio/x-scpls]


    100%[=================================================================================================================>] 199 194.34K/s ETA 00:00


    20:58:04 (194.34 KB/s) - `shoutcast-playlist.pls?rn=232879&file=filename.pls' saved [199/199]


    --20:58:04-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=716424&file=filename.pls
    => `shoutcast-playlist.pls?rn=716424&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[207.200.98.25]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 189 [audio/x-scpls]


    100%[=================================================================================================================>] 189 184.57K/s ETA 00:00


    20:58:05 (184.57 KB/s) - `shoutcast-playlist.pls?rn=716424&file=filename.pls' saved [189/189]


    --20:58:05-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=154396&file=filename.pls
    => `shoutcast-playlist.pls?rn=154396&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[205.188.234.120]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 144 [text/html]


    100%[=================================================================================================================>] 144 140.62K/s ETA 00:00


    20:58:05 (140.62 KB/s) - `shoutcast-playlist.pls?rn=154396&file=filename.pls' saved [144/144]


    --20:58:05-- http://shoutcast.com/sbin/shoutcast-playlist.pls?rn=68373&file=filename.pls
    => `shoutcast-playlist.pls?rn=68373&file=filename.pls'
    Resolving shoutcast.com... done.
    Connecting to shoutcast.com[207.200.98.25]:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 125 [audio/x-scpls]


    100%[=================================================================================================================>] 125 122.07K/s ETA 00:00


    20:58:06 (122.07 KB/s) - `shoutcast-playlist.pls?rn=68373&file=filename.pls' saved [125/125]


    /etc/vdr/scripts/shoutcast2vdr/shoutcast2vdr-0.0.8: line 160: /etc/vdr/Network-Streams/tempdir/shoutcast-playlist.pls?rn=154396&file=filename.pls: Permission denied
    /etc/vdr/scripts/shoutcast2vdr/shoutcast2vdr-0.0.8: line 161: /etc/vdr/Network-Streams/tempdir/index.html: Permission denied
    /etc/vdr/scripts/shoutcast2vdr/shoutcast2vdr-0.0.8: line 162: /etc/vdr/Network-Streams/tempdir/streamlist: Permission denied
    Network-Streams--Top10.m3u: Top10/CWRM_RadioMeteor_1.pls erstellt!
    Network-Streams--Top10.m3u: Top10/Mani_Charts_Mani_Charts_1.pls erstellt!
    Network-Streams--Top10.m3u: Top10/Polskie_Radio_Megastacja.NET_Kanal_Megastacja_HOT_1.pls erstellt!
    Network-Streams--Top10.m3u: Top10/Polskie_Radio_Megastacja.NET_Kanal_Megastacja_HOT_2.pls erstellt!
    Network-Streams--Top10.m3u: Top10/Polskie_Radio_Megastacja.NET_Kanal_Megastacja_HOT_3.pls erstellt!
    Network-Streams--Top10.m3u: Top10/qurie_HITRADIO__DE_BESTE_TOP100_RADIO_HITRADI_1.pls erstellt!
    Network-Streams--Top10.m3u: Top10/Radio_Solutions_Main_Stream_DSL_1.pls erstellt!
    Network-Streams--Top10.m3u: Top10/Radio_Solutions_Main_Stream_ISDN_1.pls erstellt!
    Network-Streams--Top10.m3u: Top10/RussianRouletteDJ_IgorSLAVIC_RHYTHMS_OF_LONDONRUSSIAN_DANCE_MUS_1.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_T_10.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_To__1.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_To__2.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_To__3.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_To__4.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_To__5.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_To__6.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_To__7.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_To__8.pls erstellt!
    Network-Streams--Top10.m3u: Top10/ToshiB_Mix_DJLive_Radio_webradio.toshib.fr_Only_Hits_To__9.pls erstellt!
    Network-Streams--Top10.m3u: Top10/Veedelsradio_Koeln_Das_beste_aus_den_80s_und_den_Top_100_in_Deu_1.pls erstellt!

    mahlzeit:/etc/vdr/scripts/shoutcast2vdr# chmod 755 shoutcast2vdr-0.0.8
    mahlzeit:/etc/vdr/scripts/shoutcast2vdr# shoutcast2vdr-0.0.8 Top10 10
    -bash: shoutcast2vdr-0.0.8: command not found

    Sieht dann so aus.....hoffe es war nicht total blöd....g*
    /scripts/shoutcast2vdr/shoutcast2vdr-0.0.8
    -rwxr--r-- 1 linvdr root 6.8k Sep 9 13:14 shoutcast2vdr
    -rwxrwx--t 1 root root 1.6k Mar 2 2007 shoutcastdel
    mahlzeit:/etc/vdr/scripts/shoutcast2vdr# chmod 755 shoutcast2vdr-0.0.
    mahlzeit:/etc/vdr/scripts/shoutcast2vdr# shoutcast2vdr-0.0.8
    -bash: shoutcast2vdr-0.0.8: command not found
    mahlzeit:/etc/vdr/scripts/shoutcast2vdr# shoutcast2vdr-0.0.8 Top10 10
    -bash: shoutcast2vdr-0.0.8: command not found
    mahlzeit:/etc/vdr/scripts/shoutcast2vdr#

    Leider kein Erfolg, hier nochmal das veränderte script:


    #!/bin/bash
    #
    # Name : shoutcast2vdr 0.0.8
    #
    # Author: Unimatrix0
    #
    # (ursprünglich von scgen 0.2 (geschrieben von "echto") "abgekupfert" (das meiste komplizierte Zeug ist noch von ihm)
    #
    #
    # Usage: Am shell promp ./shoutcast2vdr gefolgt von einem Genre und der Anzahl der Stream-Links die heruntergeladen werden sollen.
    # Beispiel shoutcast2vdr Trance 50
    # Holt 50 Streams die auf das Genre Trance (mehr oder weniger) passen sollten.
    # Es werden Unterordner für jedes Genre angelegt (outputdir/genre) und dafür noch eine m3u-playlist erstellt, die im Stammordner (outputdir) abgelegt wird.
    #
    # Original vom Author von scgen 0.2:
    # This script is work in progress so use at your own risk. A few live streams don't get
    # created and maybe I'll fix that later. You might see the error below during execution.
    #
    # Heres a quick and dirty script to generate .pls files from the top 20 shoutcast streams
    #
    # What you do with it from here is up to you. This script could easily be modified.
    #
    # Add the script to your cron jobs with 24 Hour intervals for a up to date list.
    #
    # mv: when moving multiple files, last argument must be a directory
    # (/Zitatende)
    #
    #
    # Ja ähm, genau...selbiges gilt für mich. Das ist mein erster Gehversuch mit bash. Ich weiss also nicht, ob ich den Fehler finde, der verursacher dafür ist,
    # dass nicht ganz alle Streams im Ordner landen, die eigentlich müssten. Bei 100 gestesteten, waren es bei mir aber immerhin über 70, die "durch kamen".
    # Bei Unterstützung und insbesonderen Vorschlägen wäre ich ganz sicher nicht böse.
    #
    #
    #=================================================================================================================
    # To do:
    #
    # 1. Mal schaun, im Moment fällt mir nix mehr ein ausser zu sehen, ob das Ding wirklich tut was es soll.
    # 2. Vorschläge ?
    #
    #=================================================================================================================
    # Revision:
    # 0.0.8 - Fehler behoben der die Namen doppelt erscheinen liess
    # - Maxbitrate hinzugefügt (danke wilderigel!)
    # 0.0.7 - Nun sollten auch sender mit mehr als einem Stream korrekt, mit allen Streams eingelesen werden.
    # 0.0.6 - SVDRP-Send hinzugefügt
    # 0.0.5 - Aufräumarbeiten, da war noch was zuviel drinn, naja und jetzt sind dafür viel Kommentare drinn...naja..es muss es ja keiner lesen *fg*
    # 0.0.4 - Filenamen verschönerung
    # 0.0.3 - Variabeln die per Kommandozeile übergeben werden $1 und $2 das erste für das Genre und das zweite für die Anzahl zu holender streams.
    # 0.0.2 - Variabeln um das temp und outputdir angeben zu können.
    # 0.0.1 - Das Teil macht was es soll, die wichtigsten Anpassungen für VDR sind gemacht.
    #=================================================================================================================
    #
    # Variabeln
    #=================================================================================================================
    # Genre von der Kommandozeile übernehmen ($1). Kann auch fest eingetragen werden z.B. "Alternative", "Classical", "Dance", "Funk", "Jazz", "Techno",
    # "Metal", "Mixed", "Pop", "TopTen", "Rap", "Electronic", "Trance" etc. etc. siehe dazu bei shoutcast nach
    genre=$1
    #=================================================================================================================
    # Wo sollen die fertigen .pls und .m3u-files hin ? /etc/vdr/Network-Streams bei mir.
    outputdir=/etc/vdr/Network-Streams


    # Das Temporäre verzeichnis
    tempdir=/etc/vdr/Network-Streams/tempdir


    # Der name der Playlist(s) haben soll (.m3u). Hintendran wird dann noch das Genre angehängt.
    m3uname=Network-Streams-


    # Anzahl streams die für das Genre "besorgt" werden sollen. (wird jetzt per kommandozeile angegeben, kann natürlich auch fest eingestellt werden)
    anzahl=$2


    # Sortierung nach (entweder bitrate oder listeners)
    sortierung=bitrate


    # Maximale Bitrate
    # Wenn Bitrate egal ist leer lassen!
    maxbitrate=


    # pfad zu svdrpsend (für die OSD-Mitteilung)
    svdrpsend=/usr/bin/svdrpsend.pl


    # wenn rm = rm -f steht, werden die temp-dateien am Ende gelöscht, bei rm = echo nicht.
    rm = rm -f
    #rm = echo


    # Debug
    #set -xv


    # Config ende, aber hier nur noch editieren, wenn man weiss was man tut.


    # VDR-OSD-Mitteilung
    $svdrpsend MESG $m3uname$genre aktualisierung startet...


    # Testen ob das Zielvertzeichnis schon existiert, sonst eins machen.
    test -d $tempdir || mkdir -p $tempdir
    cd $tempdir
    test -d $outputdir/$genre || mkdir -p $outputdir/$genre



    # Streamfiles holen, die den Link und den vollen Namen der Station enthält
    get_streams () {
    while read url; do
    wget $url
    done
    }




    # Meine veränderte Version von create_pls_2_files die sieht für die kenner wohl nicht sehr toll aus, aber sie funktioniert.
    create_pls2_files () {


    while read tempdata; do


    streams=`cat ${tempdata} | awk 'match($1,"numberofentries=") { print $0 }' |sed 's/numberofentries=//' |awk '{print $1}'`
    streamnr=0
    while [ $streamnr -ne $streams ]
    do
    streamnr=$(( $streamnr + 1 ))

    suchkriterium="File"$streamnr"="
    cat $tempdata | awk 'match($1,"'"$suchkriterium"'") { print $0 }' \
    | sed 's/'"$suchkriterium"'//' > $tempdata.temp

    suchkriterium="Title"$streamnr"="
    mv -f $tempdata.temp $outputdir/$genre/`cat $tempdata |\
    awk 'match($1,"'"$suchkriterium"'") { print substr($0,1,86) }' |\

    sed 's/Title.*) //' | sed 's/[()*,&!?~{}#:\`]//g' | \
    sed 's/=//g' |sed 's/-=-//g' |sed '/^#/D;/^$/D' |sed 's/^$/_ffff_/g' |sed 's/^#/_/g' |sed 's/\ /_/g' | sed 's/\///g' |\
    sed 's/__/_/g' | sed 's/+//g' | sed 's/-//g' |sed 's/__/_/g' | sed 's/\^//g' | sed 's/\[//g' | sed 's/\]//g' |sed 's/__/_/g' |\
    sed 's/\b_//g' | sed 's/[|]//g' | sed 's/[..]/./g' | sed 's/[..]/./g' |\
    awk '{print $1"'_"$streamnr"'"}'`.pls
    done
    done

    }


    # alte pls- und m3u-files des genre's löschen
    rm -f $outputdir/$genre/*.pls
    rm -f $outputdir/$m3uname$genre.m3u



    # Die html-page saugen
    wget -qO $tempdir/index.html "http://yp.shoutcast.com/directory/index.phtml?s="$(echo $genre | sed 's/ /%20/g')"&numresult=$anzahl&orderby=$sortierung&maxbitrate=$maxbitrate"
    grep \.pls $tempdir/index.html | awk '!match($5,"Lucky") {print $5}' | sed 's/href="/shoutcast.com/g' | sed 's/"><img//g'>$tempdir/streamlist



    # stream data besorgen
    get_streams < $tempdir/streamlist



    # .pls files erzeugen
    ls $tempdir/shoutcast-playlist.pls* | create_pls2_files



    # alle erzeugten streams anzeigen
    #ls -all $outputdir/$genre/*.pls



    # Aufräumen, was nicht mehr gebraucht wird.
    $rm $tempdir/shoutcast-playlist.pls*
    $rm $tempdir/index.html
    $rm $tempdir/streamlist



    # m3u-datei erstellen
    cd $outputdir
    for i in $genre/*.pls
    do
    echo $i >> $outputdir/$m3uname$genre.m3u
    echo $m3uname-$genre.m3u: $i erstellt!
    done
    # einzelnes leeres pls-file löschen, kommt wahrscheinlich wegen "m3u-datei erstellen"
    rm -f $outputdir/$genre/.pls
    rm -f $tempdir/*.*
    rm -f $tempdir/*


    # VDR-OSD-Mitteilung
    $svdrpsend MESG $m3uname$genre aktualisierung ist fertig!

    Hallo, nach Neuinstallation, hier mal mein sricpt, vielleicht habt ihr ja eine Idee.
    Vielen Dank.
    #!/bin/bash
    #
    # Name : shoutcast2vdr 0.0.8
    #
    # Author: Unimatrix0
    #
    # (ursprünglich von scgen 0.2 (geschrieben von "echto") "abgekupfert" (das meiste komplizierte Zeug ist noch von ihm)
    #
    #
    # Usage: Am shell promp ./shoutcast2vdr gefolgt von einem Genre und der Anzahl der Stream-Links die heruntergeladen werden sollen.
    # Beispiel shoutcast2vdr Trance 50
    # Holt 50 Streams die auf das Genre Trance (mehr oder weniger) passen sollten.
    # Es werden Unterordner für jedes Genre angelegt (outputdir/genre) und dafür noch eine m3u-playlist erstellt, die im Stammordner (outputdir) abgelegt wird.
    #
    # Original vom Author von scgen 0.2:
    # This script is work in progress so use at your own risk. A few live streams don't get
    # created and maybe I'll fix that later. You might see the error below during execution.
    #
    # Heres a quick and dirty script to generate .pls files from the top 20 shoutcast streams
    #
    # What you do with it from here is up to you. This script could easily be modified.
    #
    # Add the script to your cron jobs with 24 Hour intervals for a up to date list.
    #
    # mv: when moving multiple files, last argument must be a directory
    # (/Zitatende)
    #
    #
    # Ja ähm, genau...selbiges gilt für mich. Das ist mein erster Gehversuch mit bash. Ich weiss also nicht, ob ich den Fehler finde, der verursacher dafür ist,
    # dass nicht ganz alle Streams im Ordner landen, die eigentlich müssten. Bei 100 gestesteten, waren es bei mir aber immerhin über 70, die "durch kamen".
    # Bei Unterstützung und insbesonderen Vorschlägen wäre ich ganz sicher nicht böse.
    #
    #
    #=================================================================================================================
    # To do:
    #
    # 1. Mal schaun, im Moment fällt mir nix mehr ein ausser zu sehen, ob das Ding wirklich tut was es soll.
    # 2. Vorschläge ?
    #
    #=================================================================================================================
    # Revision:
    # 0.0.8 - Fehler behoben der die Namen doppelt erscheinen liess
    # - Maxbitrate hinzugefügt (danke wilderigel!)
    # 0.0.7 - Nun sollten auch sender mit mehr als einem Stream korrekt, mit allen Streams eingelesen werden.
    # 0.0.6 - SVDRP-Send hinzugefügt
    # 0.0.5 - Aufräumarbeiten, da war noch was zuviel drinn, naja und jetzt sind dafür viel Kommentare drinn...naja..es muss es ja keiner lesen *fg*
    # 0.0.4 - Filenamen verschönerung
    # 0.0.3 - Variabeln die per Kommandozeile übergeben werden $1 und $2 das erste für das Genre und das zweite für die Anzahl zu holender streams.
    # 0.0.2 - Variabeln um das temp und outputdir angeben zu können.
    # 0.0.1 - Das Teil macht was es soll, die wichtigsten Anpassungen für VDR sind gemacht.
    #=================================================================================================================
    #
    # Variabeln
    #=================================================================================================================
    # Genre von der Kommandozeile übernehmen ($1). Kann auch fest eingetragen werden z.B. "Alternative", "Classical", "Dance", "Funk", "Jazz", "Techno",
    # "Metal", "Mixed", "Pop", "TopTen", "Rap", "Electronic", "Trance" etc. etc. siehe dazu bei shoutcast nach
    genre=$1
    #=================================================================================================================
    # Wo sollen die fertigen .pls und .m3u-files hin ? /etc/vdr/Network-Streams bei mir.
    outputdir=/etc/vdr/Network-Streams


    # Das Temporäre verzeichnis
    tempdir=/etc/vdr/Network-Streams/tempdir


    # Der name der Playlist(s) haben soll (.m3u). Hintendran wird dann noch das Genre angehängt.
    m3uname=Network-Streams-


    # Anzahl streams die für das Genre "besorgt" werden sollen. (wird jetzt per kommandozeile angegeben, kann natürlich auch fest eingestellt werden)
    anzahl=$2


    # Sortierung nach (entweder bitrate oder listeners)
    sortierung=bitrate


    # Maximale Bitrate
    # Wenn Bitrate egal ist leer lassen!
    maxbitrate=


    # pfad zu svdrpsend (für die OSD-Mitteilung)
    svdrpsend=/usr/bin/svdrpsend.pl


    # wenn rm = rm -f steht, werden die temp-dateien am Ende gelöscht, bei rm = echo nicht.
    rm = rm -f
    #rm = echo


    # Debug
    #set -xv


    # Config ende, aber hier nur noch editieren, wenn man weiss was man tut.


    # VDR-OSD-Mitteilung
    $svdrpsend MESG $m3uname$genre aktualisierung startet...


    # Testen ob das Zielvertzeichnis schon existiert, sonst eins machen.
    test -d $tempdir || mkdir -p $tempdir
    cd $tempdir
    test -d $outputdir/$genre || mkdir -p $outputdir/$genre



    # Streamfiles holen, die den Link und den vollen Namen der Station enthält
    get_streams () {
    while read url; do
    wget $url
    done
    }




    # Meine veränderte Version von create_pls_2_files die sieht für die kenner wohl nicht sehr toll aus, aber sie funktioniert.
    create_pls2_files () {


    while read tempdata; do


    streams=`cat ${tempdata} | awk 'match($1,"numberofentries=") { print $0 }' |sed 's/numberofentries=//' |awk '{print $1}'`
    streamnr=0
    while [ $streamnr -ne $streams ]
    do
    streamnr=$(( $streamnr + 1 ))

    suchkriterium="File"$streamnr"="
    cat $tempdata | awk 'match($1,"'"$suchkriterium"'") { print $0 }' \
    | sed 's/'"$suchkriterium"'//' > $tempdata.temp

    suchkriterium="Title"$streamnr"="
    mv -f $tempdata.temp $outputdir/$genre/`cat $tempdata |\
    awk 'match($1,"'"$suchkriterium"'") { print substr($0,1,86) }' |\

    sed 's/Title.*) //' | sed 's/[()*,&!?~{}#:\`]//g' | \
    sed 's/=//g' |sed 's/-=-//g' |sed '/^#/D;/^$/D' |sed 's/^$/_ffff_/g' |sed 's/^#/_/g' |sed 's/\ /_/g' | sed 's/\///g' |\
    sed 's/__/_/g' | sed 's/+//g' | sed 's/-//g' |sed 's/__/_/g' | sed 's/\^//g' | sed 's/\[//g' | sed 's/\]//g' |sed 's/__/_/g' |\
    sed 's/\b_//g' | sed 's/[|]//g' | sed 's/[..]/./g' | sed 's/[..]/./g' |\
    awk '{print $1"'_"$streamnr"'"}'`.pls
    done
    done

    }


    # alte pls- und m3u-files des genre's löschen
    rm -f $outputdir/$genre/*.pls
    rm -f $outputdir/$m3uname$genre.m3u



    # Die html-page saugen
    wget -O $tempdir/index.html "http://yp.shoutcast.com/directory/index.phtml?sgenre=$genre?&numresult=$anzahl&orderby=$sortierung&maxbitrate=$maxbitrate"
    grep \.pls $tempdir/index.html | awk '!match($5,"Lucky") {print $5}' | sed 's/href="/shoutcast.com/g' | sed 's/"><img//g'>$tempdir/streamlist



    # stream data besorgen
    get_streams < $tempdir/streamlist



    # .pls files erzeugen
    ls $tempdir/shoutcast-playlist.pls* | create_pls2_files



    # alle erzeugten streams anzeigen
    #ls -all $outputdir/$genre/*.pls



    # Aufräumen, was nicht mehr gebraucht wird.
    $rm $tempdir/shoutcast-playlist.pls*
    $rm $tempdir/index.html
    $rm $tempdir/streamlist



    # m3u-datei erstellen
    cd $outputdir
    for i in $genre/*.pls
    do
    echo $i >> $outputdir/$m3uname$genre.m3u
    echo $m3uname-$genre.m3u: $i erstellt!
    done
    # einzelnes leeres pls-file löschen, kommt wahrscheinlich wegen "m3u-datei erstellen"
    rm -f $outputdir/$genre/.pls
    rm -f $tempdir/*.*
    rm -f $tempdir/*


    # VDR-OSD-Mitteilung
    $svdrpsend MESG $m3uname$genre aktualisierung ist fertig!

    ...habe versucht das script von chuck mit vi zu pasten und dabei ist mit putty/vi abgestürzt. Nach dem Neustart war das System hin. Neuinstallation.
    Hat jemand einen konkreten Vorschlat, evtl. Anleitung wie ich das sauberer, gefahrloser hinbekomme, bzw. gibt es inzwischen eine Anleitung was geändert werden muss?


    Vielen Dank

    Hallo,


    gibt es eine Möglichkeit bei der Benutzung des mp3ng - Next - Gen - MP3 - Player das Live - Fernsehbild im Vorder bzw. im Menümodus im Hintergrund laufen zu lassen?
    Habe das Mahlzeitiso 3.2 mit allen Updates.


    Gruss
    Breath

    ...habe auch noch eine mplayer.sh.sav gefunden:
    # Config File for mplayer.sh ...
    #
    # ***
    # *** Mandatory Values
    # ***
    #
    # Where to find mplayer executable ?
    MPLAYER="/usr/bin/mplayer"
    MPLAYER_V1=true


    # Video Out Filter lavc or fame - see mplayer DVB docs for details !
    #VOP="lavc=30"
    VOP="lavc=5000"


    # Video out device
    # most users will want the default of 'mpegpes', but users with a dxr3
    # need to use 'dxr3'
    #VO="dxr3"
    VO="mpegpes"


    AO="mpegpes -afm 9"


    # X-Resolutions for the DVBs card (smallest value first !)
    #
    XResPAL=(352 480 528 688 704 720)
    XResNTSC=(352 480 512 640 704 720)


    # Set the following to 'true' or 'false' according to
    # the capabilities of your TV set.
    #
    # At least _one_ has to be true!
    PAL="true"
    NTSC="false"


    # Use mplayer's -speed option for videos with a different
    # frames/s value than the selected TV norm
    #
    # this setting is only used if either PAL or NTSC
    # is set to false!
    USE_SPEED="false"


    # set to true if you want to use AC3 output
    USEAC3="false"


    # how to play AC3 audio?
    # for AC3 via sound card (ALSA driver):
    AC3AOUT="-ao alsa9 -ac hwac3"
    # for AC3 via DVB (doesn't need AC3overDVB patch);
    # needs MPlayer 0.90 final, or newer:
    #AC3AOUT="-ac hwac3"


    # what aspect ratio has your TV set?
    # either 4/3 (conventional) or 16/9 (widescreen)
    #TV_ASPECT="16/9"
    TV_ASPECT="4/3"


    # ***
    # *** Optional Setting *** Simply Remove them if they do not fit your needs...
    # ***
    #
    #
    # Cache Option for MPlayer
    CACHE="4096"


    # Framedrop
    FRAMEDROP="true"


    # Lirc RC File
    #LIRCRC="/video/.lircrc"


    # do we have a slow CPU?
    # if so, reduce the Y resolution to the half of the possible maximum:
    # NTSC: 240
    # PAL: 288
    # uncomment the following line if you have a slow CPU:
    SLOW_CPU="false"


    # Where to find DVD/VCD dummy files? (just a fake and empty text file for the plugin)
    # Example: create two empty text files (DVD and VCD) in /video/plugins/DVD-VCD/
    DVDFiles="/video/plugins/DVD-VCD"


    # What is your DVD-ROM device ?
    DVD="/dev/hdc"


    # What languages do your DVD's use ?
    DVDLANG="de"


    # extra DVD options
    DVDOPTIONS="-aop list=volume:volume=170"


    # extra VCD options
    VCDOPTIONS=""


    # should MPEG files be played directly (without rescaling) if poosible?
    MPEG_DIRECT="true"


    #Subtitle options
    SUBPOS="80" #Vertical position 0-100
    SUBCOLOR="0" #Background color 0=black 255=white
    SUBALPHA="30" #Background transparency (0-255)


    # Userdefined Options - make sure they do not collide with options
    # used in mplayer.sh
    # Only for experienced users
    # USERDEF="-what -option you ever -like to give -to mplayer"
    USERDEF="-quiet"
    #USERDEF=""


    # set to true to enable debugging output
    DEBUG="true"


    # End of Options

    Vielen Dank für die Antwort, benutze eine nexus-s2.1 primär, hauppaug-c rev. 2.1 + ttc-1500, hier die conf:


    # Config File for mplayer.sh ...
    #
    # ***
    # *** Mandatory Values
    # ***
    #
    # Where to find mplayer executable ?
    MPLAYER="/usr/bin/mplayer"
    MPLAYER_V1=true


    # Video Out Filter lavc or fame - see mplayer DVB docs for details !
    #VOP="lavc=30"
    VOP="lavc=5000"


    # Video out device
    # most users will want the default of 'mpegpes', but users with a dxr3
    # need to use 'dxr3'
    #VO="dxr3"
    VO="mpegpes"


    AO="mpegpes -afm 9"


    # X-Resolutions for the DVBs card (smallest value first !)
    #
    XResPAL=(352 480 528 688 704 720)
    XResNTSC=(352 480 512 640 704 720)


    # Set the following to 'true' or 'false' according to
    # the capabilities of your TV set.
    #
    # At least _one_ has to be true!
    PAL="true"
    NTSC="false"


    # Use mplayer's -speed option for videos with a different
    # frames/s value than the selected TV norm
    #
    # this setting is only used if either PAL or NTSC
    # is set to false!
    USE_SPEED="false"


    # set to true if you want to use AC3 output
    USEAC3="true"


    # how to play AC3 audio?
    # for AC3 via sound card (ALSA driver):
    #AC3AOUT="-ao alsa9 -ac hwac3"
    # for AC3 via DVB (doesn't need AC3overDVB patch);
    # needs MPlayer 0.90 final, or newer:
    AC3AOUT="-ac hwac3"


    # what aspect ratio has your TV set?
    # either 4/3 (conventional) or 16/9 (widescreen)
    #TV_ASPECT="16/9"
    TV_ASPECT="4/3"


    # ***
    # *** Optional Setting *** Simply Remove them if they do not fit your needs...
    # ***
    #
    #
    # Cache Option for MPlayer
    CACHE="4096"


    # Framedrop
    FRAMEDROP="true"


    # Lirc RC File
    #LIRCRC="/video/.lircrc"


    # do we have a slow CPU?
    # if so, reduce the Y resolution to the half of the possible maximum:
    # NTSC: 240
    # PAL: 288
    # uncomment the following line if you have a slow CPU:
    SLOW_CPU="false"


    # Where to find DVD/VCD dummy files? (just a fake and empty text file for the plugin)
    # Example: create two empty text files (DVD and VCD) in /video/plugins/DVD-VCD/
    DVDFiles="/video/plugins/DVD-VCD"


    # What is your DVD-ROM device ?
    DVD="/dev/dvd"


    # What languages do your DVD's use ?
    DVDLANG="de"


    # extra DVD options
    DVDOPTIONS="-aop list=volume:volume=170"


    # extra VCD options
    VCDOPTIONS=""


    # should MPEG files be played directly (without rescaling) if poosible?
    MPEG_DIRECT="true"


    #Subtitle options
    SUBPOS="80" #Vertical position 0-100
    SUBCOLOR="0" #Background color 0=black 255=white
    SUBALPHA="30" #Background transparency (0-255)


    # Userdefined Options - make sure they do not collide with options
    # used in mplayer.sh
    # Only for experienced users
    # USERDEF="-what -option you ever -like to give -to mplayer"
    USERDEF="-quiet"
    #USERDEF=""


    # set to true to enable debugging output
    DEBUG="true"


    # End of Options
    Vielen Dank für Eure Hilfe.

    Hallo,
    bekomme keinen Film zum laufen hat jemand eine Idee?:


    Feb 6 21:47:04 linvdr user.debug vdr: [2103] mplayer: mplayer child started (pid=2103)
    Feb 6 21:47:04 linvdr user.debug vdr: [2104] mplayer: player thread started (pid=2104)
    Feb 6 21:47:04 linvdr user.notice root: *** Starting mplayer.sh Version 0.8.6
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable CFGFIL has value "/usr/bin/mplayer.sh.conf"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable USEAC3 has value "false"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable AC3AOUT has value "-ac hwac3"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable TV_ASPECT has value "4/3"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable PAL has value "true"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable NTSC has value "true"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable USE_SPEED has value "true"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable DETC_FILTER has value "ivtc=1"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable MPLAYER has value "/usr/bin/mplayer"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable VOP has value "lavc=5000"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable VO has value "mpegpes"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable AO has value "mpegpes"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable CACHE has value "4096"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable CACHESTR has value "-cache 4096"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable FRAMEDROP has value "true"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable FDSTR has value "-framedrop"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable LIRCRC has value ""
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable LIRCSTR has value ""
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable SUBTITLE has value " -subpos 80 -sub-bg-color 0 -sub-bg-alpha 30"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable REMOTE has value "-slave -nolirc"
    Feb 6 21:47:04 linvdr user.notice root: *** Use Option USERDEF at your own risk!
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable USERDEF has value "-quiet"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable XResPAL has value "352 480 528 544 688 704 720"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable XResNTSC has value "352 480 512 640 704 720"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable SLOW_CPU has value "false"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: *** Option DVDFiles not set correctly! You will not be able to play VCD/DVD ""
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable DVDFiles has value ""
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable DVD has value "/dev/dvd"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable DVDLANG has value "de"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable DVDOPTIONS has value ""
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable VCDOPTIONS has value ""
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable MPEG_DIRECT has value "true"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable SUFFIX has value ".avi"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Variable MPLAYER_V1 has value "true"
    Feb 6 21:47:04 linvdr user.notice root: *** DEBUG: Calling getvidxy function to analyze source video stream ...
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: OutputFromMPLAYER: "ID_VIDEO_ID=0 ID_AUDIO_ID=1 ID_FILENAME=/pub/mplayer/Blood.Diamond/ntg-blood_xvid1.avi ID_VIDEO_FORMAT=XVID ID_VIDEO_BITRATE=907528 ID_VIDEO_WIDTH=624 ID_VIDEO_HEIGHT=256 ID_VIDEO_FPS=23.976 ID_VIDEO_ASPECT=0.0000 ID_AUDIO_CODEC=mp3 ID_AUDIO_FORMAT=85 ID_AUDIO_BITRATE=160000 ID_AUDIO_RATE=44100 ID_AUDIO_NCH=2 ID_LENGTH=4253"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: MPLAYER_RETURN: "0"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: parsed output for ORIG_X: "624"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: parsed output for ORIG_Y: "256"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: parsed output for ORIG_FPS: "23.976"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: parsed output for ORIG_ASPECT: "0.0000"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: parsed output for VIDEO_FORMAT: "XVID"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: parsed output for AUDIO_CODEC: "mp3"
    Feb 6 21:47:05 linvdr user.notice root: *** INFO: Source Video has Resolution of 624 x 256 ...
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: Film ""
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: Variable MAX_X has value "640"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: Variable NEW_Y has value "262"
    Feb 6 21:47:05 linvdr user.notice root: *** INFO: For Sqare Pixels we would scale to 640 x 262 ...
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: Variable XResTEMP has value "352 480 512 640 704 720"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: Variable AnzahlVonXResTEMP has value "6"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: Variable NEW_X has value "640"
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: setting REAL_Y = FULL_Y ""
    Feb 6 21:47:05 linvdr user.notice root: *** DEBUG: Variable CMDLINE has value "/usr/bin/mplayer -vo mpegpes -ao mpegpes -vop lavc=5000:30,expand=640:480:-1:-1:1,scale=640:262 -framedrop -cache 4096 -slave -nolirc -subpos 80 -sub-bg-color 0 -sub-bg-alpha 30 -quiet "
    Feb 6 21:47:08 linvdr user.debug vdr: [2104] mplayer: player thread ended (pid=2104)
    Feb 6 21:47:08 linvdr user.info vdr: [1964] switching to channel 1


    Vielen
    Dank