Can't embed DASH subtitles [DiscoveryPlus]
See original GitHub issueDO NOT REMOVE OR SKIP THE ISSUE TEMPLATE
- I understand that I will be blocked if I remove or skip any mandatory* field
Checklist
- I’m reporting a bug unrelated to a specific site
- I’ve verified that I’m running yt-dlp version 2022.09.01 (update instructions) or later (specify commit)
- I’ve checked that all provided URLs are playable in a browser with the same IP and same login details
- 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
Provide a description that is worded well enough to be understood
DiscoveryPlus (USA) had a recent change and switched from HLS to DASH.
Subtitles are WebVTT, but are in a DASH MP4 stream as shown with --list-subs
[DiscoveryPlus] gold-rush-dave-turins-lost-mine/cowboys-and-dreamers: Downloading JSON metadata
[DiscoveryPlus] 4903917: Downloading JSON metadata
[DiscoveryPlus] gold-rush-dave-turins-lost-mine/cowboys-and-dreamers: Downloading MPD manifest
[info] Available subtitles for 4903917:
Language Formats
en mp4
Using --write-subs, the subtitle is downloaded. If the subtitle.en.mp4 is opened in a text editor, the subtitle text and the WebVTT formating can be read.
MediaInfo below.
General
Complete name : C:\yt-dlp\subtitle.en.mp4
Format : iso6
Codec ID : iso6
File size : 131 KiB
Duration : 41mn 28s
Overall bit rate : 431 bps
Encoded date : UTC 2022-09-09 13:36:28
Tagged date : UTC 2022-09-09 13:36:28
Text
ID : 1
Format : wvtt
Codec ID : wvtt
Duration : 41mn 28s
Bit rate : 340 bps
Stream size : 103 KiB (79%)
Title : *textstream_eng=1000.webvtt.fragmented.vtt@GPAC1.0.1-revUNKNOWN_REV
Encoded date : UTC 2022-09-09 13:36:28
Tagged date : UTC 2022-09-09 13:36:28
However, yt-dlp can’t convert or embed the DASH subtitle.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.mp4':
Metadata:
major_brand : iso6
minor_version : 1
compatible_brands: iso6dash
creation_time : 2022-09-09T13:36:28.000000Z
Duration: 00:41:28.17, bitrate: 0 kb/s
Stream #0:0[0x1](und): Data: none (wvtt / 0x74747677), 0 kb/s (default)
Metadata:
creation_time : 2022-09-09T13:36:28.000000Z
handler_name : *textstream_eng=1000.webvtt.fragmented.vtt@GPAC1.0.1-revUNKNOWN_REV
Output #0, srt, to 'file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.srt':
Output file #0 does not contain any stream
ERROR: Preprocessing: Output file #0 does not contain any stream
Traceback (most recent call last):
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\YoutubeDL.py", line 3435, in pre_process
info = self.run_all_pps(key, info)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\YoutubeDL.py", line 3428, in run_all_pps
info = self.run_pp(pp, info)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\YoutubeDL.py", line 3407, in run_pp
files_to_delete, infodict = pp.run(infodict)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\common.py", line 24, in run
ret = func(self, info, *args, **kwargs)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\ffmpeg.py", line 996, in run
self.run_ffmpeg(old_file, new_file, ['-f', new_format])
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\ffmpeg.py", line 368, in run_ffmpeg
return self.run_ffmpeg_multiple_files([path], out_path, opts, **kwargs)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\ffmpeg.py", line 323, in run_ffmpeg_multiple_files
return self.real_run_ffmpeg(
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\ffmpeg.py", line 361, in real_run_ffmpeg
raise FFmpegPostProcessorError(stderr.strip().splitlines()[-1])
yt_dlp.postprocessor.ffmpeg.FFmpegPostProcessorError: Output file #0 does not contain any stream
If --embed-subs is used, video and audio are processed correctly, but there are no subitles in the final stream.
Example URL:
https://www.discoveryplus.com/video/gold-rush-dave-turins-lost-mine/cowboys-and-dreamers
Full Log (unique ids removed for privacy): The log below says version 2022.09.01, but I am using master branch yt-dlp code from 2022.09.13 that has the recent DiscoveryPlus fixes.
Provide verbose output that clearly demonstrates the problem
- Run your yt-dlp command with -vU flag added (
yt-dlp -vU <your command line>
) - Copy the WHOLE output (starting with
[debug] Command-line config
) and insert it below
Complete Verbose Output
[debug] Command-line config: ['https://www.discoveryplus.com/video/gold-rush-dave-turins-lost-mine/cowboys-and-dreamers', '--cookies', 'C:\\yt-dlp\\cookies.txt', '-o', 'C:\\yt-dlp/%(series)s.%(title)s.%(ext)s', '--convert-subs', 'srt', '--embed-subs', '--verbose']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8 (No VT), error utf-8 (No VT), screen utf-8 (No VT)
[debug] yt-dlp version 2022.09.01 [5d7c7d656]
[debug] Lazy loading extractors is disabled
[debug] Plugins: ['SamplePluginIE', 'SamplePluginPP']
[debug] Python 3.8.7 (CPython 64bit) - Windows-7-6.1.7601-SP1
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.1-full_build-www.gyan.dev (setts), ffprobe 5.1-full_build-www.gyan.dev
[debug] Optional libraries: Crypto-3.12.0, certifi-2019.03.09, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1671 extractors
[debug] [DiscoveryPlus] Extracting URL: https://www.discoveryplus.com/video/gold-rush-dave-turins-lost-mine/cowboys-and-dreamers
[debug] Using fake IP [REMOVED] (US) as X-Forwarded-For
[DiscoveryPlus] gold-rush-dave-turins-lost-mine/cowboys-and-dreamers: Downloading JSON metadata
[DiscoveryPlus] 4903917: Downloading JSON metadata
[DiscoveryPlus] gold-rush-dave-turins-lost-mine/cowboys-and-dreamers: Downloading MPD manifest
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[info] 4903917: Downloading subtitles: en
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 4903917: Downloading 1 format(s): dash-video=9840000+dash-audio_eng=125000
[info] Writing video subtitles to: C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.mp4
[debug] Invoking dashsegments downloader on "https://dplus-northamerica-cloudfront-gcs.prod-vod.h264.io/[REMOVED]/dash_clear_fmp4/x-discovery-token=Expires=[REMOVED]&KeyName=primary&Signature=[REMOVED]/master.mpd"
[dashsegments] Total fragments: 87
[download] Destination: C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.mp4
[debug] File locking is not supported. Proceeding without locking
[download] 100% of 131.04KiB in 00:08 at 15.44KiB/s
[SubtitlesConvertor] Converting subtitles
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.mp4" -f srt -movflags "+faststart" "file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.srt"
[debug] ffmpeg version 5.1-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enabl
e-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --en
able-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab
--enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enab
le-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb -
-enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 57. 28.100 / 57. 28.100
libavcodec 59. 37.100 / 59. 37.100
libavformat 59. 27.100 / 59. 27.100
libavdevice 59. 7.100 / 59. 7.100
libavfilter 8. 44.100 / 8. 44.100
libswscale 6. 7.100 / 6. 7.100
libswresample 4. 7.100 / 4. 7.100
libpostproc 56. 6.100 / 56. 6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.mp4':
Metadata:
major_brand : iso6
minor_version : 1
compatible_brands: iso6dash
creation_time : 2022-09-09T13:36:28.000000Z
Duration: 00:41:28.17, bitrate: 0 kb/s
Stream #0:0[0x1](und): Data: none (wvtt / 0x74747677), 0 kb/s (default)
Metadata:
creation_time : 2022-09-09T13:36:28.000000Z
handler_name : *textstream_eng=1000.webvtt.fragmented.vtt@GPAC1.0.1-revUNKNOWN_REV
Output #0, srt, to 'file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.srt':
Output file #0 does not contain any stream
ERROR: Preprocessing: Output file #0 does not contain any stream
Traceback (most recent call last):
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\YoutubeDL.py", line 3435, in pre_process
info = self.run_all_pps(key, info)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\YoutubeDL.py", line 3428, in run_all_pps
info = self.run_pp(pp, info)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\YoutubeDL.py", line 3407, in run_pp
files_to_delete, infodict = pp.run(infodict)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\common.py", line 24, in run
ret = func(self, info, *args, **kwargs)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\ffmpeg.py", line 996, in run
self.run_ffmpeg(old_file, new_file, ['-f', new_format])
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\ffmpeg.py", line 368, in run_ffmpeg
return self.run_ffmpeg_multiple_files([path], out_path, opts, **kwargs)
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\ffmpeg.py", line 323, in run_ffmpeg_multiple_files
return self.real_run_ffmpeg(
File "G:\python\yt-dlp-master-2022.09.13\yt_dlp\postprocessor\ffmpeg.py", line 361, in real_run_ffmpeg
raise FFmpegPostProcessorError(stderr.strip().splitlines()[-1])
yt_dlp.postprocessor.ffmpeg.FFmpegPostProcessorError: Output file #0 does not contain any stream
[debug] Invoking dashsegments downloader on "https://dplus-northamerica-cloudfront-gcs.prod-vod.h264.io/[REMOVED]/dash_clear_fmp4/x-discovery-token=Expires=[REMOVED]&KeyName=primary&Signature=[REMOVED]/master.mpd"
[dashsegments] Total fragments: 625
[download] Destination: C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.fdash-video=9840000.mp4
[download] 100% of 2.85GiB in 06:23 at 7.62MiB/s
[debug] Invoking dashsegments downloader on "https://dplus-northamerica-cloudfront-gcs.prod-vod.h264.io/[REMOVED]/dash_clear_fmp4/x-discovery-token=Expires=[REMOVED]&KeyName=primary&Signature=[REMOVED]/master.mpd"
[dashsegments] Total fragments: 628
[download] Destination: C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.fdash-audio_eng=125000.m4a
[download] 100% of 37.80MiB in 01:14 at 516.22KiB/s
ERROR: Preprocessing: Output file #0 does not contain any stream
[Merger] Merging formats into "C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.fdash-video=9840000.mp4" -i "file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.fdash-audio_eng=125000.m4a" -c copy -map "0:v:0" -map "1:a:0" -movflags "+faststart" "file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.temp.mp4"
Deleting original file C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.fdash-audio_eng=125000.m4a (pass -k to keep)
Deleting original file C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.fdash-video=9840000.mp4 (pass -k to keep)
[EmbedSubtitle] Embedding subtitles in "C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.mp4" -i "file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.mp4" -map 0 -dn -ignore_unknown -c copy "-c:s" mov_text -map "-0:s" -map "1:0" "-metadata:s:s:0" "language=eng" -movflags "+faststart" "file:C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.temp.mp4"
Deleting original file C:\yt-dlp\Gold Rush: Dave Turin's Lost Mine.Cowboys and Dreamers.en.mp4 (pass -k to keep)
Issue Analytics
- State:
- Created a year ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Problems with subtitles? – UK help centre - discovery+ - Support
Tap this and select your subtitles. iOS. Tap the video. At the bottom right of the video player you will find an icon...
Read more >DASH stream playback with subtitles not working/displayed
Hi, I am trying to play DASH streams, with external srt (multiple) files by setting the SubtitleTracks params. But the initial video load ......
Read more >Enable or Disable Discovery Plus Closed Captions & Subtitles
What is Closed Captioning and Subtitles on Discovery Plus? ... Then, tap the four dash icon and select the language you want or...
Read more >NDI Tools | NDI.tv
... from a device on another subnet or resolve other local discovery problems. ... Delivery:application/vnd.vimeo.dash+json. Embed Size:339×191 @2.625x.
Read more >About The Licenses - Creative Commons
... an enormous role in the creation, copying, discovery, and distribution of works. ... but they can't change them in any way or...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We can download it, but not process it any further (since ffmpeg doesnt support them)
See See https://github.com/yt-dlp/yt-dlp/issues/631#issuecomment-893329480, https://github.com/yt-dlp/yt-dlp/pull/247#issuecomment-827628350 for more details
you have in your command line ‘–convert-subs’, ‘srt’ try again with --convert-subs “srt” and then see if you can embed the subtitles.