]> pere.pagekite.me Git - homepage.git/blob - blog/index.rss
Publish new post.
[homepage.git] / blog / index.rss
1 <?xml version="1.0" encoding="utf-8"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom="http://www.w3.org/2005/Atom">
3 <channel>
4 <title>Petter Reinholdtsen</title>
5 <description></description>
6 <link>http://people.skolelinux.org/pere/blog/</link>
7 <atom:link href="http://people.skolelinux.org/pere/blog/index.rss" rel="self" type="application/rss+xml" />
8
9 <item>
10 <title>Streaming the Linux desktop to Kodi using VLC and RTSP</title>
11 <link>http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html</link>
12 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html</guid>
13 <pubDate>Thu, 12 Jul 2018 02:00:00 +0200</pubDate>
14 <description>&lt;p&gt;A while back, I was asked by a friend how to stream the desktop to
15 my projector connected to Kodi. I sadly had to admit that I had no
16 idea, as it was a task I never had tried. Since then, I have been
17 looking for a way to do so, preferable without much extra software to
18 install on either side. Today I found a way that seem to kind of
19 work. Not great, but it is a start.&lt;/p&gt;
20
21 &lt;p&gt;I had a look at several approaches, for example
22 &lt;a href=&quot;https://github.com/mfoetsch/dlna_live_streaming&quot;&gt;using uPnP
23 DLNA as described in 2011&lt;/a&gt;, but it required a uPnP server, fuse and
24 local storage enough to store the stream locally. This is not going
25 to work well for me, lacking enough free space, and it would
26 impossible for my friend to get working.&lt;/p&gt;
27
28 &lt;p&gt;Next, it occurred to me that perhaps I could use VLC to create a
29 video stream that Kodi could play. Preferably using
30 broadcast/multicast, to avoid having to change any setup on the Kodi
31 side when starting such stream. Unfortunately, the only recipe I
32 could find using multicast used the rtp protocol, and this protocol
33 seem to not be supported by Kodi.&lt;/p&gt;
34
35 &lt;p&gt;On the other hand, the rtsp protocol is working! Unfortunately I
36 have to specify the IP address of the streaming machine in both the
37 sending command and the file on the Kodi server. But it is showing my
38 desktop, and thus allow us to have a shared look on the big screen at
39 the programs I work on.&lt;/p&gt;
40
41 &lt;p&gt;I did not spend much time investigating codeces. I combined the
42 rtp and rtsp recipes from
43 &lt;a href=&quot;https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/&quot;&gt;the
44 VLC Streaming HowTo/Command Line Examples&lt;/a&gt;, and was able to get
45 this working on the desktop/streaming end.&lt;/p&gt;
46
47 &lt;blockquote&gt;&lt;pre&gt;
48 vlc screen:// --sout \
49 &#39;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{dst=projector.local,port=1234,sdp=rtsp://192.168.11.4:8080/test.sdp}&#39;
50 &lt;/pre&gt;&lt;/blockquote&gt;
51
52 &lt;p&gt;I ssh-ed into my Kodi box and created a file like this with the
53 same IP address:&lt;/p&gt;
54
55 &lt;blockquote&gt;&lt;pre&gt;
56 echo rtsp://192.168.11.4:8080/test.sdp \
57 &gt; /storage/videos/screenstream.m3u
58 &lt;/pre&gt;&lt;/blockquote&gt;
59
60 &lt;p&gt;Note the 192.168.11.4 IP address is my desktops IP address. As far
61 as I can tell the IP must be hardcoded for this to work. In other
62 words, if someone elses machine is going to do the steaming, you have
63 to update screenstream.m3u on the Kodi machine and adjust the vlc
64 recipe. To get started, locate the file in Kodi and select the m3u
65 file while the VLC stream is running. The desktop then show up in my
66 big screen. :)&lt;/p&gt;
67
68 &lt;p&gt;When using the same technique to stream a video file with audio,
69 the audio quality is really bad. No idea if the problem is package
70 loss or bad parameters for the transcode. I do not know VLC nor Kodi
71 enough to tell.&lt;/p&gt;
72
73 &lt;p&gt;&lt;strong&gt;Update 2018-07-12&lt;/strong&gt;: Johannes Schauer send me a few
74 succestions and reminded me about an important step. The &quot;screen:&quot;
75 input source is only available once the vlc-plugin-access-extra
76 package is installed on Debian. Without it, you will see this error
77 message: &quot;VLC is unable to open the MRL &#39;screen://&#39;. Check the log
78 for details.&quot; He further found that it is possible to drop some parts
79 of the VLC command line to reduce the amount of hardcoded information.
80 It is also useful to consider using cvlc to avoid having the VLC
81 window in the desktop view. In sum, this give us this command line on
82 the source end
83
84 &lt;blockquote&gt;&lt;pre&gt;
85 cvlc screen:// --sout \
86 &#39;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{sdp=rtsp://:8080/}&#39;
87 &lt;/pre&gt;&lt;/blockquote&gt;
88
89 &lt;p&gt;and this on the Kodi end&lt;p&gt;
90
91 &lt;blockquote&gt;&lt;pre&gt;
92 echo rtsp://192.168.11.4:8080/ \
93 &gt; /storage/videos/screenstream.m3u
94 &lt;/pre&gt;&lt;/blockquote&gt;
95
96 &lt;p&gt;Still bad image quality, though. But I did discover that streaming
97 a DVD using dvdsimple:///dev/dvd as the source had excellent video and
98 audio quality, so I guess the issue is in the input or transcoding
99 parts, not the rtsp part. I&#39;ve tried to change the vb and ab
100 parameters to use more bandwidth, but it did not make a
101 difference.&lt;/p&gt;
102
103 &lt;p&gt;I further received a suggestion from Einar Haraldseid to try using
104 gstreamer instead of VLC, and this proved to work great! He also
105 provided me with the trick to get Kodi to use a multicast stream as
106 its source. By using this monstrous oneliner, I can stream my desktop
107 with good video quality in reasonable framerate to the 239.255.0.1
108 multicast address on port 1234:
109
110 &lt;blockquote&gt;&lt;pre&gt;
111 gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \
112 videoconvert ! queue2 ! \
113 x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \
114 key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \
115 mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \
116 udpsink host=239.255.0.1 port=1234 ttl-mc=1 auto-multicast=1 sync=0 \
117 pulsesrc device=$(pactl list | grep -A2 &#39;Source #&#39; | \
118 grep &#39;Name: .*\.monitor$&#39; | cut -d&quot; &quot; -f2|head -1) ! \
119 audioconvert ! queue2 ! avenc_aac ! queue2 ! mux.
120 &lt;/pre&gt;&lt;/blockquote&gt;
121
122 &lt;p&gt;and this on the Kodi end&lt;p&gt;
123
124 &lt;blockquote&gt;&lt;pre&gt;
125 echo udp://@239.255.0.1:1234 \
126 &gt; /storage/videos/screenstream.m3u
127 &lt;/pre&gt;&lt;/blockquote&gt;
128
129 &lt;p&gt;Note the trick to pick a valid pulseaudio source. It might not
130 pick the one you need. This approach will of course lead to trouble
131 if more than one source uses the same multicast port and address.
132 Note the ttl-mc=1 setting, which limit the multicast packages to the
133 local network. If the value is increased, your screen will be
134 broadcasted further, one network &quot;hop&quot; for each increase (read up on
135 multicast to learn more. :)!&lt;/p&gt;
136
137 &lt;p&gt;Having cracked how to get Kodi to receive multicast streams, I
138 could use this VLC command to stream to the same multicast address.
139 The image quality is way better than the rtsp approach, but gstreamer
140 seem to be doing a better job.&lt;/p&gt;
141
142 &lt;blockquote&gt;&lt;pre&gt;
143 cvlc screen:// --sout &#39;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{mux=ts,dst=239.255.0.1,port=1234,sdp=sap}&#39;
144 &lt;/pre&gt;&lt;/blockquote&gt;
145
146 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
147 activities, please send Bitcoin donations to my address
148 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
149 </description>
150 </item>
151
152 <item>
153 <title>What is the most supported MIME type in Debian in 2018?</title>
154 <link>http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html</link>
155 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html</guid>
156 <pubDate>Mon, 9 Jul 2018 08:05:00 +0200</pubDate>
157 <description>&lt;p&gt;Five years ago,
158 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html&quot;&gt;I
159 measured what the most supported MIME type in Debian was&lt;/a&gt;, by
160 analysing the desktop files in all packages in the archive. Since
161 then, the DEP-11 AppStream system has been put into production, making
162 the task a lot easier. This made me want to repeat the measurement,
163 to see how much things changed. Here are the new numbers, for
164 unstable only this time:
165
166 &lt;p&gt;&lt;strong&gt;Debian Unstable:&lt;/strong&gt;&lt;/p&gt;
167
168 &lt;pre&gt;
169 count MIME type
170 ----- -----------------------
171 56 image/jpeg
172 55 image/png
173 49 image/tiff
174 48 image/gif
175 39 image/bmp
176 38 text/plain
177 37 audio/mpeg
178 34 application/ogg
179 33 audio/x-flac
180 32 audio/x-mp3
181 30 audio/x-wav
182 30 audio/x-vorbis+ogg
183 29 image/x-portable-pixmap
184 27 inode/directory
185 27 image/x-portable-bitmap
186 27 audio/x-mpeg
187 26 application/x-ogg
188 25 audio/x-mpegurl
189 25 audio/ogg
190 24 text/html
191 &lt;/pre&gt;
192
193 &lt;p&gt;The list was created like this using a sid chroot: &quot;cat
194 /var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz| zcat | awk &#39;/^
195 - \S+\/\S+$/ {print $2 }&#39; | sort | uniq -c | sort -nr | head -20&quot;&lt;/p&gt;
196
197 &lt;p&gt;It is interesting to see how image formats have passed text/plain
198 as the most announced supported MIME type. These days, thanks to the
199 AppStream system, if you run into a file format you do not know, and
200 want to figure out which packages support the format, you can find the
201 MIME type of the file using &quot;file --mime &amp;lt;filename&amp;gt;&quot;, and then
202 look up all packages announcing support for this format in their
203 AppStream metadata (XML or .desktop file) using &quot;appstreamcli
204 what-provides mimetype &amp;lt;mime-type&amp;gt;. For example if you, like
205 me, want to know which packages support inode/directory, you can get a
206 list like this:&lt;/p&gt;
207
208 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
209 % appstreamcli what-provides mimetype inode/directory | grep Package: | sort
210 Package: anjuta
211 Package: audacious
212 Package: baobab
213 Package: cervisia
214 Package: chirp
215 Package: dolphin
216 Package: doublecmd-common
217 Package: easytag
218 Package: enlightenment
219 Package: ephoto
220 Package: filelight
221 Package: gwenview
222 Package: k4dirstat
223 Package: kaffeine
224 Package: kdesvn
225 Package: kid3
226 Package: kid3-qt
227 Package: nautilus
228 Package: nemo
229 Package: pcmanfm
230 Package: pcmanfm-qt
231 Package: qweborf
232 Package: ranger
233 Package: sirikali
234 Package: spacefm
235 Package: spacefm
236 Package: vifm
237 %
238 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
239
240 &lt;p&gt;Using the same method, I can quickly discover that the Sketchup file
241 format is not yet supported by any package in Debian:&lt;/p&gt;
242
243 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
244 % appstreamcli what-provides mimetype application/vnd.sketchup.skp
245 Could not find component providing &#39;mimetype::application/vnd.sketchup.skp&#39;.
246 %
247 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
248
249 &lt;p&gt;Yesterday I used it to figure out which packages support the STL 3D
250 format:&lt;/p&gt;
251
252 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
253 % appstreamcli what-provides mimetype application/sla|grep Package
254 Package: cura
255 Package: meshlab
256 Package: printrun
257 %
258 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
259
260 &lt;p&gt;PS: A new version of Cura was uploaded to Debian yesterday.&lt;/p&gt;
261
262 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
263 activities, please send Bitcoin donations to my address
264 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
265 </description>
266 </item>
267
268 <item>
269 <title>Debian APT upgrade without enough free space on the disk...</title>
270 <link>http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html</link>
271 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html</guid>
272 <pubDate>Sun, 8 Jul 2018 12:10:00 +0200</pubDate>
273 <description>&lt;p&gt;Quite regularly, I let my Debian Sid/Unstable chroot stay untouch
274 for a while, and when I need to update it there is not enough free
275 space on the disk for apt to do a normal &#39;apt upgrade&#39;. I normally
276 would resolve the issue by doing &#39;apt install &amp;lt;somepackages&amp;gt;&#39; to
277 upgrade only some of the packages in one batch, until the amount of
278 packages to download fall below the amount of free space available.
279 Today, I had about 500 packages to upgrade, and after a while I got
280 tired of trying to install chunks of packages manually. I concluded
281 that I did not have the spare hours required to complete the task, and
282 decided to see if I could automate it. I came up with this small
283 script which I call &#39;apt-in-chunks&#39;:&lt;/p&gt;
284
285 &lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;
286 #!/bin/sh
287 #
288 # Upgrade packages when the disk is too full to upgrade every
289 # upgradable package in one lump. Fetching packages to upgrade using
290 # apt, and then installing using dpkg, to avoid changing the package
291 # flag for manual/automatic.
292
293 set -e
294
295 ignore() {
296 if [ &quot;$1&quot; ]; then
297 grep -v &quot;$1&quot;
298 else
299 cat
300 fi
301 }
302
303 for p in $(apt list --upgradable | ignore &quot;$@&quot; |cut -d/ -f1 | grep -v &#39;^Listing...&#39;); do
304 echo &quot;Upgrading $p&quot;
305 apt clean
306 apt install --download-only -y $p
307 for f in /var/cache/apt/archives/*.deb; do
308 if [ -e &quot;$f&quot; ]; then
309 dpkg -i /var/cache/apt/archives/*.deb
310 break
311 fi
312 done
313 done
314 &lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
315
316 &lt;p&gt;The script will extract the list of packages to upgrade, try to
317 download the packages needed to upgrade one package, install the
318 downloaded packages using dpkg. The idea is to upgrade packages
319 without changing the APT mark for the package (ie the one recording of
320 the package was manually requested or pulled in as a dependency). To
321 use it, simply run it as root from the command line. If it fail, try
322 &#39;apt install -f&#39; to clean up the mess and run the script again. This
323 might happen if the new packages conflict with one of the old
324 packages. dpkg is unable to remove, while apt can do this.&lt;/p&gt;
325
326 &lt;p&gt;It take one option, a package to ignore in the list of packages to
327 upgrade. The option to ignore a package is there to be able to skip
328 the packages that are simply too large to unpack. Today this was
329 &#39;ghc&#39;, but I have run into other large packages causing similar
330 problems earlier (like TeX).&lt;/p&gt;
331
332 &lt;p&gt;Update 2018-07-08: Thanks to Paul Wise, I am aware of two
333 alternative ways to handle this. The &quot;unattended-upgrades
334 --minimal-upgrade-steps&quot; option will try to calculate upgrade sets for
335 each package to upgrade, and then upgrade them in order, smallest set
336 first. It might be a better option than my above mentioned script.
337 Also, &quot;aptutude upgrade&quot; can upgrade single packages, thus avoiding
338 the need for using &quot;dpkg -i&quot; in the script above.&lt;/p&gt;
339
340 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
341 activities, please send Bitcoin donations to my address
342 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
343 </description>
344 </item>
345
346 <item>
347 <title>The worlds only stone power plant?</title>
348 <link>http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html</link>
349 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html</guid>
350 <pubDate>Sat, 30 Jun 2018 10:35:00 +0200</pubDate>
351 <description>&lt;p&gt;So far, at least hydro-electric power, coal power, wind power,
352 solar power, and wood power are well known. Until a few days ago, I
353 had never heard of stone power. Then I learn about a quarry in a
354 mountain in
355 &lt;a href=&quot;https://en.wikipedia.org/wiki/Bremanger&quot;&gt;Bremanger&lt;/a&gt; i
356 Norway, where
357 &lt;a href=&quot;https://www.bontrup.com/en/activities/raw-materials/bremanger-quarry/&quot;&gt;the
358 Bremanger Quarry&lt;/a&gt; company is extracting stone and dumping the stone
359 into a shaft leading to its shipping harbour. This downward movement
360 in this shaft is used to produce electricity. In short, it is using
361 falling rocks instead of falling water to produce electricity, and
362 according to its own statements it is producing more power than it is
363 using, and selling the surplus electricity to the Norwegian power
364 grid. I find the concept truly amazing. Is this the worlds only
365 stone power plant?&lt;/p&gt;
366
367 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
368 activities, please send Bitcoin donations to my address
369 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
370 </description>
371 </item>
372
373 <item>
374 <title>Add-on to control the projector from within Kodi</title>
375 <link>http://people.skolelinux.org/pere/blog/Add_on_to_control_the_projector_from_within_Kodi.html</link>
376 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Add_on_to_control_the_projector_from_within_Kodi.html</guid>
377 <pubDate>Tue, 26 Jun 2018 23:55:00 +0200</pubDate>
378 <description>&lt;p&gt;My movie playing setup involve &lt;a href=&quot;https://kodi.tv/&quot;&gt;Kodi&lt;/a&gt;,
379 &lt;a href=&quot;https://openelec.tv&quot;&gt;OpenELEC&lt;/a&gt; (probably soon to be
380 replaced with &lt;a href=&quot;https://libreelec.tv/&quot;&gt;LibreELEC&lt;/a&gt;) and an
381 Infocus IN76 video projector. My projector can be controlled via both
382 a infrared remote controller, and a RS-232 serial line. The vendor of
383 my projector, &lt;a href=&quot;https://www.infocus.com/&quot;&gt;InFocus&lt;/a&gt;, had been
384 sensible enough to document the serial protocol in its user manual, so
385 it is easily available, and I used it some years ago to write
386 &lt;a href=&quot;https://github.com/petterreinholdtsen/infocus-projector-control&quot;&gt;a
387 small script to control the projector&lt;/a&gt;. For a while now, I longed
388 for a setup where the projector was controlled by Kodi, for example in
389 such a way that when the screen saver went on, the projector was
390 turned off, and when the screen saver exited, the projector was turned
391 on again.&lt;/p&gt;
392
393 &lt;p&gt;A few days ago, with very good help from parts of my family, I
394 managed to find a Kodi Add-on for controlling a Epson projector, and
395 got in touch with its author to see if we could join forces and make a
396 Add-on with support for several projectors. To my pleasure, he was
397 positive to the idea, and we set out to add InFocus support to his
398 add-on, and make the add-on suitable for the official Kodi add-on
399 repository.&lt;/p&gt;
400
401 &lt;p&gt;The Add-on is now working (for me, at least), with a few minor
402 adjustments. The most important change I do relative to the master
403 branch in the github repository is embedding the
404 &lt;a href=&quot;https://github.com/pyserial/pyserial&quot;&gt;pyserial module&lt;/a&gt; in
405 the add-on. The long term solution is to make a &quot;script&quot; type
406 pyserial module for Kodi, that can be pulled in as a dependency in
407 Kodi. But until that in place, I embed it.&lt;/p&gt;
408
409 &lt;p&gt;The add-on can be configured to turn on the projector when Kodi
410 starts, off when Kodi stops as well as turn the projector off when the
411 screensaver start and on when the screesaver stops. It can also be
412 told to set the projector source when turning on the projector.
413
414 &lt;p&gt;If this sound interesting to you, check out
415 &lt;a href=&quot;https://github.com/fredrik-eriksson/kodi_projcontrol&quot;&gt;the
416 project github repository&lt;/a&gt;. Perhaps you can send patches to
417 support your projector too? As soon as we find time to wrap up the
418 latest changes, it should be available for easy installation using any
419 Kodi instance.&lt;/p&gt;
420
421 &lt;p&gt;For future improvements, I would like to add projector model
422 detection and the ability to adjust the brightness level of the
423 projector from within Kodi. We also need to figure out how to handle
424 the cooling period of the projector. My projector refuses to turn on
425 for 60 seconds after it was turned off. This is not handled well by
426 the add-on at the moment.&lt;/p&gt;
427
428 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
429 activities, please send Bitcoin donations to my address
430 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
431 </description>
432 </item>
433
434 <item>
435 <title>youtube-dl for nedlasting fra NRK med undertekster - nice free software</title>
436 <link>http://people.skolelinux.org/pere/blog/youtube_dl_for_nedlasting_fra_NRK_med_undertekster___nice_free_software.html</link>
437 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/youtube_dl_for_nedlasting_fra_NRK_med_undertekster___nice_free_software.html</guid>
438 <pubDate>Sat, 28 Apr 2018 10:30:00 +0200</pubDate>
439 <description>&lt;p&gt;I &lt;a href=&quot;https://no.wikipedia.org/wiki/VHS&quot;&gt;VHS-kassettenes&lt;/a&gt;
440 tid var det rett frem å ta vare på et TV-program en ønsket å kunne se
441 senere, uten å være avhengig av at programmet ble sendt på nytt.
442 Kanskje ønsket en å se programmet på hytten der det ikke var
443 TV-signal, eller av andre grunner ha det tilgjengelig for fremtidig
444 fornøyelse. Dette er blitt vanskeligere med introduksjon av
445 digital-TV og webstreaming, der opptak til harddisk er utenfor de
446 flestes kontroll hvis de bruker ufri programvare og bokser kontrollert
447 av andre. Men for NRK her i Norge, finnes det heldigvis flere fri
448 programvare-alternativer, som jeg har
449 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK.html&quot;&gt;skrevet&lt;/a&gt;
450 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK_med_den__nye__l_sningen.html&quot;&gt;om&lt;/a&gt;
451 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Nedlasting_fra_NRK__som_Matroska_med_undertekster.html&quot;&gt;før&lt;/a&gt;.
452 Så lenge kilden for nedlastingen er lovlig lagt ut på nett (hvilket
453 jeg antar NRK gjør), så er slik lagring til privat bruk også lovlig i
454 Norge.&lt;/p&gt;
455
456 &lt;p&gt;Sist jeg så på saken, i 2016, nevnte jeg at
457 &lt;a href=&quot;https://rg3.github.com/youtube-dl/&quot;&gt;youtube-dl&lt;/a&gt; ikke kunne
458 bake undertekster fra NRK inn i videofilene, og at jeg derfor
459 foretrakk andre alternativer. Nylig oppdaget jeg at dette har endret
460 seg. Fordelen med youtube-dl er at den er tilgjengelig direkte fra
461 Linux-distribusjoner som &lt;a href=&quot;https://www.debian.org/&quot;&gt;Debian&lt;/a&gt;
462 og &lt;a href=&quot;https://www.ubuntu.com/&quot;&gt;Ubuntu&lt;/a&gt;, slik at en slipper å
463 finne ut selv hvordan en skal få dem til å virke.&lt;/p&gt;
464
465 &lt;p&gt;For å laste ned et NRK-innslag med undertekster, og få den norske
466 underteksten pakket inn i videofilen, så kan følgende kommando
467 brukes:&lt;/p&gt;
468
469 &lt;p&gt;&lt;pre&gt;
470 youtube-dl --write-sub --sub-format ttml \
471 --convert-subtitles srt --embed-subs \
472 https://tv.nrk.no/serie/ramm-ferdig-gaa/MUHU11000316/27-04-2018
473 &lt;/pre&gt;&lt;/p&gt;
474
475 &lt;p&gt;URL-eksemplet er dagens toppsak på tv.nrk.no. Resultatet er en
476 MP4-fil med filmen og undertekster som kan spilles av med VLC. Merk
477 at VLC ikke viser frem undertekster før du aktiverer dem. For å gjøre
478 det, høyreklikk med musa i fremviservinduet, velg menyvalget for
479 undertekst og så norsk språk. Jeg testet også &#39;--write-auto-sub&#39;,
480 men det kommandolinjeargumentet ser ikke ut til å fungere, så jeg
481 endte opp med settet med argumentlisten over, som jeg fant i en
482 feilrapport i youtube-dl-prosjektets samling over feilrapporter.&lt;/p&gt;
483
484 &lt;p&gt;Denne støtten i youtube-dl gjør det svært enkelt å lagre
485 NRK-innslag, det være seg nyheter, filmer, serier eller dokumentater,
486 for å ha dem tilgjengelig for fremtidig referanse og bruk, uavhengig
487 av hvor lenge innslagene ligger tilgjengelig hos NRK. Så får det ikke
488 hjelpe at NRKs jurister mener at det er
489 &lt;a href=&quot;http://people.skolelinux.org/pere/blog/Best___ikke_fortelle_noen_at_streaming_er_nedlasting___.html&quot;&gt;vesensforskjellig
490 å legge tilgjengelig for nedlasting og for streaming&lt;/a&gt;, når det rent
491 teknisk er samme sak.&lt;/p&gt;
492
493 &lt;p&gt;Programmet youtube-dl støtter også en rekke andre nettsteder, se
494 prosjektoversikten for
495 &lt;a href=&quot;http://rg3.github.io/youtube-dl/supportedsites.html&quot;&gt;en
496 komplett liste&lt;/a&gt;.&lt;/p&gt;
497 </description>
498 </item>
499
500 <item>
501 <title>Stortingsflertallet går inn for ny IP-basert sensurinfrastruktur i Norge</title>
502 <link>http://people.skolelinux.org/pere/blog/Stortingsflertallet_g_r_inn_for_ny_IP_basert_sensurinfrastruktur_i_Norge.html</link>
503 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Stortingsflertallet_g_r_inn_for_ny_IP_basert_sensurinfrastruktur_i_Norge.html</guid>
504 <pubDate>Tue, 24 Apr 2018 15:00:00 +0200</pubDate>
505 <description>&lt;p&gt;&lt;a href=&quot;https://www.vg.no/sport/i/J1g8zj/stortingsvedtak-snart-ip-blokkerer-utenlandske-spillselskaper&quot;&gt;VG&lt;/a&gt;,
506 &lt;a href=&quot;https://www.dagbladet.no/nyheter/stortinget-blokkerer-utenlandske-spillselskaper/69740219&quot;&gt;Dagbladet&lt;/a&gt;
507 og
508 &lt;a href=&quot;https://www.nrk.no/ostfold/tar-opp-kampen-mot-utenlandske-spillselskap-1.14021381&quot;&gt;NRK&lt;/a&gt;
509 melder i dag at flertallet i Familie- og kulturkomiteen på Stortinget
510 har bestemt seg for å introdusere en ny sensurinfrastruktur i Norge.
511 Fra før har Norge en «frivillig» sensurinfrastruktur basert på
512 DNS-navn, der de største ISP-ene basert på en liste med DNS-navn
513 forgifter DNS-svar og omdirigerer til et annet IP-nummer enn det som
514 ligger i DNS. Nå kommer altså IP-basert omdirigering i tillegg. Når
515 infrastrukturen er på plass, er sensur av IP-adresser redusert et
516 spørsmål om hvilke IP-nummer som skal blokkeres. Listen over
517 IP-adresser vil naturligvis endre seg etter hvert som myndighetene
518 endrer seg. Det er ingen betryggende tanke.&lt;/p&gt;
519 </description>
520 </item>
521
522 <item>
523 <title>En grunn til å takke nei til usikker digital post</title>
524 <link>http://people.skolelinux.org/pere/blog/En_grunn_til___takke_nei_til_usikker_digital_post.html</link>
525 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/En_grunn_til___takke_nei_til_usikker_digital_post.html</guid>
526 <pubDate>Mon, 2 Apr 2018 13:30:00 +0200</pubDate>
527 <description>&lt;p&gt;Brevpost er beskyttet av straffelovens bestemmelse som gjør det
528 kriminelt å åpne andres brev. Dette følger av (ny) straffelovs
529 &lt;a href=&quot;https://lovdata.no/dokument/NL/lov/2005-05-20-28205&quot;&gt;§ 205
530 (Krenkelse av retten til privat kommunikasjon)&lt;/a&gt;, som sier at «Med
531 bot eller fengsel inntil 2 år straffes den som uberettiget ... c)
532 åpner brev eller annen lukket skriftlig meddelelse som er adressert
533 til en annen, eller på annen måte skaffer seg uberettiget tilgang til
534 innholdet.» Dette gjelder såvel postbud som alle andre som har
535 befatning med brevet etter at avsender har befatning med et lukket
536 brev. Tilsvarende står også tidligere utgaver av den norske
537 straffeloven.&lt;/p&gt;
538
539 &lt;p&gt;Når en registrerer seg på usikre digitale postkasseløsningene, som
540 f.eks. Digipost og e-Boks, og slik tar disse i bruk, så gir en de som
541 står bak løsningene tillatelse til å åpne sine brev. Dette er
542 nødvendig for at innholdet i digital post skal kunne vises frem til
543 mottaker via tjenestens websider. Dermed gjelder ikke straffelovens
544 paragraf om forbud mot å åpne brev, da tilgangen ikke lenger er
545 uberettiget. En gir altså fremmede tilgang til å lese sin
546 korrespondanse. I tillegg vil bruk av slike usikre digitale
547 postbokser føre til at det blir registrert når du leser brevene, hvor
548 du befinner deg (vha. tilkoblingens IP-adresse), hvilket utstyr du
549 bruker og en rekke annen personlig informasjon som ikke er
550 tilgjengelig når papirpost brukes. Jeg foretrekker at det er
551 lovmessig beskyttelse av min korrespondanse, som jo inneholder privat
552 og personlig informasjon. Det bidrar til litt bedre vern av personlig
553 integritet i dagens norske samfunn.&lt;/p&gt;
554 </description>
555 </item>
556
557 <item>
558 <title>Self-appointed leaders of the Free World</title>
559 <link>http://people.skolelinux.org/pere/blog/Self_appointed_leaders_of_the_Free_World.html</link>
560 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Self_appointed_leaders_of_the_Free_World.html</guid>
561 <pubDate>Thu, 22 Mar 2018 11:00:00 +0100</pubDate>
562 <description>&lt;p&gt;The leaders of the worlds have started to congratulate the
563 re-elected Russian head of state, and this causes some criticism. I
564 am though a little fascinated by a comment from USA senator John McCain,
565 &lt;a href=&quot;http://thehill.com/homenews/senate/379339-mccain-rips-trumps-congratulatory-call-to-putin-as-insult-to-russian-people&quot;&gt;sited
566 by The Hill and others&lt;/a&gt;:
567
568 &lt;p&gt;&lt;blockquote&gt;
569 &lt;p&gt;&quot;An American president does not lead the Free World by
570 congratulating dictators on winning sham elections.&quot;&lt;/p&gt;
571 &lt;/blockquote&gt;&lt;/p&gt;
572
573 &lt;p&gt;While I totally agree with the senator here, the way the quote is
574 phrased make me suspect that he is unaware of the simple fact that USA
575 have not lead the Free World since at least before its government
576 &lt;a href=&quot;https://en.wikipedia.org/wiki/Maher_Arar&quot;&gt;kidnapped a
577 completely innocent Canadian citizen in transit on his way home to
578 Canada via John F. Kennedy International Airport in September 2002 and
579 sent him to be tortured in Syria for a year&lt;/a&gt;.&lt;/p&gt;
580
581 &lt;p&gt;USA might be running ahead, but the path they are taking is not the
582 one taken by any Free World.&lt;/p&gt;
583 </description>
584 </item>
585
586 <item>
587 <title>Facebooks ability to sell your personal information is the real Cambridge Analytica scandal</title>
588 <link>http://people.skolelinux.org/pere/blog/Facebooks_ability_to_sell_your_personal_information_is_the_real_Cambridge_Analytica_scandal.html</link>
589 <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Facebooks_ability_to_sell_your_personal_information_is_the_real_Cambridge_Analytica_scandal.html</guid>
590 <pubDate>Wed, 21 Mar 2018 16:30:00 +0100</pubDate>
591 <description>&lt;p&gt;So, Cambridge Analytica is getting some well deserved criticism for
592 (mis)using information it got from Facebook about 50 million people,
593 mostly in the USA. What I find a bit surprising, is how little
594 criticism Facebook is getting for handing the information over to
595 Cambridge Analytica and others in the first place. And what about the
596 people handing their private and personal information to Facebook?
597 And last, but not least, what about the government offices who are
598 handing information about the visitors of their web pages to Facebook?
599 No-one who looked at the terms of use of Facebook should be surprised
600 that information about peoples interests, political views, personal
601 lifes and whereabouts would be sold by Facebook.&lt;/p&gt;
602
603 &lt;p&gt;What I find to be the real scandal is the fact that Facebook is
604 selling your personal information, not that one of the buyers used it
605 in a way Facebook did not approve when exposed. It is well known that
606 Facebook is selling out their users privacy, but a scandal
607 nevertheless. Of course the information provided to them by Facebook
608 would be misused by one of the parties given access to personal
609 information about the millions of Facebook users. Collected
610 information will be misused sooner or later. The only way to avoid
611 such misuse, is to not collect the information in the first place. If
612 you do not want Facebook to hand out information about yourself for
613 the use and misuse of its customers, do not give Facebook the
614 information.&lt;/p&gt;
615
616 &lt;p&gt;Personally, I would recommend to completely remove your Facebook
617 account, and take back some control of your personal information.
618 &lt;a href=&quot;https://www.theguardian.com/technology/2018/mar/19/how-to-protect-your-facebook-privacy-or-delete-yourself-completely&quot;&gt;According
619 to The Guardian&lt;/a&gt;, it is a bit hard to find out how to request
620 account removal (and not just &#39;disabling&#39;). You need to
621 &lt;a href=&quot;https://www.facebook.com/help/224562897555674?helpref=faq_content&quot;&gt;visit
622 a specific Facebook page&lt;/a&gt; and click on &#39;let us know&#39; on that page
623 to get to &lt;a href=&quot;https://www.facebook.com/help/delete_account&quot;&gt;the
624 real account deletion screen&lt;/a&gt;. Perhaps something to consider? I
625 would not trust the information to really be deleted (who knows,
626 perhaps NSA, GCHQ and FRA already got a copy), but it might reduce the
627 exposure a bit.&lt;/p&gt;
628
629 &lt;p&gt;If you want to learn more about the capabilities of Cambridge
630 Analytica, I recommend to see the video recording of the one hour talk
631 Paul-Olivier Dehaye gave to &lt;a href=&quot;&quot;&gt;NUUG&lt;/a&gt; last april about
632 &lt;a href=&quot;https://www.nuug.no/aktiviteter/20170404-big-data-psychometric/&quot;&gt;
633 Data collection, psychometric profiling and their impact on
634 politics&lt;/a&gt;.&lt;/p&gt;
635
636 &lt;p&gt;And if you want to communicate with your friends and loved ones,
637 use some end-to-end encrypted method like
638 &lt;a href=&quot;https://www.signal.org/&quot;&gt;Signal&lt;/a&gt; or
639 &lt;a href=&quot;https://ring.cx/&quot;&gt;Ring&lt;/a&gt;, and stop sharing your private
640 messages with strangers like Facebook and Google.&lt;/p&gt;
641 </description>
642 </item>
643
644 </channel>
645 </rss>