Call for testing: youtube-dl

“youtube-dl is a command-line program to download videos from YouTube.com and a few more sites.”

I’ve snapped this so you don’t have to worry about polluting your system Python.

Install with

snap install youtube-dl --edge

Example usage

youtube-dl "https://www.youtube.com/watch?v=zB_UZsJUbwQ"

Please let me know if you have any issues.

1 Like

Just tested successfully. Thanks for working with this!

1 Like

As the upstream is clearly not interested maintaining the snap and multiple attempt existed[1] [2], maybe it’s a great target for the @snapcrafters to adopt this package?

@popey What do you think?

@joedborg Thanks for your effort, but however it seems that @evan’s implementation [1] is more complete than your’s, we should probably work on his implementation instead.

[1] Add a snapcraft.yaml
[2] Adding snap package by joedborg · Pull Request #18487 · rg3/youtube-dl

If @joedborg is happy to maintain this snap, that’s great. I don’t see a need to absorb everything into snapcrafters. As mentioned in another thread, snapcrafters shouldn’t be seen as a dumping ground for all snaps. Ideally we’d upstream everything in snapcrafters, but for whatever reason some can’t or won’t be upstreamed. But if we have active community members (including Canonical employees such as @joedborg) who are willing to maintain a snap, that’s awesome.

1 Like

The major benefit I see from including this package to snapcrafters is that we can set up automatic re-publishing as this package updates frequently and an outdated package will cause frustration to its users.

If this problem is dealt properly I’d happy to let it be.

There’s two things I found necessary to improve this snap:

  • An FFmpeg distribution is required to merge separate audio and video streams.
  • Please assert the removable-media plug as video files are frequently been saved to an external drive.
1 Like

Good point. Perhaps @joedborg could look at making sure he uses something like we do in snapcrafters to ensure the snap is always nice and fresh :slight_smile:

1 Like

Thanks for all the replies.

@gunnarhj Thanks for testing this and taking the time for providing feedback.

@Lin-Buo-Ren I had not found the snap by @evan (that’s my bad). If you know where his source code lives, I’ll make sure to get in touch with him to see if he wants to collaborate. I’ll add that plug now and push a new edge, thanks for the heads up.

@popey, I’m currently pulling their updates into a fork (which has the snapcraft.yaml) with backstroke.co and then I’ll rely on the build.snapcraft.io to build and push the updates. Does this sound sane?

1 Like

Hey @joedborg. Thanks for picking this up! My attempt is here:

By all means, take it in whatever direction you think works best. I have time to help test, but I’d hold you back collaborating on the code right now.

1 Like

Thanks @evan, I’ve updated the snap based on yours and once built, it’ll be in edge.

1 Like

I noticed a problem while using your snap:

If I download a video with title with CJKV characters, the characters are lost in the resulting filename with the following warning message:

WARNING: Assuming --restrict-filenames since file system encoding cannot encode all characters. Set the LC_ALL environment variable to fix this.

Reproduce command-line:

 $ youtube-dl --format 137+171 https://www.youtube.com/watch?v=3wTCd8fC2fU

I suspect this is a glibc locale issue and can be solved by using/incorporating The locales-launch remote part, you may want to check it out.

UPDATE: Fix CJKV character missing from resulting filename by Lin-Buo-Ren · Pull Request #4 · joedborg/youtube-dl

Many thanks @Lin-Buo-Ren, I’ve merged those.

1 Like

Just an update for everyone:

I’ll be moving a known release into stable soon. I’ve swapped out backtroke.io to https://github.com/apps/pull as it seems to be simpler and more reliable. This means that the edge channel will always be up-to-date with upstream Git (https://github.com/rg3/youtube-dl).

3 Likes

Well that works very nicely!
Thank you very much for creating this snap.

Mike.

2 Likes