maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Youtube browser - mYTube - released (https://talk.maemo.org/showthread.php?t=17739)

auouymous 2011-12-12 21:18

Re: Youtube browser - mYTube - released
 
Quote:

Originally Posted by Addison (Post 1136778)
Is it possible to begin a video download directly from xterm?

On my desktop machine (also linux) I type youtube-dl URL and it downloads the highest quality video to current directory. You should be able to do the same on maemo as they are the same script.

-t will put the video's title in the filename otherwise you end up with something like dsKO_r76kfQ.flv

-f 5 downloads a low quality format to run better on the n8x0

Example: youtube-dl-x -t -f 5 http://www.youtube.com/watch?v=dsKO_r76kfQ

You'll also want to strip off extra parameters like &featured... as it can break the script. You want the URL to look like above with no & parameters after it.

Code:

#!/bin/sh
cd /media/mmc1/Videos ; youtube-dl-x -t -f 5 $1

Save that to /usr/bin/y and chmod 755 it. Then you should be able to type "y URL" in the terminal. :)

Addison 2011-12-12 21:31

Re: Youtube browser - mYTube - released
 
Quote:

Save that to /usr/bin/y and chmod 755 it. Then you should be able to type "y URL" in the terminal.
Sweet!

That was going to be my next question on how to make this even easier. :)

Addison 2011-12-12 23:02

Re: Youtube browser - mYTube - released
 
What did I do wrong with this?


[1|user@Nokia-N800-43-7|~]y http://www.youtube.com/watch?v=dEkh_KxKao0
[youtube] Setting language
[youtube] dEkh_KxKao0: Downloading video webpage
[youtube] dEkh_KxKao0: Downloading video info webpage
[youtube] dEkh_KxKao0: Extracting video information
ERROR: no fmt_url_map or conn information found in video info


I don't know what chmod 755 means.

I do have the file set as being an executable and the permissions are both set as root.

auouymous 2011-12-12 23:20

Re: Youtube browser - mYTube - released
 
Quote:

Originally Posted by Addison (Post 1136841)
What did I do wrong with this?


[1|user@Nokia-N800-43-7|~]y http://www.youtube.com/watch?v=dEkh_KxKao0
[youtube] Setting language
[youtube] dEkh_KxKao0: Downloading video webpage
[youtube] dEkh_KxKao0: Downloading video info webpage
[youtube] dEkh_KxKao0: Extracting video information
ERROR: no fmt_url_map or conn information found in video info


I don't know what chmod 755 means.

I do have the file set as being an executable and the permissions are both set as root.

755 makes it executable which you have done, the script runs.

Maybe that video doesn't have a low quality format, try removing the -f 5 from the script and see if it works.

Addison 2011-12-13 00:49

Re: Youtube browser - mYTube - released
 
I removed the "-f 5" and still the same error.

Sorry.

Addison 2011-12-13 00:59

Re: Youtube browser - mYTube - released
 
Okay. Got it.

cd /media/mmc1/Videos ; youtube-dl --no-part -f 5 -o -t $1

On my end youtube-dl-x is too old of a file I believe.

Anyway, what is the additional command for quiet output? So like nothing shows in the Terminal screen when running this.

auouymous 2011-12-13 00:59

Re: Youtube browser - mYTube - released
 
Quote:

Originally Posted by Addison (Post 1136860)
I removed the "-f -5" and still the same error.

Code:

> youtube-dl-x -t -f 5 http://www.youtube.com/watch?v=dEkh_KxKao0
[youtube] Setting language
[youtube] dEkh_KxKao0: Downloading video webpage
[youtube] dEkh_KxKao0: Downloading video info webpage
[youtube] dEkh_KxKao0: Extracting video information
[download] Destination: Jeremy_Camp_Walk_by_Faith_acoustic-dEkh_KxKao0.flv
[download] 100.0% of 7.29M at  46.96k/s ETA 00:00

Works fine for me. Are you using the latest version?

Code:

> ls -l /usr/bin/youtube-dl-x
-rwxr-xr-x 1 root root 105459 2011-09-06 07:21 /usr/bin/youtube-dl-x*


auouymous 2011-12-13 01:08

Re: Youtube browser - mYTube - released
 
Quote:

Originally Posted by Addison (Post 1136863)
youtube-dl --no-part -f 5 -o -t $1

On my end youtube-dl-x is too old of a file I believe.

You should have renamed youtube-dl to youtube-dl-x, don't remember why but mytube or something wanted the -x on it. You are not using -o correctly, get rid of it. By default videos are downloaded with a .part extension and renamed when the download completes, --no-part doesn't use the .part extension so if it fails you won't realize the file is truncated unless you saw the error message.


Quote:

Originally Posted by Addison (Post 1136863)
Anyway, what is the additional command for quiet output?

youtube-dl-x --help is your friend :)

Addison 2011-12-13 01:10

Re: Youtube browser - mYTube - released
 
I'm getting this...

[1|user@Nokia-N800-43-7|~]ls -l /usr/bin/youtube-dl-x
-rwxr-xr-x 1 root root 79756 Oct 14 16:58 /usr/bin/youtube-dl-x


Also, it just named the file "-t" with how I did it.

Let me try yours again....

Addison 2011-12-13 01:24

Re: Youtube browser - mYTube - released
 
I renamed youtube-dl to youtube-dl-x.

It works but it saved the video as "%(stitle)s-%(id)s.%(ext)s".

Did I miss something?


All times are GMT. The time now is 15:27.

vBulletin® Version 3.8.8