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">
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" />
10 <title>Simple streaming the Linux desktop to Kodi using GStreamer and RTP
</title>
11 <link>http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html
</guid>
13 <pubDate>Thu,
12 Jul
2018 17:
55:
00 +
0200</pubDate>
14 <description><p
>Last night, I wrote
15 <a href=
"http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
">a
16 recipe to stream a Linux desktop using VLC to a instance of Kodi
</a
>.
17 During the day I received valuable feedback, and thanks to the
18 suggestions I have been able to rewrite the recipe into a much simpler
19 approach requiring no setup at all. It is a single script that take
20 care of it all.
</p
>
22 <p
>This new script uses GStreamer instead of VLC to capture the
23 desktop and stream it to Kodi. This fixed the video quality issue I
24 saw initially. It further removes the need to add a m3u file on the
25 Kodi machine, as it instead connects to
26 <a href=
"https://kodi.wiki/view/JSON-RPC_API/v8
">the JSON-RPC API in
27 Kodi
</a
> and simply ask Kodi to play from the stream created using
28 GStreamer. Streaming the desktop to Kodi now become trivial. Copy
29 the script below, run it with the DNS name or IP address of the kodi
30 server to stream to as the only argument, and watch your screen show
31 up on the Kodi screen. Note, it depend on multicast on the local
32 network, so if you need to stream outside the local network, the
33 script must be modified. Also note, I have no idea if audio work, as
34 I only care about the picture part.
</p
>
36 <blockquote
><pre
>
39 # Stream the Linux desktop view to Kodi. See
40 # http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
41 # for backgorund information.
43 # Make sure the stream is stopped in Kodi and the gstreamer process is
44 # killed if something go wrong (for example if curl is unable to find the
45 # kodi server). Do the same when interrupting this script.
50 curl --silent --header
'Content-Type: application/json
' \
51 --data-binary
"{ \
"id\
":
1, \
"jsonrpc\
": \
"2.0\
", \
"method\
": \
"$cmd\
", \
"params\
": $params }
" \
52 "http://$host/jsonrpc
"
55 if [ -n
"$kodihost
" ] ; then
56 # Stop the playing when we end
57 playerid=$(kodicmd
"$kodihost
" Player.GetActivePlayers
"{}
" |
58 jq .result[].playerid)
59 kodicmd
"$kodihost
" Player.Stop
"{ \
"playerid\
" : $playerid }
" > /dev/null
61 if [
"$gstpid
" ]
&& kill -
0 "$gstpid
" >/dev/null
2>&1; then
62 kill
"$gstpid
"
67 if [ -n
"$
1" ]; then
78 pasrc=$(pactl list | grep -A2
'Source #
' | grep
'Name: .*\.monitor$
' | \
79 cut -d
" " -f2|head -
1)
80 gst-launch-
1.0 ximagesrc use-damage=
0 ! video/x-raw,framerate=
30/
1 ! \
81 videoconvert ! queue2 ! \
82 x264enc bitrate=
8000 speed-preset=superfast tune=zerolatency qp-min=
30 \
83 key-int-max=
15 bframes=
2 ! video/x-h264,profile=high ! queue2 ! \
84 mpegtsmux alignment=
7 name=mux ! rndbuffersize max=
1316 min=
1316 ! \
85 udpsink host=$mcast port=$mcastport ttl-mc=$mcastttl auto-multicast=
1 sync=
0 \
86 pulsesrc device=$pasrc ! audioconvert ! queue2 ! avenc_aac ! queue2 ! mux. \
87 > /dev/null
2>&1 &
90 # Give stream a second to get going
93 # Ask kodi to start streaming using its JSON-RPC API
94 kodicmd
"$kodihost
" Player.Open \
95 "{\
"item\
": { \
"file\
": \
"udp://@$mcast:$mcastport\
" } }
" > /dev/null
98 wait
"$gstpid
"
99 </pre
></blockquote
>
101 <p
>I hope you find the approach useful. I know I do.
</p
>
103 <p
>As usual, if you use Bitcoin and want to show your support of my
104 activities, please send Bitcoin donations to my address
105 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
110 <title>Streaming the Linux desktop to Kodi using VLC and RTSP
</title>
111 <link>http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
</link>
112 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
</guid>
113 <pubDate>Thu,
12 Jul
2018 02:
00:
00 +
0200</pubDate>
114 <description><p
>A while back, I was asked by a friend how to stream the desktop to
115 my projector connected to Kodi. I sadly had to admit that I had no
116 idea, as it was a task I never had tried. Since then, I have been
117 looking for a way to do so, preferable without much extra software to
118 install on either side. Today I found a way that seem to kind of
119 work. Not great, but it is a start.
</p
>
121 <p
>I had a look at several approaches, for example
122 <a href=
"https://github.com/mfoetsch/dlna_live_streaming
">using uPnP
123 DLNA as described in
2011</a
>, but it required a uPnP server, fuse and
124 local storage enough to store the stream locally. This is not going
125 to work well for me, lacking enough free space, and it would
126 impossible for my friend to get working.
</p
>
128 <p
>Next, it occurred to me that perhaps I could use VLC to create a
129 video stream that Kodi could play. Preferably using
130 broadcast/multicast, to avoid having to change any setup on the Kodi
131 side when starting such stream. Unfortunately, the only recipe I
132 could find using multicast used the rtp protocol, and this protocol
133 seem to not be supported by Kodi.
</p
>
135 <p
>On the other hand, the rtsp protocol is working! Unfortunately I
136 have to specify the IP address of the streaming machine in both the
137 sending command and the file on the Kodi server. But it is showing my
138 desktop, and thus allow us to have a shared look on the big screen at
139 the programs I work on.
</p
>
141 <p
>I did not spend much time investigating codeces. I combined the
142 rtp and rtsp recipes from
143 <a href=
"https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/
">the
144 VLC Streaming HowTo/Command Line Examples
</a
>, and was able to get
145 this working on the desktop/streaming end.
</p
>
147 <blockquote
><pre
>
148 vlc screen:// --sout \
149 '#transcode{vcodec=mp4v,acodec=mpga,vb=
800,ab=
128}:rtp{dst=projector.local,port=
1234,sdp=rtsp://
192.168.11.4:
8080/test.sdp}
'
150 </pre
></blockquote
>
152 <p
>I ssh-ed into my Kodi box and created a file like this with the
153 same IP address:
</p
>
155 <blockquote
><pre
>
156 echo rtsp://
192.168.11.4:
8080/test.sdp \
157 > /storage/videos/screenstream.m3u
158 </pre
></blockquote
>
160 <p
>Note the
192.168.11.4 IP address is my desktops IP address. As far
161 as I can tell the IP must be hardcoded for this to work. In other
162 words, if someone elses machine is going to do the steaming, you have
163 to update screenstream.m3u on the Kodi machine and adjust the vlc
164 recipe. To get started, locate the file in Kodi and select the m3u
165 file while the VLC stream is running. The desktop then show up in my
166 big screen. :)
</p
>
168 <p
>When using the same technique to stream a video file with audio,
169 the audio quality is really bad. No idea if the problem is package
170 loss or bad parameters for the transcode. I do not know VLC nor Kodi
171 enough to tell.
</p
>
173 <p
><strong
>Update
2018-
07-
12</strong
>: Johannes Schauer send me a few
174 succestions and reminded me about an important step. The
"screen:
"
175 input source is only available once the vlc-plugin-access-extra
176 package is installed on Debian. Without it, you will see this error
177 message:
"VLC is unable to open the MRL
'screen://
'. Check the log
178 for details.
" He further found that it is possible to drop some parts
179 of the VLC command line to reduce the amount of hardcoded information.
180 It is also useful to consider using cvlc to avoid having the VLC
181 window in the desktop view. In sum, this give us this command line on
184 <blockquote
><pre
>
185 cvlc screen:// --sout \
186 '#transcode{vcodec=mp4v,acodec=mpga,vb=
800,ab=
128}:rtp{sdp=rtsp://:
8080/}
'
187 </pre
></blockquote
>
189 <p
>and this on the Kodi end
<p
>
191 <blockquote
><pre
>
192 echo rtsp://
192.168.11.4:
8080/ \
193 > /storage/videos/screenstream.m3u
194 </pre
></blockquote
>
196 <p
>Still bad image quality, though. But I did discover that streaming
197 a DVD using dvdsimple:///dev/dvd as the source had excellent video and
198 audio quality, so I guess the issue is in the input or transcoding
199 parts, not the rtsp part. I
've tried to change the vb and ab
200 parameters to use more bandwidth, but it did not make a
201 difference.
</p
>
203 <p
>I further received a suggestion from Einar Haraldseid to try using
204 gstreamer instead of VLC, and this proved to work great! He also
205 provided me with the trick to get Kodi to use a multicast stream as
206 its source. By using this monstrous oneliner, I can stream my desktop
207 with good video quality in reasonable framerate to the
239.255.0.1
208 multicast address on port
1234:
210 <blockquote
><pre
>
211 gst-launch-
1.0 ximagesrc use-damage=
0 ! video/x-raw,framerate=
30/
1 ! \
212 videoconvert ! queue2 ! \
213 x264enc bitrate=
8000 speed-preset=superfast tune=zerolatency qp-min=
30 \
214 key-int-max=
15 bframes=
2 ! video/x-h264,profile=high ! queue2 ! \
215 mpegtsmux alignment=
7 name=mux ! rndbuffersize max=
1316 min=
1316 ! \
216 udpsink host=
239.255.0.1 port=
1234 ttl-mc=
1 auto-multicast=
1 sync=
0 \
217 pulsesrc device=$(pactl list | grep -A2
'Source #
' | \
218 grep
'Name: .*\.monitor$
' | cut -d
" " -f2|head -
1) ! \
219 audioconvert ! queue2 ! avenc_aac ! queue2 ! mux.
220 </pre
></blockquote
>
222 <p
>and this on the Kodi end
<p
>
224 <blockquote
><pre
>
225 echo udp://@
239.255.0.1:
1234 \
226 > /storage/videos/screenstream.m3u
227 </pre
></blockquote
>
229 <p
>Note the trick to pick a valid pulseaudio source. It might not
230 pick the one you need. This approach will of course lead to trouble
231 if more than one source uses the same multicast port and address.
232 Note the ttl-mc=
1 setting, which limit the multicast packages to the
233 local network. If the value is increased, your screen will be
234 broadcasted further, one network
"hop
" for each increase (read up on
235 multicast to learn more. :)!
</p
>
237 <p
>Having cracked how to get Kodi to receive multicast streams, I
238 could use this VLC command to stream to the same multicast address.
239 The image quality is way better than the rtsp approach, but gstreamer
240 seem to be doing a better job.
</p
>
242 <blockquote
><pre
>
243 cvlc screen:// --sout
'#transcode{vcodec=mp4v,acodec=mpga,vb=
800,ab=
128}:rtp{mux=ts,dst=
239.255.0.1,port=
1234,sdp=sap}
'
244 </pre
></blockquote
>
246 <p
>As usual, if you use Bitcoin and want to show your support of my
247 activities, please send Bitcoin donations to my address
248 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
253 <title>What is the most supported MIME type in Debian in
2018?
</title>
254 <link>http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html
</link>
255 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html
</guid>
256 <pubDate>Mon,
9 Jul
2018 08:
05:
00 +
0200</pubDate>
257 <description><p
>Five years ago,
258 <a href=
"http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html
">I
259 measured what the most supported MIME type in Debian was
</a
>, by
260 analysing the desktop files in all packages in the archive. Since
261 then, the DEP-
11 AppStream system has been put into production, making
262 the task a lot easier. This made me want to repeat the measurement,
263 to see how much things changed. Here are the new numbers, for
264 unstable only this time:
266 <p
><strong
>Debian Unstable:
</strong
></p
>
270 ----- -----------------------
282 30 audio/x-vorbis+ogg
283 29 image/x-portable-pixmap
285 27 image/x-portable-bitmap
293 <p
>The list was created like this using a sid chroot:
"cat
294 /var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz| zcat | awk
'/^
295 - \S+\/\S+$/ {print $
2 }
' | sort | uniq -c | sort -nr | head -
20"</p
>
297 <p
>It is interesting to see how image formats have passed text/plain
298 as the most announced supported MIME type. These days, thanks to the
299 AppStream system, if you run into a file format you do not know, and
300 want to figure out which packages support the format, you can find the
301 MIME type of the file using
"file --mime
&lt;filename
&gt;
", and then
302 look up all packages announcing support for this format in their
303 AppStream metadata (XML or .desktop file) using
"appstreamcli
304 what-provides mimetype
&lt;mime-type
&gt;. For example if you, like
305 me, want to know which packages support inode/directory, you can get a
306 list like this:
</p
>
308 <p
><blockquote
><pre
>
309 % appstreamcli what-provides mimetype inode/directory | grep Package: | sort
316 Package: doublecmd-common
318 Package: enlightenment
338 </pre
></blockquote
></p
>
340 <p
>Using the same method, I can quickly discover that the Sketchup file
341 format is not yet supported by any package in Debian:
</p
>
343 <p
><blockquote
><pre
>
344 % appstreamcli what-provides mimetype application/vnd.sketchup.skp
345 Could not find component providing
'mimetype::application/vnd.sketchup.skp
'.
347 </pre
></blockquote
></p
>
349 <p
>Yesterday I used it to figure out which packages support the STL
3D
352 <p
><blockquote
><pre
>
353 % appstreamcli what-provides mimetype application/sla|grep Package
358 </pre
></blockquote
></p
>
360 <p
>PS: A new version of Cura was uploaded to Debian yesterday.
</p
>
362 <p
>As usual, if you use Bitcoin and want to show your support of my
363 activities, please send Bitcoin donations to my address
364 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
369 <title>Debian APT upgrade without enough free space on the disk...
</title>
370 <link>http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html
</link>
371 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html
</guid>
372 <pubDate>Sun,
8 Jul
2018 12:
10:
00 +
0200</pubDate>
373 <description><p
>Quite regularly, I let my Debian Sid/Unstable chroot stay untouch
374 for a while, and when I need to update it there is not enough free
375 space on the disk for apt to do a normal
'apt upgrade
'. I normally
376 would resolve the issue by doing
'apt install
&lt;somepackages
&gt;
' to
377 upgrade only some of the packages in one batch, until the amount of
378 packages to download fall below the amount of free space available.
379 Today, I had about
500 packages to upgrade, and after a while I got
380 tired of trying to install chunks of packages manually. I concluded
381 that I did not have the spare hours required to complete the task, and
382 decided to see if I could automate it. I came up with this small
383 script which I call
'apt-in-chunks
':
</p
>
385 <p
><blockquote
><pre
>
388 # Upgrade packages when the disk is too full to upgrade every
389 # upgradable package in one lump. Fetching packages to upgrade using
390 # apt, and then installing using dpkg, to avoid changing the package
391 # flag for manual/automatic.
396 if [
"$
1" ]; then
397 grep -v
"$
1"
403 for p in $(apt list --upgradable | ignore
"$@
" |cut -d/ -f1 | grep -v
'^Listing...
'); do
404 echo
"Upgrading $p
"
406 apt install --download-only -y $p
407 for f in /var/cache/apt/archives/*.deb; do
408 if [ -e
"$f
" ]; then
409 dpkg -i /var/cache/apt/archives/*.deb
414 </pre
></blockquote
></p
>
416 <p
>The script will extract the list of packages to upgrade, try to
417 download the packages needed to upgrade one package, install the
418 downloaded packages using dpkg. The idea is to upgrade packages
419 without changing the APT mark for the package (ie the one recording of
420 the package was manually requested or pulled in as a dependency). To
421 use it, simply run it as root from the command line. If it fail, try
422 'apt install -f
' to clean up the mess and run the script again. This
423 might happen if the new packages conflict with one of the old
424 packages. dpkg is unable to remove, while apt can do this.
</p
>
426 <p
>It take one option, a package to ignore in the list of packages to
427 upgrade. The option to ignore a package is there to be able to skip
428 the packages that are simply too large to unpack. Today this was
429 'ghc
', but I have run into other large packages causing similar
430 problems earlier (like TeX).
</p
>
432 <p
>Update
2018-
07-
08: Thanks to Paul Wise, I am aware of two
433 alternative ways to handle this. The
"unattended-upgrades
434 --minimal-upgrade-steps
" option will try to calculate upgrade sets for
435 each package to upgrade, and then upgrade them in order, smallest set
436 first. It might be a better option than my above mentioned script.
437 Also,
"aptutude upgrade
" can upgrade single packages, thus avoiding
438 the need for using
"dpkg -i
" in the script above.
</p
>
440 <p
>As usual, if you use Bitcoin and want to show your support of my
441 activities, please send Bitcoin donations to my address
442 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
447 <title>The worlds only stone power plant?
</title>
448 <link>http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html
</link>
449 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html
</guid>
450 <pubDate>Sat,
30 Jun
2018 10:
35:
00 +
0200</pubDate>
451 <description><p
>So far, at least hydro-electric power, coal power, wind power,
452 solar power, and wood power are well known. Until a few days ago, I
453 had never heard of stone power. Then I learn about a quarry in a
455 <a href=
"https://en.wikipedia.org/wiki/Bremanger
">Bremanger
</a
> i
457 <a href=
"https://www.bontrup.com/en/activities/raw-materials/bremanger-quarry/
">the
458 Bremanger Quarry
</a
> company is extracting stone and dumping the stone
459 into a shaft leading to its shipping harbour. This downward movement
460 in this shaft is used to produce electricity. In short, it is using
461 falling rocks instead of falling water to produce electricity, and
462 according to its own statements it is producing more power than it is
463 using, and selling the surplus electricity to the Norwegian power
464 grid. I find the concept truly amazing. Is this the worlds only
465 stone power plant?
</p
>
467 <p
>As usual, if you use Bitcoin and want to show your support of my
468 activities, please send Bitcoin donations to my address
469 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
474 <title>Add-on to control the projector from within Kodi
</title>
475 <link>http://people.skolelinux.org/pere/blog/Add_on_to_control_the_projector_from_within_Kodi.html
</link>
476 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Add_on_to_control_the_projector_from_within_Kodi.html
</guid>
477 <pubDate>Tue,
26 Jun
2018 23:
55:
00 +
0200</pubDate>
478 <description><p
>My movie playing setup involve
<a href=
"https://kodi.tv/
">Kodi
</a
>,
479 <a href=
"https://openelec.tv
">OpenELEC
</a
> (probably soon to be
480 replaced with
<a href=
"https://libreelec.tv/
">LibreELEC
</a
>) and an
481 Infocus IN76 video projector. My projector can be controlled via both
482 a infrared remote controller, and a RS-
232 serial line. The vendor of
483 my projector,
<a href=
"https://www.infocus.com/
">InFocus
</a
>, had been
484 sensible enough to document the serial protocol in its user manual, so
485 it is easily available, and I used it some years ago to write
486 <a href=
"https://github.com/petterreinholdtsen/infocus-projector-control
">a
487 small script to control the projector
</a
>. For a while now, I longed
488 for a setup where the projector was controlled by Kodi, for example in
489 such a way that when the screen saver went on, the projector was
490 turned off, and when the screen saver exited, the projector was turned
493 <p
>A few days ago, with very good help from parts of my family, I
494 managed to find a Kodi Add-on for controlling a Epson projector, and
495 got in touch with its author to see if we could join forces and make a
496 Add-on with support for several projectors. To my pleasure, he was
497 positive to the idea, and we set out to add InFocus support to his
498 add-on, and make the add-on suitable for the official Kodi add-on
499 repository.
</p
>
501 <p
>The Add-on is now working (for me, at least), with a few minor
502 adjustments. The most important change I do relative to the master
503 branch in the github repository is embedding the
504 <a href=
"https://github.com/pyserial/pyserial
">pyserial module
</a
> in
505 the add-on. The long term solution is to make a
"script
" type
506 pyserial module for Kodi, that can be pulled in as a dependency in
507 Kodi. But until that in place, I embed it.
</p
>
509 <p
>The add-on can be configured to turn on the projector when Kodi
510 starts, off when Kodi stops as well as turn the projector off when the
511 screensaver start and on when the screesaver stops. It can also be
512 told to set the projector source when turning on the projector.
514 <p
>If this sound interesting to you, check out
515 <a href=
"https://github.com/fredrik-eriksson/kodi_projcontrol
">the
516 project github repository
</a
>. Perhaps you can send patches to
517 support your projector too? As soon as we find time to wrap up the
518 latest changes, it should be available for easy installation using any
519 Kodi instance.
</p
>
521 <p
>For future improvements, I would like to add projector model
522 detection and the ability to adjust the brightness level of the
523 projector from within Kodi. We also need to figure out how to handle
524 the cooling period of the projector. My projector refuses to turn on
525 for
60 seconds after it was turned off. This is not handled well by
526 the add-on at the moment.
</p
>
528 <p
>As usual, if you use Bitcoin and want to show your support of my
529 activities, please send Bitcoin donations to my address
530 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
535 <title>youtube-dl for nedlasting fra NRK med undertekster - nice free software
</title>
536 <link>http://people.skolelinux.org/pere/blog/youtube_dl_for_nedlasting_fra_NRK_med_undertekster___nice_free_software.html
</link>
537 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/youtube_dl_for_nedlasting_fra_NRK_med_undertekster___nice_free_software.html
</guid>
538 <pubDate>Sat,
28 Apr
2018 10:
30:
00 +
0200</pubDate>
539 <description><p
>I
<a href=
"https://no.wikipedia.org/wiki/VHS
">VHS-kassettenes
</a
>
540 tid var det rett frem å ta vare på et TV-program en ønsket å kunne se
541 senere, uten å være avhengig av at programmet ble sendt på nytt.
542 Kanskje ønsket en å se programmet på hytten der det ikke var
543 TV-signal, eller av andre grunner ha det tilgjengelig for fremtidig
544 fornøyelse. Dette er blitt vanskeligere med introduksjon av
545 digital-TV og webstreaming, der opptak til harddisk er utenfor de
546 flestes kontroll hvis de bruker ufri programvare og bokser kontrollert
547 av andre. Men for NRK her i Norge, finnes det heldigvis flere fri
548 programvare-alternativer, som jeg har
549 <a href=
"http://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK.html
">skrevet
</a
>
550 <a href=
"http://people.skolelinux.org/pere/blog/Hvordan_enkelt_laste_ned_filmer_fra_NRK_med_den__nye__l_sningen.html
">om
</a
>
551 <a href=
"http://people.skolelinux.org/pere/blog/Nedlasting_fra_NRK__som_Matroska_med_undertekster.html
">før
</a
>.
552 Så lenge kilden for nedlastingen er lovlig lagt ut på nett (hvilket
553 jeg antar NRK gjør), så er slik lagring til privat bruk også lovlig i
556 <p
>Sist jeg så på saken, i
2016, nevnte jeg at
557 <a href=
"https://rg3.github.com/youtube-dl/
">youtube-dl
</a
> ikke kunne
558 bake undertekster fra NRK inn i videofilene, og at jeg derfor
559 foretrakk andre alternativer. Nylig oppdaget jeg at dette har endret
560 seg. Fordelen med youtube-dl er at den er tilgjengelig direkte fra
561 Linux-distribusjoner som
<a href=
"https://www.debian.org/
">Debian
</a
>
562 og
<a href=
"https://www.ubuntu.com/
">Ubuntu
</a
>, slik at en slipper å
563 finne ut selv hvordan en skal få dem til å virke.
</p
>
565 <p
>For å laste ned et NRK-innslag med undertekster, og få den norske
566 underteksten pakket inn i videofilen, så kan følgende kommando
570 youtube-dl --write-sub --sub-format ttml \
571 --convert-subtitles srt --embed-subs \
572 https://tv.nrk.no/serie/ramm-ferdig-gaa/MUHU11000316/
27-
04-
2018
573 </pre
></p
>
575 <p
>URL-eksemplet er dagens toppsak på tv.nrk.no. Resultatet er en
576 MP4-fil med filmen og undertekster som kan spilles av med VLC. Merk
577 at VLC ikke viser frem undertekster før du aktiverer dem. For å gjøre
578 det, høyreklikk med musa i fremviservinduet, velg menyvalget for
579 undertekst og så norsk språk. Jeg testet også
'--write-auto-sub
',
580 men det kommandolinjeargumentet ser ikke ut til å fungere, så jeg
581 endte opp med settet med argumentlisten over, som jeg fant i en
582 feilrapport i youtube-dl-prosjektets samling over feilrapporter.
</p
>
584 <p
>Denne støtten i youtube-dl gjør det svært enkelt å lagre
585 NRK-innslag, det være seg nyheter, filmer, serier eller dokumentater,
586 for å ha dem tilgjengelig for fremtidig referanse og bruk, uavhengig
587 av hvor lenge innslagene ligger tilgjengelig hos NRK. Så får det ikke
588 hjelpe at NRKs jurister mener at det er
589 <a href=
"http://people.skolelinux.org/pere/blog/Best___ikke_fortelle_noen_at_streaming_er_nedlasting___.html
">vesensforskjellig
590 å legge tilgjengelig for nedlasting og for streaming
</a
>, når det rent
591 teknisk er samme sak.
</p
>
593 <p
>Programmet youtube-dl støtter også en rekke andre nettsteder, se
594 prosjektoversikten for
595 <a href=
"http://rg3.github.io/youtube-dl/supportedsites.html
">en
596 komplett liste
</a
>.
</p
>
601 <title>Stortingsflertallet går inn for ny IP-basert sensurinfrastruktur i Norge
</title>
602 <link>http://people.skolelinux.org/pere/blog/Stortingsflertallet_g_r_inn_for_ny_IP_basert_sensurinfrastruktur_i_Norge.html
</link>
603 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Stortingsflertallet_g_r_inn_for_ny_IP_basert_sensurinfrastruktur_i_Norge.html
</guid>
604 <pubDate>Tue,
24 Apr
2018 15:
00:
00 +
0200</pubDate>
605 <description><p
><a href=
"https://www.vg.no/sport/i/J1g8zj/stortingsvedtak-snart-ip-blokkerer-utenlandske-spillselskaper
">VG
</a
>,
606 <a href=
"https://www.dagbladet.no/nyheter/stortinget-blokkerer-utenlandske-spillselskaper/
69740219">Dagbladet
</a
>
608 <a href=
"https://www.nrk.no/ostfold/tar-opp-kampen-mot-utenlandske-spillselskap-
1.14021381">NRK
</a
>
609 melder i dag at flertallet i Familie- og kulturkomiteen på Stortinget
610 har bestemt seg for å introdusere en ny sensurinfrastruktur i Norge.
611 Fra før har Norge en «frivillig» sensurinfrastruktur basert på
612 DNS-navn, der de største ISP-ene basert på en liste med DNS-navn
613 forgifter DNS-svar og omdirigerer til et annet IP-nummer enn det som
614 ligger i DNS. Nå kommer altså IP-basert omdirigering i tillegg. Når
615 infrastrukturen er på plass, er sensur av IP-adresser redusert et
616 spørsmål om hvilke IP-nummer som skal blokkeres. Listen over
617 IP-adresser vil naturligvis endre seg etter hvert som myndighetene
618 endrer seg. Det er ingen betryggende tanke.
</p
>
623 <title>En grunn til å takke nei til usikker digital post
</title>
624 <link>http://people.skolelinux.org/pere/blog/En_grunn_til___takke_nei_til_usikker_digital_post.html
</link>
625 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/En_grunn_til___takke_nei_til_usikker_digital_post.html
</guid>
626 <pubDate>Mon,
2 Apr
2018 13:
30:
00 +
0200</pubDate>
627 <description><p
>Brevpost er beskyttet av straffelovens bestemmelse som gjør det
628 kriminelt å åpne andres brev. Dette følger av (ny) straffelovs
629 <a href=
"https://lovdata.no/dokument/NL/lov/
2005-
05-
20-
28/§
205">§
205
630 (Krenkelse av retten til privat kommunikasjon)
</a
>, som sier at «Med
631 bot eller fengsel inntil
2 år straffes den som uberettiget ... c)
632 åpner brev eller annen lukket skriftlig meddelelse som er adressert
633 til en annen, eller på annen måte skaffer seg uberettiget tilgang til
634 innholdet.» Dette gjelder såvel postbud som alle andre som har
635 befatning med brevet etter at avsender har befatning med et lukket
636 brev. Tilsvarende står også tidligere utgaver av den norske
637 straffeloven.
</p
>
639 <p
>Når en registrerer seg på usikre digitale postkasseløsningene, som
640 f.eks. Digipost og e-Boks, og slik tar disse i bruk, så gir en de som
641 står bak løsningene tillatelse til å åpne sine brev. Dette er
642 nødvendig for at innholdet i digital post skal kunne vises frem til
643 mottaker via tjenestens websider. Dermed gjelder ikke straffelovens
644 paragraf om forbud mot å åpne brev, da tilgangen ikke lenger er
645 uberettiget. En gir altså fremmede tilgang til å lese sin
646 korrespondanse. I tillegg vil bruk av slike usikre digitale
647 postbokser føre til at det blir registrert når du leser brevene, hvor
648 du befinner deg (vha. tilkoblingens IP-adresse), hvilket utstyr du
649 bruker og en rekke annen personlig informasjon som ikke er
650 tilgjengelig når papirpost brukes. Jeg foretrekker at det er
651 lovmessig beskyttelse av min korrespondanse, som jo inneholder privat
652 og personlig informasjon. Det bidrar til litt bedre vern av personlig
653 integritet i dagens norske samfunn.
</p
>
658 <title>Self-appointed leaders of the Free World
</title>
659 <link>http://people.skolelinux.org/pere/blog/Self_appointed_leaders_of_the_Free_World.html
</link>
660 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Self_appointed_leaders_of_the_Free_World.html
</guid>
661 <pubDate>Thu,
22 Mar
2018 11:
00:
00 +
0100</pubDate>
662 <description><p
>The leaders of the worlds have started to congratulate the
663 re-elected Russian head of state, and this causes some criticism. I
664 am though a little fascinated by a comment from USA senator John McCain,
665 <a href=
"http://thehill.com/homenews/senate/
379339-mccain-rips-trumps-congratulatory-call-to-putin-as-insult-to-russian-people
">sited
666 by The Hill and others
</a
>:
668 <p
><blockquote
>
669 <p
>"An American president does not lead the Free World by
670 congratulating dictators on winning sham elections.
"</p
>
671 </blockquote
></p
>
673 <p
>While I totally agree with the senator here, the way the quote is
674 phrased make me suspect that he is unaware of the simple fact that USA
675 have not lead the Free World since at least before its government
676 <a href=
"https://en.wikipedia.org/wiki/Maher_Arar
">kidnapped a
677 completely innocent Canadian citizen in transit on his way home to
678 Canada via John F. Kennedy International Airport in September
2002 and
679 sent him to be tortured in Syria for a year
</a
>.
</p
>
681 <p
>USA might be running ahead, but the path they are taking is not the
682 one taken by any Free World.
</p
>