![]() |
[ANNOUNCE] ytcli - A simple but effective command line Youtube client
Hello everyone.
I've hacked together a small tool that lets you:
It's in extras-devel. But why? There are plenty of GUI frontends for youtube already! True, but to be honest after trying all of them, I found that not a single one of them is usable for me. They all are slow to load and navigate (the N900 is to blame for this, not the authors of the GUI tools), searching is a pain (The Youtube API is responsible for this one) and all I really want is to quickly find and download and watch some videos that I remember having seen on youtube - this is my use case. About the Youtube API problem (you can skip this): The search results the Youtube API gives are utter shite. For example, try doing a web search for "gremlinz aspect gavel" and you'll find a perfectly fine list of results. However supplying the Youtube API with this search string reveals no results at all. All of the GUI tools are using the API directly and hence I can't really find anything I previously found on a PC. With this CLI tool, you can just search for something really broad and then grep for whatever is important to you. Demonstration: Let's do a search for 'gremlinz'. The Youtube API provides 50 search results at a time at max. Run the same command repeatedly and it will show 50 more results each time. Code:
user@Nokia-N900:~/ytcli$ ytcli -f "gremlinz" Code:
user@Nokia-N900:~/ytcli$ ytcli -f "gremlinz" | grep -i "gavel" Code:
user@Nokia-N900:~/ytcli$ ytcli -q 28 Code:
user@Nokia-N900:~/ytcli$ ytcli -s Code:
user@Nokia-N900:~/ytcli$ ytcli -f "technical itch" | grep -i rukus Code:
user@Nokia-N900:~/ytcli$ ytcli -s Code:
user@Nokia-N900:~/ytcli$ ytcli -r 2 Code:
user@Nokia-N900:~/ytcli$ ytcli -f "katamari damacy" | grep -i "lonely" Code:
user@Nokia-N900:~/ytcli$ ytcli -h I just -f | grep what I need, -q it and when the banner comes up I can play it in mplayer. Or I can play it immediately using -p. By the way, the downloader runs as long as there is stuff in the queue. If you want to interrupt the download and pick it up at a later point, run it with -k to kill it, then later with -u to resume. It will continue where it stopped. ytcli depends on mplayer for playback and youtube-dl for downloading. http://login.icu.uzh.ch/~archer/Scre...813-193948.png Enjoy! known issues / room for improvement - if it happens to you that a video only plays the first few frames (in mplayer), press SPACE twice. This is a problem with mplayer. - sometimes webm videos get downloaded, not sure what to do with them yet since mplayer doesn't seem to be willing to play them - fancy features like extracting sound or converting videos to a native codec/container - trying to use maemo media player instead of mplayer to make use of the DSP - all ytcli temp files get wiped upon a reboot |
Re: [ANNOUNCE] ytcli - A simple but effective command line Youtube client
I'm getting an error.
Code:
BusyBox v1.18.5 (Debian 1.18.5power3) built-in shell (ash) |
Re: [ANNOUNCE] ytcli - A simple but effective command line Youtube client
Quote:
|
Re: [ANNOUNCE] ytcli - A simple but effective command line Youtube client
Forgot to thank you mate. It's working fine now, after the update. ;)
Greetz, J4ZZ |
Re: [ANNOUNCE] ytcli - A simple but effective command line Youtube client
hy!
i have a problem with install this app ! this is a copy of my error : momak:~# apt-get install ytcli Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: ytcli 0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded. Need to get 8850B of archives. After this operation, 73,7kB of additional disk space will be used. Get:1 http://repository.maemo.org fremantle/free ytcli 0.0.1-6 [8850B] Fetched 8850B in 0s (34,5kB/s) Selecting previously deselected package ytcli. (Reading database ... 24348 files and directories currently installed.) Unpacking ytcli (from .../archives/ytcli_0.0.1-6_all.deb) ... Setting up ytcli (0.0.1-6) ... dpkg (subprocess): unable to execute post-installation script: No such file or directory dpkg: error processing ytcli (--configure): subprocess post-installation script returned error exit status 2 Errors were encountered while processing: ytcli E: Sub-process /usr/bin/dpkg returned an error code (1) momak:~# help please :) thanks |
Re: [ANNOUNCE] ytcli - A simple but effective command line Youtube client
Quote:
But actually ytcli are only two Python scripts, /opt/ytcli/ytcli.py and /opt/ytcli/ytcli_queue.py plus the shell wrapper /usr/bin/ytcli. Those scripts should be there even after the incomplete installation, so just fix ytcli and replace "bash" with "sh" in the shebang line as there is no default bash on the N900 afaik. If the files are not there you can extract them from the ytcli .deb package, copy them to their respective folders and set ytcli to executable as I did. The ytcli script now works for me but I get the following error message while queuing a video for download: "ERROR no fmt_url_map or conn information found in video info" The video of course doesn't get downloaded at all. Is there a restriction to download certain videos? Cheers, M. |
Re: [ANNOUNCE] ytcli - A simple but effective command line Youtube client
Quote:
sorry for my eng. how to replace bash with sh!? tell me more closely please... what change in script ps: it is only half install .... |
Re: [ANNOUNCE] ytcli - A simple but effective command line Youtube client
Quote:
1. Make shure that python-gdata is installed: $python >>>import gdata There shouldn't be any error message. 2.Make shure that /opt/ytcli/ytcli.py + /opt/ytcli/ytcli_queue.py are installed. 3.Go root and edit /usr/bin/ytcli: replace "bash" with "sh" at line #1 4. Check if ytcli is user executable or use chmod to set it. If any of those steps do not work you should wait until shapeshifter will hopefully provide a new fixed package. Cheers, M. |
All times are GMT. The time now is 06:04. |
vBulletin® Version 3.8.8