Open BreadMaker opened 8 years ago
Also having this issue
Same here. livestreamer 1.12.2
Also got this issue
If use proper user-agent string, then it is accepted and working again! https://github.com/nitpicker/livestreamer/commit/d5d814fbf673c8bf62c5d34cfed824f8088e30a4
Save https://raw.githubusercontent.com/nitpicker/livestreamer/d5d814fbf673c8bf62c5d34cfed824f8088e30a4/src/livestreamer/plugins/youtube.py to your livestream plugin folder
Is it a profit or law issue??
[Edited] For guy who is unfamiliar with python, there is pre-built one at https://github.com/nitpicker/livestreamer/releases/download/untagged-781898b0704c7ac99ca2/livestreamer-1.12.2.win-amd64.zip (Python 2.7/Windows x64)
it also happened to me ;'(
@nitpicker
I don't seem to have any plugins directory. Ubuntu 15.10
In my case it's /usr/share/livestreamer/livestreamer_cli
, with packages and utils folders. Creating plugins folder and putting Your youtube.py
file, has not helped.
Where is plugins folder supposed to be placed?
@v1kn, usr\lib\python2.7\dist-packages\livestreamer\plugins (I have extracted the deb package under Windows)
You're my hero, nitpicker.
@nitpicker works! Thanks, great job
Want to try this but I'm on Windows 10 can't find the file on my system
@JackSaat , maybe it's in <python dir>\Lib\site-packages\<livestreamer-x.yy.z-py2.7.egg>\livestreamer\plugins.
@nitpicker found that folder here: C:\Program Files (x86)\Livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\plugins but it got .pyc files in it.
Windows version has the .py files compiled into .pyc files. For any updates (for example, this update for Youtube) you will have to compile the youtube.py into a youtube.pyc to make it work.
Date: Wed, 13 Apr 2016 10:46:33 -0700 From: notifications@github.com To: livestreamer@noreply.github.com Subject: Re: [chrippa/livestreamer] 503 error from Youtube (#1284)
@nitpicker found that folder here: C:\Program Files (x86)\Livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\plugins but it got .pyc files in it.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub
@scottbernstein @nitpicker thanks, working great now again!
@nitpicker I've the same issue with livestreamer 1.12.2 in Debian. I tried to replace youtube.py with your version, but it doesn't work better. Do you have any idea?
error: Unable to open URL: http://youtube.com/get_video_info (503 Server Error: Service Unavailable for url: http://ipv4.google.com/sorry/IndexRedirect?continue=http://youtube.com/get_video_info%3Fel%3Dplayer_embedded%26video_id%3DAlZa8oRwc0g&q=CGMSBFAPxwoYvYC-uAUiGQDxp4NLHpRM5dj1SSS_V7oBGgFDu0nOUCAqSWh0dHA6Ly95b3V0dWJlLmNvbS9nZXRfdmlkZW9faW5mbz9lbD1wbGF5ZXJfZW1iZWRkZWQmdmlkZW9faWQ9QWxaYThvUndjMGc)
The issue is with the odd URL you have tried to pass the livestreamer. What's with the "ipv4.google.com" URL? Just use the direct youtube.com/watch?v=XXXX URL and it should work fine.
Date: Thu, 14 Apr 2016 04:35:46 -0700 From: notifications@github.com To: livestreamer@noreply.github.com CC: scott_bernstein@hotmail.com Subject: Re: [chrippa/livestreamer] 503 error from Youtube (#1284)
@nitpicker
I've the same issue with livestreamer 1.12.2 in Debian. I tried to replace youtube.py with your version, but it doesn't work better. Do you have any idea?
error: Unable to open URL: http://youtube.com/get_video_info (503 Server Error: Service Unavailable for url: http://ipv4.google.com/sorry/IndexRedirect?continue=http://youtube.com/get_video_info%3Fel%3Dplayer_embedded%26video_id%3DAlZa8oRwc0g&q=CGMSBFAPxwoYvYC-uAUiGQDxp4NLHpRM5dj1SSS_V7oBGgFDu0nOUCAqSWh0dHA6Ly95b3V0dWJlLmNvbS9nZXRfdmlkZW9faW5mbz9lbD1wbGF5ZXJfZW1iZWRkZWQmdmlkZW9faWQ9QWxaYThvUndjMGc)
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
@nitpicker You are a f*king life saver. I had a project that was using livestreamer and you literally saved me. I am new to streaming videos. Can someone tell me why it was broken before and how it is fixed now? Edit: This fix worked on my linux computer but I get the error on my raspberry pi. Any idea why? Edit: Found the problem and solved. But not sure why or how it happened. /usr/bin had a 'livestreamer' with version number 1.10.2 and /usr/local/bin had a 'livestreamer' with version number 1.12.2. And the command which was used was from /usr/local/bin/. I changed the version number back to 1.10.2 and voila it starts working. Any comments anyone?
@nitpicker Where would I find that file on OS X Yosemite?
@nitpicker Could you please pull request of your Youtube fix in order to be merged with Livestreamer ?
@jcxmej, @chrishukill,
I have no machine which is not running Windows 7, may re-install livestreamer from source is preferred. (See http://docs.livestreamer.io/install.html Source section).
I'm on OSX and used easy_install to install livestreamer.
All I had to to do is replace this
/Library/Python/2.7/site-packages/livestreamer-1.12.2-py2.7.egg/livestreamer/plugins/youtube.py
with this:
https://raw.githubusercontent.com/nitpicker/livestreamer/d5d814fbf673c8bf62c5d34cfed824f8088e30a4/src/livestreamer/plugins/youtube.py
Thanks so much @nitpicker you've made my csgo dreamhack video watching an actual 60fps tonight/next couple days. Now all I have to do is figure out how to/if i have to manually update with easy_install.
@chrishukill check if this is where yours is
People that have mpv can try something like this to watch youtube videos before this gets updated fully:
mpv --ytdl "https://www.youtube.com/watch?v=sLprVF6d7Ug"
Will this be merged into master?
@scottbernstein I tried to compile that youtube.py into a youtube.pyc and when I run livestreamer, I got this error message:
C:\Users\hiepn>livestreamer https://www.youtube.com/watch?v=ybtnI9qvXj8 720p Failed to load plugin youtube: ImportError: Bad magic number in c:\program files (x86)\livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\plugins\youtube.pyc'
error: No plugin can handle URL: https://www.youtube.com/watch?v=ybtnI9qvXj8
What's wrong with me? I use the py_compile
modules, Python 3.5 (x64):
>>> import py_compile
>>> py_compile.compile('youtube.py')
@nitpicker The fix worked great. I am trying to learn why, so I can hopefully troubleshoot these things in the future. i have compared the old youtube.py to yours and I see only one change on one line pertaining to hls headers. Was that the only issue and how would that be determined? Do I need to learn python?
@mdc2008, it's not related to python. I uses Telerik Fiddler to modify/replay the API request.
@nitpicker Awesome... I already have that installed, I just don't know much about it...thank you.
@hiepnhl -- you have to use the latest version of Python 2.7.
Livestreamer does not support Python 3 at this time
On Apr 15, 2016, at 4:37 AM, hiepnhl notifications@github.com wrote:
@scottbernstein I tried to compile that youtube.py into a youtube.pyc and when I run livestreamer, I got this error message:
C:\Users\hiepn>livestreamer https://www.youtube.com/watch?v=ybtnI9qvXj8 720p Failed to load plugin youtube: ImportError: Bad magic number in c:\program files (x86)\livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\plugins\youtube.pyc'
error: No plugin can handle URL: https://www.youtube.com/watch?v=ybtnI9qvXj8
What's wrong with me? I use this py_compile modules, Python 3.5 (x64):
import py_compile py_compile.compile('youtube.py')
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
@nitpicker
I compiled the youtube.py into .pyc and placed in the plugin folder.
I am no longer getting the 503 error , however I am only getting the first frame of the video loading into VLC. If i use -O output.mp4 it does the same thing.
This has been reported many times before. You need to update to the nightly build version of VLC for your platform and it will work fine
Date: Fri, 15 Apr 2016 13:11:15 -0700 From: notifications@github.com To: livestreamer@noreply.github.com CC: scott_bernstein@hotmail.com Subject: Re: [chrippa/livestreamer] 503 error from Youtube (#1284)
@nitpicker
I compiled the youtube.py into .pyc and placed in the plugin folder.
I am no longer getting the 503 error , however I am only getting the first frame of the video loading into VLC. If i use -O output.mp4 it does the same thing.
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
updated to nightly VLC 3.0 and working Thanks
P.S. Last week Youtube live stream recorded well, but now I dealing with this issue.
(1) Done... Replaced youtube.py & youtube.pyc files in ~/venv/PyLearn/lib/python2.7/site-packages/livestreamer/plugins/
Thanks @nitpicker For people that didn't understand.
line 162 ;) In _get_stream_info Does this problem come from a change in Youtube? Why we have to add the navigator in Header now and not before?
Thanks for the youtube plugin fix.
I can write the youtube stream now, but after closing the stream I can't open the file. I'm trying to save the live coachella streams for example..
Just seems to error when I try to open in vlc or quicktime etc? vlc will show the first frame or something try to run it and blip out..
If i run the same command on a standard non-stream youtube, it saves and plays fine.
On MacOSX tried with VLC 2.2.2 and latest nightly build 2.2.3 17thApril -- saving with 'best', which seems to be outputting 1080p60fps hls.
Update: seems to just be an issue with VLC playback? if i open the saved stream in mpv for example it plays fine.. i've tested with both latest vlc nightly build and mpv writing the stream, but playing the file back in vlc fails while mpv is normal....
@ninjada ...not the 2.x nightly build. You need to install the 3.x nightly build for it to work.
Date: Sun, 17 Apr 2016 18:04:33 -0700 From: notifications@github.com To: livestreamer@noreply.github.com CC: scott_bernstein@hotmail.com Subject: Re: [chrippa/livestreamer] 503 error from Youtube (#1284)
Thanks for the fix.
I can write the youtube stream now, but after closing the stream I can't open the file. Just seems to error out.
On MacOSX tried with VLC 2.2.2 and latest nightly build 2.2.3 17thApril
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub
Ahh doh missed that, last Mac v3 nightly build was Feb. Working now, thanks for clearing it up!
@skules thanks for your instructions, but on Windows I don't have a "youtube.py" I just have a "youtube.pyc" which I can not open with an Editor. How to fix the Problem on Windows? Path to the file: C:\Program Files (x86)\Livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\plugins\youtube.pyc
read the nitpicker post (13 day ago).
I'm also getting this on vaughlive.tv streams.
@tobilektri I compiled the .py file with Python. It wouldn't let me upload a .pyc file, so I changed the extension to .txt. Be sure to change it back to .pyc
Quicker solution:
Run as:
livestreamer --http-header "User-Agent"="UA" https://www.youtube.com/watch?v=123
Where UA is a user agent string, such as that which appears at http://whatsmyuseragent.com/
This error comes because YouTube treats livestreamer's HTTP requests as bot requests. The ipv4.google.com address that comes out with the error is a redirect to a captcha page. As far as I know there is no way for livestreamer to prompt a user to solve the captcha. Using a recognised user agent solves this problem.
For what it's worth, on Windows 10 I put the youtube.py file in my plugins folder (mentioned a few times), removed youtube.pyc and ran Livestreamer as usual. It doesn't compile the file to .pyc but it still works just fine (for me).
This fixed it for me, upgrading to the latest nightly build v3.0 for VLC. I didn't need to mess with the .pyc file.
Every time I try to watch a youtube video the following message appears:
For the record, the video can be watched via broswer without problems.
Using livestreamer 1.12.2 with Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux