question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default postprocessor fails when encountering "Unknown" stream

See original GitHub issue

Checklist

  • I’m reporting a bug unrelated to a specific site
  • I’ve verified that I’m running yt-dlp version 2021.12.27. (update instructions)
  • 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 issues including closed ones. DO NOT post duplicates
  • I’ve read the guidelines for opening an issue

Description

I am working on a default extractor for ESPN+ streams. The extractor is not fully functional yet as I have had to hardcode a few auth tokens, but after doing so I am able to successfully download the video. However, I seem to be running into an issue with the postprocessor:

ERROR: Postprocessing: If you want them copied, please use -copy_unknown

This seems to be related to #2 and #9. I am not sure why the -dn option is not ignoring the excess unknown stream, which is 0:2

If I manually add -ignore_unkown to the command, no post-processing is attempted at all, which leaves me in the same position as before, with a .mp4 file that has not been fixed up. I should also mention that I see this same error without doing anything with my new extractor, by that I mean I get the same result by just directly giving yt-dlp the master.m3u8 and the required header.

Verbose log

yt-dlp -f hls-4190 https://www.espn.com/watch/player/_/id/2935a850-ad4b-4f93-adb8-0b4d60821e66 --cookies espn.com_cookies.txt -o luton.mp4 --fixup force -v
[debug] Command-line config: ['-f', 'hls-4190', 'https://www.espn.com/watch/player/_/id/2935a850-ad4b-4f93-adb8-0b4d60821e66', '--cookies', 'espn.com_cookies.txt', '-o', 'luton.mp4', '--fixup', 'force', '-v']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2021.12.27 [6223f67a8]
[debug] Lazy loading extractors is disabled
[debug] Python version 3.9.9 (CPython 64bit) - macOS-12.1-arm64-arm-64bit
[debug] exe versions: ffmpeg 4.4.1 (setts), ffprobe 4.4.1
[debug] Optional libraries: Cryptodome, mutagen, sqlite, websockets
[debug] Proxy map: {}
[debug] [WatchESPN] Extracting URL: https://www.espn.com/watch/player/_/id/2935a850-ad4b-4f93-adb8-0b4d60821e66
[WatchESPN] 2935a850-ad4b-4f93-adb8-0b4d60821e66: Downloading JSON metadata
[WatchESPN] 2935a850-ad4b-4f93-adb8-0b4d60821e66: Downloading JSON metadata
[WatchESPN] 2935a850-ad4b-4f93-adb8-0b4d60821e66: Downloading JSON metadata
[WatchESPN] 2935a850-ad4b-4f93-adb8-0b4d60821e66: Downloading JSON metadata
[WatchESPN] 2935a850-ad4b-4f93-adb8-0b4d60821e66: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[info] 2935a850-ad4b-4f93-adb8-0b4d60821e66: Downloading 1 format(s): hls-4190
[debug] Invoking downloader on "https://vod-akc-na.media.plus.espn.com/ps01/espn/event/2022/01/09/Luton_Town_vs_Harrogate_T_20220109_1641725757031/3500K/3500_complete_aeng-trimmed.m3u8"
[download] luton.mp4 has already been downloaded
[download] 100% of 3.42GiB
[debug] ffprobe command line: ffprobe -hide_banner -show_format -show_streams -print_format json file:luton.mp4
[FixupM3u8] Fixing MPEG-TS in MP4 container of "luton.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i file:luton.mp4 -c copy -map 0 -dn -f mp4 -bsf:a aac_adtstoasc -movflags +faststart file:luton.temp.mp4
[debug] ffmpeg version 4.4.1 Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 13.0.0 (clang-1300.0.29.3)
  configuration: --prefix=/opt/homebrew/Cellar/ffmpeg/4.4.1_3 --enable-shared --enable-pthreads --enable-version3 --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librist --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libxvid --enable-lzma --enable-libfontconfig --enable-libfreetype --enable-frei0r --enable-libass --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libspeex --enable-libsoxr --enable-libzmq --enable-libzimg --disable-libjack --disable-indev=jack --enable-avresample --enable-videotoolbox
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
[mpegts @ 0x15181b600] Could not find codec parameters for stream 2 (Unknown: none (CUEI / 0x49455543)): unknown codec
Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
Input #0, mpegts, from 'file:luton.mp4':
  Duration: 02:14:08.21, start: 3451.648200, bitrate: 3645 kb/s
  Program 1 
  Stream #0:0[0x1e1]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc
  Stream #0:1[0x1e2]: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 128 kb/s
  Stream #0:2[0x4a6]: Unknown: none (CUEI / 0x49455543)
  Stream #0:3[0x4a7]: Data: timed_id3 (ID3  / 0x20334449)
Cannot map stream #0:2 - unsupported type.
If you want unsupported types ignored instead of failing, please use the -ignore_unknown option
If you want them copied, please use -copy_unknown
ERROR: Postprocessing: If you want them copied, please use -copy_unknown
Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/YoutubeDL.py", line 3119, in process_info
    replace_info_dict(self.post_process(dl_filename, info_dict, files_to_move))
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/YoutubeDL.py", line 3292, in post_process
    info = self.run_pp(pp, info)
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/YoutubeDL.py", line 3236, in run_pp
    files_to_delete, infodict = pp.run(infodict)
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/postprocessor/common.py", line 22, in run
    ret = func(self, info, *args, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/postprocessor/common.py", line 117, in wrapper
    return func(self, info)
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/postprocessor/ffmpeg.py", line 890, in run
    self._fixup('Fixing MPEG-TS in MP4 container', info['filepath'], [
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/postprocessor/ffmpeg.py", line 851, in _fixup
    self.run_ffmpeg(filename, temp_filename, options)
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/postprocessor/ffmpeg.py", line 327, in run_ffmpeg
    return self.run_ffmpeg_multiple_files([path], out_path, opts, **kwargs)
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/postprocessor/ffmpeg.py", line 281, in run_ffmpeg_multiple_files
    return self.real_run_ffmpeg(
  File "/opt/homebrew/lib/python3.9/site-packages/yt_dlp/postprocessor/ffmpeg.py", line 320, in real_run_ffmpeg
    raise FFmpegPostProcessorError(stderr.split('\n')[-1])
yt_dlp.postprocessor.ffmpeg.FFmpegPostProcessorError: If you want them copied, please use -copy_unknown

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
pukkandancommented, Jan 12, 2022

you can use any random file upload service (google drive?). If you want to share the link privately, you can reach me on discord or just email me

0reactions
ischmidt20commented, Jan 12, 2022

Hmmm, I must have not been adding the argument properly before. Now when I add --postprocessor-args -ignore_unknown to the command (in addition to --fixup force on a file that had already been downloaded), the fixup works. If you don’t want to include it in the postprocessor by default, is there any way it can be added as a default argument for a single extractor only?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Postprocessing: Conversion failed! #3138 - yt-dlp/yt-dlp - GitHub
Downloading a video fails with Postprocessing: Conversion failed! error, ... Stream #1:0(eng): Audio: opus, 48000 Hz, stereo, fltp (default) ...
Read more >
Troubleshoot SageMaker Clarify Processing Jobs
If you encounter failures with SageMaker Clarify processing jobs, consult the following scenarios to help identify the issue. Note. The failure reason and ......
Read more >
[Support Guide] Frequently encountered problems during builds
There are some situations during build that may lead to a failure in post processing — many things that fail will lead to...
Read more >
Troubleshooting GitLab Runner
You can see the Permission Denied error. The most likely cause is that your system uses SELinux (enabled by default on CentOS, Fedora...
Read more >
Configuration options — nbconvert 7.2.6 documentation
Continue notebook execution even if one of the cells throws an error and include the error message in the cell output (the default...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found