Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement video playback #52

Open
razzeee opened this issue Aug 21, 2020 · 1 comment
Open

Implement video playback #52

razzeee opened this issue Aug 21, 2020 · 1 comment

Comments

@razzeee
Copy link
Member

razzeee commented Aug 21, 2020

No description provided.

@ionif
Copy link
Collaborator

ionif commented Apr 20, 2022

Writing these notes for future reference:

We need to use GetMovieDetails with the movie ID in order to get the filepath like in this python example: json_query = xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.GetMovieDetails", "params": {"properties": ["file", "imdbnumber", "year", "trailer", "streamdetails", "art"], "movieid":%s }, "id": 1}' %dbid)

Then we can use Files.PrepareDownload to get a url we can playback:
curl --user kodi:kodi --header "Content-Type: application/json" --data '{"jsonrpc":"2.0", "id":1, "method":"Files.PrepareDownload", "params":{ "path": "/home/a1rwulf/Videos/moviecuts/2_Fast_2_Furious/2_Fast_2_Furious.mkv" }}' 'http://127.0.0.1:8080/jsonrpc'

We can playback that url in the browser with a HTML5 player(only will support some formats, if we ever get transcoding working we could support every format)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants