Page 1 of 1

schedule radio recording

Posted: 03 Aug 2014 01:00
by george4tape
Hi a few years ago i was using using windows task scheduler to launch a bat file to open vlc and record radio caroline, it worked until i upgraded VLC
This bat file no longer works.. VLC opens and then quickly crashes!
here is the file..i have not given my user name, should there be " marks at begining?

"C:\Program Files\VideoLAN\VLC\vlc.exe" http://sc5.radiocaroline.net:8010/listen.pls --volume 256 --http-caching 5000 :sout=#transcode{acodec=mp3,ab=128,channels=2,samplerate=44100}:duplicate{dst=std{access=file,mux=raw,dst=C:\Users\MYUSERNAME\Music\record radio.ps

any idea how to git it to work?
Cheers
george4tape :?

Re: schedule radio recording

Posted: 07 Aug 2014 18:46
by L5730
Hi,
I'm new to this forum, so please excuse any faux pas.

I have a scheduled .bat script to record a Live radio stream, and also another to record an archived stream.

Code: Select all

if not "%minimized%"=="" goto :minimized set minimized=true start /min cmd /C "%~dpnx0" goto :EOF :minimized rem Anything after here will run in a minimized window FOR /F "TOKENS=1* DELIMS= " %%A IN ('DATE/T') DO SET CDATE=%%B For /f "tokens=1-4 delims=/ " %%a in ('date /t') do (set date=%%b-%%a-%%c) "C:\program files (x86)\videolan\vlc\vlc.exe" <radio stream url:port> :sout=#file{dst="<drive:>\<folder>\<file name> %date%.mp3"} --play-and-exit --run-time=1860 --stop-time=1860 --qt-start-minimized :sout-keep exit
This will start a CMD windows minimised so not to be annoying.
VLC will also start minimized.
The date is set in USA format MM-DD-YY (move the %%a, %%b, %%c around to change that)
It streams to a file at location you specify, appends a space, the current date, and puts the .mp3 extension on.
The streaming will run for 1860 seconds (1h 1m)
After completion, VLC will close, then the CMD window will.

Does that help? I know you are trying to transcode, but I haven't got quite that far yet.

Re: schedule radio recording

Posted: 26 Aug 2014 16:58
by aleatory
I see you can set the date. Where do you set the time?

Re: schedule radio recording

Posted: 03 Sep 2014 13:06
by L5730
Time = %time%
Open a CMD window and type:

Code: Select all

echo %time%
The output will be:
11:54:03.43

Change time to %time:~0,5%
11:54

So then just add in this and it should be happy, eg:

Code: Select all

"C:\program files (x86)\videolan\vlc\vlc.exe" <radio stream url:port> :sout=#file{dst="<drive:>\<folder>\<file name> %date%_%time:~0,5%.mp3"} --play-and-exit --run-time=1860 --stop-time=1860 --qt-start-minimized :sout-keep exit
Note: %date%_%time:~0,5% is now part of the output file name string.