you could try this instead (otherwise I'm not sure you can use "access=file"
Code:cvlc --run-time=10800 http://www.live365.com/play/319909? --sout "#duplicate{dst=std{access=file,mux=raw,dst=/home/paul/mfn.mp3}" vlc://quit ;
you could try this instead (otherwise I'm not sure you can use "access=file"
Code:cvlc --run-time=10800 http://www.live365.com/play/319909? --sout "#duplicate{dst=std{access=file,mux=raw,dst=/home/paul/mfn.mp3}" vlc://quit ;
Last edited by mc4man; June 12th, 2010 at 05:02 PM. Reason: for cron use cvlc
that works fine, thanks for your help!
ah, a slight hitch has arisen for me on the cron side of things.
i used Gnome schedule to set up the cron, and had to select 'x application' as the behaviour in order for VLC to start up on schedule. However, though VLC starts and connects to the stream it wont write the saved .mp3 file.
any thoughts on this?
EDIT
using the one time scheduler works fine, but recurring does not. strange...
Last edited by pc10pc; June 7th, 2010 at 07:00 PM.
hi, just wanted to add my vote of thanks for the script. Just spent the last few hours getting it working using Ruby => works an absolute treat! Much appreciated bheemboy.
The Ruby system command gets 2 command line arguments for URL of station (details stored in a YAML file) and duration, as per the following:Code:system "cvlc --run-time=#{@duration} #{@url} --sout '#duplicate{dst=std{access=file,mux=raw,dst=/home/rob/Music/Radio/#{@outputfile}.mp3}' vlc://quit ;"
Just felt compelled to add, a big thanks for this thread.. I've been looking for something like this, was using Streamtuner but I wanted automation.
Linux never ceases to amaze me with the possibilities..
I have been trying to get this to work but when I run my script it just plays the radio station and the recording is no where to be found. This is what the terminal displays
james@james-desktop:~$ /home/james/Desktop/recordmyshow.sh
VLC media player 1.0.6 Goldeneye
/home/james/Desktop/recordmyshow.sh: line 4: --sout: command not found
james@james-desktop:~$ [0x2672048] dummy interface: using the dummy interface module...
[0x7ff85c002cc8] pulse audio output: No. of Audio Channels: 2
Here is my script
#!/bin/sh
NOW=$(date +”%b-%d-%y”)
cvlc --run-time=3600 http://216.235.94.11/play?s=johnnyca...71473454218358 --sout "#duplicate{dst=std{access=file,mux=raw,dst=/home/james/music/JCradio/test.mp3}" vlc://quit ;
I have changed it several times but the way with the least errors. The radio station I am trying to record is here
http://216.235.94.11/play?s=johnnyca...71473454218358
Any help would be great. Thanks.
Hi jlabomb
I think your link's no good.
Try your script with this link insted:-
Then look in the /home/james/music/JCradio folderCode:cvlc --run-time=3600 http://216.235.94.11/play?s=johnnycashradio --sout "#duplicate{dst=std{access=file,mux=raw,dst=/home/james/music/JCradio/test.mp3}" vlc://quit ;
Last edited by ron999; July 24th, 2010 at 11:16 AM.
Thanks. That did the job. I don't know why the link didn't work because I could hear the audio when I ran the script. Anyway I have one more question. Is there a command to auto name the file either by a number or time and date? Thanks again this will be great for me.
jlabomb
In your command, instead of file name test.mp3
Try something like this:-
JohnnyCash-$(date +"%b-%d-%y").mp3
What's sorta interesting about that site is the podcasts are of much better quality - the stream you're recording is 96k, 20500. Can't tell if the external player on the site is using the lower or higher quality mp3's
There was to much 'info' in that link - vlc would 'stop' after getting the stream so no --soutI don't know why the link didn't work because I could hear the audio
As a hint - sometimes play a link in vlc, then as it's playing go - tools - codec info.. and see what url is displayed in vlc (location
Last edited by mc4man; July 24th, 2010 at 04:06 PM.
Bookmarks