Page 7 of 8

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sat Jun 22, 2013 10:44 pm
by drugones
Hello,

I'm getting this problem when playing some videos (some instead are working).
I read through the past posts but didn't found anything about it.

Any Idea of what problem this can be ?
(The sim link from /usr/bin/python to /usr/bin/python2.7 is ok)

Code: Select all

Traceback (most recent call last):
  File "/usr/local/bin/pi-yt", line 9, in <module>
    load_entry_point('whitey==0.3', 'console_scripts', 'pi-yt')()
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.3-py2.7.egg/yt/__init__.py", line 41, in main_with_omxplayer
    ui.run()
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.3-py2.7.egg/yt/__init__.py", line 84, in run
    curses.wrapper(self._curses_main)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.3-py2.7.egg/yt/__init__.py", line 128, in _curses_main
    self._run_pager()
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.3-py2.7.egg/yt/__init__.py", line 255, in _run_pager
    self._play_video(c - ord('1'))
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.3-py2.7.egg/yt/__init__.py", line 282, in _play_video
    play_url(url,self._player)
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.3-py2.7.egg/yt/__init__.py", line 389, in play_url
    raise RuntimeError('Error getting URL.')
RuntimeError: Error getting URL.

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sat Jul 06, 2013 9:32 pm
by thegreg
Hello. I use Archlinux on my raspberry with newest version of youtube-dl and whitey-0.2. When i try to run i get this:

Code: Select all

$ yt --player omxplayer
Traceback (most recent call last):
  File "/usr/bin/yt", line 9, in <module>
    load_entry_point('whitey==0.2', 'console_scripts', 'yt')()
  File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 343, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2355, in load_entry_point
    return ep.load()
  File "/usr/lib/python3.3/site-packages/pkg_resources.py", line 2061, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/python3.3/site-packages/whitey-0.2-py3.3.egg/yt/__init__.py", line 5, in <module>
    import curses.wrapper
ImportError: No module named 'curses.wrapper'
[code/]
Any help?

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Mon Jul 08, 2013 3:46 am
by Harbingerx81
I have tried for the last couple of days to get this working with no success...

Currently I have:
- gone back to a fresh image and updated the firmware via rpi-update

-Installed the following:

sudo apt-get install youtube-dl
sudo youtube-dl -U
sudo apt-get install python-setuptools
sudo easy_install whitey

-Verified that omxplayer is up to date

(The above is per instructions here: https://pypi.python.org/pypi/whitey)

-As suggested on an earlier post I have made sure that is have LANG=en_US.utf set in both .profile and in the raspi-config...

-Using raspi-config I have also adjusted my GPU mem to 128

Everything seems to install properly, and the interface loads but when I select a video the "Playing such and such URL" message that appears on screen is as far as it goes...

These steps are all that I have done after a fresh image, so if there are any more suggestions people have or steps that I may have missed I would love some feedback...

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Wed Jul 10, 2013 7:17 am
by Tobberoth
I got it working yesterday (followed the OPs exactly which didn't work since yt refused to start the videos, then I updated youtube-dl from the link earlier in the thread and now it works great).

My problem is that omxplayer does not allow me to seek. Space works perfectly for pause/play, the number keys work fine to control the speed of the video, but the arrow keys do absolutely nothing...

Anyone know how I can get them to work?

Also, an extra n00b question: If I plug my raspberry pi into my TV, then ssh into it from my computer and run this yt setup, will the omxplayer play the video on my TV, or try to do it to my ssh terminal?

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Thu Aug 01, 2013 11:41 pm
by drummingsim
This looks like a great idea! I followed the instructions very closely but unfortunately it would seem it's not working. Basically, I can get the yt command to work in terminal, but when I select a video (using numbers 1-9) it comes up saying "Playing <youtube link>" which then disappears, but nothing else happens. I have both mplayer and omxplayer installed, both of which work as I have tested videos on them. I don't understand what's gone wrong here :|

Cheers,

Si

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sun Aug 04, 2013 6:03 pm
by solar3000
mine doesn't run.

when I break it down I get this error.

when I run youtube-dl I see the problem:

Code: Select all

 ./youtube-dl http://www.youtube.com/watch?v=aH3Q_CZy968
[youtube] Setting language
[youtube] aH3Q_CZy968: Downloading video webpage
[youtube] aH3Q_CZy968: Downloading video info webpage
[youtube] aH3Q_CZy968: Extracting video information

ERROR: unable to download video

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sun Aug 04, 2013 6:11 pm
by solar3000
I found the answer.
it has its own updater
youtube-dl --update

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sun Aug 04, 2013 6:27 pm
by solar3000
ok now that I got youtube-dl and yt working...
How do I get it to work in a browser like midori?

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Wed Aug 14, 2013 11:00 am
by tjmeneses
Hopefully the original creator of this code still checks the thread occasionally.

I'm having a bit of a pickle. I managed to get this running, but the speakers I plugged into the Pi won't output the audio from Youtube. Is there something in the installation process I can do to force analog audio out?

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sun Aug 18, 2013 2:39 pm
by jcoonrod
Tried this today, and while yt runs a list of videos, and while my oxmplayer command works from the command line with files, youtube doesn't seem to play. I read on another suggestion that youtube has changed its file conventions. Is this still working for everyone? If so, how would I find the errors and fix my problem.

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Fri Sep 20, 2013 8:11 am
by ciancmatt
when i try to install i get this
chmod: cannot access `youtube.dl': No such file or directory
chmod: cannot access `cp': No such file or directory
chmod: cannot access `youtube.dl': No such file or directory
chmod: cannot access `/usr/bin/youtube.dl': No such file or directory

it would be great if someone could help :D

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sun Sep 29, 2013 1:58 pm
by paopaomj
Hi, guys
Will yt support proxy settings?
I'm in China, as you may know, youtube is blocked here.
I see youtube-dl currently has proxy toggle already, will yt handle this feature too?
By now I use global pptp vpn on Pi for to use yt.
I tried to ask the yt author but I didn't find any contact info of him on the whitey pypi page .
Any suggestion is welcome.
Thanks !

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sun Nov 10, 2013 12:34 pm
by Quasim0ndo
For those who still have the issue of yt running but not displaying any video, here's what eventually worked for me:

- not sure if this was important, but following the post above I changed my default locale to en_US.utf using raspi-config. Make sure to do a sudo reboot afterwards and check that the settings stuck by calling locale. It should say LANG=en_US.UTF-8

- another important thing is that you should once run sudo youtube-dl --update - the line youtube-dl --U as the documentation said did not work for me and the sudo is important if you do not have admin rights otherwise the downloader cannot overwrite the files.

- start yt with yt --player omxplayer

. lastly depending on your connection speed and the size of the video you want to see you have to be a little bit patient after selecting and starting a video in yt. The playback does not start immediately after the selection but it will take several seconds in which nothing happens exept for that message box that tells you "Playing https://www.youtube.com.....

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Tue Dec 31, 2013 12:52 am
by kreker
hi. this is awesome.after some troubles with the locale setting I can get it working!
Only one thing, I can't get the prev/next choise. On my keyboard the "/" is with shift+7, what I'm doing wrong?

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sun Jan 26, 2014 9:58 pm
by Adz
When I try to use this ([email protected] ~ $ yt), all I get is this response:
Traceback (most recent call last):
File "/usr/local/bin/yt", line 9, in <module>
load_entry_point('whitey==0.1', 'console_scripts', 'yt')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2279, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1994, in load
raise ImportError("%r has no %r attribute" % (entry,attr))
ImportError: <module 'yt' from '/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.pyc'> has no 'main' attribute
Any help?

NP! I'm a 15-year old PiNoob, and thus have very little knowledge on this.

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Tue Aug 19, 2014 8:53 pm
by itsmeee
worked fine for me., thanks

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sun Feb 15, 2015 4:17 pm
by wenrong443
hello, may i ask some of the music video cannot run? It only display playing https://www.youtube.com/xxxxxxxxx(something) but after that display nothing, for example, the jay chou ś music video. Please help me. Thanks. :oops:

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Tue Mar 24, 2015 5:38 pm
by Gregon
Is it possible to play youtube url?

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Thu Apr 02, 2015 8:41 pm
by viniciusvec
Thank you man, great tool!
Looking forward to use it sometime over netcat in order to create a geek Jukebox or something.

8-)

only one video i can see : https://youtube.com/devicesupport

Posted: Sun May 31, 2015 9:29 am
by sunoon9
hello,

Thank you, it's a great tool ! :D

But i have a problem when i'm runing with Arch. When i launch yt, there is only one video that i can see :
https://youtube.com/devicesupport

Youtube say to me:
"if you see this video in your YouTube app’s video feeds, your device is affected. (Note: If the video appears unexpectedly in a web browser, it means that website is using an outdated method to access YouTube videos.)"

Any ideas ? :geek:

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Wed Jun 17, 2015 6:15 pm
by DoggyGaming97
When I run yt the menus pop up for a split second than this happens:

Traceback (most recent call last):
File "/usr/local/bin/yt", line 9, in <module>
load_entry_point('whitey==0.1', 'console_scripts', 'yt')()
File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 16, in main
ui.run()
File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 56, in run
curses.wrapper(self._curses_main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 100, in _curses_main
self._run_pager()
File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 174, in _run_pager
feed = self._get_feed(idx, n_per_page)
File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 141, in _get_feed
self._last_feed = self._feed['fetch_cb'](start, count, self._ordering)
File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 406, in fetch_cb
return json.load(urllib2.urlopen('%s?%s' % (url, urllib.urlencode(query))))
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 407, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 445, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 410: Gone

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sat Aug 01, 2015 7:30 am
by NewGalaxy
Hello,

I have that same problem;

Traceback (most recent call last):
File "/usr/local/bin/yt", line 9, in <module>
load_entry_point('whitey==0.4', 'console_scripts', 'yt')()
File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 37, in main
ui.run()
File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 103, in run
curses.wrapper(self._curses_main)
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 147, in _curses_main
self._run_pager()
File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 221, in _run_pager
feed = self._get_feed(idx, n_per_page)
File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 188, in _get_feed
self._last_feed = self._feed['fetch_cb'](start, count, self._ordering)
File "/usr/local/lib/python2.7/dist-packages/whitey-0.4-py2.7.egg/yt/__init__.py", line 484, in fetch_cb
return json.load(urllib2.urlopen('%s?%s' % (url, urllib.urlencode(query))))
File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 407, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 445, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 410: Gone


Please help me.

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sat Aug 01, 2015 12:34 pm
by Joe Schmoe
Note: I haven't read this whole thread - just scanned the last page's worth of responses, but I see that people are complaining about youtube-dl just outright failing every once in a while - that is, spewing a traceback instead of doing what it is supposed to do.

As far as I can tell, this just happens every once in a while, and there's nothing you can do about it other than retry. Almost always, when I retry it, it just works.

Keeping updated to the latest version of youtube-dl is, of course, obligatory, but the problem is still real. I have filed an "issue" on this over at youtube-dl's support area (as Joe Schmoe), but not much has happened on it, because, although they were able to replicate the problem at least once, the fact that no one (not even me) can replicate it on demand means that it is hard to follow up on.

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Sat Aug 01, 2015 1:17 pm
by gkreidl
whitey-0.4 uses the old, deprecated youtube interface, which has been disabled by youtube a few months ago.

For the new interface you need a license key from youtube (the developer).

Re: HOWTO: YouTube on the Raspberry Pi - sans X B-)

Posted: Mon Sep 07, 2015 3:36 pm
by shentan93
hi guys, i'm having the same errors as DoggyGaming97 and NewGalaxy. The menu happens to be showing for a second and then i got all these errors.. Please help me as i'm currently working on this for a project of mine in school..

Code: Select all

Traceback (most recent call last):
  File "/usr/local/bin/yt", line 9, in <module>
    load_entry_point('whitey==0.1', 'console_scripts', 'yt')()
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 16, in main
    ui.run()
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 56, in run
    curses.wrapper(self._curses_main)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 100, in _curses_main
    self._run_pager()
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 174, in _run_pager
    feed = self._get_feed(idx, n_per_page)
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 141, in _get_feed
    self._last_feed = self._feed['fetch_cb'](start, count, self._ordering)
  File "/usr/local/lib/python2.7/dist-packages/whitey-0.1-py2.7.egg/yt/__init__.py", line 378, in fetch_cb
    return json.load(urllib2.urlopen('%s?%s' % (url, urllib.urlencode(query))))
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 407, in open
    response = meth(req, response)
  File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python2.7/urllib2.py", line 445, in error
    return self._call_chain(*args)
  File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 410: Gone