As you saw in my previous post / video, I was running Youtube videos in fullscreen on my little display. I was using an application (really just a 2000+ line perl script) that does this for me. The program is called youtube-viewer (github)
Gcala posted a nice guide on how to set it up and has given me permission to also repost it here. I’m making some modifications as I had to do a couple changes, but it works.
- sudo apt-get install gcc-4.7
- export CC=gcc-4.7
- export CXX=g++-4.7
- sudo apt-get install libwww-perl
- sudo cpan -i XML::Fast
- sudo wget https://github.com/downloads/ssilverm/youtube-viewer/youtube-viewer -O /usr/bin/youtube-viewer
- sudo chmod +x /usr/bin/youtube-viewer
Now just type youtube-viewer on the command line and you are good to go 🙂
List of Commands
all : play all the results in order next : go to the next page (same as <ENTER>) back : return to the previous page login : will prompt you for login logout : will delete the authentication key [integer] : play the corresponding video i, info [i] : show more informations about one video c, comments [i] : show video comments (e.g.: c 19) r, related [i] : show related videos (e.g.: r 6) v, videos [i] : show author's latest videos p, playlists [i] : show author's latest playlists subscribe [i] : subscribe to author's channel like, dislike [i] : like or dislike a video fav, favorite [i] : favorite a video (e.g.: fav 3) [keywords] : search for youtube videos 3-8, 3..8 : same as 3 4 5 6 7 8 8 2 12 4 6 5 1 : play the videos in your order -argv -argv2=v : set some arguments (e.g.: -u=google) e, edit-config : edit and apply the configuration load-config : (re)load the configuration file /my?[regex]*$/ : play videos matched by a regex (/i) reset, reload : restart the application q, quit, exit : close the application
Let me know if you have any issues or questions!
I’ve some problems. Everything works, but I can’t force audio hdmi output and I have only composite-analog audio all the time.
I’ve already set this settings on /boot/config.txt:
and hdmi audio is already working on other apps such as Quake3.
What can I do?
I’m getting this same issue. I only just switched to HDMI. I’ve been using composite out since I got it, and sound works great through the headphone jack.
I’ll look into it.
It seems a problem releated to HDMI audio, disabling audio the game works fine. 😉
I’m sorry, I replied to the wrong post 😉
About youtube, I fixed it passing -o hdmi to omxplayer with a little script, as explained in the Gcala post you linked 😉
Now it works fine 🙂
Hey. Thanks for the tutorial. I followed everything (appears to be successful) however after I run youtube-viewer, locate and choose the video I want, it seems to get the video but never launches the player. It just dumps back to the search results. Thoughts? Thanks!
Same as Brian. I had youtube-viewer working perfectly, but then one day it just stopped. It loads great, does a search. When I type a number in for the video I want to play it sends it to omxplayer which just gives ‘have a nice day :)’ and then the search is relisted (as if the video has successfully played).
I’ve done the basics. Tried reinstalling everything, and got all my updates, but nothing. Even configured yt-player but that seems to fail at the same point.
If anyone has any ideas, I’d really appreciate it. My wife and I have been using youtube player as practically our only source of entertainment on the telly.
I will look into this!
It’s really strange. I just got a new SD card and installed the latest version of Raspbian on it, and ran all the updates and then followed the instructions you provided, and I still have the same problem. I wonder if this is anything to do with where I am situated? I’m in Australia btw…
I have the same problem, youtube-viewer will display the video information and then omxplayer prints “Have a nice day” and then the search results are displayed again.
Hi Ssilver2k2, can you confirm that the youtube player still works for you. Sorry to be a pain. I’m really struggling to get to the bottom of it.