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>Using the Kodi API to play Youtube videos
</title>
11 <link>http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html
</link>
12 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html
</guid>
13 <pubDate>Sun,
2 Sep
2018 23:
40:
00 +
0200</pubDate>
14 <description><p
>I continue to explore my Kodi installation, and today I wanted to
15 tell it to play a youtube URL I received in a chat, without having to
16 insert search terms using the on-screen keyboard. After searching the
17 web for API access to the Youtube plugin and testing a bit, I managed
18 to find a recipe that worked. If you got a kodi instance with its API
19 available from http://kodihost/jsonrpc, you can try the following to
20 have check out a nice cover band.
</p
>
22 <p
><blockquote
><pre
>curl --silent --header
'Content-Type: application/json
' \
23 --data-binary
'{
"id
":
1,
"jsonrpc
":
"2.0",
"method
":
"Player.Open
",
24 "params
": {
"item
": {
"file
":
25 "plugin://plugin.video.youtube/play/?video_id=LuRGVM9O0qg
" } } }
' \
26 http://projector.local/jsonrpc
</pre
></blockquote
></p
>
28 <p
>I
've extended kodi-stream program to take a video source as its
29 first argument. It can now handle direct video links, youtube links
30 and
'desktop
' to stream my desktop to Kodi. It is almost like a
31 Chromecast. :)
</p
>
33 <p
>As usual, if you use Bitcoin and want to show your support of my
34 activities, please send Bitcoin donations to my address
35 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
40 <title>Software created using taxpayers’ money should be Free Software
</title>
41 <link>http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html
</link>
42 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Software_created_using_taxpayers__money_should_be_Free_Software.html
</guid>
43 <pubDate>Thu,
30 Aug
2018 13:
50:
00 +
0200</pubDate>
44 <description><p
>It might seem obvious that software created using tax money should
45 be available for everyone to use and improve. Free Software
46 Foundation Europe recentlystarted a campaign to help get more people
47 to understand this, and I just signed the petition on
48 <a href=
"https://publiccode.eu/
">Public Money, Public Code
</a
> to help
49 them. I hope you too will do the same.
</p
>
54 <title>A bit more on privacy respecting health monitor / fitness tracker
</title>
55 <link>http://people.skolelinux.org/pere/blog/A_bit_more_on_privacy_respecting_health_monitor___fitness_tracker.html
</link>
56 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/A_bit_more_on_privacy_respecting_health_monitor___fitness_tracker.html
</guid>
57 <pubDate>Mon,
13 Aug
2018 09:
00:
00 +
0200</pubDate>
58 <description><p
>A few days ago, I wondered if there are any privacy respecting
59 health monitors and/or fitness trackers available for sale these days.
60 I would like to buy one, but do not want to share my personal data
61 with strangers, nor be forced to have a mobile phone to get data out
62 of the unit. I
've received some ideas, and would like to share them
65 One interesting data point was a pointer to a Free Software app for
67 <a href=
"https://github.com/Freeyourgadget/Gadgetbridge/
">Gadgetbridge
</a
>.
68 It provide cloudless collection and storing of data from a variety of
70 <a href=
"https://github.com/Freeyourgadget/Gadgetbridge/#supported-devices
">list
71 of supported devices
</a
> is a good indicator for units where the
72 protocol is fairly open, as it is obviously being handled by Free
73 Software. Other units are reportedly encrypting the collected
74 information with their own public key, making sure only the vendor
75 cloud service is able to extract data from the unit. The people
76 contacting me about Gadgetbirde said they were using
77 <a href=
"https://us.amazfit.com/shop/bip?variant=
336750">Amazfit
79 <a href=
"http://www.xiaomimi6phone.com/xiaomi-mi-band-
3-features-release-date-rumors/
">Xiaomi
80 Band
3</a
>.
</p
>
82 <p
>I also got a suggestion to look at some of the units from Garmin.
83 I was told their GPS watches can be connected via USB and show up as a
84 USB storage device with
85 <a href=
"https://www.gpsbabel.org/htmldoc-development/fmt_garmin_fit.html
">Garmin
86 FIT files
</a
> containing the collected measurements. While
87 proprietary, FIT files apparently can be read at least by
88 <a href=
"https://www.gpsbabel.org
">GPSBabel
</a
> and the
89 <a href=
"https://apps.nextcloud.com/apps/gpxpod
">GpxPod
</a
> Nextcloud
90 app. It is unclear to me if they can read step count and heart rate
91 data. The person I talked to was using a
92 <a href=
"https://buy.garmin.com/en-US/US/p/
564291">Garmin Forerunner
93 935</a
>, which is a fairly expensive unit. I doubt it is worth it for
94 a unit where the vendor clearly is trying its best to move from open
95 to closed systems. I still remember when Garmin dropped NMEA support
96 in its GPSes.
</p
>
98 <p
>A final idea was to build ones own unit, perhaps by basing it on a
99 wearable hardware platforms like
100 <a href=
"https://learn.adafruit.com/flora-geo-watch
">the Flora Geo
101 Watch
</a
>. Sound like fun, but I had more money than time to spend on
102 the topic, so I suspect it will have to wait for another time.
</p
>
104 <p
>While I was working on tracking down links, I came across an
105 inspiring TED talk by Dave Debronkart about
106 <a href=
"https://archive.org/details/DavedeBronkart_2010X
">being a
107 e-patient
</a
>, and discovered the web site
108 <a href=
"https://participatorymedicine.org/epatients/
">Participatory
109 Medicine
</a
>. If you too want to track your own health and fitness
110 without having information about your private life floating around on
111 computers owned by others, I recommend checking it out.
</p
>
113 <p
>As usual, if you use Bitcoin and want to show your support of my
114 activities, please send Bitcoin donations to my address
115 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
120 <title>Privacy respecting health monitor / fitness tracker?
</title>
121 <link>http://people.skolelinux.org/pere/blog/Privacy_respecting_health_monitor___fitness_tracker_.html
</link>
122 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Privacy_respecting_health_monitor___fitness_tracker_.html
</guid>
123 <pubDate>Tue,
7 Aug
2018 16:
00:
00 +
0200</pubDate>
124 <description><p
>Dear lazyweb,
</p
>
126 <p
>I wonder, is there a fitness tracker / health monitor available for
127 sale today that respect the users privacy? With this I mean a
128 watch/bracelet capable of measuring pulse rate and other
129 fitness/health related values (and by all means, also the correct time
130 and location if possible), which is
<strong
>only
</strong
> provided for
131 me to extract/read from the unit with computer without a radio beacon
132 and Internet connection. In other words, it do not depend on a cell
133 phone app, and do make the measurements available via other peoples
134 computer (aka
"the cloud
"). The collected data should be available
135 using only free software. I
'm not interested in depending on some
136 non-free software that will leave me high and dry some time in the
137 future. I
've been unable to find any such unit. I would like to buy
138 it. The ones I have seen for sale here in Norway are proud to report
139 that they share my health data with strangers (aka
"cloud enabled
").
140 Is there an alternative? I
'm not interested in giving money to people
141 requiring me to accept
"privacy terms
" to allow myself to measure my
142 own health.
</p
>
144 <p
>As usual, if you use Bitcoin and want to show your support of my
145 activities, please send Bitcoin donations to my address
146 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
151 <title>Sharing images with friends and family using RSS and EXIF/XMP metadata
</title>
152 <link>http://people.skolelinux.org/pere/blog/Sharing_images_with_friends_and_family_using_RSS_and_EXIF_XMP_metadata.html
</link>
153 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Sharing_images_with_friends_and_family_using_RSS_and_EXIF_XMP_metadata.html
</guid>
154 <pubDate>Tue,
31 Jul
2018 23:
30:
00 +
0200</pubDate>
155 <description><p
>For a while now, I have looked for a sensible way to share images
156 with my family using a self hosted solution, as it is unacceptable to
157 place images from my personal life under the control of strangers
158 working for data hoarders like Google or Dropbox. The last few days I
159 have drafted an approach that might work out, and I would like to
160 share it with you. I would like to publish images on a server under
161 my control, and point some Internet connected display units using some
162 free and open standard to the images I published. As my primary
163 language is not limited to ASCII, I need to store metadata using
164 UTF-
8. Many years ago, I hoped to find a digital photo frame capable
165 of reading a RSS feed with image references (aka using the
166 &lt;enclosure
&gt; RSS tag), but was unable to find a current supplier
167 of such frames. In the end I gave up that approach.
</p
>
169 <p
>Some months ago, I discovered that
170 <a href=
"https://www.jwz.org/xscreensaver/
">XScreensaver
</a
> is able to
171 read images from a RSS feed, and used it to set up a screen saver on
172 my home info screen, showing images from the Daily images feed from
173 NASA. This proved to work well. More recently I discovered that
174 <a href=
"https://kodi.tv
">Kodi
</a
> (both using
175 <a href=
"https://www.openelec.tv/
">OpenELEC
</a
> and
176 <a href=
"https://libreelec.tv
">LibreELEC
</a
>) provide the
177 <a href=
"https://github.com/grinsted/script.screensaver.feedreader
">Feedreader
</a
>
178 screen saver capable of reading a RSS feed with images and news. For
179 fun, I used it this summer to test Kodi on my parents TV by hooking up
180 a Raspberry PI unit with LibreELEC, and wanted to provide them with a
181 screen saver showing selected pictures from my selection.
</p
>
183 <p
>Armed with motivation and a test photo frame, I set out to generate
184 a RSS feed for the Kodi instance. I adjusted my
<a
185 href=
"https://freedombox.org/
">Freedombox
</a
> instance, created
186 /var/www/html/privatepictures/, wrote a small Perl script to extract
187 title and description metadata from the photo files and generate the
188 RSS file. I ended up using Perl instead of python, as the
189 libimage-exiftool-perl Debian package seemed to handle the EXIF/XMP
190 tags I ended up using, while python3-exif did not. The relevant EXIF
191 tags only support ASCII, so I had to find better alternatives. XMP
192 seem to have the support I need.
</p
>
194 <p
>I am a bit unsure which EXIF/XMP tags to use, as I would like to
195 use tags that can be easily added/updated using normal free software
196 photo managing software. I ended up using the tags set using this
197 exiftool command, as these tags can also be set using digiKam:
</p
>
199 <blockquote
><pre
>
200 exiftool -headline=
'The RSS image title
' \
201 -description=
'The RSS image description.
' \
202 -subject+=for-family photo.jpeg
203 </pre
></blockquote
>
205 <p
>I initially tried the
"-title
" and
"keyword
" tags, but they were
206 invisible in digiKam, so I changed to
"-headline
" and
"-subject
". I
207 use the keyword/subject
'for-family
' to flag that the photo should be
208 shared with my family. Images with this keyword set are located and
209 copied into my Freedombox for the RSS generating script to find.
</p
>
211 <p
>Are there better ways to do this? Get in touch if you have better
212 suggestions.
</p
>
214 <p
>As usual, if you use Bitcoin and want to show your support of my
215 activities, please send Bitcoin donations to my address
216 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
221 <title>Simple streaming the Linux desktop to Kodi using GStreamer and RTP
</title>
222 <link>http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html
</link>
223 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html
</guid>
224 <pubDate>Thu,
12 Jul
2018 17:
55:
00 +
0200</pubDate>
225 <description><p
>Last night, I wrote
226 <a href=
"http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
">a
227 recipe to stream a Linux desktop using VLC to a instance of Kodi
</a
>.
228 During the day I received valuable feedback, and thanks to the
229 suggestions I have been able to rewrite the recipe into a much simpler
230 approach requiring no setup at all. It is a single script that take
231 care of it all.
</p
>
233 <p
>This new script uses GStreamer instead of VLC to capture the
234 desktop and stream it to Kodi. This fixed the video quality issue I
235 saw initially. It further removes the need to add a m3u file on the
236 Kodi machine, as it instead connects to
237 <a href=
"https://kodi.wiki/view/JSON-RPC_API/v8
">the JSON-RPC API in
238 Kodi
</a
> and simply ask Kodi to play from the stream created using
239 GStreamer. Streaming the desktop to Kodi now become trivial. Copy
240 the script below, run it with the DNS name or IP address of the kodi
241 server to stream to as the only argument, and watch your screen show
242 up on the Kodi screen. Note, it depend on multicast on the local
243 network, so if you need to stream outside the local network, the
244 script must be modified. Also note, I have no idea if audio work, as
245 I only care about the picture part.
</p
>
247 <blockquote
><pre
>
250 # Stream the Linux desktop view to Kodi. See
251 # http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
252 # for backgorund information.
254 # Make sure the stream is stopped in Kodi and the gstreamer process is
255 # killed if something go wrong (for example if curl is unable to find the
256 # kodi server). Do the same when interrupting this script.
260 params=
"$
3"
261 curl --silent --header
'Content-Type: application/json
' \
262 --data-binary
"{ \
"id\
":
1, \
"jsonrpc\
": \
"2.0\
", \
"method\
": \
"$cmd\
", \
"params\
": $params }
" \
263 "http://$host/jsonrpc
"
266 if [ -n
"$kodihost
" ] ; then
267 # Stop the playing when we end
268 playerid=$(kodicmd
"$kodihost
" Player.GetActivePlayers
"{}
" |
269 jq .result[].playerid)
270 kodicmd
"$kodihost
" Player.Stop
"{ \
"playerid\
" : $playerid }
" > /dev/null
272 if [
"$gstpid
" ]
&& kill -
0 "$gstpid
" >/dev/null
2>&1; then
273 kill
"$gstpid
"
276 trap cleanup EXIT INT
278 if [ -n
"$
1" ]; then
289 pasrc=$(pactl list | grep -A2
'Source #
' | grep
'Name: .*\.monitor$
' | \
290 cut -d
" " -f2|head -
1)
291 gst-launch-
1.0 ximagesrc use-damage=
0 ! video/x-raw,framerate=
30/
1 ! \
292 videoconvert ! queue2 ! \
293 x264enc bitrate=
8000 speed-preset=superfast tune=zerolatency qp-min=
30 \
294 key-int-max=
15 bframes=
2 ! video/x-h264,profile=high ! queue2 ! \
295 mpegtsmux alignment=
7 name=mux ! rndbuffersize max=
1316 min=
1316 ! \
296 udpsink host=$mcast port=$mcastport ttl-mc=$mcastttl auto-multicast=
1 sync=
0 \
297 pulsesrc device=$pasrc ! audioconvert ! queue2 ! avenc_aac ! queue2 ! mux. \
298 > /dev/null
2>&1 &
301 # Give stream a second to get going
304 # Ask kodi to start streaming using its JSON-RPC API
305 kodicmd
"$kodihost
" Player.Open \
306 "{\
"item\
": { \
"file\
": \
"udp://@$mcast:$mcastport\
" } }
" > /dev/null
308 # wait for gst to end
309 wait
"$gstpid
"
310 </pre
></blockquote
>
312 <p
>I hope you find the approach useful. I know I do.
</p
>
314 <p
>As usual, if you use Bitcoin and want to show your support of my
315 activities, please send Bitcoin donations to my address
316 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
321 <title>Streaming the Linux desktop to Kodi using VLC and RTSP
</title>
322 <link>http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
</link>
323 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
</guid>
324 <pubDate>Thu,
12 Jul
2018 02:
00:
00 +
0200</pubDate>
325 <description><p
>PS: See
326 <ahref=
"http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html
">the
327 followup post
</a
> for a even better approach.
</p
>
329 <p
>A while back, I was asked by a friend how to stream the desktop to
330 my projector connected to Kodi. I sadly had to admit that I had no
331 idea, as it was a task I never had tried. Since then, I have been
332 looking for a way to do so, preferable without much extra software to
333 install on either side. Today I found a way that seem to kind of
334 work. Not great, but it is a start.
</p
>
336 <p
>I had a look at several approaches, for example
337 <a href=
"https://github.com/mfoetsch/dlna_live_streaming
">using uPnP
338 DLNA as described in
2011</a
>, but it required a uPnP server, fuse and
339 local storage enough to store the stream locally. This is not going
340 to work well for me, lacking enough free space, and it would
341 impossible for my friend to get working.
</p
>
343 <p
>Next, it occurred to me that perhaps I could use VLC to create a
344 video stream that Kodi could play. Preferably using
345 broadcast/multicast, to avoid having to change any setup on the Kodi
346 side when starting such stream. Unfortunately, the only recipe I
347 could find using multicast used the rtp protocol, and this protocol
348 seem to not be supported by Kodi.
</p
>
350 <p
>On the other hand, the rtsp protocol is working! Unfortunately I
351 have to specify the IP address of the streaming machine in both the
352 sending command and the file on the Kodi server. But it is showing my
353 desktop, and thus allow us to have a shared look on the big screen at
354 the programs I work on.
</p
>
356 <p
>I did not spend much time investigating codeces. I combined the
357 rtp and rtsp recipes from
358 <a href=
"https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/
">the
359 VLC Streaming HowTo/Command Line Examples
</a
>, and was able to get
360 this working on the desktop/streaming end.
</p
>
362 <blockquote
><pre
>
363 vlc screen:// --sout \
364 '#transcode{vcodec=mp4v,acodec=mpga,vb=
800,ab=
128}:rtp{dst=projector.local,port=
1234,sdp=rtsp://
192.168.11.4:
8080/test.sdp}
'
365 </pre
></blockquote
>
367 <p
>I ssh-ed into my Kodi box and created a file like this with the
368 same IP address:
</p
>
370 <blockquote
><pre
>
371 echo rtsp://
192.168.11.4:
8080/test.sdp \
372 > /storage/videos/screenstream.m3u
373 </pre
></blockquote
>
375 <p
>Note the
192.168.11.4 IP address is my desktops IP address. As far
376 as I can tell the IP must be hardcoded for this to work. In other
377 words, if someone elses machine is going to do the steaming, you have
378 to update screenstream.m3u on the Kodi machine and adjust the vlc
379 recipe. To get started, locate the file in Kodi and select the m3u
380 file while the VLC stream is running. The desktop then show up in my
381 big screen. :)
</p
>
383 <p
>When using the same technique to stream a video file with audio,
384 the audio quality is really bad. No idea if the problem is package
385 loss or bad parameters for the transcode. I do not know VLC nor Kodi
386 enough to tell.
</p
>
388 <p
><strong
>Update
2018-
07-
12</strong
>: Johannes Schauer send me a few
389 succestions and reminded me about an important step. The
"screen:
"
390 input source is only available once the vlc-plugin-access-extra
391 package is installed on Debian. Without it, you will see this error
392 message:
"VLC is unable to open the MRL
'screen://
'. Check the log
393 for details.
" He further found that it is possible to drop some parts
394 of the VLC command line to reduce the amount of hardcoded information.
395 It is also useful to consider using cvlc to avoid having the VLC
396 window in the desktop view. In sum, this give us this command line on
399 <blockquote
><pre
>
400 cvlc screen:// --sout \
401 '#transcode{vcodec=mp4v,acodec=mpga,vb=
800,ab=
128}:rtp{sdp=rtsp://:
8080/}
'
402 </pre
></blockquote
>
404 <p
>and this on the Kodi end
<p
>
406 <blockquote
><pre
>
407 echo rtsp://
192.168.11.4:
8080/ \
408 > /storage/videos/screenstream.m3u
409 </pre
></blockquote
>
411 <p
>Still bad image quality, though. But I did discover that streaming
412 a DVD using dvdsimple:///dev/dvd as the source had excellent video and
413 audio quality, so I guess the issue is in the input or transcoding
414 parts, not the rtsp part. I
've tried to change the vb and ab
415 parameters to use more bandwidth, but it did not make a
416 difference.
</p
>
418 <p
>I further received a suggestion from Einar Haraldseid to try using
419 gstreamer instead of VLC, and this proved to work great! He also
420 provided me with the trick to get Kodi to use a multicast stream as
421 its source. By using this monstrous oneliner, I can stream my desktop
422 with good video quality in reasonable framerate to the
239.255.0.1
423 multicast address on port
1234:
425 <blockquote
><pre
>
426 gst-launch-
1.0 ximagesrc use-damage=
0 ! video/x-raw,framerate=
30/
1 ! \
427 videoconvert ! queue2 ! \
428 x264enc bitrate=
8000 speed-preset=superfast tune=zerolatency qp-min=
30 \
429 key-int-max=
15 bframes=
2 ! video/x-h264,profile=high ! queue2 ! \
430 mpegtsmux alignment=
7 name=mux ! rndbuffersize max=
1316 min=
1316 ! \
431 udpsink host=
239.255.0.1 port=
1234 ttl-mc=
1 auto-multicast=
1 sync=
0 \
432 pulsesrc device=$(pactl list | grep -A2
'Source #
' | \
433 grep
'Name: .*\.monitor$
' | cut -d
" " -f2|head -
1) ! \
434 audioconvert ! queue2 ! avenc_aac ! queue2 ! mux.
435 </pre
></blockquote
>
437 <p
>and this on the Kodi end
<p
>
439 <blockquote
><pre
>
440 echo udp://@
239.255.0.1:
1234 \
441 > /storage/videos/screenstream.m3u
442 </pre
></blockquote
>
444 <p
>Note the trick to pick a valid pulseaudio source. It might not
445 pick the one you need. This approach will of course lead to trouble
446 if more than one source uses the same multicast port and address.
447 Note the ttl-mc=
1 setting, which limit the multicast packages to the
448 local network. If the value is increased, your screen will be
449 broadcasted further, one network
"hop
" for each increase (read up on
450 multicast to learn more. :)!
</p
>
452 <p
>Having cracked how to get Kodi to receive multicast streams, I
453 could use this VLC command to stream to the same multicast address.
454 The image quality is way better than the rtsp approach, but gstreamer
455 seem to be doing a better job.
</p
>
457 <blockquote
><pre
>
458 cvlc screen:// --sout
'#transcode{vcodec=mp4v,acodec=mpga,vb=
800,ab=
128}:rtp{mux=ts,dst=
239.255.0.1,port=
1234,sdp=sap}
'
459 </pre
></blockquote
>
461 <p
>As usual, if you use Bitcoin and want to show your support of my
462 activities, please send Bitcoin donations to my address
463 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
468 <title>What is the most supported MIME type in Debian in
2018?
</title>
469 <link>http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html
</link>
470 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_in_2018_.html
</guid>
471 <pubDate>Mon,
9 Jul
2018 08:
05:
00 +
0200</pubDate>
472 <description><p
>Five years ago,
473 <a href=
"http://people.skolelinux.org/pere/blog/What_is_the_most_supported_MIME_type_in_Debian_.html
">I
474 measured what the most supported MIME type in Debian was
</a
>, by
475 analysing the desktop files in all packages in the archive. Since
476 then, the DEP-
11 AppStream system has been put into production, making
477 the task a lot easier. This made me want to repeat the measurement,
478 to see how much things changed. Here are the new numbers, for
479 unstable only this time:
481 <p
><strong
>Debian Unstable:
</strong
></p
>
485 ----- -----------------------
497 30 audio/x-vorbis+ogg
498 29 image/x-portable-pixmap
500 27 image/x-portable-bitmap
508 <p
>The list was created like this using a sid chroot:
"cat
509 /var/lib/apt/lists/*sid*_dep11_Components-amd64.yml.gz| zcat | awk
'/^
510 - \S+\/\S+$/ {print $
2 }
' | sort | uniq -c | sort -nr | head -
20"</p
>
512 <p
>It is interesting to see how image formats have passed text/plain
513 as the most announced supported MIME type. These days, thanks to the
514 AppStream system, if you run into a file format you do not know, and
515 want to figure out which packages support the format, you can find the
516 MIME type of the file using
"file --mime
&lt;filename
&gt;
", and then
517 look up all packages announcing support for this format in their
518 AppStream metadata (XML or .desktop file) using
"appstreamcli
519 what-provides mimetype
&lt;mime-type
&gt;. For example if you, like
520 me, want to know which packages support inode/directory, you can get a
521 list like this:
</p
>
523 <p
><blockquote
><pre
>
524 % appstreamcli what-provides mimetype inode/directory | grep Package: | sort
531 Package: doublecmd-common
533 Package: enlightenment
553 </pre
></blockquote
></p
>
555 <p
>Using the same method, I can quickly discover that the Sketchup file
556 format is not yet supported by any package in Debian:
</p
>
558 <p
><blockquote
><pre
>
559 % appstreamcli what-provides mimetype application/vnd.sketchup.skp
560 Could not find component providing
'mimetype::application/vnd.sketchup.skp
'.
562 </pre
></blockquote
></p
>
564 <p
>Yesterday I used it to figure out which packages support the STL
3D
567 <p
><blockquote
><pre
>
568 % appstreamcli what-provides mimetype application/sla|grep Package
573 </pre
></blockquote
></p
>
575 <p
>PS: A new version of Cura was uploaded to Debian yesterday.
</p
>
577 <p
>As usual, if you use Bitcoin and want to show your support of my
578 activities, please send Bitcoin donations to my address
579 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
584 <title>Debian APT upgrade without enough free space on the disk...
</title>
585 <link>http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html
</link>
586 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/Debian_APT_upgrade_without_enough_free_space_on_the_disk___.html
</guid>
587 <pubDate>Sun,
8 Jul
2018 12:
10:
00 +
0200</pubDate>
588 <description><p
>Quite regularly, I let my Debian Sid/Unstable chroot stay untouch
589 for a while, and when I need to update it there is not enough free
590 space on the disk for apt to do a normal
'apt upgrade
'. I normally
591 would resolve the issue by doing
'apt install
&lt;somepackages
&gt;
' to
592 upgrade only some of the packages in one batch, until the amount of
593 packages to download fall below the amount of free space available.
594 Today, I had about
500 packages to upgrade, and after a while I got
595 tired of trying to install chunks of packages manually. I concluded
596 that I did not have the spare hours required to complete the task, and
597 decided to see if I could automate it. I came up with this small
598 script which I call
'apt-in-chunks
':
</p
>
600 <p
><blockquote
><pre
>
603 # Upgrade packages when the disk is too full to upgrade every
604 # upgradable package in one lump. Fetching packages to upgrade using
605 # apt, and then installing using dpkg, to avoid changing the package
606 # flag for manual/automatic.
611 if [
"$
1" ]; then
612 grep -v
"$
1"
618 for p in $(apt list --upgradable | ignore
"$@
" |cut -d/ -f1 | grep -v
'^Listing...
'); do
619 echo
"Upgrading $p
"
621 apt install --download-only -y $p
622 for f in /var/cache/apt/archives/*.deb; do
623 if [ -e
"$f
" ]; then
624 dpkg -i /var/cache/apt/archives/*.deb
629 </pre
></blockquote
></p
>
631 <p
>The script will extract the list of packages to upgrade, try to
632 download the packages needed to upgrade one package, install the
633 downloaded packages using dpkg. The idea is to upgrade packages
634 without changing the APT mark for the package (ie the one recording of
635 the package was manually requested or pulled in as a dependency). To
636 use it, simply run it as root from the command line. If it fail, try
637 'apt install -f
' to clean up the mess and run the script again. This
638 might happen if the new packages conflict with one of the old
639 packages. dpkg is unable to remove, while apt can do this.
</p
>
641 <p
>It take one option, a package to ignore in the list of packages to
642 upgrade. The option to ignore a package is there to be able to skip
643 the packages that are simply too large to unpack. Today this was
644 'ghc
', but I have run into other large packages causing similar
645 problems earlier (like TeX).
</p
>
647 <p
>Update
2018-
07-
08: Thanks to Paul Wise, I am aware of two
648 alternative ways to handle this. The
"unattended-upgrades
649 --minimal-upgrade-steps
" option will try to calculate upgrade sets for
650 each package to upgrade, and then upgrade them in order, smallest set
651 first. It might be a better option than my above mentioned script.
652 Also,
"aptutude upgrade
" can upgrade single packages, thus avoiding
653 the need for using
"dpkg -i
" in the script above.
</p
>
655 <p
>As usual, if you use Bitcoin and want to show your support of my
656 activities, please send Bitcoin donations to my address
657 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>
662 <title>The worlds only stone power plant?
</title>
663 <link>http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html
</link>
664 <guid isPermaLink=
"true">http://people.skolelinux.org/pere/blog/The_worlds_only_stone_power_plant_.html
</guid>
665 <pubDate>Sat,
30 Jun
2018 10:
35:
00 +
0200</pubDate>
666 <description><p
>So far, at least hydro-electric power, coal power, wind power,
667 solar power, and wood power are well known. Until a few days ago, I
668 had never heard of stone power. Then I learn about a quarry in a
670 <a href=
"https://en.wikipedia.org/wiki/Bremanger
">Bremanger
</a
> i
672 <a href=
"https://www.bontrup.com/en/activities/raw-materials/bremanger-quarry/
">the
673 Bremanger Quarry
</a
> company is extracting stone and dumping the stone
674 into a shaft leading to its shipping harbour. This downward movement
675 in this shaft is used to produce electricity. In short, it is using
676 falling rocks instead of falling water to produce electricity, and
677 according to its own statements it is producing more power than it is
678 using, and selling the surplus electricity to the Norwegian power
679 grid. I find the concept truly amazing. Is this the worlds only
680 stone power plant?
</p
>
682 <p
>As usual, if you use Bitcoin and want to show your support of my
683 activities, please send Bitcoin donations to my address
684 <b
><a href=
"bitcoin:
15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a
></b
>.
</p
>