1 <?xml version=
"1.0" encoding=
"ISO-8859-1"?>
2 <rss version='
2.0' xmlns:lj='http://www.livejournal.org/rss/lj/
1.0/'
>
4 <title>Petter Reinholdtsen - Entries from September
2018</title>
5 <description>Entries from September
2018</description>
6 <link>http://people.skolelinux.org/pere/blog/
</link>
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
>