1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
5 <title>Petter Reinholdtsen: entries from April
2009</title>
6 <link rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"../../../style.css">
7 <link rel=
"alternate" title=
"RSS Feed" href=
"04.rss" type=
"application/rss+xml">
14 <a href=
"../../../">Petter Reinholdtsen
</a>
20 <p>Entries from April
2009.
</p>
25 <a href=
"../../../Recording_video_from_cron_using_VLC.html">Recording video from cron using VLC
</a>
33 <p>One think I have wanted to figure out for a along time is how to
34 run vlc from cron to do recording of video streams on the net. The
35 task is trivial with mplayer, but I do not really trust the security
36 of mplayer (it crashes too often on strange input), and thus prefer
37 vlc. I finally found a way to do it today. I spent an hour or so
38 searching the web for recipes and reading the documentation. The
39 hardest part was to get rid of the GUI window, but after finding the
40 dummy interface, the command line finally presented itself:
</p>
42 <blockquote><pre>URL=http://www.ping.uio.no/video/rms-oslo_2009.ogg
44 DISPLAY= vlc -q $URL \
45 --sout="#duplicate{dst=std{access=file,url='$SAVEFILE'},dst=nodisplay}" \
46 --intf=dummy
</pre></blockquote>
48 <p>The command stream the URL and store it in the SAVEFILE by
49 duplicating the output stream to "nodisplay" and the file, using the
50 dummy interface. The dummy interface and the nodisplay output make
51 sure no X interface is needed.
</p>
53 <p>The cron job then need to start this job with the appropriate URL
54 and file name to save, sleep for the duration wanted, and then kill
55 the vlc process with SIGTERM. Here is a complete script
56 <tt>vlc-record
</tt> to use from
<tt>at
</tt> or
<tt>cron
</tt>:
</p>
58 <blockquote><pre>#!/bin/sh
63 DISPLAY= vlc -q "$URL" \
64 --sout="#duplicate{dst=std{access=file,url='$SAVEFILE'},dst=nodisplay}" \
65 --intf=dummy < /dev/null
> /dev/null
2>&
1 &
69 wait $pid
</pre></blockquote>
76 Tags:
<a href=
"../../../tags/english">english
</a>,
<a href=
"../../../tags/nuug">nuug
</a>,
<a href=
"../../../tags/video">video
</a>.
80 <div class=
"padding"></div>
84 <a href=
"../../../Fransk_idiotlovforslag_hinker_gjennom_parlamentet.html">Fransk idiotlovforslag hinker gjennom parlamentet
</a>
92 <p><a href=
"http://www.dagbladet.no/2009/04/09/kultur/musikk/fildeling/tekno/5689356/">Dagbladet
93 melder at det franske idiotforslaget om å kutte Internet-forbindelsen
94 til alle som blir anklaget for å ha brutt opphavsretten
3 ganger
</a>
95 ble nedstemt i dag med
21 mot
15 stemmer. Vinklingen i Dagbladet er
96 litt merkelig når en vet at det samme forslaget ble vedtatt i
97 parlamentets andre kammer med
12 mot
4 stemmer, etter at det
98 <a href=
"http://opendotdotdot.blogspot.com/2009/04/hadopi-law-passed-by-12-votes-to-4.html">overraskende
99 ble foreslått å ta saken opp til votering
22:
45 sist torsdag
</a>,
100 etter sigende i strid med vanlige rutiner i det franske parlamentet.
</p>
102 <p>Det hele blir ennå mer komisk når et vet at
103 <a href=
"http://www.zeropaid.com/news/10034/political_hypocrisy_french_president_sued_for_copyright_infringement/">presidentens
104 parti er blitt anklaget for å ha brutt opphavsretten
</a>. Mon tro om
105 partet skal miste internet-forbindelsen hvis de får
2 anklager til
113 Tags:
<a href=
"../../../tags/norsk">norsk
</a>,
<a href=
"../../../tags/nuug">nuug
</a>,
<a href=
"../../../tags/personvern">personvern
</a>.
117 <div class=
"padding"></div>
119 <p style=
"text-align: right;"><a href=
"04.rss"><img src=
"../../../xml.gif" alt=
"RSS Feed" width=
"36" height=
"14"></a></p>
131 <li><a href=
"../../../archive/2009/01/">January (
8)
</a></li>
133 <li><a href=
"../../../archive/2009/02/">February (
8)
</a></li>
135 <li><a href=
"../../../archive/2009/03/">March (
12)
</a></li>
137 <li><a href=
"../../../archive/2009/04/">April (
2)
</a></li>
144 <li><a href=
"../../../archive/2008/11/">November (
5)
</a></li>
146 <li><a href=
"../../../archive/2008/12/">December (
7)
</a></li>
157 <li><a href=
"../../../tags/3d-printer">3d-printer (
9)
</a></li>
159 <li><a href=
"../../../tags/amiga">amiga (
1)
</a></li>
161 <li><a href=
"../../../tags/aros">aros (
1)
</a></li>
163 <li><a href=
"../../../tags/debian">debian (
6)
</a></li>
165 <li><a href=
"../../../tags/debian edu">debian edu (
6)
</a></li>
167 <li><a href=
"../../../tags/english">english (
10)
</a></li>
169 <li><a href=
"../../../tags/fiksgatami">fiksgatami (
1)
</a></li>
171 <li><a href=
"../../../tags/ltsp">ltsp (
1)
</a></li>
173 <li><a href=
"../../../tags/multimedia">multimedia (
2)
</a></li>
175 <li><a href=
"../../../tags/norsk">norsk (
32)
</a></li>
177 <li><a href=
"../../../tags/nuug">nuug (
32)
</a></li>
179 <li><a href=
"../../../tags/personvern">personvern (
4)
</a></li>
181 <li><a href=
"../../../tags/reprap">reprap (
9)
</a></li>
183 <li><a href=
"../../../tags/rss">rss (
1)
</a></li>
185 <li><a href=
"../../../tags/standard">standard (
2)
</a></li>
187 <li><a href=
"../../../tags/stavekontroll">stavekontroll (
1)
</a></li>
189 <li><a href=
"../../../tags/video">video (
6)
</a></li>
191 <li><a href=
"../../../tags/vitenskap">vitenskap (
1)
</a></li>
193 <li><a href=
"../../../tags/web">web (
2)
</a></li>