The Following 8 Users Say Thank You to shapeshifter For This Useful Post: | ||
![]() |
2011-08-14
, 14:35
|
Posts: 539 |
Thanked: 518 times |
Joined on May 2010
@ nanaurbusiness
|
#2
|
BusyBox v1.18.5 (Debian 1.18.5power3) built-in shell (ash) Enter 'help' for a list of built-in commands. ~ $ ytcli -f "technical itch" | grep -i rukus Traceback (most recent call last): File "/opt/ytcli/ytcli.py", line 13, in <module> import gdata.youtube ImportError: No module named gdata.youtube ~ $
![]() |
2011-08-14
, 15:09
|
Posts: 187 |
Thanked: 345 times |
Joined on Nov 2009
|
#3
|
The Following User Says Thank You to shapeshifter For This Useful Post: | ||
![]() |
2011-08-17
, 09:26
|
Posts: 539 |
Thanked: 518 times |
Joined on May 2010
@ nanaurbusiness
|
#4
|
![]() |
2011-09-01
, 07:43
|
Posts: 32 |
Thanked: 9 times |
Joined on Feb 2011
|
#5
|
![]() |
2011-09-01
, 19:07
|
Posts: 66 |
Thanked: 87 times |
Joined on Aug 2010
|
#6
|
![]() |
2011-09-01
, 19:57
|
Posts: 32 |
Thanked: 9 times |
Joined on Feb 2011
|
#7
|
Yes, I had the same problem.
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.
![]() |
2011-09-02
, 07:24
|
Posts: 66 |
Thanked: 87 times |
Joined on Aug 2010
|
#8
|
sorry for my eng.
how to replace bash with sh!?
tell me more closely please... what change in script
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.
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.
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
Author of:
Last edited by shapeshifter; 2011-08-13 at 22:11.