Page 1 of 1

YouTube playback from web UI

Posted: Sat Feb 16, 2013 5:42 pm
by kktuax
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 :)

Re: YouTube playback from web UI

Posted: Sun Feb 17, 2013 2:40 pm
by dpguest
What is the address of your blog?

Re: YouTube playback from web UI

Posted: Mon Feb 18, 2013 12:54 pm
by kktuax
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

Re: YouTube playback from web UI

Posted: Mon Feb 18, 2013 1:04 pm
by Cloudcentric
Both links work fine, by the way.....

Re: YouTube playback from web UI

Posted: Fri Jul 19, 2013 3:22 pm
by bobbydriver
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

Re: YouTube playback from web UI

Posted: Sun Jul 21, 2013 8:24 pm
by Jammet
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.

Re: YouTube playback from web UI

Posted: Sun Jul 21, 2013 9:48 pm
by gkreidl
Minimal Kiosk Browser can play videos directly from the youtube website. (Full screen with omxplayer; youtube-dl has to be installed).

Re: YouTube playback from web UI

Posted: Sun Jan 12, 2014 8:49 pm
by kktuax
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

Re: YouTube playback from web UI

Posted: Sat Aug 30, 2014 9:51 pm
by donkarlo
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.