- <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>
-<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>
-</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>
- <guid isPermaLink="true">Standardize_on_protocols_and_formats__not_vendors_and_applications.html</guid>
- <pubDate>Mon, 30 Mar 2009 11:50:00 +0200</pubDate>
- <description>
-<p>Where I work at the University of Oslo, one decision stand out as a
-very good one to form a long lived computer infrastructure. It is the
-simple one, lost by many in todays computer industry: Standardize on
-open network protocols and open exchange/storage formats, not applications.
-Applications come and go, while protocols and files tend to stay, and
-thus one want to make it easy to change application and vendor, while
-avoiding conversion costs and locking users to a specific platform or
-application.</p>
-
-<p>This approach make it possible to replace the client applications
-independently of the server applications. One can even allow users to
-use several different applications as long as they handle the selected
-protocol and format. In the normal case, only one client application
-is recommended and users only get help if they choose to use this
-application, but those that want to deviate from the easy path are not
-blocked from doing so.</p>
-
-<p>It also allow us to replace the server side without forcing the
-users to replace their applications, and thus allow us to select the
-best server implementation at any moment, when scale and resouce
-requirements change.</p>
-
-<p>I strongly recommend standardizing - on open network protocols and
-open formats, but I would never recommend standardizing on a single
-application that do not use open network protocol or open formats.</p>
-</description>
- </item>
-