drugones
Posts: 1
Joined: Sat Jun 22, 2013 10:39 pm

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

Sat Jun 22, 2013 10:44 pm

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.

thegreg
Posts: 1
Joined: Sat Jul 06, 2013 9:19 pm

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

Sat Jul 06, 2013 9:32 pm

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?

Harbingerx81
Posts: 3
Joined: Thu Feb 02, 2012 8:44 pm

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

Mon Jul 08, 2013 3:46 am

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...

Tobberoth
Posts: 4
Joined: Tue Jul 09, 2013 8:14 am

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

Wed Jul 10, 2013 7:17 am

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?

drummingsim
Posts: 2
Joined: Tue Jul 23, 2013 10:55 pm
Location: Livingston, West Lothian, Scotland

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

Thu Aug 01, 2013 11:41 pm

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

User avatar
solar3000
Posts: 1011
Joined: Sat May 18, 2013 12:14 am

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

Sun Aug 04, 2013 6:03 pm

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
Antikythera

User avatar
solar3000
Posts: 1011
Joined: Sat May 18, 2013 12:14 am

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

Sun Aug 04, 2013 6:11 pm

I found the answer.
it has its own updater
youtube-dl --update
Antikythera

User avatar
solar3000
Posts: 1011
Joined: Sat May 18, 2013 12:14 am

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

Sun Aug 04, 2013 6:27 pm

ok now that I got youtube-dl and yt working...
How do I get it to work in a browser like midori?
Antikythera

tjmeneses
Posts: 1
Joined: Thu Jul 18, 2013 3:24 pm

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

Wed Aug 14, 2013 11:00 am

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?

jcoonrod
Posts: 2
Joined: Sun Aug 18, 2013 2:37 pm

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

Sun Aug 18, 2013 2:39 pm

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.

ciancmatt
Posts: 10
Joined: Tue Sep 17, 2013 7:24 pm

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

Fri Sep 20, 2013 8:11 am

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
New to the pi

paopaomj
Posts: 1
Joined: Sun Sep 29, 2013 1:49 pm

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

Sun Sep 29, 2013 1:58 pm

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 !

Quasim0ndo
Posts: 14
Joined: Fri May 17, 2013 1:43 pm

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

Sun Nov 10, 2013 12:34 pm

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.....

kreker
Posts: 1
Joined: Tue Dec 31, 2013 12:50 am

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

Tue Dec 31, 2013 12:52 am

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?

Adz
Posts: 1
Joined: Sun Jan 26, 2014 9:53 pm

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

Sun Jan 26, 2014 9:58 pm

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.
What? You expected something clever or funny in a signature? Well tough. You're getting this.

itsmeee
Posts: 2
Joined: Tue Aug 19, 2014 8:48 pm

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

Tue Aug 19, 2014 8:53 pm

worked fine for me., thanks

wenrong443
Posts: 1
Joined: Sun Feb 15, 2015 4:11 pm

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

Sun Feb 15, 2015 4:17 pm

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:

Gregon
Posts: 1
Joined: Tue Mar 24, 2015 5:34 pm

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

Tue Mar 24, 2015 5:38 pm

Is it possible to play youtube url?

viniciusvec
Posts: 1
Joined: Thu Apr 02, 2015 8:39 pm

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

Thu Apr 02, 2015 8:41 pm

Thank you man, great tool!
Looking forward to use it sometime over netcat in order to create a geek Jukebox or something.

8-)

sunoon9
Posts: 4
Joined: Sun May 31, 2015 9:19 am

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

Sun May 31, 2015 9:29 am

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:

DoggyGaming97
Posts: 3
Joined: Wed Jun 17, 2015 6:12 pm

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

Wed Jun 17, 2015 6:15 pm

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

NewGalaxy
Posts: 1
Joined: Sat Aug 01, 2015 7:24 am

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

Sat Aug 01, 2015 7:30 am

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.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

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

Sat Aug 01, 2015 12:34 pm

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.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

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

Sat Aug 01, 2015 1:17 pm

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).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

shentan93
Posts: 1
Joined: Mon Sep 07, 2015 3:28 pm

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

Mon Sep 07, 2015 3:36 pm

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

Return to “Media centres”

Who is online

Users browsing this forum: No registered users and 3 guests