]> pere.pagekite.me Git - homepage.git/commitdiff
Generated.
authorPetter Reinholdtsen <pere@hungry.com>
Sun, 2 Sep 2018 21:40:47 +0000 (23:40 +0200)
committerPetter Reinholdtsen <pere@hungry.com>
Sun, 2 Sep 2018 21:40:47 +0000 (23:40 +0200)
blog/tags/kodi/index.html [new file with mode: 0644]
blog/tags/kodi/kodi.rss [new file with mode: 0644]

diff --git a/blog/tags/kodi/index.html b/blog/tags/kodi/index.html
new file mode 100644 (file)
index 0000000..446f376
--- /dev/null
@@ -0,0 +1,773 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+    <title>Petter Reinholdtsen: Entries Tagged kodi</title>
+    <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/style.css" />
+    <link rel="stylesheet" type="text/css" media="screen" href="http://people.skolelinux.org/pere/blog/vim.css" />
+    <link rel="alternate" title="RSS Feed" href="kodi.rss" type="application/rss+xml" />
+  </head>
+  <body>
+    <div class="title">
+ <h1>
+     <a href="http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen</a>
+     
+ </h1>
+</div>
+
+
+    <h3>Entries tagged "kodi".</h3>
+    
+    <div class="entry">
+      <div class="title">
+        <a href="http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html">Using the Kodi API to play Youtube videos</a>
+      </div>
+      <div class="date">
+         2nd September 2018
+      </div>
+      <div class="body">
+        <p>I continue to explore my Kodi installation, and today I wanted to
+tell it to play a youtube URL I received in a chat, without having to
+insert search terms using the on-screen keyboard.  After searching the
+web for API access to the Youtube plugin and testing a bit, I managed
+to find a recipe that worked.  If you got a kodi instance with its API
+available from http://kodihost/jsonrpc, you can try the following to
+have check out a nice cover band.</p>
+
+<p><blockquote><pre>curl --silent --header 'Content-Type: application/json' \
+  --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Open",
+  "params": {"item": { "file":
+  "plugin://plugin.video.youtube/play/?video_id=LuRGVM9O0qg" } } }' \
+  http://projector.local/jsonrpc</pre></blockquote></p>
+
+<p>I've extended kodi-stream program to take a video source as its
+first argument.  It can now handle direct video links, youtube links
+and 'desktop' to stream my desktop to Kodi.  It is almost like a
+Chromecast. :)</p>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+
+      </div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/kodi">kodi</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>.
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
+    <div class="entry">
+      <div class="title">
+        <a href="http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html">Simple streaming the Linux desktop to Kodi using GStreamer and RTP</a>
+      </div>
+      <div class="date">
+        12th July 2018
+      </div>
+      <div class="body">
+        <p>Last night, I wrote
+<a href="http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html">a
+recipe to stream a Linux desktop using VLC to a instance of Kodi</a>.
+During the day I received valuable feedback, and thanks to the
+suggestions I have been able to rewrite the recipe into a much simpler
+approach requiring no setup at all.  It is a single script that take
+care of it all.</p>
+
+<p>This new script uses GStreamer instead of VLC to capture the
+desktop and stream it to Kodi.  This fixed the video quality issue I
+saw initially.  It further removes the need to add a m3u file on the
+Kodi machine, as it instead connects to
+<a href="https://kodi.wiki/view/JSON-RPC_API/v8">the JSON-RPC API in
+Kodi</a> and simply ask Kodi to play from the stream created using
+GStreamer.  Streaming the desktop to Kodi now become trivial.  Copy
+the script below, run it with the DNS name or IP address of the kodi
+server to stream to as the only argument, and watch your screen show
+up on the Kodi screen.  Note, it depend on multicast on the local
+network, so if you need to stream outside the local network, the
+script must be modified.  Also note, I have no idea if audio work, as
+I only care about the picture part.</p>
+
+<blockquote><pre>
+#!/bin/sh
+#
+# Stream the Linux desktop view to Kodi.  See
+# http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
+# for backgorund information.
+
+# Make sure the stream is stopped in Kodi and the gstreamer process is
+# killed if something go wrong (for example if curl is unable to find the
+# kodi server).  Do the same when interrupting this script.
+kodicmd() {
+    host="$1"
+    cmd="$2"
+    params="$3"
+    curl --silent --header 'Content-Type: application/json' \
+        --data-binary "{ \"id\": 1, \"jsonrpc\": \"2.0\", \"method\": \"$cmd\", \"params\": $params }" \
+        "http://$host/jsonrpc"
+}
+cleanup() {
+    if [ -n "$kodihost" ] ; then
+       # Stop the playing when we end
+       playerid=$(kodicmd "$kodihost" Player.GetActivePlayers "{}" |
+                           jq .result[].playerid)
+       kodicmd "$kodihost" Player.Stop "{ \"playerid\" : $playerid }" > /dev/null
+    fi
+    if [ "$gstpid" ] && kill -0 "$gstpid" >/dev/null 2>&1; then
+       kill "$gstpid"
+    fi
+}
+trap cleanup EXIT INT
+
+if [ -n "$1" ]; then
+    kodihost=$1
+    shift
+else
+    kodihost=kodi.local
+fi
+
+mcast=239.255.0.1
+mcastport=1234
+mcastttl=1
+
+pasrc=$(pactl list | grep -A2 'Source #' | grep 'Name: .*\.monitor$' | \
+  cut -d" " -f2|head -1)
+gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \
+  videoconvert ! queue2 ! \
+  x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \
+  key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \
+  mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \
+  udpsink host=$mcast port=$mcastport ttl-mc=$mcastttl auto-multicast=1 sync=0 \
+  pulsesrc device=$pasrc ! audioconvert ! queue2 ! avenc_aac ! queue2 ! mux. \
+  > /dev/null 2>&1 &
+gstpid=$!
+
+# Give stream a second to get going
+sleep 1
+
+# Ask kodi to start streaming using its JSON-RPC API
+kodicmd "$kodihost" Player.Open \
+       "{\"item\": { \"file\": \"udp://@$mcast:$mcastport\" } }" > /dev/null
+
+# wait for gst to end
+wait "$gstpid"
+</pre></blockquote>
+
+<p>I hope you find the approach useful.  I know I do.</p>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+
+      </div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/kodi">kodi</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>.
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
+    <div class="entry">
+      <div class="title">
+        <a href="http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html">Streaming the Linux desktop to Kodi using VLC and RTSP</a>
+      </div>
+      <div class="date">
+        12th July 2018
+      </div>
+      <div class="body">
+        <p>PS: See
+<ahref="http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html">the
+followup post</a> for a even better approach.</p>
+
+<p>A while back, I was asked by a friend how to stream the desktop to
+my projector connected to Kodi.  I sadly had to admit that I had no
+idea, as it was a task I never had tried.  Since then, I have been
+looking for a way to do so, preferable without much extra software to
+install on either side.  Today I found a way that seem to kind of
+work.  Not great, but it is a start.</p>
+
+<p>I had a look at several approaches, for example
+<a href="https://github.com/mfoetsch/dlna_live_streaming">using uPnP
+DLNA as described in 2011</a>, but it required a uPnP server, fuse and
+local storage enough to store the stream locally.  This is not going
+to work well for me, lacking enough free space, and it would
+impossible for my friend to get working.</p>
+
+<p>Next, it occurred to me that perhaps I could use VLC to create a
+video stream that Kodi could play.  Preferably using
+broadcast/multicast, to avoid having to change any setup on the Kodi
+side when starting such stream.  Unfortunately, the only recipe I
+could find using multicast used the rtp protocol, and this protocol
+seem to not be supported by Kodi.</p>
+
+<p>On the other hand, the rtsp protocol is working!  Unfortunately I
+have to specify the IP address of the streaming machine in both the
+sending command and the file on the Kodi server.  But it is showing my
+desktop, and thus allow us to have a shared look on the big screen at
+the programs I work on.</p>
+
+<p>I did not spend much time investigating codeces.  I combined the
+rtp and rtsp recipes from
+<a href="https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/">the
+VLC Streaming HowTo/Command Line Examples</a>, and was able to get
+this working on the desktop/streaming end.</p>
+
+<blockquote><pre>
+vlc screen:// --sout \
+  '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{dst=projector.local,port=1234,sdp=rtsp://192.168.11.4:8080/test.sdp}'
+</pre></blockquote>
+
+<p>I ssh-ed into my Kodi box and created a file like this with the
+same IP address:</p>
+
+<blockquote><pre>
+echo rtsp://192.168.11.4:8080/test.sdp \
+  > /storage/videos/screenstream.m3u
+</pre></blockquote>
+
+<p>Note the 192.168.11.4 IP address is my desktops IP address.  As far
+as I can tell the IP must be hardcoded for this to work.  In other
+words, if someone elses machine is going to do the steaming, you have
+to update screenstream.m3u on the Kodi machine and adjust the vlc
+recipe.  To get started, locate the file in Kodi and select the m3u
+file while the VLC stream is running.  The desktop then show up in my
+big screen. :)</p>
+
+<p>When using the same technique to stream a video file with audio,
+the audio quality is really bad.  No idea if the problem is package
+loss or bad parameters for the transcode.  I do not know VLC nor Kodi
+enough to tell.</p>
+
+<p><strong>Update 2018-07-12</strong>: Johannes Schauer send me a few
+succestions and reminded me about an important step.  The "screen:"
+input source is only available once the vlc-plugin-access-extra
+package is installed on Debian.  Without it, you will see this error
+message: "VLC is unable to open the MRL 'screen://'.  Check the log
+for details."  He further found that it is possible to drop some parts
+of the VLC command line to reduce the amount of hardcoded information.
+It is also useful to consider using cvlc to avoid having the VLC
+window in the desktop view.  In sum, this give us this command line on
+the source end
+
+<blockquote><pre>
+cvlc screen:// --sout \
+  '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{sdp=rtsp://:8080/}'
+</pre></blockquote>
+
+<p>and this on the Kodi end<p>
+
+<blockquote><pre>
+echo rtsp://192.168.11.4:8080/ \
+  > /storage/videos/screenstream.m3u
+</pre></blockquote>
+
+<p>Still bad image quality, though.  But I did discover that streaming
+a DVD using dvdsimple:///dev/dvd as the source had excellent video and
+audio quality, so I guess the issue is in the input or transcoding
+parts, not the rtsp part.  I've tried to change the vb and ab
+parameters to use more bandwidth, but it did not make a
+difference.</p>
+
+<p>I further received a suggestion from Einar Haraldseid to try using
+gstreamer instead of VLC, and this proved to work great!  He also
+provided me with the trick to get Kodi to use a multicast stream as
+its source.  By using this monstrous oneliner, I can stream my desktop
+with good video quality in reasonable framerate to the 239.255.0.1
+multicast address on port 1234:
+
+<blockquote><pre>
+gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \
+  videoconvert ! queue2 ! \
+  x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \
+  key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \
+  mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \
+  udpsink host=239.255.0.1 port=1234 ttl-mc=1 auto-multicast=1 sync=0 \
+  pulsesrc device=$(pactl list | grep -A2 'Source #' | \
+    grep 'Name: .*\.monitor$' |  cut -d" " -f2|head -1) ! \
+  audioconvert ! queue2 ! avenc_aac ! queue2 ! mux.
+</pre></blockquote>
+
+<p>and this on the Kodi end<p>
+
+<blockquote><pre>
+echo udp://@239.255.0.1:1234 \
+  > /storage/videos/screenstream.m3u
+</pre></blockquote>
+
+<p>Note the trick to pick a valid pulseaudio source.  It might not
+pick the one you need.  This approach will of course lead to trouble
+if more than one source uses the same multicast port and address.
+Note the ttl-mc=1 setting, which limit the multicast packages to the
+local network.  If the value is increased, your screen will be
+broadcasted further, one network "hop" for each increase (read up on
+multicast to learn more. :)!</p>
+
+<p>Having cracked how to get Kodi to receive multicast streams, I
+could use this VLC command to stream to the same multicast address.
+The image quality is way better than the rtsp approach, but gstreamer
+seem to be doing a better job.</p>
+
+<blockquote><pre>
+cvlc screen:// --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{mux=ts,dst=239.255.0.1,port=1234,sdp=sap}'
+</pre></blockquote>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+
+      </div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian">debian</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/kodi">kodi</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>.
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
+    <p style="text-align: right;"><a href="kodi.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS Feed" width="36" height="14" /></a></p>
+    <div id="sidebar">
+      
+
+
+<h2>Archive</h2>
+<ul>
+
+<li>2018
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/01/">January (1)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/02/">February (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/03/">March (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/04/">April (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/06/">June (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/07/">July (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/08/">August (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/09/">September (1)</a></li>
+
+</ul></li>
+
+<li>2017
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/01/">January (4)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/02/">February (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/03/">March (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/04/">April (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/06/">June (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/07/">July (1)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/08/">August (1)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/09/">September (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/10/">October (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/11/">November (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2017/12/">December (4)</a></li>
+
+</ul></li>
+
+<li>2016
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/01/">January (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/02/">February (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/03/">March (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/04/">April (8)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/05/">May (8)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/06/">June (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/07/">July (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/08/">August (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/09/">September (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/10/">October (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/11/">November (8)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2016/12/">December (5)</a></li>
+
+</ul></li>
+
+<li>2015
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/01/">January (7)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/02/">February (6)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/03/">March (1)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/04/">April (4)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/05/">May (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/06/">June (4)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/07/">July (6)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/08/">August (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/09/">September (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/10/">October (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/11/">November (6)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2015/12/">December (3)</a></li>
+
+</ul></li>
+
+<li>2014
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/01/">January (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/02/">February (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/03/">March (8)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/04/">April (7)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/05/">May (1)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/06/">June (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/07/">July (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/08/">August (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/09/">September (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/10/">October (6)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/11/">November (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2014/12/">December (5)</a></li>
+
+</ul></li>
+
+<li>2013
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/01/">January (11)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/02/">February (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/03/">March (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/04/">April (6)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/05/">May (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/06/">June (10)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/07/">July (7)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/08/">August (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/09/">September (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/10/">October (7)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/11/">November (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2013/12/">December (3)</a></li>
+
+</ul></li>
+
+<li>2012
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/01/">January (7)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/02/">February (10)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/03/">March (17)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/04/">April (12)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/05/">May (12)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/06/">June (20)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/07/">July (17)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/08/">August (6)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/09/">September (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/10/">October (17)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/11/">November (10)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2012/12/">December (7)</a></li>
+
+</ul></li>
+
+<li>2011
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/01/">January (16)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/02/">February (6)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/03/">March (6)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/04/">April (7)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/05/">May (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/06/">June (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/07/">July (7)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/08/">August (6)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/09/">September (4)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/10/">October (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/11/">November (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2011/12/">December (1)</a></li>
+
+</ul></li>
+
+<li>2010
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/01/">January (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/02/">February (1)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/03/">March (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/04/">April (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/05/">May (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/06/">June (14)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/07/">July (12)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/08/">August (13)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/09/">September (7)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/10/">October (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/11/">November (13)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2010/12/">December (12)</a></li>
+
+</ul></li>
+
+<li>2009
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/01/">January (8)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/02/">February (8)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/03/">March (12)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/04/">April (10)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/05/">May (9)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/06/">June (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/07/">July (4)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/08/">August (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/09/">September (1)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/10/">October (2)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/11/">November (3)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2009/12/">December (3)</a></li>
+
+</ul></li>
+
+<li>2008
+<ul>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2008/11/">November (5)</a></li>
+
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2008/12/">December (7)</a></li>
+
+</ul></li>
+
+</ul>
+
+
+
+<h2>Tags</h2>
+<ul>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (16)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/amiga">amiga (1)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/aros">aros (1)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/bankid">bankid (4)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (9)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (17)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/bsa">bsa (2)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/chrpath">chrpath (2)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian">debian (162)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (158)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/debian-handbook">debian-handbook (4)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/digistan">digistan (10)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/dld">dld (17)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/docbook">docbook (25)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (383)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (23)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (13)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (32)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/freedombox">freedombox (9)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (18)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/h264">h264 (20)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/intervju">intervju (42)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/isenkram">isenkram (16)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/kart">kart (20)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/kodi">kodi (3)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/ldap">ldap (9)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/lego">lego (4)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/lenker">lenker (8)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/lsdvd">lsdvd (2)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (1)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/mesh network">mesh network (8)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (41)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/nice free software">nice free software (10)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/norsk">norsk (299)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/nuug">nuug (190)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (33)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/open311">open311 (2)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (72)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/personvern">personvern (107)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/raid">raid (2)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/reactos">reactos (1)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/reprap">reprap (11)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/rfid">rfid (3)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/robot">robot (10)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/rss">rss (1)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/ruter">ruter (6)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (2)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (54)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (4)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (5)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/standard">standard (55)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (6)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (12)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (55)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (4)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/usenix">usenix (2)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (9)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/verkidetfri">verkidetfri (11)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (67)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>
+
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/web">web (41)</a></li>
+
+</ul>
+
+
+    </div>
+    <p style="text-align: right">
+ Created by <a href="http://steve.org.uk/Software/chronicle">Chronicle v4.6</a>
+</p>
+
+  </body>
+</html>
diff --git a/blog/tags/kodi/kodi.rss b/blog/tags/kodi/kodi.rss
new file mode 100644 (file)
index 0000000..e427f2e
--- /dev/null
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="utf-8"?>
+<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
+       <channel>
+               <title>Petter Reinholdtsen - Entries tagged kodi</title>
+               <description>Entries tagged kodi</description>
+                <link>http://people.skolelinux.org/pere/blog/</link>
+
+       
+       <item>
+               <title>Using the Kodi API to play Youtube videos</title>
+               <link>http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Using_the_Kodi_API_to_play_Youtube_videos.html</guid>
+                <pubDate>Sun, 2 Sep 2018 23:40:00 +0200</pubDate>
+               <description>&lt;p&gt;I continue to explore my Kodi installation, and today I wanted to
+tell it to play a youtube URL I received in a chat, without having to
+insert search terms using the on-screen keyboard.  After searching the
+web for API access to the Youtube plugin and testing a bit, I managed
+to find a recipe that worked.  If you got a kodi instance with its API
+available from http://kodihost/jsonrpc, you can try the following to
+have check out a nice cover band.&lt;/p&gt;
+
+&lt;p&gt;&lt;blockquote&gt;&lt;pre&gt;curl --silent --header &#39;Content-Type: application/json&#39; \
+  --data-binary &#39;{ &quot;id&quot;: 1, &quot;jsonrpc&quot;: &quot;2.0&quot;, &quot;method&quot;: &quot;Player.Open&quot;,
+  &quot;params&quot;: {&quot;item&quot;: { &quot;file&quot;:
+  &quot;plugin://plugin.video.youtube/play/?video_id=LuRGVM9O0qg&quot; } } }&#39; \
+  http://projector.local/jsonrpc&lt;/pre&gt;&lt;/blockquote&gt;&lt;/p&gt;
+
+&lt;p&gt;I&#39;ve extended kodi-stream program to take a video source as its
+first argument.  It can now handle direct video links, youtube links
+and &#39;desktop&#39; to stream my desktop to Kodi.  It is almost like a
+Chromecast. :)&lt;/p&gt;
+
+&lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+&lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
+</description>
+       </item>
+       
+       <item>
+               <title>Simple streaming the Linux desktop to Kodi using GStreamer and RTP</title>
+               <link>http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html</guid>
+                <pubDate>Thu, 12 Jul 2018 17:55:00 +0200</pubDate>
+               <description>&lt;p&gt;Last night, I wrote
+&lt;a href=&quot;http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html&quot;&gt;a
+recipe to stream a Linux desktop using VLC to a instance of Kodi&lt;/a&gt;.
+During the day I received valuable feedback, and thanks to the
+suggestions I have been able to rewrite the recipe into a much simpler
+approach requiring no setup at all.  It is a single script that take
+care of it all.&lt;/p&gt;
+
+&lt;p&gt;This new script uses GStreamer instead of VLC to capture the
+desktop and stream it to Kodi.  This fixed the video quality issue I
+saw initially.  It further removes the need to add a m3u file on the
+Kodi machine, as it instead connects to
+&lt;a href=&quot;https://kodi.wiki/view/JSON-RPC_API/v8&quot;&gt;the JSON-RPC API in
+Kodi&lt;/a&gt; and simply ask Kodi to play from the stream created using
+GStreamer.  Streaming the desktop to Kodi now become trivial.  Copy
+the script below, run it with the DNS name or IP address of the kodi
+server to stream to as the only argument, and watch your screen show
+up on the Kodi screen.  Note, it depend on multicast on the local
+network, so if you need to stream outside the local network, the
+script must be modified.  Also note, I have no idea if audio work, as
+I only care about the picture part.&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+#!/bin/sh
+#
+# Stream the Linux desktop view to Kodi.  See
+# http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html
+# for backgorund information.
+
+# Make sure the stream is stopped in Kodi and the gstreamer process is
+# killed if something go wrong (for example if curl is unable to find the
+# kodi server).  Do the same when interrupting this script.
+kodicmd() {
+    host=&quot;$1&quot;
+    cmd=&quot;$2&quot;
+    params=&quot;$3&quot;
+    curl --silent --header &#39;Content-Type: application/json&#39; \
+        --data-binary &quot;{ \&quot;id\&quot;: 1, \&quot;jsonrpc\&quot;: \&quot;2.0\&quot;, \&quot;method\&quot;: \&quot;$cmd\&quot;, \&quot;params\&quot;: $params }&quot; \
+        &quot;http://$host/jsonrpc&quot;
+}
+cleanup() {
+    if [ -n &quot;$kodihost&quot; ] ; then
+       # Stop the playing when we end
+       playerid=$(kodicmd &quot;$kodihost&quot; Player.GetActivePlayers &quot;{}&quot; |
+                           jq .result[].playerid)
+       kodicmd &quot;$kodihost&quot; Player.Stop &quot;{ \&quot;playerid\&quot; : $playerid }&quot; &gt; /dev/null
+    fi
+    if [ &quot;$gstpid&quot; ] &amp;&amp; kill -0 &quot;$gstpid&quot; &gt;/dev/null 2&gt;&amp;1; then
+       kill &quot;$gstpid&quot;
+    fi
+}
+trap cleanup EXIT INT
+
+if [ -n &quot;$1&quot; ]; then
+    kodihost=$1
+    shift
+else
+    kodihost=kodi.local
+fi
+
+mcast=239.255.0.1
+mcastport=1234
+mcastttl=1
+
+pasrc=$(pactl list | grep -A2 &#39;Source #&#39; | grep &#39;Name: .*\.monitor$&#39; | \
+  cut -d&quot; &quot; -f2|head -1)
+gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \
+  videoconvert ! queue2 ! \
+  x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \
+  key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \
+  mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \
+  udpsink host=$mcast port=$mcastport ttl-mc=$mcastttl auto-multicast=1 sync=0 \
+  pulsesrc device=$pasrc ! audioconvert ! queue2 ! avenc_aac ! queue2 ! mux. \
+  &gt; /dev/null 2&gt;&amp;1 &amp;
+gstpid=$!
+
+# Give stream a second to get going
+sleep 1
+
+# Ask kodi to start streaming using its JSON-RPC API
+kodicmd &quot;$kodihost&quot; Player.Open \
+       &quot;{\&quot;item\&quot;: { \&quot;file\&quot;: \&quot;udp://@$mcast:$mcastport\&quot; } }&quot; &gt; /dev/null
+
+# wait for gst to end
+wait &quot;$gstpid&quot;
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;I hope you find the approach useful.  I know I do.&lt;/p&gt;
+
+&lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+&lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
+</description>
+       </item>
+       
+       <item>
+               <title>Streaming the Linux desktop to Kodi using VLC and RTSP</title>
+               <link>http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html</link>
+               <guid isPermaLink="true">http://people.skolelinux.org/pere/blog/Streaming_the_Linux_desktop_to_Kodi_using_VLC_and_RTSP.html</guid>
+                <pubDate>Thu, 12 Jul 2018 02:00:00 +0200</pubDate>
+               <description>&lt;p&gt;PS: See
+&lt;ahref=&quot;http://people.skolelinux.org/pere/blog/Simple_streaming_the_Linux_desktop_to_Kodi_using_GStreamer_and_RTP.html&quot;&gt;the
+followup post&lt;/a&gt; for a even better approach.&lt;/p&gt;
+
+&lt;p&gt;A while back, I was asked by a friend how to stream the desktop to
+my projector connected to Kodi.  I sadly had to admit that I had no
+idea, as it was a task I never had tried.  Since then, I have been
+looking for a way to do so, preferable without much extra software to
+install on either side.  Today I found a way that seem to kind of
+work.  Not great, but it is a start.&lt;/p&gt;
+
+&lt;p&gt;I had a look at several approaches, for example
+&lt;a href=&quot;https://github.com/mfoetsch/dlna_live_streaming&quot;&gt;using uPnP
+DLNA as described in 2011&lt;/a&gt;, but it required a uPnP server, fuse and
+local storage enough to store the stream locally.  This is not going
+to work well for me, lacking enough free space, and it would
+impossible for my friend to get working.&lt;/p&gt;
+
+&lt;p&gt;Next, it occurred to me that perhaps I could use VLC to create a
+video stream that Kodi could play.  Preferably using
+broadcast/multicast, to avoid having to change any setup on the Kodi
+side when starting such stream.  Unfortunately, the only recipe I
+could find using multicast used the rtp protocol, and this protocol
+seem to not be supported by Kodi.&lt;/p&gt;
+
+&lt;p&gt;On the other hand, the rtsp protocol is working!  Unfortunately I
+have to specify the IP address of the streaming machine in both the
+sending command and the file on the Kodi server.  But it is showing my
+desktop, and thus allow us to have a shared look on the big screen at
+the programs I work on.&lt;/p&gt;
+
+&lt;p&gt;I did not spend much time investigating codeces.  I combined the
+rtp and rtsp recipes from
+&lt;a href=&quot;https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/&quot;&gt;the
+VLC Streaming HowTo/Command Line Examples&lt;/a&gt;, and was able to get
+this working on the desktop/streaming end.&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+vlc screen:// --sout \
+  &#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;
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;I ssh-ed into my Kodi box and created a file like this with the
+same IP address:&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+echo rtsp://192.168.11.4:8080/test.sdp \
+  &gt; /storage/videos/screenstream.m3u
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;Note the 192.168.11.4 IP address is my desktops IP address.  As far
+as I can tell the IP must be hardcoded for this to work.  In other
+words, if someone elses machine is going to do the steaming, you have
+to update screenstream.m3u on the Kodi machine and adjust the vlc
+recipe.  To get started, locate the file in Kodi and select the m3u
+file while the VLC stream is running.  The desktop then show up in my
+big screen. :)&lt;/p&gt;
+
+&lt;p&gt;When using the same technique to stream a video file with audio,
+the audio quality is really bad.  No idea if the problem is package
+loss or bad parameters for the transcode.  I do not know VLC nor Kodi
+enough to tell.&lt;/p&gt;
+
+&lt;p&gt;&lt;strong&gt;Update 2018-07-12&lt;/strong&gt;: Johannes Schauer send me a few
+succestions and reminded me about an important step.  The &quot;screen:&quot;
+input source is only available once the vlc-plugin-access-extra
+package is installed on Debian.  Without it, you will see this error
+message: &quot;VLC is unable to open the MRL &#39;screen://&#39;.  Check the log
+for details.&quot;  He further found that it is possible to drop some parts
+of the VLC command line to reduce the amount of hardcoded information.
+It is also useful to consider using cvlc to avoid having the VLC
+window in the desktop view.  In sum, this give us this command line on
+the source end
+
+&lt;blockquote&gt;&lt;pre&gt;
+cvlc screen:// --sout \
+  &#39;#transcode{vcodec=mp4v,acodec=mpga,vb=800,ab=128}:rtp{sdp=rtsp://:8080/}&#39;
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;and this on the Kodi end&lt;p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+echo rtsp://192.168.11.4:8080/ \
+  &gt; /storage/videos/screenstream.m3u
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;Still bad image quality, though.  But I did discover that streaming
+a DVD using dvdsimple:///dev/dvd as the source had excellent video and
+audio quality, so I guess the issue is in the input or transcoding
+parts, not the rtsp part.  I&#39;ve tried to change the vb and ab
+parameters to use more bandwidth, but it did not make a
+difference.&lt;/p&gt;
+
+&lt;p&gt;I further received a suggestion from Einar Haraldseid to try using
+gstreamer instead of VLC, and this proved to work great!  He also
+provided me with the trick to get Kodi to use a multicast stream as
+its source.  By using this monstrous oneliner, I can stream my desktop
+with good video quality in reasonable framerate to the 239.255.0.1
+multicast address on port 1234:
+
+&lt;blockquote&gt;&lt;pre&gt;
+gst-launch-1.0 ximagesrc use-damage=0 ! video/x-raw,framerate=30/1 ! \
+  videoconvert ! queue2 ! \
+  x264enc bitrate=8000 speed-preset=superfast tune=zerolatency qp-min=30 \
+  key-int-max=15 bframes=2 ! video/x-h264,profile=high ! queue2 ! \
+  mpegtsmux alignment=7 name=mux ! rndbuffersize max=1316 min=1316 ! \
+  udpsink host=239.255.0.1 port=1234 ttl-mc=1 auto-multicast=1 sync=0 \
+  pulsesrc device=$(pactl list | grep -A2 &#39;Source #&#39; | \
+    grep &#39;Name: .*\.monitor$&#39; |  cut -d&quot; &quot; -f2|head -1) ! \
+  audioconvert ! queue2 ! avenc_aac ! queue2 ! mux.
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;and this on the Kodi end&lt;p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+echo udp://@239.255.0.1:1234 \
+  &gt; /storage/videos/screenstream.m3u
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;Note the trick to pick a valid pulseaudio source.  It might not
+pick the one you need.  This approach will of course lead to trouble
+if more than one source uses the same multicast port and address.
+Note the ttl-mc=1 setting, which limit the multicast packages to the
+local network.  If the value is increased, your screen will be
+broadcasted further, one network &quot;hop&quot; for each increase (read up on
+multicast to learn more. :)!&lt;/p&gt;
+
+&lt;p&gt;Having cracked how to get Kodi to receive multicast streams, I
+could use this VLC command to stream to the same multicast address.
+The image quality is way better than the rtsp approach, but gstreamer
+seem to be doing a better job.&lt;/p&gt;
+
+&lt;blockquote&gt;&lt;pre&gt;
+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;
+&lt;/pre&gt;&lt;/blockquote&gt;
+
+&lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+&lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
+</description>
+       </item>
+       
+        </channel>
+</rss>