The Art-Music, Literature and Linguistics Forum

ARCHIVED TOPICS => Computers and Programming => Topic started by: guest54 on January 01, 2013, 01:20:28 pm



Title: Schedule recordings with VLC media player
Post by: guest54 on January 01, 2013, 01:20:28 pm
It took me a while to work this out, because the documentation is confused/ing. But I am now able to do it to my satisfaction. To record a programme from the Czech station D-Dur, for example, at a certain time:

Step 1) Prepare a configuration file. I like to make a separate configuration file for each station. Then there are only three items which have to be changed from one recording to the next: a) the date and time of the scheduled start, b) the date and time of the scheduled end, and c) the name of the output file for the recording.

Here is an example of a configuration file - it is called ddur.vlm, and it consists of three lines (the first one wraps around on the screen):

new record broadcast enabled input http://195.113.161.70:8000/cro-d-dur-256.ogg output #std{access=file,mux=ogg,dst='D:\Czechrecs\Testingdx.ogg'}
new start schedule enabled date 2013/01/01-13:35:00 append control record play
new end schedule enabled date 2013/01/01-13:37:00 append control record stop

Note the station URL (http://195.113.161.70:8000/cro-d-dur-256.ogg), the date and time when the recording should start (on the second line, in the order year/month/day), the date and time when the recording should end (on the third line), and the name of the output file (D:\Czechrecs\Testingdx.ogg).

Step 2) Issue the following command:

vlc --vlm-conf ddur.vlm

Observe the reference to the configuration file ddur.vlm prepared in step 1 above. VLC will pop up, and start recording at the scheduled time. The only indications that it is actually doing anything will be 1) when the light on the modem starts flickering, and 2) a directory display will show the output file increasing in size.

That covers the essentials! The documentation makes reference to a telnet interface, and an html interface, but neither is actually necessary for this straightforward function.

In practice I like to make two further enhancements or refinements:

1) Change the output bit-rate to 256. The first line of the configuration file in step 1 will then be:

new record broadcast enabled input http://195.113.161.70:8000/cro-d-dur-256.ogg output #transcode{vcodec=none,acodec=vorb,ab=256,channels=2,samplerate=48000}:std{access=file,mux=ogg,dst='D:\Czechrecs\Testingdx.ogg'}

(All one line, with a space after the word "output".) Having a round number like that helps with subsequent conversions and editing of the recording. The broadcast stream, although it has 256 in its name, actually arrives at a bit-rate of 224, so I give it a little lee-way by transcoding it to 256.

2) Perhaps superstitiously and unnecessarily I increase the internet stream caching size, so the command line in step 2 becomes:

vlc --vlm-conf ddur.vlm :network-caching=3000

In the Windows interface there is an item under the Tools menu with the name "VLM Configuration," which can possibly be used to perform a similar scheduling function; but I have not investigated it.