User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

RPi-youtube, smooth youtube videos on Chromium

Sun Mar 20, 2016 1:16 pm

I've released a Chromium extension for the RPi that allows you to play youtube videos in omxplayer, allowing much smoother playback.
Currently, when you install the extension and all the required files, when you visit a youtube video it will prompt you if you want to view the video locally. After pressing OK and waiting a few seconds, omxplayer will pop up displaying the video. It's as simple as that!

Edit: Now using omxplayerGUI and all bugs known so far have been fixed. Active development is continuing for support for more features, like over 300 new websites. If the prompt doesn't load, try refreshing the page.\

Edit 2: Now, I've updated the extension to now support >600 websites simply by clicking the extension icon!

Install. If you recently installed Chromium, this should already be installed
Run this in the terminal

Code: Select all

sudo apt-get install rpi-youtube
You must follow these updated instructions first: viewtopic.php?t=121195

Then, install the Chrome extension from the official store: https://chrome.google.com/webstore/deta ... ijaekhhlgn

It should be updated regularly:

Code: Select all

run_omxplayer.py -U
The code is open source and available here: https://github.com/kusti8/RPi-chromium

Any problems can be reported on Github.

Known problems:
No support for users other than pi (this is being worked on)

Credit goes to gkreidl for omxplayerGUI

Questions? or suggestions
You can ask on Gitter here, https://gitter.im/kusti8/RPi-chromium?u ... share-link
or on this thread.

Currently, some features are still being tested, such as setting the omxplayer size and audio output. More features are to come and I'm open to suggestions! Thanks! ;)
Last edited by kusti8 on Mon Apr 04, 2016 9:45 pm, edited 10 times in total.
There are 10 types of people: those who understand binary and those who don't.

mathboy4life
Posts: 197
Joined: Fri Jan 08, 2016 7:29 pm

Re: RPi-youtube

Sun Mar 20, 2016 2:42 pm

Great work!
Also this is not accurate
Known problems:
No support for users other than pi (this is being worked on)

It works only on the raspberry pi because only the raspberry pi uses omxplayer. It will never work for anything other than the PI.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Sun Mar 20, 2016 2:44 pm

mathboy4life wrote:Great work!
Also this is not accurate
Known problems:
No support for users other than pi (this is being worked on)

It works only on he raspberry pi because only the raspberry pi uses omxplayer. It will never work for anything other than the PI.
Key word: user
Currently in the dev branch is a fix. Currently the manifests and install script rely on /home/pi.

But thanks! ;)
There are 10 types of people: those who understand binary and those who don't.

mathboy4life
Posts: 197
Joined: Fri Jan 08, 2016 7:29 pm

Re: RPi-youtube

Sun Mar 20, 2016 2:58 pm

OK sorry i interpreted your sentence wrong. I am guessing you're trying to say that this works only for the username

Code: Select all

PI
. But nice most people use chromium browser and want to watch a full screen YouTube video.
I notice you have

Code: Select all

--win "0 0 639 479"
That resolution is too small. How about "1280 720"?

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Sun Mar 20, 2016 3:30 pm

mathboy4life wrote:OK sorry i interpreted your sentence wrong. I am guessing you're trying to say that this works only for the username

Code: Select all

PI
. But nice most people use chromium browser and want to watch a full screen YouTube video.
I notice you have

Code: Select all

--win "0 0 639 479"
That resolution is too small. How about "1280 720"?
Custom resolution is in the dev branch. I'll push it out once it's all tested.
There are 10 types of people: those who understand binary and those who don't.

User avatar
QBall1977
Posts: 76
Joined: Thu Aug 09, 2012 10:06 am
Location: Hull, East Yorkshire
Contact: Website

Re: RPi-youtube

Sun Mar 20, 2016 4:34 pm

Thank you, definitely going to give this a go. Tried Minitube, but just couldn't get it working. This is a great alternative. Anyone know if OMXPlayer now supports USB speakers?

Keep up the great work!
:D
____________________________________________
Looking for where to start - try Kernel Panic - http://goo.gl/EEQ5J

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Sun Mar 20, 2016 4:35 pm

QBall1977 wrote:Thank you, definitely going to give this a go. Tried Minitube, but just couldn't get it working. This is a great alternative. Anyone know if OMXPlayer now supports USB speakers?

Keep up the great work!
:D
Not sure about the USB speakers. I don't think so.

Thanks!
There are 10 types of people: those who understand binary and those who don't.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Sun Mar 20, 2016 7:30 pm

kusti8 wrote:
mathboy4life wrote:OK sorry i interpreted your sentence wrong. I am guessing you're trying to say that this works only for the username

Code: Select all

PI
. But nice most people use chromium browser and want to watch a full screen YouTube video.
I notice you have

Code: Select all

--win "0 0 639 479"
That resolution is too small. How about "1280 720"?
Custom resolution is in the dev branch. I'll push it out once it's all tested.
I budged. ;) New resolution is 1280x720. Get it with a git pull.
There are 10 types of people: those who understand binary and those who don't.

lumsdot
Posts: 122
Joined: Wed Mar 11, 2015 5:29 pm

Re: RPi-youtube

Sun Mar 20, 2016 9:54 pm

Says the chrome extension will only work if i log into chrome.
Can it be made to work if you dont log into chrome?

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Sun Mar 20, 2016 10:28 pm

lumsdot wrote:Says the chrome extension will only work if i log into chrome.
Can it be made to work if you dont log into chrome?
It should work if you don't login. It worked for me. Can you post a picture?
There are 10 types of people: those who understand binary and those who don't.

cjan
Posts: 723
Joined: Sun May 06, 2012 12:00 am

Re: RPi-youtube

Sun Mar 20, 2016 11:36 pm

wrong user, how to reinstall? all symbolic link went wrong.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Sun Mar 20, 2016 11:38 pm

cjan wrote:wrong user, how to reinstall? all symbolic link went wrong.
Just execute the install script again with the right user (pi) and ignore the errors. Sorry about that, it's fixed in the dev branch but I haven't had time to test it.
There are 10 types of people: those who understand binary and those who don't.

cjan
Posts: 723
Joined: Sun May 06, 2012 12:00 am

Re: RPi-youtube

Sun Mar 20, 2016 11:42 pm

kusti8 wrote:
cjan wrote:wrong user, how to reinstall? all symbolic link went wrong.
Just execute the install script again with the right user (pi) and ignore the errors. Sorry about that, it's fixed in the dev branch but I haven't had time to test it.
ok, but youtube didnt work.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Sun Mar 20, 2016 11:44 pm

cjan wrote:
kusti8 wrote:
cjan wrote:wrong user, how to reinstall? all symbolic link went wrong.
Just execute the install script again with the right user (pi) and ignore the errors. Sorry about that, it's fixed in the dev branch but I haven't had time to test it.
ok, but youtube didnt work.
Try refreshing it. That sometimes helps. Do you get the prompt or where does it fail?
There are 10 types of people: those who understand binary and those who don't.

cjan
Posts: 723
Joined: Sun May 06, 2012 12:00 am

Re: RPi-youtube

Sun Mar 20, 2016 11:50 pm

kusti8 wrote:Try refreshing it. That sometimes helps. Do you get the prompt or where does it fail?
$~/RPi-chromium $ LC_ALL=C sudo bash install.sh
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version.
omxplayer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
fatal: destination path 'youtube-dl' already exists and is not an empty directory.
ln: failed to create symbolic link 'youtube-dl': File exists
wc: invalid zero-length file name
ln: failed to create symbolic link '/usr/bin/run_omxplayer.py': File exists
mkdir: cannot create directory '/etc/chromium-browser/native-messaging-hosts': File exists
Done! Now install the RPi-youtube extension.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Sun Mar 20, 2016 11:52 pm

That looks like it's already installed. When you start chromium and go to a YouTube video on YouTube.com, where does it fail?
There are 10 types of people: those who understand binary and those who don't.

cjan
Posts: 723
Joined: Sun May 06, 2012 12:00 am

Re: RPi-youtube

Sun Mar 20, 2016 11:55 pm

kusti8 wrote:That looks like it's already installed. When you start chromium and go to a YouTube video on YouTube.com, where does it fail?
no oxmplayer only html5 240p.

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

Re: RPi-youtube

Mon Mar 21, 2016 5:49 am

The title of your OP is misleading. It seems to claim that this is the only solution to watch youtube videos on the Pi.
BTW, kweb is offering the same feature for almost three years now and not only for youtube, but for 600+ video websites and all webpages including HTML5 video.
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

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Mon Mar 21, 2016 10:47 am

gkreidl wrote:The title of your OP is misleading. It seems to claim that this is the only solution to watch youtube videos on the Pi.
BTW, kweb is offering the same feature for almost three years now and not only for youtube, but for 600+ video websites and all webpages including HTML5 video.
I realize kweb has had the feature for a long time but how is the title misleading. Where does RPi-youtube suggest anything other than youtube? Can we please keep this in topic? I'm planning to introduce more websites, but the way chromium works is a little restricting.
There are 10 types of people: those who understand binary and those who don't.

fruitoftheloom
Posts: 20704
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: RPi-youtube

Mon Mar 21, 2016 10:49 am

kusti8 wrote:
gkreidl wrote:The title of your OP is misleading. It seems to claim that this is the only solution to watch youtube videos on the Pi.
BTW, kweb is offering the same feature for almost three years now and not only for youtube, but for 600+ video websites and all webpages including HTML5 video.
I realize kweb has had the feature for a long time but how is the title misleading. Where does RPi-youtube suggest anything other than youtube? Can we please keep this in topic? I'm planning to introduce more websites, but the way chromium works is a little restricting.
Maybe you could mention Chromium Browser Rpi 2 & 3 in Title to appease :?:

Also could you put in a RED Warning that it will only work with the RPi 2 & 3, great work by the way.. ;)
Last edited by fruitoftheloom on Mon Mar 21, 2016 10:52 am, edited 1 time in total.
Retired disgracefully.....

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Mon Mar 21, 2016 10:51 am

cjan wrote:
kusti8 wrote:That looks like it's already installed. When you start chromium and go to a YouTube video on YouTube.com, where does it fail?
no oxmplayer only html5 240p.
I realize that, but you need to be more specific.
Try:
rm /usr/bin/run_omxplayer.py
rm /usr/bin/youtube-dl
And try the install again.

Just making sure, you ran the install script and installed the extension?
Last edited by kusti8 on Mon Mar 21, 2016 11:10 am, edited 2 times in total.
There are 10 types of people: those who understand binary and those who don't.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube

Mon Mar 21, 2016 10:51 am

fruitoftheloom wrote:
kusti8 wrote:
gkreidl wrote:The title of your OP is misleading. It seems to claim that this is the only solution to watch youtube videos on the Pi.
BTW, kweb is offering the same feature for almost three years now and not only for youtube, but for 600+ video websites and all webpages including HTML5 video.
I realize kweb has had the feature for a long time but how is the title misleading. Where does RPi-youtube suggest anything other than youtube? Can we please keep this in topic? I'm planning to introduce more websites, but the way chromium works is a little restricting.
Maybe you could mention Chromium Browser Rpi 2 & 3 in Title to appease :?:
Sure
There are 10 types of people: those who understand binary and those who don't.

User avatar
QBall1977
Posts: 76
Joined: Thu Aug 09, 2012 10:06 am
Location: Hull, East Yorkshire
Contact: Website

Re: RPi-youtube, smooth youtube videos on Chromium

Tue Mar 22, 2016 1:01 am

Thanks for your work on this. I did have this working, but then did a git pull, to get the higher resolution. I ran the script once more after the git pull. It all goes well till it tries load up OMXPlayer I think, I get the prompt and a small window appears then quickly disappears. I still get the large buffering bars on the video and it just keeps trying to play on the page, but no longer through OMX Player, suggestions.

Should I uninstall / reinstall the chrome plugin?

You're doing a grand job.

:) :D :D
____________________________________________
Looking for where to start - try Kernel Panic - http://goo.gl/EEQ5J

Nickcn
Posts: 200
Joined: Sat Mar 05, 2016 8:18 pm
Location: USA

Re: RPi-youtube, smooth youtube videos on Chromium

Tue Mar 22, 2016 1:45 am

deleted
Last edited by Nickcn on Mon May 16, 2016 3:35 am, edited 1 time in total.

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: RPi-youtube, smooth youtube videos on Chromium

Tue Mar 22, 2016 11:06 am

QBall1977 wrote:Thanks for your work on this. I did have this working, but then did a git pull, to get the higher resolution. I ran the script once more after the git pull. It all goes well till it tries load up OMXPlayer I think, I get the prompt and a small window appears then quickly disappears. I still get the large buffering bars on the video and it just keeps trying to play on the page, but no longer through OMX Player, suggestions.

Should I uninstall / reinstall the chrome plugin?

You're doing a grand job.

:) :D :D
Thanks. I have a much simpler version which is less error prone and should work much better, so if you can sit tight, that should be much better.

It's still in beta, so thanks for bearing with me. ;)
There are 10 types of people: those who understand binary and those who don't.

Return to “General discussion”