You are not logged in.

#1 2011-11-17 01:25:26

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

yturl - Youtube media URL grabber

yturl is a simple YouTube media URL grabber. I became annoyed with bloated tools to get YouTube videos, so decided to write my own.

AUR: https://aur.archlinux.org/packages.php?ID=59216
GitHub: https://github.com/cdown/yturl

As an example of its use, you can use it with mplayer like so:

mplayer -cache 8192 "$(yturl 'gWJIQm9qH-w')"

You can even use it with the full URL to the video -- any of the following will work:

yturl 'http://www.youtube.com/watch?v=gWJIQm9qH-w&list=FLHlOsDJ_cK_ujbNLPOyZtRQ&index=1&feature=plpp_video'
yturl 'http://www.youtube.com/v/gWJIQm9qH-w'
yturl 'youtu.be/gWJIQm9qH-w'

...or any other valid YouTube video URL. It doesn't support RTMP streams (used for television shows and movies), and I don't intend to add it in future due to the needless complexity.

Feedback appreciated!

Last edited by neurolysis (2012-05-30 10:35:34)

Offline

#2 2011-11-17 01:57:38

upsidaisium
Member
From: Vietnam
Registered: 2006-09-16
Posts: 263
Website

Re: yturl - Youtube media URL grabber

Good idea, thanks for this.


I've seen young people waste their time reading books about sensitive vampires. It's kinda sad. But you say it's not the end of the world... Well, maybe it is!

Offline

#3 2011-11-18 15:44:31

Sara
Member
From: USA
Registered: 2009-07-09
Posts: 217
Website

Re: yturl - Youtube media URL grabber

Thanks; this replaced youtube-dl for me. Will be using this for all my
YouTube watching.


Registed Linux User 483618

Offline

#4 2011-11-18 16:51:24

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,676

Re: yturl - Youtube media URL grabber

Let's get rid of the "Bear in mind..." part in the man page, alright?  Man pages are meant to be crisp wink
A link to the details of what the "itag" magic means would be helpful, and it seems to me numbers don't really make much sense here.

I've always found the `-t' option to youtube-dl helpful, but youtube-dl does seem bloated in several ways.  I'm thinking of some simple format strings like `%u' for URL and `%t' for title, etc., if that makes sense to you.


This silver ladybug at line 28...

Offline

#5 2011-11-22 01:13:53

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: yturl - Youtube media URL grabber

Will clear up and have information on itag specifics in the man page for next release. Thanks for the feedback!

Offline

#6 2012-01-12 06:32:52

wims
Member
Registered: 2009-05-26
Posts: 15

Re: yturl - Youtube media URL grabber

It would be incredibly awesome if your tool somehow managed to deal with playlists as well

Offline

#7 2012-01-14 11:35:55

aurinkolasit
Member
Registered: 2009-07-02
Posts: 27

Re: yturl - Youtube media URL grabber

Thanks. This is a nice script! I did something similar back in the days but it stopped to work at some point because YouTube changed its API. Hopefully you're prepared to maintain this script...

+1 for playlist support and clarification about the itag business.

Last edited by aurinkolasit (2012-01-14 11:36:47)

Offline

#8 2012-02-16 06:50:03

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: yturl - Youtube media URL grabber

Thanks for the feedback. Itag stuff is now more clearly documented on Git. I'm not sure how I should best deal with playlists, however. Perhaps I could create a local playlist with the URIs and then tell yturl to output that, however I'm not sure how I feel about that...

Offline

#9 2012-05-11 22:13:37

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: yturl - Youtube media URL grabber

v1.02 now out, massive code quality rewrite. I also now only support using the yturl-git package.

Playlists are possible, I am planning to make a separate tool to do this soon. :-)

Last edited by neurolysis (2012-05-11 22:16:45)

Offline

#10 2012-05-12 04:29:52

magicalChicken
Member
From: in the sky
Registered: 2012-03-03
Posts: 73
Website

Re: yturl - Youtube media URL grabber

Very nice, thanks! This works great in a script using ffmpeg to convert from the flash.

Offline

#11 2012-05-15 07:36:38

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: yturl - Youtube media URL grabber

Offline

#12 2012-05-30 10:33:07

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: yturl - Youtube media URL grabber

Offline

#13 2012-10-06 00:12:37

neurolysis
Member
Registered: 2011-02-23
Posts: 112
Website

Re: yturl - Youtube media URL grabber

Will bump to 1.05 tomorrow, fixes 403 issue (YouTube silently introduced required signature CGI param). For now you can just repull from git.

Last edited by neurolysis (2012-10-06 00:12:57)

Offline

#14 2013-04-08 10:31:42

cdown
Member
From: London, England
Registered: 2013-02-09
Posts: 46
Website

Re: yturl - Youtube media URL grabber

Hi, this is neurolysis (I now use cdown everywhere).

v1.13.0 is out. This release adds the `-q` option to allow specifying that you want high/medium/low quality -- no more need to manually specify itags. Some syntax has changed, please see README.md.

Please let me know if you have any suggestions.

Offline

#15 2013-04-08 10:32:37

Iao
Member
Registered: 2012-11-09
Posts: 20

Re: yturl - Youtube media URL grabber

Thank you for this!

Offline

#16 2013-04-08 11:06:03

kokoko3k
Member
Registered: 2008-11-14
Posts: 1,482

Re: yturl - Youtube media URL grabber

Doesn't mplayer needs cookies to play some youtube videos?
I'm asking because with youtube-dl sometime that is necessary.

Online

#17 2013-04-09 06:52:48

cdown
Member
From: London, England
Registered: 2013-02-09
Posts: 46
Website

Re: yturl - Youtube media URL grabber

kokoko3k wrote:

Doesn't mplayer needs cookies to play some youtube videos?
I'm asking because with youtube-dl sometime that is necessary.

I haven't experienced this. Perhaps this is for RTMP.

Offline

#18 2013-04-12 13:27:39

cdown
Member
From: London, England
Registered: 2013-02-09
Posts: 46
Website

Re: yturl - Youtube media URL grabber

Dependency on Python 2 removed -- we now support Python 3. :-)

Python 2 support also remains, yturl works natively on both Python 2 and 3. The PKGBUILD automatically detects whether to use python3 or python2 as the dependency, if you have both, it will use python3.

Last edited by cdown (2013-04-12 13:47:06)

Offline

Board footer

Powered by FluxBB