X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/b5f518634d7d657984abc38dc6d1fc83da046018..a9ff0da5c4ed764a7a8e7153f00f20afa4532e95:/blog/index.rss diff --git a/blog/index.rss b/blog/index.rss index 7ef97cf9d2..e452331e50 100644 --- a/blog/index.rss +++ b/blog/index.rss @@ -6,6 +6,52 @@ + + Recording video from cron using VLC + Recording_video_from_cron_using_VLC.html + Recording_video_from_cron_using_VLC.html + Sun, 5 Apr 2009 10:00:00 +0200 + +<p>One think I have wanted to figure out for a along time is how to +run vlc from cron to do recording of video streams on the net. The +task is trivial with mplayer, but I do not really trust the security +of mplayer (it crashes too often on strange input), and thus prefer +vlc. I finally found a way to do it today. I spent an hour or so +searching the web for recipes and reading the documentation. The +hardest part was to get rid of the GUI window, but after finding the +dummy interface, the command line finally presented itself:</p> + +<blockquote><pre>URL=http://www.ping.uio.no/video/rms-oslo_2009.ogg +SAVEFILE=rms.ogg +DISPLAY= vlc -q $URL \ + --sout="#duplicate{dst=std{access=file,url='$SAVEFILE'},dst=nodisplay}" \ + --intf=dummy</pre></blockquote> + +<p>The command stream the URL and store it in the SAVEFILE by +duplicating the output stream to "nodisplay" and the file, using the +dummy interface. The dummy interface and the nodisplay output make +sure no X interface is needed.</p> + +<p>The cron job then need to start this job with the appropriate URL +and file name to save, sleep for the duration wanted, and then kill +the vlc process with SIGTERM. Here is a complete script +<tt>vlc-record</tt> to use from <tt>at</tt> or <tt>cron</tt>:</p> + +<blockquote><pre>#!/bin/sh +set -e +URL="$1" +SAVEFILE="$2" +DURATION="$3" +DISPLAY= vlc -q "$URL" \ + --sout="#duplicate{dst=std{access=file,url='$SAVEFILE'},dst=nodisplay}" \ + --intf=dummy < /dev/null > /dev/null 2>&1 & +pid=$! +sleep $DURATION +kill $pid +wait $pid</pre></blockquote> + + + Standardize on protocols and formats, not vendors and applications Standardize_on_protocols_and_formats__not_vendors_and_applications.html @@ -417,53 +463,5 @@ reprap-en kvikner til.</p> - - Frikanalen og jul i studentrådet - Frikanalen_og_jul_i_studentr__det.html - Frikanalen_og_jul_i_studentr__det.html - Wed, 11 Mar 2009 23:40:00 +0100 - -<p>I går -<a href="http://lists.nuug.no/pipermail/interesserte/2009-March/000387.html">lanserte</a> -NUUGs videogruppe -<a href="http://www.frikanalen.no">Frikanalen</a> med -<a href="http://www.nuug.no/pub/video/frikanalen/frontpage.cgi">åpne -standarder</a>, og resultatet av noen intense uker med arbeide kunne -endelig presenteres. Jeg har tro på åpen kanalkonseptet som -Frikanalen er et eksempel på, der borgerne får anledning til å -kringkaste sitt syn på en åpen og demokratisk måte. Jeg er veldig -glad vi har fått gjort kanalen tilgjengelig i Ogg Theora, slik at alle -kan få tilgang til opptakene på web, og slipper å måtte installere MS -Silverlight for å spille av opptakene.</p> - -<p>Frikanalen har en brokete historie, og dagens inkarnasjon er ikke -helt slik foreningen Åpen kanal planla det for mange år siden, noe som -er bakgrunnen for at det fredag 13. mars 2009 kl 09:00 starter en -rettsak i Oslo tingrett der Kringkasterforeningen (tidligere -foreningen Åpen kanal) har saksøkt kulturdepartementet over -konsesjonsvilkårene til Frikanalen. Jeg er spent på resultatet.</p> - -<p>I arbeidet med Frikanalen med åpne standarder, så har vi hatt glede -av å se en rekke av innslagene som er tilgjengelig. Her er mye -religiøst sludder, fra -<a href="http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=720">vandring -i jerusalem</a> via -<a href="http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=779">religiøst -vinklede nyheter</a> til -<a -href="http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=2077">kreasjonisk -retorikk</a>, men også fine -<a href="http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=407">dokumentarer -om redningsselskapet</a> og -<a href="http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=2204">interessante -tegneserieanmeldelser</a>. Det jeg derimot har hatt størst glede av, -er - -<a href="http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=1556">jul -i studentrådet</a>, der hver episode var en fest å se på. Jeg håper -NUUG lykkes med å få ut sine opptak med like stor suksess.</p> - - -