]> pere.pagekite.me Git - homepage.git/blob - blog/data/2018-09-02-kodi-linux-youtube.txt
Generated.
[homepage.git] / blog / data / 2018-09-02-kodi-linux-youtube.txt
1 Title: Using the Kodi API to play Youtube videos
2 Tags: english, debian, video, kodi
3 Date: 2018-09-02 23:40
4
5 <p>I continue to explore my Kodi installation, and today I wanted to
6 tell it to play a youtube URL I received in a chat, without having to
7 insert search terms using the on-screen keyboard. After searching the
8 web for API access to the Youtube plugin and testing a bit, I managed
9 to find a recipe that worked. If you got a kodi instance with its API
10 available from http://kodihost/jsonrpc, you can try the following to
11 have check out a nice cover band.</p>
12
13 <p><blockquote><pre>curl --silent --header 'Content-Type: application/json' \
14 --data-binary '{ "id": 1, "jsonrpc": "2.0", "method": "Player.Open",
15 "params": {"item": { "file":
16 "plugin://plugin.video.youtube/play/?video_id=LuRGVM9O0qg" } } }' \
17 http://projector.local/jsonrpc</pre></blockquote></p>
18
19 <p>I've extended kodi-stream program to take a video source as its
20 first argument. It can now handle direct video links, youtube links
21 and 'desktop' to stream my desktop to Kodi. It is almost like a
22 Chromecast. :)</p>
23
24 <p>As usual, if you use Bitcoin and want to show your support of my
25 activities, please send Bitcoin donations to my address
26 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>