Howto: Record a web stream of TV with VLC
As you may have noticed, a number of national and international tv stations are beginning to offer their products in the form of high-definition mp4 live video streams. Long gone are the days when streaming meant crappy realmedia video. Let’s hope they never return.

A natural question that arises is how to record and store such streams for future viewing. In this part one of our feature on recording with VLC we will look at how to save a tv stream to the hard disk. Read on for more…
Prerequisites
Before we begin, we have to install a couple of things. First, lets get VLC
apt-get install vlc
Next, we have to locate a couple of tv stream urls. At the bottom of this page, I have listed a few for you to try out. The one we will work with is
mms://wm1.streamzilla.jet-stream.nl/demo=fireplaceHD
which is in fact not a tv station, but a HD fireplace. Nice and comfy.
Viewing a stream
To view the fireplace in action, open a console and type
vlc mms://wm1.streamzilla.jet-stream.nl/demo=fireplaceHD
Saving a stream to the hard disk
To save the stream to you hard disk execute the following command (in one line)
cvlc mms://wm1.streamzilla.jet-stream.nl/demo=fireplaceHD --sout
"#transcode{vcodec=mp1v,vb=800,scale=1,acodec=mp3,ab=256,channels=2}
:duplicate{dst=std{access=file,mux=ts,dst=/home/user/Fireplace.mpg}}"
Remember to replace the “user” in the “dst=” part with your username.
Playing with video codecs
To encode to another video format, use one of the following “names” part in your vcodec=… command
Name Description mp1v MPEG-1 Video - recommended for portability mp2v MPEG-2 Video - used in DVDs mp4v MPEG-4 Video SVQ1 Sorenson Video v1 SVQ3 Sorenson Video v3 WMV1 Windows Media Video v1 WMV2 Windows Media Video v2 WMV3 Windows Media Video v3, also called Windows Media 9 (unsupported) DVSD Digital Video MJPG MJPEG H263 H263 h264 H264 theo Theora IV20 Indeo Video IV40 Indeo Video version 4 or later (unsupported) RV10 Real Media Video cvid Cinepak VP31 On2 VP FLV1 Flash Video CYUV Creative YUV HFYU Huffman YUV MSVC Microsoft Video v1 MRLE Microsoft RLE Video AASC Autodesc RLE Video FLIC FLIC video QPEG QPEG Video
List of tv stations
DR1 rtsp://streamer-01.dr.nordija.dk/dr1high DR2 rtsp://streamer-01.dr.nordija.dk/dr2high MADFACE mms://72.29.72.109/madfacetv Ministry of Sound http://a745.l2645830502.c26458.g.lm.akamaistream.net/D/745/26458/v0001/reflector:30502 Music Plus TV mms://musicplus-musicplustv.wm.llnwd.net/musicplus_musicplustv SCC mms://media.scctv.net/SCCtv%20Broadband SportBox mms://s-lon-01b.global-mix.net/itb FRANCE 24 mms://live.france24.com/france24_fr.wsx ZDF mms://ms.mdcs.dtag.de/encoder.zdf.zdf_h SKY TG24 mms://live.skylife.it/SkyTg24 NRK Nyheter mms://media00.nrk.no/mms2/nydi/AutoEnc/mn1840.wmv TV Visjon http://wm-live.crossnet.net/Visjonnorge SONY Japan mms://morrich.gekimedia.net/MainStream500 BBC WORLD mms://tv.lzu.edu.cn/tv1 FOX 5 mms://a1729.l2168647534.c21686.g.lm.akamaistream.net/D/1729/21687/v0001/reflector:30206 FOX 8 mms://a1090.l1814050135.c18140.g.lm.akamaistream.net/D/1090/18140/v0001/reflector:50135 ABC mms://wmslive.stream.aol.com/live/abc/now KARE 11 mms://a1100.l2234351369.c22343.n.lm.akamaistream.net/D/1100/22343/v0001/reflector:51369 MSNBC mms://msnbc.wmod.llnwd.net/a275/e1/video/100/vh.asf SKY news mms://live1.wm.skynews.servecast.net/skynews_wmlz_live300k FTV mms://88.191.27.137/paid%5Cfashiontv CNN mms://a466.l3760651364.c37606.g.lm.akamaistream.net/D/466/37606/v0001/reflector:51364mms://a466.l3760651364.c37606.g.lm.akamaistream.net/D/466/37606/v0001




this is really great stuff – thx a lot- worked like a charm!!!
really nice sense and wonderful share !!
Thanks,
Logeshkumar P
India
so this records just fine and dandy, but how can you tell it to STOP recording a stream without manually hitting the stop button? If I want to record a stream without popping up the GUI I know the syntax for it, but again, how would I tell VLC to stop recording the stream?
Can’t get this to work. Only error
“Das Wertvollste im Leben ist die Entfaltung der Persönlichkeit und ihrer schöpferischen Kräfte”. Ich glaube, das passt hier hier recht gut. Geäußert hat das übrigens Albert Einstein.