Page 1 of 3

RPi-youtube, smooth youtube videos on Chromium

Posted: Sun Mar 20, 2016 1:16 pm
by kusti8
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! ;)

Re: RPi-youtube

Posted: Sun Mar 20, 2016 2:42 pm
by mathboy4life
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.

Re: RPi-youtube

Posted: Sun Mar 20, 2016 2:44 pm
by kusti8
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! ;)

Re: RPi-youtube

Posted: Sun Mar 20, 2016 2:58 pm
by mathboy4life
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"?

Re: RPi-youtube

Posted: Sun Mar 20, 2016 3:30 pm
by kusti8
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.

Re: RPi-youtube

Posted: Sun Mar 20, 2016 4:34 pm
by QBall1977
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

Re: RPi-youtube

Posted: Sun Mar 20, 2016 4:35 pm
by kusti8
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!

Re: RPi-youtube

Posted: Sun Mar 20, 2016 7:30 pm
by kusti8
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.

Re: RPi-youtube

Posted: Sun Mar 20, 2016 9:54 pm
by lumsdot
Says the chrome extension will only work if i log into chrome.
Can it be made to work if you dont log into chrome?

Re: RPi-youtube

Posted: Sun Mar 20, 2016 10:28 pm
by kusti8
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?

Re: RPi-youtube

Posted: Sun Mar 20, 2016 11:36 pm
by cjan
wrong user, how to reinstall? all symbolic link went wrong.

Re: RPi-youtube

Posted: Sun Mar 20, 2016 11:38 pm
by kusti8
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.

Re: RPi-youtube

Posted: Sun Mar 20, 2016 11:42 pm
by cjan
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.

Re: RPi-youtube

Posted: Sun Mar 20, 2016 11:44 pm
by kusti8
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?

Re: RPi-youtube

Posted: Sun Mar 20, 2016 11:50 pm
by cjan
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.

Re: RPi-youtube

Posted: Sun Mar 20, 2016 11:52 pm
by kusti8
That looks like it's already installed. When you start chromium and go to a YouTube video on YouTube.com, where does it fail?

Re: RPi-youtube

Posted: Sun Mar 20, 2016 11:55 pm
by cjan
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.

Re: RPi-youtube

Posted: Mon Mar 21, 2016 5:49 am
by gkreidl
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.

Re: RPi-youtube

Posted: Mon Mar 21, 2016 10:47 am
by kusti8
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.

Re: RPi-youtube

Posted: Mon Mar 21, 2016 10:49 am
by fruitoftheloom
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.. ;)

Re: RPi-youtube

Posted: Mon Mar 21, 2016 10:51 am
by kusti8
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?

Re: RPi-youtube

Posted: Mon Mar 21, 2016 10:51 am
by kusti8
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

Re: RPi-youtube, smooth youtube videos on Chromium

Posted: Tue Mar 22, 2016 1:01 am
by QBall1977
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

Re: RPi-youtube, smooth youtube videos on Chromium

Posted: Tue Mar 22, 2016 1:45 am
by Nickcn
deleted

Re: RPi-youtube, smooth youtube videos on Chromium

Posted: Tue Mar 22, 2016 11:06 am
by kusti8
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. ;)