youtube-dl pass external-downloader-args to the wrong external-downloader #17309

Closed
opened 2026-02-21 08:09:27 -05:00 by deekerman · 2 comments
Owner

Originally created by @magicalz on GitHub (Jul 4, 2019).

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running youtube-dl version 2019.07.02
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

root@20190616-2:~/stream-recorder# youtube-dl -v -o "/root/aria2download/%(title)s.%(ext)s" --external-downloader aria2c --external-downloader-args "-c -j 6 -x 6 -s 6 -k 1M" -f best https://www.youtube.com/watch?v=B6NbCs5pt20
[debug] System config: []
[debug] User config: ['--external-downloader', 'aria2c']
[debug] Custom config: []
[debug] Command-line args: ['-v', '-o', '/root/aria2download/%(title)s.%(ext)s', '--external-downloader', 'aria2c', '--external-downloader-args', '-c -j 6 -x 6 -s 6 -k 1M', '-f', 'best', 'https://www.youtube.com/watch?v=B6NbCs5pt20']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.07.02
[debug] Python version 3.7.3 (CPython) - Linux-4.12.9-041209-generic-x86_64-with-debian-8.11
[debug] exe versions: ffmpeg 4.1.3-static, ffprobe 4.1.3-static
[debug] Proxy map: {}
[youtube] B6NbCs5pt20: Downloading webpage
[youtube] B6NbCs5pt20: Downloading video info webpage
[youtube] B6NbCs5pt20: Downloading m3u8 information
[youtube] B6NbCs5pt20: Downloading MPD manifest
[debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1562278657/ei/oCYeXZPgOYmRhgacvrPoDg/ip/2001:19f0:5:2bb9:5400:2ff:fe20:2ad2/id/B6NbCs5pt20.0/itag/301/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D299/hls_chunk_host/r5---sn-ab5l6n6l.googlevideo.com/force_finished/1/playlist_type/CLEAN/mm/44/mn/sn-ab5l6n6l/ms/lva/mv/u/mvi/4/pl/52/dover/11/keepalive/yes/mt/1562256817/disable_polymer/true/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,force_finished,playlist_type/sig/ALgxI2wwRQIgcuX3_Bn6D2faPwMqIgzzg3XafFiKc3lZMk8NRWhaLPICIQCca-6-qtrNYDjSn27LEL2cZiEyzygnbqwfwu9urZgZyA%3D%3D/lsparams/hls_chunk_host,mm,mn,ms,mv,mvi,pl/lsig/AHylml4wRQIhAOAiccn0fh_LXmcnyUsQ9jJ60snU7NXla6OkN3oul5Q4AiAJgns2ybjSZ9tnqm4NyeN2K248af1RgcYGjJ1DIObZEg%3D%3D/playlist/index.m3u8'
[download] Destination: /root/aria2download/【Minecraft】のんびりクラフトだぞぉ~【#百鬼あやめ_ホロライブ】.mp4
[debug] ffmpeg command line: ffmpeg -y -loglevel verbose -c -j 6 -x 6 -s 6 -k 1M -headers 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3749.2 Safari/537.36
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
' -i https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1562278657/ei/oCYeXZPgOYmRhgacvrPoDg/ip/2001:19f0:5:2bb9:5400:2ff:fe20:2ad2/id/B6NbCs5pt20.0/itag/301/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D299/hls_chunk_host/r5---sn-ab5l6n6l.googlevideo.com/force_finished/1/playlist_type/CLEAN/mm/44/mn/sn-ab5l6n6l/ms/lva/mv/u/mvi/4/pl/52/dover/11/keepalive/yes/mt/1562256817/disable_polymer/true/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,force_finished,playlist_type/sig/ALgxI2wwRQIgcuX3_Bn6D2faPwMqIgzzg3XafFiKc3lZMk8NRWhaLPICIQCca-6-qtrNYDjSn27LEL2cZiEyzygnbqwfwu9urZgZyA%3D%3D/lsparams/hls_chunk_host,mm,mn,ms,mv,mvi,pl/lsig/AHylml4wRQIhAOAiccn0fh_LXmcnyUsQ9jJ60snU7NXla6OkN3oul5Q4AiAJgns2ybjSZ9tnqm4NyeN2K248af1RgcYGjJ1DIObZEg%3D%3D/playlist/index.m3u8 -c copy -f mp4 -bsf:a aac_adtstoasc 'file:/root/aria2download/【Minecraft】のんびりクラフトだぞぉ~【#百鬼あやめ_ホロライブ】.mp4.part'
ffmpeg version 4.1.3-static https://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516
  configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzvbi --enable-libzimg
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Unrecognized option 'k'.
Error splitting the argument list: Option not found


ERROR: ffmpeg exited with code 1
  File "/usr/local/python3.7/bin/youtube-dl", line 10, in <module>
    sys.exit(main())
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/__init__.py", line 474, in main
    _real_main(argv)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/__init__.py", line 464, in _real_main
    retcode = ydl.download(all_urls)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 2008, in download
    url, force_generic_extractor=self.params.get('force_generic_extractor', False))
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 807, in extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 861, in process_ie_result
    return self.process_video_result(ie_result, download=download)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 1642, in process_video_result
    self.process_info(new_info)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 1915, in process_info
    success = dl(filename, info_dict)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 1854, in dl
    return fd.download(name, info)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/downloader/common.py", line 366, in download
    return self.real_download(filename, info_dict)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/downloader/external.py", line 64, in real_download
    self.get_basename(), retval))
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/downloader/common.py", line 165, in report_error
    self.ydl.report_error(*args, **kargs)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 624, in report_error
    self.trouble(error_message, tb)
  File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 586, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

Description

WRITE DESCRIPTION HERE

I try to use youtube-dl with aria2 to download youtube video, but for some of the videos, youtube-dl will ignore aria2 and use ffmpeg instead, also pass the aria2 args to ffmpeg which cause an exception.

Originally created by @magicalz on GitHub (Jul 4, 2019). <!-- ###################################################################### WARNING! IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE ###################################################################### --> ## Checklist <!-- Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl: - First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2019.07.02. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED. - Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser. - Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape. - Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates. - Read bugs section in FAQ: http://yt-dl.org/reporting - Finally, put x into all relevant boxes (like this [x]) --> - [x] I'm reporting a broken site support issue - [x] I've verified that I'm running youtube-dl version **2019.07.02** - [x] I've checked that all provided URLs are alive and playable in a browser - [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped - [x] I've searched the bugtracker for similar bug reports including closed ones - [x] I've read bugs section in FAQ ## Verbose log <!-- Provide the complete verbose output of youtube-dl that clearly demonstrates the problem. 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 below. It should look similar to this: [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2019.07.02 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} <more lines> --> ``` root@20190616-2:~/stream-recorder# youtube-dl -v -o "/root/aria2download/%(title)s.%(ext)s" --external-downloader aria2c --external-downloader-args "-c -j 6 -x 6 -s 6 -k 1M" -f best https://www.youtube.com/watch?v=B6NbCs5pt20 [debug] System config: [] [debug] User config: ['--external-downloader', 'aria2c'] [debug] Custom config: [] [debug] Command-line args: ['-v', '-o', '/root/aria2download/%(title)s.%(ext)s', '--external-downloader', 'aria2c', '--external-downloader-args', '-c -j 6 -x 6 -s 6 -k 1M', '-f', 'best', 'https://www.youtube.com/watch?v=B6NbCs5pt20'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2019.07.02 [debug] Python version 3.7.3 (CPython) - Linux-4.12.9-041209-generic-x86_64-with-debian-8.11 [debug] exe versions: ffmpeg 4.1.3-static, ffprobe 4.1.3-static [debug] Proxy map: {} [youtube] B6NbCs5pt20: Downloading webpage [youtube] B6NbCs5pt20: Downloading video info webpage [youtube] B6NbCs5pt20: Downloading m3u8 information [youtube] B6NbCs5pt20: Downloading MPD manifest [debug] Invoking downloader on 'https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1562278657/ei/oCYeXZPgOYmRhgacvrPoDg/ip/2001:19f0:5:2bb9:5400:2ff:fe20:2ad2/id/B6NbCs5pt20.0/itag/301/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D299/hls_chunk_host/r5---sn-ab5l6n6l.googlevideo.com/force_finished/1/playlist_type/CLEAN/mm/44/mn/sn-ab5l6n6l/ms/lva/mv/u/mvi/4/pl/52/dover/11/keepalive/yes/mt/1562256817/disable_polymer/true/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,force_finished,playlist_type/sig/ALgxI2wwRQIgcuX3_Bn6D2faPwMqIgzzg3XafFiKc3lZMk8NRWhaLPICIQCca-6-qtrNYDjSn27LEL2cZiEyzygnbqwfwu9urZgZyA%3D%3D/lsparams/hls_chunk_host,mm,mn,ms,mv,mvi,pl/lsig/AHylml4wRQIhAOAiccn0fh_LXmcnyUsQ9jJ60snU7NXla6OkN3oul5Q4AiAJgns2ybjSZ9tnqm4NyeN2K248af1RgcYGjJ1DIObZEg%3D%3D/playlist/index.m3u8' [download] Destination: /root/aria2download/【Minecraft】のんびりクラフトだぞぉ~【#百鬼あやめ_ホロライブ】.mp4 [debug] ffmpeg command line: ffmpeg -y -loglevel verbose -c -j 6 -x 6 -s 6 -k 1M -headers 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3749.2 Safari/537.36 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 ' -i https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1562278657/ei/oCYeXZPgOYmRhgacvrPoDg/ip/2001:19f0:5:2bb9:5400:2ff:fe20:2ad2/id/B6NbCs5pt20.0/itag/301/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D299/hls_chunk_host/r5---sn-ab5l6n6l.googlevideo.com/force_finished/1/playlist_type/CLEAN/mm/44/mn/sn-ab5l6n6l/ms/lva/mv/u/mvi/4/pl/52/dover/11/keepalive/yes/mt/1562256817/disable_polymer/true/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,force_finished,playlist_type/sig/ALgxI2wwRQIgcuX3_Bn6D2faPwMqIgzzg3XafFiKc3lZMk8NRWhaLPICIQCca-6-qtrNYDjSn27LEL2cZiEyzygnbqwfwu9urZgZyA%3D%3D/lsparams/hls_chunk_host,mm,mn,ms,mv,mvi,pl/lsig/AHylml4wRQIhAOAiccn0fh_LXmcnyUsQ9jJ60snU7NXla6OkN3oul5Q4AiAJgns2ybjSZ9tnqm4NyeN2K248af1RgcYGjJ1DIObZEg%3D%3D/playlist/index.m3u8 -c copy -f mp4 -bsf:a aac_adtstoasc 'file:/root/aria2download/【Minecraft】のんびりクラフトだぞぉ~【#百鬼あやめ_ホロライブ】.mp4.part' ffmpeg version 4.1.3-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2019 the FFmpeg developers built with gcc 6.3.0 (Debian 6.3.0-18+deb9u1) 20170516 configuration: --enable-gpl --enable-version3 --enable-static --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --cc=gcc-6 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-gmp --enable-gray --enable-libaom --enable-libfribidi --enable-libass --enable-libvmaf --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-librubberband --enable-libsoxr --enable-libspeex --enable-libvorbis --enable-libopus --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzvbi --enable-libzimg libavutil 56. 22.100 / 56. 22.100 libavcodec 58. 35.100 / 58. 35.100 libavformat 58. 20.100 / 58. 20.100 libavdevice 58. 5.100 / 58. 5.100 libavfilter 7. 40.101 / 7. 40.101 libswscale 5. 3.100 / 5. 3.100 libswresample 3. 3.100 / 3. 3.100 libpostproc 55. 3.100 / 55. 3.100 Unrecognized option 'k'. Error splitting the argument list: Option not found ERROR: ffmpeg exited with code 1 File "/usr/local/python3.7/bin/youtube-dl", line 10, in <module> sys.exit(main()) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/__init__.py", line 474, in main _real_main(argv) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/__init__.py", line 464, in _real_main retcode = ydl.download(all_urls) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 2008, in download url, force_generic_extractor=self.params.get('force_generic_extractor', False)) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 807, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 861, in process_ie_result return self.process_video_result(ie_result, download=download) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 1642, in process_video_result self.process_info(new_info) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 1915, in process_info success = dl(filename, info_dict) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 1854, in dl return fd.download(name, info) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/downloader/common.py", line 366, in download return self.real_download(filename, info_dict) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/downloader/external.py", line 64, in real_download self.get_basename(), retval)) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/downloader/common.py", line 165, in report_error self.ydl.report_error(*args, **kargs) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 624, in report_error self.trouble(error_message, tb) File "/usr/local/python3.7/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 586, in trouble tb_data = traceback.format_list(traceback.extract_stack()) ``` ## Description <!-- Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible. If work on your issue requires account credentials please provide them or explain how one can obtain them. --> WRITE DESCRIPTION HERE I try to use youtube-dl with aria2 to download youtube video, but for some of the videos, youtube-dl will ignore aria2 and use ffmpeg instead, also pass the aria2 args to ffmpeg which cause an exception.
deekerman 2026-02-21 08:09:27 -05:00
  • closed this issue
  • added the
    duplicate
    label
Author
Owner

@magicalz commented on GitHub (Jul 4, 2019):

Can you tell me which issue is it duplicate from? I try to search the similar issue before I commit this one but found nothing.

@magicalz commented on GitHub (Jul 4, 2019): Can you tell me which issue is it duplicate from? I try to search the similar issue before I commit this one but found nothing.
Author
Owner

@maxnordlund commented on GitHub (Jul 24, 2020):

I think I found the duplicate, #10784, but only @dstftw can confirm that one is it?

@maxnordlund commented on GitHub (Jul 24, 2020): I think I found the duplicate, #10784, but only @dstftw can confirm that one is it?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/youtube-dl#17309
No description provided.