Closed dynamitemedia closed 10 years ago
other tools like youtube-dl and quvi (mpv uses this) exist for parsing youtube links
i would prefer using livestreamer if possible because of the great support here. I would entertain youtube-dl but no idea how to set that up to work without downloading video first
Adding the following probably will done the job.
def _get_stream_info(self, url):
+ match = re.search("/(embed|v)/([^?]+)", url)
+ if match:
+ url = "http://youtube.com/watch?v={0}".format(match.group(2))
res = http.get(url)
where would i make that change or is that something that needs to be done by Chirrpa?
Here: https://github.com/chrippa/livestreamer/blob/develop/src/livestreamer/plugins/youtube.py
You can place the modified file with changes into livestreamer/plugins folder, but you should delete youtube.pyc
PS. C:\Program Files\Livestreamer\livestreamer-1.7.5-py2.7.egg\livestreamer\plugins\youtube.pyc
sorry but no idea where to put the changes and what directory on a linux box?
basically what line do i change in that file above?
youtube-dl -g
prints a link which can be opened by your-favorite-media-playerâ„¢
still missing something here, sorry but i can't get it working... any help with a working version?
@athoik It would be more simple if you can push youtube embed implementation into youtube.py plugin so everybody will be able to use it without any custom modification. ;)
chirppa, it will now play the embedded video but does not work with start and stopping the video can you test that and see what is going on? it works fine in browser but it starts at beginning each time with the start and stop commands
That is intended, seeking is not supported.
:(
we are working on embedding youtube videos on our site but wanted to still be able to watch these videos on the raspberry pi but can't seem to get any of the following urls to work
http://www.youtube.com/embed/u1zgFlCw8Aw?version=3&start=135&end=145&autoplay=1 or https://www.youtube.com/v/u1zgFlCw8Aw?version=3&start=135&end=145&autoplay=1
i have tried using the following:
livestreamer "http://www.youtube.com/embed/u1zgFlCw8Aw?version=3&start=135&end=145&autoplay=1" best