kktuax
Posts: 4
Joined: Sat Feb 16, 2013 5:29 pm

YouTube playback from web UI

Sat Feb 16, 2013 5:42 pm

I've written a small application for playing YouTube videos inspired in YT's approach but with a mobile web interface.

You can find installation instructions in project's repository and a small description in my blog.

Hope you guys like it :)

dpguest
Posts: 28
Joined: Wed Feb 06, 2013 4:17 pm

Re: YouTube playback from web UI

Sun Feb 17, 2013 2:40 pm

What is the address of your blog?

kktuax
Posts: 4
Joined: Sat Feb 16, 2013 5:29 pm

Re: YouTube playback from web UI

Mon Feb 18, 2013 12:54 pm

You can access the site clicking on "my blog" text. I think the link style is missing in this board ;)

Here is the full link: http://blog.maxtuni.es/2013/02/introduc ... e-web.html

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: YouTube playback from web UI

Mon Feb 18, 2013 1:04 pm

Both links work fine, by the way.....
I know everything about nothing"

bobbydriver
Posts: 70
Joined: Thu Oct 18, 2012 9:06 am

Re: YouTube playback from web UI

Fri Jul 19, 2013 3:22 pm

Finally got this working.

1st issue was that I already had youtube-dl installed in a different directory. I had to move it to within youtupi to get the downloads & playing working

Now I have a question - is it possible to hardcode the default quality of youtube? It seems to be set at 720 but that causes really bad stuttering on my pi via the wireless. I only have a CRT TV connected via the AV cables (ie not HDMI) so I'm not bothered about the lower quality. When I set it manually via the settings drop-down it always reverts back to 720 after I close the browser

I also had some problems with the Files directory location. I set it to be the root VIDEOS folder on my NAS (mounted to the Pi as Samba share) - but it didn't show the sub-folders, only the most recent 50 files (in date order) is that correct? I couldn't filter to find anything else

And finally - I realised that I also have apache running on port 80, so it seems overkill to have another web server running on 8080. Would it be straightforward to port the app across to Apache or a big hassle with lots of settings to change in the code?

Thanks - great work by the way

Jammet
Posts: 3
Joined: Sun Jul 21, 2013 7:46 pm

Re: YouTube playback from web UI

Sun Jul 21, 2013 8:24 pm

So at this moment my favourite way of replaying youtube videos is that, with yt (yt-pi) as the frontend. Nice and lean. But not without it's limitations because I have yet to find a youtube client that just takes a simple generic youtube URL on the command like, and just plays that. yt-pi has a search function, and it's terrible. Every single time I try to watch something VERY specific, I can't find it despite typing in the exact title of the video with upper and lower case. This is especially true with very new videos. Do you know of ANY way to feed these clients a normal youtube URL? That would be such a relief.

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

Re: YouTube playback from web UI

Sun Jul 21, 2013 9:48 pm

Minimal Kiosk Browser can play videos directly from the youtube website. (Full screen with omxplayer; youtube-dl has to be installed).
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

kktuax
Posts: 4
Joined: Sat Feb 16, 2013 5:29 pm

Re: YouTube playback from web UI

Sun Jan 12, 2014 8:49 pm

Quality of videos can be changed from the settings section:
Image

The embedded python web server is pretty lightweight but you can integrate it in an existing apache server. I haven't tried it, but you can try to follow this guide to install an aditional apache2 module: http://webpy.org/cookbook/mod_wsgi-apache-ubuntu

Then in youtupi.py, you would need to edit the bottom of the file, the

Code: Select all

if __name__ == "__main__":
No longer would be needed, and it should look like this:

Code: Select all

urls = (
                '/(.*)/', 'redirect',
                '/playlist', 'playlist',
                '/video/(.*)', 'video',
                '/control/(.*)', 'control',
                '/local', module_local,
                '/youtube', module_youtube,
                '/', 'index'
)
app = web.application(urls, globals()).wsgifunc()
Local files search now works, previously indeed only the last modified files where found.
bobbydriver wrote:Finally got this working.

1st issue was that I already had youtube-dl installed in a different directory. I had to move it to within youtupi to get the downloads & playing working

Now I have a question - is it possible to hardcode the default quality of youtube? It seems to be set at 720 but that causes really bad stuttering on my pi via the wireless. I only have a CRT TV connected via the AV cables (ie not HDMI) so I'm not bothered about the lower quality. When I set it manually via the settings drop-down it always reverts back to 720 after I close the browser

I also had some problems with the Files directory location. I set it to be the root VIDEOS folder on my NAS (mounted to the Pi as Samba share) - but it didn't show the sub-folders, only the most recent 50 files (in date order) is that correct? I couldn't filter to find anything else

And finally - I realised that I also have apache running on port 80, so it seems overkill to have another web server running on 8080. Would it be straightforward to port the app across to Apache or a big hassle with lots of settings to change in the code?

Thanks - great work by the way

donkarlo
Posts: 1
Joined: Sat Aug 30, 2014 9:38 pm

Re: YouTube playback from web UI

Sat Aug 30, 2014 9:51 pm

I'm using the pi most of the time as a headless YT music player, so i wanted the audio output over the headphone jack to my suround system.
The audio output of the omxplayer can be changed in ~/youtupi/youtupi/playlist.py. Search for the line with playerArgs = ["omxplayer", "-o", "hdmi"] and change "hdmi" to "local" for the headphone jack or "both" for headphone jack and hdmi.

Return to “Media centres”