How to Record internet radio using VLC

This tutorial will explain how to record internet radio using VLC this can be done with a single command using VLC
Procedure to follow

1. Create a script file ‘', with the following content from your terminal

NOW=$(date +"%b-%d-%y")

cvlc --run-time=7200 --sout "#duplicate{dst=std{access=file,mux=raw,dst=/home/<user>/myshow-$NOW.mp3}" vlc://quit ;

cvlc is the commandline version of vlc

use --run-time to indicate the duration of the show in seconds

Replace the url to the radio station of your choice and dst to the path you desire.

2.Mark the file as executable

chmod +x

3.Schedule the recording in cron.

a. Launch the cron

crontab -e

b. Put the schedule in it

00 18 * * 06 /home/<user>/

Source from here

Sponsored Link

You may also like...

5 Responses

  1. Floyd says:

    How would one do this for a web site that requires a login and password? Could that be included in the script?

  2. Bit Hacker says:

    Simply copying the URL of the radio and using Advanced Control button of recording does the same job. 🙂

  3. maedox says:

    @Floyd: If it supports bacis auth you can put your username and password in front of the URL like this: http://username:[email protected]

    And if it doesn’t, there probably is another mechanism to do it. for example, uses a simple hash string (url?some-ugly-hash-string) to identify everyone. Ask them. 🙂

  4. vik says:

    I’m to run this script (slightly modified, but the cvlc bit is effectively the same), but it starts up vlc, processes the quit part, and nothing is recorded. Removing vlc://quit works, but that will record forever. Any ideas? vlc 1.0.6 on ubuntu 10.04

  5. Bob says:

    I can not get the script to work.
    1) I see two left curley braces but only one right curley brace in the example.
    2) I have not succeeded in getting VLC to recognize a variable for the dst= for some odd reason. I want to pass a varialbe for the destination file if possible.
    3) When I put –run-time=60 it doesn’t seem to work but if I leave out the = so that it reads –run-time 60 it does providing I put that after the dst=nodisplay

    Any thoughts?

Leave a Reply

Your email address will not be published. Required fields are marked *