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

Videos from Twitter cannot be downloaded: --external-downloader-args passed to ffmpeg #15940

Closed
cheater opened this issue Mar 21, 2018 · 1 comment
Labels

Comments

@cheater
Copy link

@cheater cheater commented Mar 21, 2018

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 2018.03.20. 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 2018.03.20

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
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

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

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


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 ```):

$ youtube-dl -v --prefer-ffmpeg --external-downloader aria2c --external-downloader-args '-k 1M' https://twitter.com/Cardinologistuk/status/975741593008459777
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--prefer-ffmpeg', u'--external-downloader', u'aria2c', u'--external-downloader-args', u'-k 1M', u'https://twitter.com/Cardinologistuk/status/975741593008459777']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.20
[debug] Python version 2.7.6 (CPython) - Linux-4.4.0-040400-generic-i686-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.20-6, avprobe 9.20-6, ffmpeg 3.3.3, ffprobe 3.3.3, phantomjs 1.9.0, rtmpdump 2.4-n87-gita9f353c-ppa8
[debug] Proxy map: {}
[twitter] 975741593008459777: Downloading webpage
[twitter:card] 975741593008459777: Downloading webpage
[twitter:card] 975741593008459777: Downloading m3u8 information
[twitter:card] 975741593008459777: Downloading mobile webpage
[twitter:card] 975741593008459777: Downloading main script
[twitter:card] 975741593008459777: Downloading API data
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on u'https://video.twimg.com/ext_tw_video/975741017591877633/pu/pl/720x1280/lW99o_4OCVP1jY-r.m3u8'
[download] Destination: Mr H - Finishing touches on #custom @marshallamps 1960 #vintage amps #minibar #ImadeThat #handbuilt #marshallamps #jackdaniels #no7 #thedoorworks-975741593008459777.mp4
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -k 1M -headers 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)
' -i 'https://video.twimg.com/ext_tw_video/975741017591877633/pu/pl/720x1280/lW99o_4OCVP1jY-r.m3u8' -c copy -f mp4 'file:Mr H - Finishing touches on #custom @marshallamps 1960 #vintage amps #minibar #ImadeThat #handbuilt #marshallamps #jackdaniels #no7 #thedoorworks-975741593008459777.mp4.part'
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --disable-ffserver --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc --enable-libzimg
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Unrecognized option 'k'.
Error splitting the argument list: Option not found


ERROR: ffmpeg exited with code 1
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
    youtube_dl.main()
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 471, in main
    _real_main(argv)
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 461, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1989, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 796, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 888, in process_ie_result
    new_result, download=download, extra_info=extra_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 850, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1623, in process_video_result
    self.process_info(new_info)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1896, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1835, in dl
    return fd.download(name, info)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 364, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/external.py", line 57, in real_download
    self.get_basename(), retval))
  File "/usr/local/bin/youtube-dl/youtube_dl/downloader/common.py", line 166, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 613, in report_error
    self.trouble(error_message, tb)
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 575, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())
...
<end of log>

strace error log: https://gist.github.com/cheater/9b8277a34751d183b3e32d76753ef4b2

Output of just ffmpeg -k:

$ ffmpeg -k
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --extra-libs=-ldl --prefix=/opt/ffmpeg --mandir=/usr/share/man --enable-avresample --disable-debug --enable-nonfree --enable-gpl --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --disable-decoder=amrwb --enable-libpulse --enable-libfreetype --enable-gnutls --disable-ffserver --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libvorbis --enable-libtheora --enable-libmp3lame --enable-libopus --enable-libvpx --enable-libspeex --enable-libass --enable-avisynth --enable-libsoxr --enable-libxvid --enable-libvidstab --enable-libwavpack --enable-nvenc --enable-libzimg
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libavresample   3.  5.  0 /  3.  5.  0
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
Unrecognized option 'k'.
Error splitting the argument list: Option not found

Description of your issue, suggested solution and other information

When downloading a specific video, youtube-dl passes --external-downloader-args to ffmpeg.

Example command line:
youtube-dl --prefer-ffmpeg --external-downloader aria2c --external-downloader-args '-k 1M' https://twitter.com/Cardinologistuk/status/975741593008459777

I've tried the same command line with other video sites, eg youtube, and that works. It's notable that this also worked with twitter until recently, and now stopped working. I'm not sure if this is because of a recent youtube-dl update or if it happened 'spontaneously'. I tried with a few other videos on Twitter and it doesn't work either.

You get shown error output from ffmpeg. It's the same error as if you just ran ffmpeg -k.

This error means that if you use an external downloader with custom args, videos from Twitter cannot be downloaded at all now.

My guess is whatever code executes ffmpeg confuses the arguments it should be passing to it.

@dstftw dstftw closed this Mar 21, 2018
@dstftw dstftw added the duplicate label Mar 21, 2018
@cheater
Copy link
Author

@cheater cheater commented Mar 21, 2018

duplicate of #10784

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.