--- /dev/null
+Title: Using the Kodi API to play Youtube videos
+Tags: english, debian, video
+Date: 2018-09-02 23:30
+
+<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=bmHHw5j2BhI&incognito=true&screensaver=true" } } }' 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>