Package Details: youtube-dl-git 2017.02.04.1.r4.6ef3e65a7-1

Git Clone URL: (read-only)
Package Base: youtube-dl-git
Description: A small command-line program to download videos from and a few more sites (git version)
Upstream URL:
Keywords: download player streaming video youtube
Licenses: custom
Conflicts: youtube-dl
Provides: youtube-dl
Submitter: baskerville
Maintainer: disastro
Last Packager: disastro
Votes: 98
Popularity: 2.873479
First Submitted: 2012-02-27 11:10
Last Updated: 2017-02-05 11:34

Required by (54)

Sources (1)

Latest Comments

disastro commented on 2017-02-05 11:12

I can't confirm or deny that error but regardless setuptools should also be in the makedepends, thanks!

@Cysioland (who flagged out-of-date) this is a git package, there is no "newer version in the repo" most of the time, makepkg pulls the latest. Read how the AUR VCS packages work.

Alad commented on 2017-01-29 12:26

python_setuptools should _also_ be in makedepends, otherwise there were errors like:

Traceback (most recent call last):
File "/usr/bin/youtube-dl", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3.6/site-packages/pkg_resources/", line 3019, in <module>
File "/usr/lib/python3.6/site-packages/pkg_resources/", line 3003, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/pkg_resources/", line 3032, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3.6/site-packages/pkg_resources/", line 655, in _build_master
File "/usr/lib/python3.6/site-packages/pkg_resources/", line 963, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3.6/site-packages/pkg_resources/", line 849, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'youtube-dl==2016.11.22' distribution was not found and is required by the application

disastro commented on 2016-11-25 22:37

Unflagged, not outdated. @ritchy see AlfredoRamos' comment

ritchy commented on 2016-11-25 18:44

Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/youtube_dl/", line 676, in extract_info
ie_result = ie.extract(url)
File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/", line 341, in extract
return self._real_extract(url)
File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/", line 1568, in _real_extract
encrypted_sig, video_id, player_url, age_gate)
File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/", line 1005, in _decrypt_signature
'Signature extraction failed: ' + tb, cause=e)
youtube_dl.utils.ExtractorError: Signature extraction failed: Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/", line 995, in _decrypt_signature
video_id, player_url, s
File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/", line 910, in _extract_signature_function
res = self._parse_sig_js(code)
File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/", line 973, in _parse_sig_js
initial_function = jsi.extract_function(funcname)
File "/usr/lib/python3.5/site-packages/youtube_dl/", line 241, in extract_function
raise ExtractorError('Could not find JS function %r' % funcname)
youtube_dl.utils.ExtractorError: Could not find JS function 'Xn'; please report this issue on . Make sure you are using the latest version; see on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
(caused by ExtractorError("Could not find JS function 'Xn'; please report this issue on . Make sure you are using the latest version; see on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.",)); please report this issue on . Make sure you are using the latest version; see on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output

Answer from youtube-dl devs :
You are using an outdated version of youtube-dl. Read this FAQ entry if you have troubles updating.

disastro commented on 2016-08-27 10:16

Indeed, unflagged because no apparent reason this is outdated

AlfredoRamos commented on 2016-08-26 16:31

@twilk It's not outdated, please read about -git packages.


disastro commented on 2016-05-05 19:52

@Case_Of Fixed! Thank you

Case_Of commented on 2016-05-05 19:17

python-setuptools should be in depends instead of makedepends.

disastro commented on 2016-04-08 15:36

Hello all

Adopted, rewrote PKGBUILD, updated version.
Wrote following community/youtube-dl, and now actually using git for source.
Please report any issues that might arise, I can only test on so many systems.

xduugu commented on 2016-03-06 11:15

Bumping the pkgrel does not help since the pkgrel is only used when the pkgver is equal.

But there are more issues with the way the package version is generated:
- it can generate a different pkgver for the same commit, because it does not use the date of the commit, but the local date.
- the pkgver function is run after the source was downloaded and extracted, which means that the downloaded archive is always renamed to the pkver that is given in the PKGBUILD, but this is usually not the commit that was downloaded.

I think the only way for a -git package, that does not use git for downloading, is to get rid of the sources array and use curl and bsdtar manually.

flu commented on 2016-03-06 09:45

pkgver is date+commit hash, so your corner case could happen. The pkgver creation is not standard for a -git package because this is not (it downloads a zip snapshot). The "fix" would be adding hour, minute, even second to pkgver, but this makes the version number very long. Not a very serious issue, by the way.

Any other thoughts?

My suggestion is to bump the pkgrel to 2 every time on your side. Or to ignore the warning, if it is working anyway.

xduugu commented on 2016-03-05 12:40

Could you fix the versioning of the package? I just upgraded the package, but the new version is less than the version in the .SRCINFO file. It is actually built from a newer commit, though.

Version of the AUR package: 2016.03.05.845817a-1
Date of commit: Sat, 5 Mar 2016 18:14:58 +0800 -> UTC: 2016-03-05 10:14:58

Version when built: 2016.03.05.18b0b23-1
Date of commit: Sat, 5 Mar 2016 12:14:48 +0100 -> UTC: 2016-03-05 11:14:48

RunningDroid commented on 2016-01-28 01:16

@yan12125 I've been having the same problems and the patch fixes things for me.

yan12125 commented on 2016-01-17 19:04

Sorry for the fragile LC_ALL=en_US.UTF-8 hacking. The following patch to PKGBUILD should fix all the problems. @colinkeenan @jamietanna could you check this patch works without PYTHONIOENCODING or LC_ALL tricks?

diff --git a/PKGBUILD b/PKGBUILD
index 0d0c88a..1ea1a28 100644
@@ -29,13 +29,18 @@ pkgver() {
echo $DATE.$HASH

+ "$pkgname-$(pkgver).zip::$_name/archive/$"
+ ''
+sha512sums=(SKIP '8b20a4b3360b7ef48a7a4df5651026f0e97d1f11a4d1fa66ce0dc8173e87bbb9d0dbf44328dbd7fe7f6ebe742e38de4a985d5d731c537e831a1e2ef40af05b91')

prepare() {
cd $_name-$_branch
sed -i 's|etc/bash_completion.d|share/bash-completion/completions|'
sed -i 's|etc/fish/completions|share/fish/vendor_completions.d|'
+ patch -Np1 -i ../8ae63d1bb7f4f07529f3978da0dc4b82e67ddc62.patch

package() {

colinkeenan commented on 2016-01-17 05:50

With today's update (1/16/2016), the build fails complaining about some ascii conversion, but I got it to work by adding the following to /etc/environment:


Smola commented on 2016-01-14 21:13

@jamietanna It's better to set it to `LC_ALL=C`.

jamietanna commented on 2016-01-14 21:04

Hey @flu, I've just done an upgrade, and found that the build fails on the `make` command, with the warning `/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)` if the user does not have en_US.UTF-8 installed. This may not be very common, but thought I'd document it nonetheless.

I've found the following patch to work - hopefully it helps others who have the same issue.

diff --git a/PKGBUILD b/PKGBUILD
index 8555004..93c476a 100644
@@ -41,7 +41,7 @@ prepare() {
package() {
cd $_name-$_branch

- LC_ALL=en_US.UTF-8 make bash-completion zsh-completion fish-completion README.txt youtube-dl.1
+ make bash-completion zsh-completion fish-completion README.txt youtube-dl.1
python install --root="$pkgdir" --optimize=1

mv "$pkgdir"/usr/share/bash-completion/completions/youtube-dl.bash-completion \

yan12125 commented on 2016-01-13 14:01

Dear @flu, could you consider including man pages, zsh and fish completion scripts into the package?

diff --git a/PKGBUILD b/PKGBUILD
index 2477aab..1cbaf9e 100644
@@ -16,7 +16,7 @@ arch=('any')

depends=('python' 'python-setuptools')
+makedepends=('git' 'pandoc')
optdepends=('ffmpeg: for video post-processing')

@@ -34,16 +34,17 @@ sha512sums=(SKIP)
prepare() {
cd $_name-$_branch
sed -i 's|etc/bash_completion.d|share/bash-completion/completions|'
- sed -i ':etc/fish/completions:d'
+ sed -i 's|etc/fish/completions|share/fish/vendor_completions.d|'

package() {
cd $_name-$_branch

- python devscripts/
+ LC_ALL=en_US.UTF-8 make bash-completion zsh-completion fish-completion README.txt youtube-dl.1
python install --root="$pkgdir" --optimize=1

mv "$pkgdir"/usr/share/bash-completion/completions/youtube-dl.bash-completion \
+ install -D -m644 youtube-dl.zsh "$pkgdir"/usr/share/zsh/site-functions/_youtube-dl
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE

flu commented on 2016-01-07 18:20

Ok, did it. Sounded good enough except that now .SRCINFO pkgver is wrong but this shouldn't be a big deal. Another option may be to explicitely remove Ideas are welcome!

izilly commented on 2016-01-07 15:45

The source currently downloads to "$SRCDEST/", which is causing some problems for me. Unless I manually delete the old source files before each new build, the newly created packages are just repackaged versions of the old, outdated source. Nothing is actually getting updated.

Here's a modified PKGBUILD that puts $pkgver in the source filename:

flu commented on 2015-12-05 09:18

Made the switch. I am open to more suggestions of course, please point me anything I may have forgotten. Thank you everyone.

Smola commented on 2015-12-04 17:54

flu, we could use `git ls-remote` to get commit hash:

$ git ls-remote -h git:// master | cut -c1-7

Or this awk script, which mimic `git describe` behavior:

FredBezies commented on 2015-12-03 14:09

@flu : orphaning this pkgbuild. Feel free to adopt it.

FredBezies commented on 2015-12-02 21:09

@SanskritFritz : it is simpler for me to give it up "fully". So, if Flu wants to own it, just a little mail and let's get it on ;)

SanskritFritz commented on 2015-12-02 21:00

FredBezies, you can give him co-maintainer role.

FredBezies commented on 2015-12-02 20:46

@flu : you want to adopt it ? Just tell me, I will orphan it for you.

flu commented on 2015-12-02 20:33

About master zip, md5sums=(SKIP) is the solution, isn't it?
And, say, the date as pkgver. Like
Yes, this solution is awkward regarding commits, but may be a good idea anyway.

davispuh commented on 2015-11-28 18:25

for some reason it installs empty /usr/etc/fish/completions and it kinda breaks fish's $__fish_sysconfdir as it starts to use /usr/etc/fish instead of /etc/fish

FredBezies commented on 2015-11-27 20:20

I won't do this for one reason. I would have to regenerate every single time md5sum of zip file. Using git repository is slower, but I don't have to run a makepkg -g > PKGBUILD every single time.

Also, youtube-dl is a very active project. 4 to 10 commits a day. So won't be usable for more than a day, and not buildable.

Just look at commit list on november 23, 2015. Only 12 commits.

A zip file could be a good idea, but only for stable releases.

I hope I answered you.

Smola commented on 2015-11-25 11:24

@mralext20 But contains exactly the same version of files as the git master branch. Am I wrong?

mralext20 commented on 2015-11-22 21:07

@Smola that would be using the binary instead of the git repo. there is already a binary package in the community repo.

Smola commented on 2015-11-21 19:29

Maybe we can switch source from git repo to zip download? Zip archive is like 100 times smaller than git repo.
Receiving objects: 100% (66367/66367), 104.52 MiB | 4.00 MiB/s, done.
Length: 1142089 (1.1M) [application/zip]
Or am I missing something here?

dafty commented on 2015-09-24 12:59

With the bug being resolved, I think there should be an update to the pkgver=.

I'm using 2015.09.22.r4.g19f93d9, where the bug is not present.

dysphoria commented on 2015-09-09 19:33

The community PKGBUILD has this line in prepare() for the correct fish completion path:
sed -i 's:etc/fish/completions:share/fish/completions:'

Since the PKGBUILD doesnt install the fish completion anyway, I assume that if you dont use the fish shell you can safely replace it with an empty path:
sed -i 's:etc/fish/completions::'

That should get rid of the empty folder.

dysphoria commented on 2015-09-09 19:32

The community PKGBUILD has this line in prepare() for the correct fish completion path:
sed -i 's:etc/fish/completions:share/fish/completions:'

Since the PKGBUILD doesnt install the fish completion anyway, I assume that if you dont use the fish shell you can safely replace it with an empty path:
sed -i 's:etc/fish/completions::'

dysphoria commented on 2015-09-09 19:06

The community PKGBUILD has this line in prepare() for the correct fish completion path:
sed -i 's|etc/fish/completions|share/fish/completions|'
though that just moves the empty folder to /usr/share/fish/completions

I assume that if you dont use the fish shell you can safely remove this from the by adding this to prepare() instead:
sed -i ':etc/fish/completions:d'

TomBoshoven commented on 2015-09-09 17:37

This package creates the empty folder /usr/etc/fish/completions .

baskerville commented on 2014-06-22 18:43

Thanks, I've applied all the suggested changes.

HalosGhost commented on 2014-06-11 14:49

This package could really use some TLC. For example, it's a python package, it's arch is 'any', not ('i686' 'x86_64'). Furthermore, the makefile provided upstream is terrible—you should seriously consider just using the standard python installation (like we do in the official package) instead of requiring zip as a makedepend.

All the best,

baskerville commented on 2013-09-02 12:03

Thanks but youtube-dl works with python 3.

I've added a makedepends entry though.

dapus2 commented on 2013-09-01 21:45

Some fixes:
-makedepends=('git' 'zip' 'sed')
+makedepends=('python2' 'git' 'zip' 'sed')

in build():
+sed -i 's/python/python2/g' Makefile

dapus2 commented on 2013-09-01 19:56

Some fixes:
-makedepends=('git' 'zip' 'sed')
+makedepends=('python2' 'git' 'zip' 'sed')

in build():
+sed -i 's/python/python2/g' Makefile

ConnorBehan commented on 2013-08-26 21:21

Yeah, it's a shame that the dependence on pandoc makes it hard to use

sulhan commented on 2013-07-01 09:36


:) No, thanks to you.

My comment was intended for any user who would like to build youtube-dl without needs to installing haskell-pandoc (63 MB dependencies is just to big for me or others), not specifically to "you". But, thanks again to make it as optional.

baskerville commented on 2013-06-27 13:14

Thanks, I've managed to make it optional.

sulhan commented on 2013-06-25 01:27

If you don't mind missing manual page and README.txt you can use this PKGBUILD [1] to install youtube-dl without haskell-pandoc dependency.


baskerville commented on 2013-05-11 20:02

Thanks, fixed.

konni commented on 2013-05-11 19:20

please replace 'pandoc' with 'haskell-pandoc' in makedepends.

baskerville commented on 2012-09-27 18:54

PKGBUILD modified accordingly.

Zucca commented on 2012-09-27 18:23

Ok. Here's how it should work:
makedepends=('git' 'zip' 'sed' 'pandoc')

And there's also one sed line patching few files. Only MakeFile needs to be patched:
sed -i 's|/usr/bin/env python|/usr/bin/env python2|' Makefile

There you go.

*pokes baskerville*

Zucca commented on 2012-09-27 18:16

... as a build depency afaik.

Zucca commented on 2012-09-27 18:09

pandoc in needed depency.
Also PKGBUILD seems to be broken.

baskerville commented on 2012-03-07 19:47

You're welcome!

GordonGR commented on 2012-03-07 19:07

Good old youtube-dl. Thanks!