kktuax / youtupi Goto Github PK
View Code? Open in Web Editor NEWYouTube (mobile) web frontend for your Raspberry Pi
Home Page: https://maxtuni.es/2013/02/16/Introducing-YouTuPi.html
YouTube (mobile) web frontend for your Raspberry Pi
Home Page: https://maxtuni.es/2013/02/16/Introducing-YouTuPi.html
Pafy is no longer available from the URL defined in the submodules
Two possible workarounds:
Hi,
first of all thanks for your work! My new setup requires the web interface to run on a different port (8080 is already used) Is there any way to change the used port?
I followed the instructions installing youtupi in my raspbian, I get the UI to search and everything, but I hear no sound. I'm having troubles to debug because I can't find logs or any clue of what's going wrong.
Please advise
Hi, is it possible install youtupi on amd64/linux?
Thanks.
While trying to play a Youtube video the following message appears and nothing happens.
Reading config from: /home/pi/youtupi
http://0.0.0.0:8080/
193.137.170.54:55071 - - [18/Mar/2014 10:28:53] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:49876 - - [18/Mar/2014 10:28:54] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:55071 - - [18/Mar/2014 10:28:56] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:49876 - - [18/Mar/2014 10:28:59] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:55071 - - [18/Mar/2014 10:29:02] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:49876 - - [18/Mar/2014 10:29:02] "HTTP/1.1 POST /playlist" - 303 See Other
193.137.170.57:49876 - - [18/Mar/2014 10:29:02] "HTTP/1.1 GET /playlist" - 200 OK
Locating URL for: r75BFcH4u2k
193.137.170.57:49876 - - [18/Mar/2014 10:29:04] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:55071 - - [18/Mar/2014 10:29:07] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:49876 - - [18/Mar/2014 10:29:09] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:55071 - - [18/Mar/2014 10:29:12] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:49876 - - [18/Mar/2014 10:29:14] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:55071 - - [18/Mar/2014 10:29:17] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:49876 - - [18/Mar/2014 10:29:19] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:55071 - - [18/Mar/2014 10:29:22] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:49876 - - [18/Mar/2014 10:29:24] "HTTP/1.1 GET /playlist" - 200 OK
Unable to fetch valid URL in format: 22
193.137.170.54:55071 - - [18/Mar/2014 10:29:27] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:49876 - - [18/Mar/2014 10:29:29] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:55071 - - [18/Mar/2014 10:29:32] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:49876 - - [18/Mar/2014 10:29:34] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:55071 - - [18/Mar/2014 10:29:37] "HTTP/1.1 GET /playlist" - 200 OK
Unable to fetch valid URL in format: 18
(..)
I'm using latest updated version.
Thank you!
The videos are randomly skipped when they are expected to play.
When you add a video to the playlist, it stays there for a few seconds in the first position and then disappears with no feedback.
This problem will clear an entire playlist by skipping all of the videos sequentially.
You are probably able to play the video after insisting on adding and re-adding it to the playlist.
I have tested the URL provided to omxplayer and it works on browser.
The YouTuPi and omxplayer are updated to the latest versions.
LOG:
Reading config from: /home/pi/youtupi/youtupi
http://0.0.0.0:8080/
193.137.170.54:49862 - - [05/Feb/2014 16:47:24] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:40771 - - [05/Feb/2014 16:47:28] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:49862 - - [05/Feb/2014 16:47:28] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:40771 - - [05/Feb/2014 16:47:32] "HTTP/1.1 POST /playlist" - 303 See Other
193.137.170.57:40771 - - [05/Feb/2014 16:47:32] "HTTP/1.1 GET /playlist" - 200 OK
Locating URL for: rn_YodiJO6k
193.137.170.57:40771 - - [05/Feb/2014 16:47:33] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:40771 - - [05/Feb/2014 16:47:48] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:49862 - - [05/Feb/2014 16:47:48] "HTTP/1.1 GET /playlist" - 200 OK
Running player: omxplayer -o local --live http://r1---sn-apn7en7s.googlevideo.com/videoplayback?mv=m&id=ae7fd8a1d8893ba9&ip=193.137.170.59&key=yt5&expire=1391642635&source=youtube&pcm2fr=yes&sver=3&mt=1391618745&ipbits=0&ms=au&itag=18&ratebypass=yes&fexp=926550%2C927610%2C921098%2C932273%2C936910%2C936913&sparams=id%2Cip%2Cipbits%2Citag%2Cpcm2fr%2Cratebypass%2Csource%2Cupn%2Cexpire&upn=HJK3nufgZhI&signature=E54D34DF295906DC24E355FDEF9179ED8F2EE3ED0BA2.D8AA19698AD4FDF309B7A146BF422C2B0A
193.137.170.57:40771 - - [05/Feb/2014 16:47:53] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.54:49862 - - [05/Feb/2014 16:47:53] "HTTP/1.1 GET /playlist" - 200 OK
193.137.170.57:40771 - - [05/Feb/2014 16:47:58] "HTTP/1.1 GET /playlist" - 200 OK
it would be nice to do audio only as well is that a possibility
As for now, after selecting a search result, a user has to click the playlist entry and interact with a modal view before being able to actually play what he/she selected.
Expected behaviour: click on search result, see the item added to the playlist while playback starts automatically.
I needed to edit ./youtupi/engine/OMXPlayerEngine.py and remove the "-o hdmi" because I play music through the 3.5" analog jack.
Ideally this should be configurable and/or documented in the Readme.
Autoplayed videos start normally. When video it's forced to play with the "next" button it starts and restarts a few seconds later.
After I press play, it takes a lot of seconds before omxplayer appears in the process list (ps aux |grep omx)
These changes adds the ability to search for existing YouTube playlists. Searching for a playlist list=id (e.i "list=PLFs4vir_WsTwEd-nJgVJCZPNL3HALHHpF") returns the playlist songs.
Updated youtupi.youtube.js:
function getYoutubeQueryUrl(){
var url;
var query = $("#search-basic").val().trim();
if(query != ''){
if(query.indexOf("list=") > -1){
var lid = query.split("=");
url = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId='+lid[1]+'&type=video&maxResults='+$('#slider').val()+'&key=AIzaSyAdAR3PofKiUSGFsfQ03FBEpVkVa1WA0J4';
} else {
url = 'https://www.googleapis.com/youtube/v3/search?order=relevance&part=snippet&q='+query+'&type=video&maxResults='+$('#slider').val()+'&key=AIzaSyAdAR3PofKiUSGFsfQ03FBEpVkVa1WA0J4';
}
}
return url;
}
function getYoutubeResponseVideos(response){
var videos = [];
var entries = response.items || [];
for (var i = 0; i < entries.length; i++) {
var entry = entries[i];
if(typeof entry.video != 'undefined'){
entry = entry.video;
}
var video = {}
if(typeof entry.id.videoId != 'undefined'){
video.id = entry.id.videoId;
} else {
video.id = entry.snippet.resourceId.videoId;
}
video.description = entry.snippet.description;
video.title = entry.snippet.title;
video.duration = entry.duration;
if(typeof entry.snippet.thumbnails != 'undefined'){
if(typeof entry.snippet.thumbnails.high != 'undefined'){
video.thumbnail = entry.snippet.thumbnails.high.url;
}else if(typeof entry.snippet.thumbnails.medium != 'undefined'){
video.thumbnail = entry.snippet.thumbnails.medium.url;
}else{
video.thumbnail = entry.snippet.thumbnails.default.url;
}
}
video.type = "youtube";
video.operations = [ {'name': 'download', 'text': 'Download', 'successMessage': 'Video downloaded'} ];
videos.push(video);
}
return videos;
}
Checkout this JQuery plugin for i18n: https://code.google.com/p/jquery-i18n-properties/
I have kind of clock on Nokia LCD Screen pcd8544. Backlight of this LCD are continously turn on. When I play som video from youtube throught youtupi then that backlight start blinking, and finally turn off. After that only way to turn it on is restart of my clock service. When I use omxplayer outside youtupi there is no such issue.
Cheers
In order to allow fast playlist insertion
Now an os.killpg is triggered leaving an open subprocess
Hello,
this error started happening to me after some upgrade on my Raspbian.
If I'd run /etc/init.d/youtupi start
it works fine, but not via service
.
This is the error:
-- Unit youtupi.service has begun starting up.
Apr 30 21:11:46 raspberrypi systemd[1846]: Failed at step EXEC spawning /etc/init.d/youtupi: Exec format error
-- Subject: Process /etc/init.d/youtupi could not be executed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
I'm not sure if more people have experienced that or will, but I thought it would be important to give you the info.
After some debugging I figured the problem was the line #! /bin/sh
not being the first line of the file.
No idea if it's a bug somewhere or if not placing it on the first line is really a mistake that *sh take care of, but I think it would be useful to update the file service/youtupi
with this correction.
In any case, spot on, great work!
Hey Max,
it looks like the search for the local function is really slow,
maybe it is some problem of me or do you know why ?
im using youtupi on a Raspberry pi Rev B with 512 MB Ram
when im using the normal function "find path | grep Name (with pattern)"
its much faster or the php script i did write until i did see ur programm...
maybe u know a answer for this
Thank You
Save and load video playlist
apt-get install python-dbus
To allow reordering the playlist without affecting the currently playing video
As omxplayer needs UTF-8 encoding
Integrate with periscope? patrickdessalle/periscope#7
Package for charset detection:
Using External command: http://stackoverflow.com/a/9200975
10.0.0.4:54268 - - [17/Apr/2014 02:56:36] "HTTP/1.1 POST /playlist" - 303 See Other
10.0.0.4:54276 - - [17/Apr/2014 02:56:36] "HTTP/1.1 GET /playlist" - 200 OK
10.0.0.4:54276 - - [17/Apr/2014 02:56:36] "HTTP/1.1 GET /playlist" - 200 OK
Locating URL for: TFHbAvY1kJ4
Exception in thread Thread-32:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in *bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 760, in run
self.function(_self.args, _self.kwargs)
File "/home/pi/youtupi/youtupi/playlist.py", line 131, in autoPlay
prepareVideo(nvideo)
File "/home/pi/youtupi/youtupi/playlist.py", line 122, in prepareVideo
url = youtube.getUrl(video.data)
File "/home/pi/youtupi/youtupi/modules/youtube.py", line 11, in getUrl
formats = getYoutubeFormats(data['id'])
File "/home/pi/youtupi/youtupi/modules/youtube.py", line 24, in getYoutubeFormats
yt_dl = subprocess.Popen(args, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1259, in _execute_child
raise child_exception
OSError: [Errno 13] Permission denied
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.