]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.rss
Generated.
[homepage.git] / blog / index.rss
index 7ef97cf9d2046d71e6780f519c3910906e911d6f..e452331e50e352e09b0ef2232da28f1ce5f605fe 100644 (file)
@@ -6,6 +6,52 @@
                 <link></link>
                 <atom:link href="index.rss" rel="self" type="application/rss+xml" />
        
+       <item>
+               <title>Recording video from cron using VLC</title>
+               <link>Recording_video_from_cron_using_VLC.html</link>
+               <guid isPermaLink="true">Recording_video_from_cron_using_VLC.html</guid>
+                <pubDate>Sun, 5 Apr 2009 10:00:00 +0200</pubDate>
+               <description>
+&lt;p&gt;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:&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;URL=http://www.ping.uio.no/video/rms-oslo_2009.ogg
+SAVEFILE=rms.ogg
+DISPLAY= vlc -q $URL \
+  --sout=&quot;#duplicate{dst=std{access=file,url=&#39;$SAVEFILE&#39;},dst=nodisplay}&quot; \
+  --intf=dummy&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;The command stream the URL and store it in the SAVEFILE by
+duplicating the output stream to &quot;nodisplay&quot; and the file, using the
+dummy interface.  The dummy interface and the nodisplay output make
+sure no X interface is needed.&lt;/p&gt;
+
+&lt;p&gt;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
+&lt;tt&gt;vlc-record&lt;/tt&gt; to use from &lt;tt&gt;at&lt;/tt&gt; or &lt;tt&gt;cron&lt;/tt&gt;:&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;#!/bin/sh
+set -e
+URL=&quot;$1&quot;
+SAVEFILE=&quot;$2&quot;
+DURATION=&quot;$3&quot;
+DISPLAY= vlc -q &quot;$URL&quot; \
+  --sout=&quot;#duplicate{dst=std{access=file,url=&#39;$SAVEFILE&#39;},dst=nodisplay}&quot; \
+  --intf=dummy &lt; /dev/null &gt; /dev/null 2&gt;&amp;1 &amp;
+pid=$!
+sleep $DURATION
+kill $pid
+wait $pid&lt;/pre&gt;&lt;/blockquote&gt;
+</description>
+       </item>
+       
        <item>
                <title>Standardize on protocols and formats, not vendors and applications</title>
                <link>Standardize_on_protocols_and_formats__not_vendors_and_applications.html</link>
@@ -417,53 +463,5 @@ reprap-en kvikner til.&lt;/p&gt;
 </description>
        </item>
        
-       <item>
-               <title>Frikanalen og jul i studentrådet</title>
-               <link>Frikanalen_og_jul_i_studentr__det.html</link>
-               <guid isPermaLink="true">Frikanalen_og_jul_i_studentr__det.html</guid>
-                <pubDate>Wed, 11 Mar 2009 23:40:00 +0100</pubDate>
-               <description>
-&lt;p&gt;I går
-&lt;a href=&quot;http://lists.nuug.no/pipermail/interesserte/2009-March/000387.html&quot;&gt;lanserte&lt;/a&gt;
-NUUGs videogruppe
-&lt;a href=&quot;http://www.frikanalen.no&quot;&gt;Frikanalen&lt;/a&gt; med
-&lt;a href=&quot;http://www.nuug.no/pub/video/frikanalen/frontpage.cgi&quot;&gt;åpne
-standarder&lt;/a&gt;, 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.&lt;/p&gt;
-
-&lt;p&gt;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.&lt;/p&gt;
-
-&lt;p&gt;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
-&lt;a href=&quot;http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=720&quot;&gt;vandring
-i jerusalem&lt;/a&gt; via
-&lt;a href=&quot;http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=779&quot;&gt;religiøst
-vinklede nyheter&lt;/a&gt; til
-&lt;a
-href=&quot;http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=2077&quot;&gt;kreasjonisk
-retorikk&lt;/a&gt;, men også fine
-&lt;a href=&quot;http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=407&quot;&gt;dokumentarer
-om redningsselskapet&lt;/a&gt; og
-&lt;a href=&quot;http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=2204&quot;&gt;interessante
-tegneserieanmeldelser&lt;/a&gt;.  Det jeg derimot har hatt størst glede av,
-er
-
-&lt;a href=&quot;http://www.nuug.no/pub/video/frikanalen/fetchvideo.cgi?videoId=1556&quot;&gt;jul
-i studentrådet&lt;/a&gt;, der hver episode var en fest å se på.  Jeg håper
-NUUG lykkes med å få ut sine opptak med like stor suksess.&lt;/p&gt;
-</description>
-       </item>
-       
         </channel>
 </rss>