OSX: Save Quicktime audio stream to a file using VLC
I found a Mac OS X hint yesterday mentioning how VideoLAN CLient (VLC) can save streaming videos into a file. Since today I wanted to record a radio show off the Internet, I gave it a shot for an audio stream too.
Here’s what I got:
If you want to save a Quicktime (AAC/MP4) audio stream (maybe others, too? Leave a comment if you know!) to a file, start VLC from the command line (terminal window) like this:
/Applications/VLC.app/Contents/MacOS/VLC –rtsp-tcp \
rtsp://example.com/path/to/stream \
–sout ‘#standard{access=file,mux=mp4,url=/Users/\
Shared/VLCoutput.mp4}’
(obviously, you needn’t break it up into several lines of code, you can just leave out the line breaks as well as the backslashes: We will use that format in a jiffy).
Now, if you want to schedule the whole thing, a cron job will do the job. The tool at would be certainly more correct (since you don’t want to schedule it as a recurrent task), but the at daemon is disabled on OS X by default.
So, do a crontab -e and put in two lines like this (yes, put the whole VLC stuff into one line as mentioned above):
0 15 12 5 * /Applications/VLC.app/Contents/MacOS/VLC --rtsp-tcp rtsp://example.com/path/to/stream --sout '#standard{access=file,mux=mp4,url=/Users/Shared/VLCoutput.mp4}'
30 15 12 5 * killall -QUIT VLC
The first line starts VLC as mentioned above. 0 15 12 5 means: Start at 3 p.m. (= 0 15), on May 12 (= 12 5). The asterisks in each of the lines just mean that you don’t care about the weekday.
Read the rest of this entry »
