Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

youtube-dl doesn't understand ffmpeg masquerading as avconv #14633

Closed
larryhastings opened this issue Oct 30, 2017 · 2 comments
Closed

youtube-dl doesn't understand ffmpeg masquerading as avconv #14633

larryhastings opened this issue Oct 30, 2017 · 2 comments
Labels

Comments

@larryhastings
Copy link

@larryhastings larryhastings commented Oct 30, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like this: [x])
  • Use the Preview tab to see what your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.10.29. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.10.29

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=Et6QLISlFL8']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2017.10.29
[debug] Python version 2.7.13 - Linux-4.13.0-16-generic-x86_64-with-debian-stretch-sid
[debug] exe versions: avconv 3.3.4-2, avprobe 3.3.4-2, ffmpeg 3.3.4-2, ffprobe 3.3.4-2              
[debug] Proxy map: {}
[youtube] Et6QLISlFL8: Downloading webpage
[youtube] Et6QLISlFL8: Downloading video info webpage
[youtube] Et6QLISlFL8: Extracting video information
[youtube] Et6QLISlFL8: Downloading MPD manifest
WARNING: Your copy of avconv is outdated and unable to properly mux separate video and audio files, youtube-dl will download single file media. Update avconv to version 10-0 or newer to fix this.
[debug] Default format spec: best/bestvideo+bestaudio                           
[debug] Invoking downloader on u'https://r4---sn-aigl6ney.googlevideo.com/videoplayback?ei=Xa73WbudHMWWW42XlPgI&initcwndbps=946250&lmt=1508684355701357&ipbits=0&ratebypass=yes&expire=1509425853&sparams=dur%2Cei%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cexpire&id=o-AMFjnBNjfje3XxFwX5amxqUdJCcDdlgClC0rcVbCeRSL&source=youtube&requiressl=yes&dur=963.813&mm=31&mn=sn-aigl6ney&pl=16&ms=au&mt=1509403913&itag=22&mv=m&ip=86.189.9.190&mime=video%2Fmp4&signature=AAAD02DC082E8D19A4F044D3A2076C27E4C27398.7C2348C19507B4D15E872B481D2E82AEC78BA054&key=yt6'                      
[download] Destination: Mr. Plinkett's Zombie Review!!!-Et6QLISlFL8.mp4         
[download] 100% of 163.90MiB in 00:37

Description of your issue, suggested solution and other information

youtube-dl understands how to use ffmpeg and avconv. On a system with both installed, it can explicitly use either; if you don't specify a default it somehow chooses one or the other to use.

On my freshly-installed Ubuntu 17.10 (64-bit) computer, youtube-dl seems to choose avconv by default. But avconv is not actually installed. Debian chose to switch back to ffmpeg quite some time ago, but in order to not break shell scripts (I guess) they symbolically linked avconv to ffmpeg. Naturally Ubuntu inherited this behavior, voila:

% ls -l /usr/bin/avconv
lrwxrwxrwx 1 root root 6 Sep 26 11:42 /usr/bin/avconv -> ffmpeg

The real avconv tool is currently at version 12.0. And it seems that avconv added a feature in version 10.0 that's necessary for youtube-dl to use it for muxing; versions older than 10.0 are too old to be useful.

However, ffmpeg is currently at version 3.3.4-2 on this system. And here's the bug: it seems that youtube-dl somehow analyzes "avconv" (really ffmpeg), and concludes that it's at version 3.3.4-2. Since that's less than 10.0, youtube-dl decides it can't mux with avconv. So instead it downloads the best-quality single-file download, which is of markedly lower quality, judging by download size.

I can work around this problem by specifying "--prefer-ffmpeg" on the youtube-dl command-line. But it would be nice if I didn't have to.

Strategies you might consider to work around this problem:

  • Examine the avconv and ffmpeg executables. If one is a symbolic link to the other, prefer the real program to the symbolic link by default.
  • If both programs are present, but only one of the two is of a sufficiently high version to be useful, automatically prefer the useful one by default.

One final note: my computers running Ubuntu 17.04 (64-bit) did not (and do not currently) have this problem, despite the fact that they too have avconv as a symbolic link to ffmpeg, and ffmpeg is an even older version ("3.2.4-1build2"). I don't know why I don't see this behavior on those computers.

@dstftw dstftw closed this Oct 31, 2017
@dstftw dstftw added the duplicate label Oct 31, 2017
@larryhastings
Copy link
Author

@larryhastings larryhastings commented Dec 29, 2017

What issue is this a duplicate of? I'd like to submit a patch for this, and I should refer to the issue in the PR.

@larryhastings
Copy link
Author

@larryhastings larryhastings commented Dec 29, 2017

Nevermind, I found it. (It's #10673.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.