OpenVG based YouTube client.


75 posts   Page 3 of 3   1, 2, 3
by bbond007 » Sun Jan 13, 2013 6:54 pm
++bahjatk++ wrote:I would try to embed raspytube in an x window using GTK+ in the upcoming month or two :)
it would still be controled by keyboard, but window resizing will be available at least. I might not be the best one to do this, but raspytube is currently the best Raspberry Pi youtube player and it'd be awesome with a mouse.


Mouse support has been added... You may need to set the mouse device in the Input Menu.. It defaults to "/dev/input/event0". Use left, or right cursor to change. When you get the right device the mouse will magically start working.

https://github.com/bbond007/raspytube/b ... t_menu.jpg

I decided to make everything single-click based so that I'll be able to support touch screens in the future.

In the main results screen if you click the top-leftmost area of the screen the main menu will come up. Clicking far left or fetches the next or previous set of results.

If you are going to use the mouse, its best not to do so inside xwindows as you'll otherwise be clicking on random stuff on the desktop...

I'm working on a better mouse pointer... this one is temporary until I come up with something better.
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by ++bahjatk++ » Sun Jan 13, 2013 9:19 pm
bbond007 wrote:
++bahjatk++ wrote:I would try to embed raspytube in an x window using GTK+ in the upcoming month or two :)
it would still be controled by keyboard, but window resizing will be available at least. I might not be the best one to do this, but raspytube is currently the best Raspberry Pi youtube player and it'd be awesome with a mouse.


Mouse support has been added... You may need to set the mouse device in the Input Menu.. It defaults to "/dev/input/event0". Use left, or right cursor to change. When you get the right device the mouse will magically start working.

https://github.com/bbond007/raspytube/b ... t_menu.jpg

I decided to make everything single-click based so that I'll be able to support touch screens in the future.

In the main results screen if you click the top-leftmost area of the screen the main menu will come up. Clicking far left or fetches the next or previous set of results.

If you are going to use the mouse, its best not to do so inside xwindows as you'll otherwise be clicking on random stuff on the desktop...

I'm working on a better mouse pointer... this one is temporary until I come up with something better.


Pretty nice job! Thank you! I would love to see xwindow support though.
I am pretty sure you can do it way before I get my Pi, it seems to take forever to arrive.
Posts: 36
Joined: Sun Dec 30, 2012 10:02 am
by bbond007 » Fri Jan 18, 2013 2:05 am
raspytube_X11.JPG
raspytube_X11.JPG (56.53 KiB) Viewed 1412 times
This application can now run in a X11 window. The app is not really running in X11 window, but it is a clever illusion. How I accomplish this is I create a dummy X11 window, track the movement of that window on the desktop then uses "vc_dispmanx_element_change_attributes" of the VC output to match. This has the added benefit of being able to take input focus and capture X11 input such as mouse move/enter events and keypresses. Apparently it is very expensive to call XGetWindowAttributes and XGetGeometry (that is actually how MC Hammer went broke), so I only do so periodically which is why you'll notice a slight lag when you move the window(before the VC window catches up). This is also why the window always front-most. To switch to XWindows mode, There is an invisible "button" on right-topmost position to toggle on the screen or the "q" key (for quarter-screen).

Not perfect, but still, this is cool hack and I hope to modify OMXPlayer to work in the same way...
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by ++bahjatk++ » Fri Jan 18, 2013 8:08 pm
bbond007 wrote:
raspytube_X11.JPG
This application can now run in a X11 window. The app is not really running in X11 window, but it is a clever illusion. How I accomplish this is I create a dummy X11 window, track the movement of that window on the desktop then uses "vc_dispmanx_element_change_attributes" of the VC output to match. This has the added benefit of being able to take input focus and capture X11 input such as mouse move/enter events and keypresses. Apparently it is very expensive to call XGetWindowAttributes and XGetGeometry (that is actually how MC Hammer went broke), so I only do so periodically which is why you'll notice a slight lag when you move the window(before the VC window catches up). This is also why the window always front-most. To switch to XWindows mode, There is an invisible "button" on right-topmost position to toggle on the screen or the "q" key (for quarter-screen).

Not perfect, but still, this is cool hack and I hope to modify OMXPlayer to work in the same way...


I must say man, you're a friggin genius!
I finally got my Pi but still waiting for the sd card I ordered on eBay.. I'll get it sooner rather than later and install raspytube before anything on raspbian!
Posts: 36
Joined: Sun Dec 30, 2012 10:02 am
by kalehrl » Sat Jan 19, 2013 11:25 pm
Hi bbond007
Could you consider adding some popular youtube channels such as music, sport, gaming etc.?
Sometimes I like to watch music videos and it would be great if I could just go to menu and choose music channel and play some videos.
Thanks
Posts: 342
Joined: Tue Jul 24, 2012 10:49 am
by dudeman » Sun Jan 20, 2013 9:50 pm
Thank you Sir!
User avatar
Posts: 22
Joined: Sun Jan 20, 2013 1:20 am
Location: USA
by dudeman » Sun Jan 20, 2013 10:59 pm
kalehrl wrote:I compared the sizes of your binary and the one I compiled and mine is much bigger - 1.7MB compared to yours of 1.14MB. So I assumed it was the old version. Any ideas why such size difference?


I know my comment is old, but just as a general tip use
Code: Select all
/usr/bin/md5sum
to get a hash of a file to compare with others. If you are uncomfortable with the collision issues md5 has, you can also use shasum.
User avatar
Posts: 22
Joined: Sun Jan 20, 2013 1:20 am
Location: USA
by bbond007 » Mon Jan 21, 2013 1:27 am
kalehrl wrote:Hi bbond007
Could you consider adding some popular youtube channels such as music, sport, gaming etc.?
Sometimes I like to watch music videos and it would be great if I could just go to menu and choose music channel and play some videos.
Thanks


Do you just mean to add some popular searches or does YouTube have any official channels you are talking about?

This is an interactive demo if the capabilities of the API I'm using:

https://developers.google.com/youtube/a ... _responses

If you just be add some canned popular searches then I think it would put it in in a configurable way like a car stereo where you can save your 10(or however many) presets. It may start as simples as "news & "Gaming" but eventually, as we run of of things to add, it degrade into requests for cat videos, Kardashians, Honey Boo Boo, etc..

I don't know if any have noticed mplayer from desktop mode works pretty well if you pick a smaller video format. I still have not fixed it full screen but i think the performance would be too poor to consider over omx anyway.

I still have not been able to get omxplayer to compile 100%.

I have disabled hardware jpg decoding by default. On my RPI its stared getting timeouts and sometimes segfaults.Not always, sometimes it seems to work well. I'm not sure what happened there, but its a shame because it has better quality. Now with the windowed mode I easier time debugging it. that stuff is real difficult to debug because sometimes just simply adding a few printf or running in the debugger changes the outcome.
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by kalehrl » Mon Jan 21, 2013 2:29 pm
I was referring to official youtube channels like Music to which you can subscribe if you want to:
http://www.youtube.com/channel/HCp-Rdqh ... =gb_ch_rec
If I just type 'music' in the search field, I will get results which I'm not happy with because they are all mixed. Youtube Music offers the latest videos which are most popular.
Posts: 342
Joined: Tue Jul 24, 2012 10:49 am
by bbond007 » Mon Jan 21, 2013 9:27 pm
kalehrl wrote:I was referring to official youtube channels like Music to which you can subscribe if you want to:
http://www.youtube.com/channel/HCp-Rdqh ... =gb_ch_rec
If I just type 'music' in the search field, I will get results which I'm not happy with because they are all mixed. Youtube Music offers the latest videos which are most popular.


I think I found what you are talking about....

In the json-c interactive demo I think it is the "category" option.

I have now implemented this feature.

you can set the category from the main menu or by pressing "C"

once you do that your results will be filtered.

for example you'd select "Music" as the category and you could just leave the search string blank or type in "Rap" or "Yodeling" or whatever.

https://github.com/bbond007/raspytube/b ... y_menu.jpg
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by kalehrl » Tue Jan 22, 2013 6:53 pm
Thank you for the update bbond007.
I pressed C button and I chose Music.
I expected my video list to be populated with the same entries as when going to youtube site and choosing Music.
It didn't work that way and I reread your post and saw that it doesn't work that way.
Wouldn't it be better that by choosing the category, the video list is automatically populated with the entries in the same way as on youtube site?
Posts: 342
Joined: Tue Jul 24, 2012 10:49 am
by bbond007 » Wed Jan 23, 2013 12:34 am
++bahjatk++ wrote:Thanks for explaining, if omxplayer is open source - can't you add some bits to the code that do the seeking, then upload the modded omxplayer to your repo ? (the sentence sounds rude, but I cannot say it any way else - poor english, sorry!)


This is kind of related. I fixed the support for Mplayer. Just discovered Mplayer supports seeking. I found it works pretty well if you select video format 36. The problem with mplayer is that its not hardware accelerated. I guess we just need those bits from Mplayer put into OMXplayer :)
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by bbond007 » Wed Jan 23, 2013 12:39 am
kalehrl wrote:Thank you for the update bbond007.
I pressed C button and I chose Music.
I expected my video list to be populated with the same entries as when going to youtube site and choosing Music.
It didn't work that way and I reread your post and saw that it doesn't work that way.
Wouldn't it be better that by choosing the category, the video list is automatically populated with the entries in the same way as on youtube site?


maybe.

just meed to do a search with "" to trigger the refresh. I could make it do that automatically i suppose.
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by bbond007 » Wed Jan 23, 2013 1:12 am
bbond007 wrote:
kalehrl wrote:Thank you for the update bbond007.
I pressed C button and I chose Music.
I expected my video list to be populated with the same entries as when going to youtube site and choosing Music.
It didn't work that way and I reread your post and saw that it doesn't work that way.
Wouldn't it be better that by choosing the category, the video list is automatically populated with the entries in the same way as on youtube site?


maybe.

just meed to do a search with "" to trigger the refresh. I could make it do that automatically i suppose.


I have changed the program to do the refresh automatically. sorry about the confusion. try it now.
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by kalehrl » Wed Jan 23, 2013 7:10 pm
I tried it but the videos it shows are not the same as on the youtube site.
http://tinypic.com/r/21o67ir/6
Posts: 342
Joined: Tue Jul 24, 2012 10:49 am
by bbond007 » Wed Jan 23, 2013 9:01 pm
kalehrl wrote:I tried it but the videos it shows are not the same as on the youtube site.
http://tinypic.com/r/21o67ir/6


Raspytube uses the YouTube's json-c API, not the website.

Again, I'll refer you to the YouTube json-c interactive demo... if you can get the desired results you are looking for by playing with different settings, then for sure I can reproduce those same results in raspytube.

https://developers.google.com/youtube/a ... _responses

I my guess is that those results don't exist....

thanks
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by kalehrl » Thu Jan 24, 2013 10:22 am
You're right.
I couldn't get the same videos as on the website using the interactive demos so it's not possible. :(
Posts: 342
Joined: Tue Jul 24, 2012 10:49 am
by alexnklein » Tue Mar 12, 2013 1:14 am
How time-intensive would it be to write a fast install script for the OpenVG, including youtube-dl and omxplayer? Noob question, I know, but wanted to have something like this for my young cousin to enjoy a more intuitive YouTube experience on his Pi. Get in touch if you have any ideas...
Posts: 3
Joined: Tue Dec 11, 2012 8:42 pm
by ghans » Tue Mar 12, 2013 12:26 pm
jojen posted a very interesting approach for a HTML5 video ,
recently , and it also works on youtube after his latest update :

http://lin.jojen.de/?p=32

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 3931
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by bbond007 » Thu Mar 14, 2013 3:37 am
alexnklein wrote:How time-intensive would it be to write a fast install script for the OpenVG, including youtube-dl and omxplayer? Noob question, I know, but wanted to have something like this for my young cousin to enjoy a more intuitive YouTube experience on his Pi. Get in touch if you have any ideas...

you don't have to compile raspytube as long as you trust my EXE (or ZIP) from gethub.

#!/bin/sh
sudo apt-get install omxplayer libjpeg8 wget
wget https://github.com/bbond007/raspytube/b ... pytube.bin
chmod 755 raspytube.bin

or this to get the zip.
#!/bin/sh
sudo apt-get install omxplayer libjpeg8 wget unzip
wget https://github.com/bbond007/raspytube/b ... be.bin.zip
unzip raspytube.bin.zip
chmod 755 raspytube.bin
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by Jessie » Thu Mar 14, 2013 4:34 am
bbond007 wrote:Apparently it is very expensive to call XGetWindowAttributes and XGetGeometry (that is actually how MC Hammer went broke),

Nice.
User avatar
Forum Moderator
Forum Moderator
Posts: 1168
Joined: Fri Nov 04, 2011 7:40 pm
by bbond007 » Sun Mar 24, 2013 9:55 pm
Documentation has been updated.

https://github.com/bbond007/raspytube/b ... /README.md

Thank CalumJEadie for that.

BTW, I like this auto-install.... nice work!
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm
by ghans » Mon Mar 25, 2013 11:44 am
Wow , the README got actually readable .
Should be added to the notes as milestone achievement ...


Just kidding.

But raspytube is indeed a nice bit of software. We should
lobby the Foundation to include it in the images by default.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 3931
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by ++bahjatk++ » Wed Mar 27, 2013 5:35 pm
ghans wrote:Wow , the README got actually readable .
Should be added to the notes as milestone achievement ...

Hahahaha
ghans wrote:But raspytube is indeed a nice bit of software. We should
lobby the Foundation to include it in the images by default.

Yes we should :)
--
On another note, how can I create a desktop shortcut for raspytube ? I tried the X11 [desktop icon] file but didn't work.
Posts: 36
Joined: Sun Dec 30, 2012 10:02 am
by bbond007 » Sun Mar 31, 2013 4:46 am
++bahjatk++ wrote:[
On another note, how can I create a desktop shortcut for raspytube ? I tried the X11 [desktop icon] file but didn't work.


yeah, raspytube needs to run from a terminal to capture input.

It can be done though. I added the following files to the github:

sudo cp raspytube.desktop /home/pi/Desktop
sudo cp raspytube.png /usr/share/pixmaps

if you don't have lxterminal installed and use xterm then you'll need to edit raspytube.desktop accordingly.

you will need to haveraspytube.bin in the path somewhere like /usr/bin

Enjoy desktop shortcut. I made the icon myself with my Photoshop 7.0 skills - hopefully not too bad ...

Hope that helps...
Posts: 73
Joined: Sun Nov 04, 2012 6:10 pm