From: Petter Reinholdtsen Date: Sun, 2 Sep 2018 21:24:09 +0000 (+0200) Subject: Document how to start a youtube movie via Kodi API. X-Git-Url: http://pere.pagekite.me/gitweb/homepage.git/commitdiff_plain/4bdbd8fa0b9c8ef1c6cf54746554874d33852d22 Document how to start a youtube movie via Kodi API. --- diff --git a/blog/data/2018-09-02-kodi-linux-youtube.txt b/blog/data/2018-09-02-kodi-linux-youtube.txt new file mode 100644 index 0000000000..dfb0bbcc3e --- /dev/null +++ b/blog/data/2018-09-02-kodi-linux-youtube.txt @@ -0,0 +1,23 @@ +Title: Using the Kodi API to play Youtube videos +Tags: english, debian, video +Date: 2018-09-02 23:30 + +

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.

+ +

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

+ +

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. :)

+ +

As usual, if you use Bitcoin and want to show your support of my +activities, please send Bitcoin donations to my address +15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.