cybton.com
Über uns | Jobs | Werbung | Sitemap | AGB | Impressum | Hilfe ?
 Kostenlos anmelden)
Forum
Aktuellste Beiträge
Forenregeln

Community
BB-Codes
Tags
Chat
Suche (Web)
Wer ist online?
Top-User

Basar


Statistik
Mitglieder gesamt: 68138
Mitglieder online: 10
Gäste online: 6
mehr...

Anzeige
Forum » Forum: Software & Betriebssysteme » Thread: MPlayer Stream Aufzeichnen

Thread: MPlayer Stream Aufzeichnen

Tags:
Seite 2 von 212

17.05.2007 19:39 Uhr

 

Status: online
HIER
Irgendwie wird die Aufnahme nicht mehr gestoppt:
+ PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
 
#!/bin/bash
# copyright Wulf Coulmann <scripts at gpl.coulmann dot de
# GNU GPL  
# http://www.gnu.org/licenses/gpl.html
# 
# Download me here: http://gpl.coulmann.de/radio_rip
 
# Config --------------------------------------------------
 
        TMP=\'/tmp/\'     # location of the temporery fifo buffer   
      RETRY=200       # how often we retry if we do\'nt get a streaming port
 
# let\'s rock\'n roll
 
 
case \"$1\" in
    -h|--help)
 
cat | less << \'EOD\'
RADIO_RIP(1)            User Manuals                RADIO_RIP(1)
 
 
 
 
NAME
     radio_rip - dumps every audio stream you can listen with your mplayer
     installation (yes, it\'s a possibility to record real streams) and encode 
     them to everything sox can manage. 
     Ogg Vorbis, mp3 ...  
 
SYNOPSIS
     radio_rip [ --help | RECORDING_TIME OUTPUT_FILE STREAM_URL ] 
 
DESCRIPTION
     radio_rip connect via mplayer to a audio stream send the raw output
     to a named pipe. Sox reads from the named pipe and transform to a format
     you refer in OUTPUT_FILE by the last 3 characters. 
     If there is no free streaming port available radio_rip retry that often you 
     define in the config section of the radio_rip script. The default is 200. 
     It\'s a god idea to use radio_rip in combination with cron or at and sometimes
     http://gpl.coulmann.de/day_of_month.html is very helpful. 
     Of corse, you need a mplayer and a sox installation.
 
     RECORDING_TIME 
         is the duration of the recording in minutes 
     OUTPUT_FILE 
         is the location of the output codec. The last 3 characters define the format
       e.g. ~/favorite_radio_show.ogg will generate a ogg vorbis file
         please refer to sox (1)           
     STREAM_URL 
         is the url of any audio stream your mplayer installation can handle
         please refer to mplayer (1)
 
 
OPTIONS
     -h   print this help
 
EXAMPLES
     main program call
     radio_rip 55 ~/favorite_radio_show.ogg rtsp://stream01.rbb-online.de/broadcast/multikulti
 
     crontab - every sunday 9:04
     4 09 * * 7 radio_rip 55 ~/favorite_radio_show.ogg rtsp://stream01.rbb-online.de/broadcast/multikulti
 
     crontab and day_of_month - every second sunday of the month 
     3 16 * * 7 day_of_month 2 \"radio_rip 55 ~/favorite_radio_show.ogg rtsp://stream01.rbb-online.de/broadcast/multikulti\"
 
     at for single recordings
     echo \"radio_rip 55 ~/favorite_radio_show.ogg rtsp://stream01.rbb-online.de/broadcast/multikulti\" | at 16:05
 
 
AUTHOR
     Wulf Coulmann <scripts at gpl.coulmann dot de>
 
SEE ALSO
     mplayer(1), sox(1), cron(8), at(1), http://gpl.coulmann.de/day_of_month.html  
 
Linux                Last change: September 2006                    
EOD
 
            exit 0
 
      ;;
 
    *)
        DAUER=$1
      ZIEL=/usr/radio/hr3_`date +%s`.mp3
      URL=$3
 
 
        FIFO=$TMP`date +%s`_real_rip.wav
      mkfifo $FIFO
      # run mplayer in background
      /usr/bin/mplayer -ao pcm:file=$FIFO -cache 32 $URL&
        MPLAYER=$!
 
      # convert raw data to mp3
        lame $FIFO $ZIEL
 
 
      # make sure we get a port of the streaming server, if not try to reconnect
      CHECK=0
      RECONNECT=0
 
        while  [ $CHECK -lt 1 ] && [ $RECONNECT -lt $RETRY ]
        do
          sleep 1 
            if [ ! -n \"`ps -p $MPLAYER|grep $MPLAYER`\" ] ; then
               echo \"reconnect $RECONNECT\"
                /usr/bin/mplayer -ao pcm:file=$FIFO -cache 32 $URL&
                 MPLAYER=$!
             CHECK=0
               RECONNECT=$(($RECONNECT + 1)) 
            fi
 
          CHECK=$(($CHECK + 1)) 
        done
 
        echo steht
         
        # wait for requested time
      sleep $(($DAUER * 60))
 
      # stop mplayer
      kill %1
        sleep 10
       
      # remove fifo
      rm -rf $FIFO
 
      ;;
esac
Woran kann das Liegen?

Hier noch die Crontab, wen sie Interessiert:
PHP:
1
2
 
0 * * * * /root/download.sh 60 Datei.mp3 http://stream
Achja, von meinem Script wird die Dateiangabe ignoriert!
___________________________
MFG Jan
"funzt nicht" ist keine gültige Fehlerbeschreibung!*haarerauf*
http://www.sysprofile.de/id30821
21.05.2007 20:09 Uhr

 

Status: online
push,

kann mir keiner Helfen?
___________________________
MFG Jan
"funzt nicht" ist keine gültige Fehlerbeschreibung!*haarerauf*
http://www.sysprofile.de/id30821
Seite 2 von 212
nach obennach oben

Copyright © 2008 cybton-network

Google
Partner: #Musik - Dein Internetradio - nexem. - .wir machen news - Your-Book.net - Dein kostenloses Gästebuch
ANEXIA - PHP Entwicklung - Dockers - s.Oliver Schuhe - Think Schuhe - der eigene Weg - Dorfen - Paul Green Schuhe - Bequeme Geox - Web-Entwicklung