Home > Uncategorized > Using VLC and cron to record a stream

Using VLC and cron to record a stream

Here is how to schedule a TV recording with VLC and cron. Enter this in crontab -e:

# m h  dom mon dow   command
45 18 11 10 * vlc -I http "rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=295" --sout file/ts://$HOME/tv-france3.mpg >& $HOME/vlc.log

-I http is needed do not start any GUI. We are running VLC in a cron job so there is neither X11 display nor TTY. --sout file tells vlc to write the video to a file.

Advertisements
Tags:
  1. Dr. Phuzzichtkeit
    May 4, 2009 at 22:21

    Thanks!!

  2. Charlie X-Ray
    July 21, 2010 at 17:50

    Thanks. I was missing the -I.

  3. April 1, 2011 at 18:33

    thanks for this tips , do have any idea how to stop recod from cron , i tried that

    20 20 * * * vlc -I dummy ‘http://radio.rim952.fr:8001/stream.ogg’ –sout file/OGG://$HOME/pierrjovan/today.ogg >& $HOME/pierrjovan/vlc.log
    21 20 * * * pgrep -o vlc | xargs kill -9
    but the kill dosen’t do anything ..

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: