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

Get the URL to stream a video #7

Closed
simonwjackson opened this issue Jun 1, 2015 · 10 comments
Closed

Get the URL to stream a video #7

simonwjackson opened this issue Jun 1, 2015 · 10 comments

Comments

@simonwjackson
Copy link
Contributor

No description provided.

@pkkid
Copy link
Owner

pkkid commented Jun 1, 2015

I'm curious about this request. How are you using this url? I assumed it would only be useful with a proper plea client.

@simonwjackson
Copy link
Contributor Author

The response of the URL is a video stream that you can simply pass to VLC, MPV or many other video players. It works quite well.

@simonwjackson
Copy link
Contributor Author

@mjs7231 Looking into it a bit further, the stream is: h264, aac

I'm guessing this is because X-Plex-Platform is set to Chrome

@pkkid pkkid changed the title Feature: Get the URL to stream a video Get the URL to stream a video Jun 2, 2015
@pkkid
Copy link
Owner

pkkid commented Jun 2, 2015

NOTE: With commit 43e99e9 you can now specify the headers including X-Plex-Platform via an ini file.

@pkkid
Copy link
Owner

pkkid commented Jun 2, 2015

I can't get this to stream in VLC, not sure what I'm doing wrong here. :(

@simonwjackson
Copy link
Contributor Author

@mjs7231 Can you paste the URL? (feel free to scrub the IP) 😃

@pkkid
Copy link
Owner

pkkid commented Jun 4, 2015

Here is the command I am trying to run.

>> vlc "http://localhost:32400/video/:/transcode/universal/start?maxVideoBitrate=128&X-Plex-Platform=Chrome&copyts=1&offset=0&path=http%3A%2F%2F127.0.0.1%3A32400%2Flibrary%2Fmetadata%2F%2Flibrary%2Fmetadata%2F4431&mediaIndex=0&videoResolution=1280x720"
[0x7f881c001098] access_http access error: error: HTTP/1.1 400 Bad Request
[0x7f881c001098] access_http access error: error: HTTP/1.1 400 Bad Request
[0x7f881c001098] access_mms access error: error: HTTP/1.1 400 Bad Request
[0x7f883800ac88] main input error: open of `http://localhost:32400/video/:/transcode/universal/start?maxVideoBitrate=128&X-Plex-Platform=Chrome&copyts=1&offset=0&path=http%3A%2F%2F127.0.0.1%3A32400%2Flibrary%2Fmetadata%2F%2Flibrary%2Fmetadata%2F4431&mediaIndex=0&videoResolution=1280x720' failed

EDIT: HEYA! -- I got it with this URL. turns out it was also including the /library/metadata part twice.

vlc "http://localhost:32400/video/:/transcode/universal/start?maxVideoBitrate=128&X-Plex-Platform=Chrome&copyts=1&offset=0&path=http%3A%2F%2F127.0.0.1%3A32400%2Flibrary%2Fmetadata%2F4431&mediaIndex=0&videoResolution=1280x720"

@pkkid
Copy link
Owner

pkkid commented Jun 4, 2015

I added this without using a separate StreamURL object. The function Video.getStreamURL was added using your code as the example, thanks!

commit 527b0ee
Author: Michael Shepanski mjs7231@gmail.com
Date: Thu Jun 4 00:00:37 2015 -0400
Add Video.getStreamURL()

@pkkid pkkid closed this as completed Jun 4, 2015
@ZePaiva
Copy link

ZePaiva commented Jul 8, 2021

Is this method still available on Movie objects or has it passed to otther type of objects?

If it's still available on Movie objects what is the code to get it?
I'm using this sample but it's throwing AttributeError:

server=PlexServer( ( HOST+':'+str(PORT) ), PLEX_TOKEN)
mov=server.library.section('Movies').get('mov1')
print(mov.getStreamUrl())

@blacktwin
Copy link
Collaborator

@ZePaiva Method is still working. Please provide more information like the entire error. Also create a new issue or use the Python-PlexAPI Discord.

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

No branches or pull requests

4 participants