Repository: yt-dlp
Issue: [feature request] subtitle conversion of .srv3/newer .vtt with YTSubConverter to .ass
Labels: enhancement,external issue,triage,site:youtube,core:post-processor


currently ffmpeg vtt support is very basic,  
and even vtt with no extended styles would create a video that only plays in mpv, while other players won't be able to show any streams.


here is an example for such video and subs  
https://www.youtube.com/watch?v=NbtszSKYCYM  

although that's not a yt-dlp problem,  
there is a 3rd-party that supports those subs types and can generate a perfectly usable .ass for embedding into videos, while still preserving the styles:  
https://github.com/arcusmaximus/YTSubConverter  

it can be very helpful for normalizing YouTube's QUIRKY subtitles formats into something media players know and love!

b.t.w. its ui is built with C#, but its core is scriptable (lua) and can be converted to python as a native module (not 3rd-party...).

<hr/>

<details><summary>Verbose log</summary>

(complex vtt has log related no issues it just won't show, other formats would show:  

```txt

D:\DOS\yt-dlp_kit>call "D:\DOS\YT-DLP~2\resources\yt-dlp_win\yt-dlp.exe" "https://www.youtube.com/watch?v=NbtszSKYCYM" --ignore-config --config-location "D:\DOS\YT-DLP~2\yt-dlp_conf_base.conf" --format "bestaudio[ext=m4a]/bestaudio/best" --extract-audio --merge-output-format mkv --remux-video mkv 
[debug] Command-line config: ['https://www.youtube.com/watch?v=NbtszSKYCYM', '--ignore-config', '--config-location', 'D:\\DOS\\YT-DLP~2\\yt-dlp_conf_base.conf', '--format', 'bestaudio[ext=m4a]/bestaudio/best', '--extract-audio', '--merge-output-format', 'mkv', '--remux-video', 'mkv']
[debug] | Config "D:\DOS\YT-DLP~2\yt-dlp_conf_base.conf": ['--force-ipv4', '--windows-filenames', '--sleep-requests', '1', '--sleep-interval', '1', '--sleep-subtitles', '2', '--max-sleep-interval', '3', '--console-title', '--no-check-certificates', '--prefer-insecure', '--user-agent', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36', '--concurrent-fragments', '3', '--skip-unavailable-fragments', '--embed-subs', '--write-subs', '--write-auto-subs', '--sub-langs', 'en,iw,iw-en,ja,ko', '--sub-format', 'srv3', '--embed-metadata', '--embed-chapters', '--embed-thumbnail', '--convert-thumbnails', 'jpg', '--sponsorblock-mark', 'intro,outro,poi_highlight', '--sponsorblock-remove', 'sponsor,selfpromo,interaction,filler,music_offtopic', '--sponsorblock-api', 'https://sponsor.ajay.app', '--no-abort-on-error', '--skip-unavailable-fragments', '--verbose', '--print-traffic']
[debug] Encodings: locale cp1255, fs utf-8, pref cp1255, out cp1255 (No ANSI), error cp1255 (No ANSI), screen cp1255 (No ANSI)
[debug] yt-dlp version 2022.06.22.1 [a86e01e] (win32_dir)
[debug] Python version 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-107249-g9dfec90253-20220626 (setts), ffprobe N-107249-g9dfec90253-20220626, phantomjs 2.5.0, rtmpdump 2.3
[debug] Optional libraries: Cryptodome-3.14.1, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=NbtszSKYCYM
[youtube] NbtszSKYCYM: Downloading webpage
[youtube] Sleeping 1.0 seconds ...
send: b'GET /watch?v=NbtszSKYCYM&bpctr=9999999999&has_verified=1&pp=8AEB HTTP/1.1\r\nHost: www.youtube.com\r\nCookie: PREF=hl=en&tz=UTC; CONSENT=YES+cb.20210328-17-p0.en+FX+571\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 301 Moved Permanently\r\n'
header: Content-Type: application/binary
header: X-Content-Type-Options: nosniff
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Pragma: no-cache
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Date: Mon, 27 Jun 2022 05:59:08 GMT
header: Location: https://www.youtube.com/watch?v=NbtszSKYCYM&bpctr=9999999999&has_verified=1&pp=8AEB
header: Server: ESF
header: Content-Length: 0
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: Connection: close
send: b'GET /watch?v=NbtszSKYCYM&bpctr=9999999999&has_verified=1&pp=8AEB HTTP/1.1\r\nHost: www.youtube.com\r\nCookie: PREF=hl=en&tz=UTC; CONSENT=YES+cb.20210328-17-p0.en+FX+571\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/html; charset=utf-8
header: X-Content-Type-Options: nosniff
header: Cache-Control: no-cache, no-store, max-age=0, must-revalidate
header: Pragma: no-cache
header: Expires: Mon, 01 Jan 1990 00:00:00 GMT
header: Date: Mon, 27 Jun 2022 05:59:08 GMT
header: Strict-Transport-Security: max-age=31536000
header: X-Frame-Options: SAMEORIGIN
header: Cross-Origin-Opener-Policy-Report-Only: same-origin-allow-popups; report-to="youtube_main"
header: Report-To: {"group":"youtube_main","max_age":2592000,"endpoints":[{"url":"https://csp.withgoogle.com/csp/report-to/youtube_main"}]}
header: Permissions-Policy: ch-ua-arch=*, ch-ua-bitness=*, ch-ua-full-version=*, ch-ua-full-version-list=*, ch-ua-model=*, ch-ua-platform=*, ch-ua-platform-version=*
header: Accept-CH: Sec-CH-UA-Arch, Sec-CH-UA-Bitness, Sec-CH-UA-Full-Version, Sec-CH-UA-Full-Version-List, Sec-CH-UA-Model, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version
header: Vary: Sec-CH-UA-Arch, Sec-CH-UA-Bitness, Sec-CH-UA-Full-Version, Sec-CH-UA-Full-Version-List, Sec-CH-UA-Model, Sec-CH-UA-Platform, Sec-CH-UA-Platform-Version
header: P3P: CP="This is not a P3P policy! See http://support.google.com/accounts/answer/151657?hl=en for more info."
header: Content-Encoding: br
header: Transfer-Encoding: chunked
header: Server: ESF
header: X-XSS-Protection: 0
header: Set-Cookie: GPS=1; Domain=.youtube.com; Expires=Mon, 27-Jun-2022 06:29:08 GMT; Path=/; Secure; HttpOnly
header: Set-Cookie: YSC=_2s8L1-l0lU; Domain=.youtube.com; Path=/; Secure; HttpOnly; SameSite=none
header: Set-Cookie: __Secure-YEC=; Domain=.youtube.com; Expires=Tue, 01-Oct-2019 05:59:08 GMT; Path=/; Secure; HttpOnly; SameSite=lax
header: Set-Cookie: VISITOR_INFO1_LIVE=bRFgNIFrKFQ; Domain=.youtube.com; Expires=Sat, 24-Dec-2022 05:59:08 GMT; Path=/; Secure; HttpOnly; SameSite=none
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
[youtube] NbtszSKYCYM: Downloading android player API JSON
[debug] Loading youtube-sigfuncs.js_9c24c545_109 from cache
[debug] Loading youtube-nsig.9c24c545 from cache
[debug] [youtube] Decrypted nsig 23bA95pcetCULwPjzBL => Hm4eFGyptZsSoQ
[debug] Loading youtube-sigfuncs.js_9c24c545_113 from cache
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, codec:vp9.2, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[debug] Downloading subtitles: en, iw-en, ja
[SponsorBlock] Fetching SponsorBlock segments
send: b'POST /youtubei/v1/player?key=AIzaSyA8eiZmM1FaDVjRy-df2KTyQ_vz_yYM39w&prettyPrint=false HTTP/1.1\r\nContent-Length: 307\r\nHost: www.youtube.com\r\nCookie: PREF=hl=en&tz=UTC; CONSENT=YES+cb.20210328-17-p0.en+FX+571; GPS=1; YSC=_2s8L1-l0lU; VISITOR_INFO1_LIVE=bRFgNIFrKFQ\r\nX-Youtube-Client-Name: 3\r\nX-Youtube-Client-Version: 16.49\r\nOrigin: https://www.youtube.com\r\nContent-Type: application/json\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: close\r\n\r\n'
send: b'{"context": {"client": {"clientName": "ANDROID", "clientVersion": "16.49", "hl": "en", "timeZone": "UTC", "utcOffsetMinutes": 0}}, "videoId": "NbtszSKYCYM", "params": "8AEB", "playbackContext": {"contentPlaybackContext": {"html5Preference": "HTML5_PREF_WANTS"}}, "contentCheckOk": true, "racyCheckOk": true}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: application/json; charset=UTF-8
header: Vary: Origin
header: Vary: X-Origin
header: Vary: Referer
header: Content-Encoding: br
header: Date: Mon, 27 Jun 2022 05:59:10 GMT
header: Server: scaffolding on HTTPServer2
header: Content-Length: 11782
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: X-Content-Type-Options: nosniff
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
[debug] SponsorBlock query: https://sponsor.ajay.app/api/skipSegments/96b4?service=YouTube&categories=%5B%22interaction%22%2C+%22outro%22%2C+%22selfpromo%22%2C+%22poi_highlight%22%2C+%22intro%22%2C+%22filler%22%2C+%22sponsor%22%2C+%22music_offtopic%22%5D&actionTypes=%5B%22skip%22%2C+%22poi%22%5D
[SponsorBlock] No segments were found in the SponsorBlock database
send: b'GET /api/skipSegments/96b4?service=YouTube&categories=%5B%22interaction%22%2C+%22outro%22%2C+%22selfpromo%22%2C+%22poi_highlight%22%2C+%22intro%22%2C+%22filler%22%2C+%22sponsor%22%2C+%22music_offtopic%22%5D&actionTypes=%5B%22skip%22%2C+%22poi%22%5D HTTP/1.1\r\nHost: sponsor.ajay.app\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Mon, 27 Jun 2022 05:59:11 GMT
header: Content-Type: application/json; charset=utf-8
header: Transfer-Encoding: chunked
header: Connection: close
header: x-powered-by: Express
header: access-control-allow-origin: *
header: access-control-allow-methods: GET, POST, OPTIONS, DELETE
header: access-control-allow-headers: Content-Type
header: content-security-policy: script-src 'none'; object-src 'none'
header: etag: W/"4ddb-ur6ESm+lHFrCv9GeWFh8vBeiP2w"
header: x-cache: MISS
header: CF-Cache-Status: DYNAMIC
header: Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
header: Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=QnLReWaSwfK8FtgyzVRDdstJrgKL%2BKWW%2BC%2B%2B5ikJcaRNBDdVfEJAy8XhdhgGgNgmNrBOCEhkB4cgjZBCjkCAAHVo1I3FHYDWTVfUGAVzdj5SpIGQVU8n6ZbrAw3Xp%2B3k1dqC"}],"group":"cf-nel","max_age":604800}
header: NEL: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
header: Server: cloudflare
header: CF-RAY: 721bf4869f35bb35-FRA
header: Content-Encoding: br
header: alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400
[info] NbtszSKYCYM: Downloading 1 format(s): 140
[info] Writing video subtitles to: Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].en.srv3
[debug] Invoking http downloader on "https://www.youtube.com/api/timedtext?v=NbtszSKYCYM&xoaf=5&xosf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1656334748&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cxoaf&signature=D15C61AC73BBB30E649FDD47CB9A982976637381.E930D67C6B897692413CD10281B03338B6C0B335&key=yt8&lang=en&fmt=srv3"
[download] Sleeping 2.00 seconds ...
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].en.srv3
send: b'GET /api/timedtext?v=NbtszSKYCYM&xoaf=5&xosf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1656334748&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cxoaf&signature=D15C61AC73BBB30E649FDD47CB9A982976637381.E930D67C6B897692413CD10281B03338B6C0B335&key=yt8&lang=en&fmt=srv3 HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: www.youtube.com\r\nCookie: PREF=hl=en&tz=UTC; CONSENT=YES+cb.20210328-17-p0.en+FX+571; GPS=1; YSC=_2s8L1-l0lU; VISITOR_INFO1_LIVE=bRFgNIFrKFQ\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/xml; charset=UTF-8
header: Date: Mon, 27 Jun 2022 05:59:13 GMT
header: Pragma: no-cache
header: Expires: Fri, 01 Jan 1990 00:00:00 GMT
header: Cache-Control: no-cache, must-revalidate
header: X-Content-Type-Options: nosniff
header: Server: video-timedtext
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Accept-Ranges: none
header: Vary: Accept-Encoding
header: Connection: close
header: Transfer-Encoding: chunked

[download] 1.00KiB at  Unknown B/s (00:00)
[download] 3.00KiB at  193.43KiB/s (00:00)
[download] 7.00KiB at  322.70KiB/s (00:00)
[download] 15.00KiB at  691.49KiB/s (00:00)
[download] 26.66KiB at  388.39KiB/s (00:00)
[download] 100% of 26.66KiB in 00:00       
[info] Writing video subtitles to: Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].iw-en.srv3
[debug] Invoking http downloader on "https://www.youtube.com/api/timedtext?v=NbtszSKYCYM&xoaf=5&xosf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1656334748&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cxoaf&signature=D15C61AC73BBB30E649FDD47CB9A982976637381.E930D67C6B897692413CD10281B03338B6C0B335&key=yt8&lang=en&tlang=iw-en&fmt=srv3"
[download] Sleeping 2.00 seconds ...
[download] Destination: Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].iw-en.srv3
send: b'GET /api/timedtext?v=NbtszSKYCYM&xoaf=5&xosf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1656334748&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cxoaf&signature=D15C61AC73BBB30E649FDD47CB9A982976637381.E930D67C6B897692413CD10281B03338B6C0B335&key=yt8&lang=en&tlang=iw-en&fmt=srv3 HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: www.youtube.com\r\nCookie: PREF=hl=en&tz=UTC; CONSENT=YES+cb.20210328-17-p0.en+FX+571; GPS=1; YSC=_2s8L1-l0lU; VISITOR_INFO1_LIVE=bRFgNIFrKFQ\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/xml; charset=UTF-8
header: Date: Mon, 27 Jun 2022 05:59:15 GMT
header: Pragma: no-cache
header: Expires: Fri, 01 Jan 1990 00:00:00 GMT
header: Cache-Control: no-cache, must-revalidate
header: X-Content-Type-Options: nosniff
header: Server: video-timedtext
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Accept-Ranges: none
header: Vary: Accept-Encoding
header: Connection: close
header: Transfer-Encoding: chunked

[download] 1.00KiB at  Unknown B/s (00:00)
[download] 3.00KiB at  253.72KiB/s (00:00)
[download] 7.00KiB at  592.01KiB/s (00:00)
[download] 15.00KiB at    1.24MiB/s (00:00)
[download] 24.30KiB at  413.01KiB/s (00:00)
[download] 100% of 24.30KiB in 00:00       
[info] Writing video subtitles to: Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].ja.srv3
[debug] Invoking http downloader on "https://www.youtube.com/api/timedtext?v=NbtszSKYCYM&xoaf=5&xosf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1656334748&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cxoaf&signature=D15C61AC73BBB30E649FDD47CB9A982976637381.E930D67C6B897692413CD10281B03338B6C0B335&key=yt8&lang=ja&fmt=srv3"
[download] Sleeping 2.00 seconds ...
[download] Destination: Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].ja.srv3
send: b'GET /api/timedtext?v=NbtszSKYCYM&xoaf=5&xosf=1&hl=en&ip=0.0.0.0&ipbits=0&expire=1656334748&sparams=ip%2Cipbits%2Cexpire%2Cv%2Cxoaf&signature=D15C61AC73BBB30E649FDD47CB9A982976637381.E930D67C6B897692413CD10281B03338B6C0B335&key=yt8&lang=ja&fmt=srv3 HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: www.youtube.com\r\nCookie: PREF=hl=en&tz=UTC; CONSENT=YES+cb.20210328-17-p0.en+FX+571; GPS=1; YSC=_2s8L1-l0lU; VISITOR_INFO1_LIVE=bRFgNIFrKFQ\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Content-Type: text/xml; charset=UTF-8
header: Date: Mon, 27 Jun 2022 05:59:18 GMT
header: Pragma: no-cache
header: Expires: Fri, 01 Jan 1990 00:00:00 GMT
header: Cache-Control: no-cache, must-revalidate
header: X-Content-Type-Options: nosniff
header: Server: video-timedtext
header: X-XSS-Protection: 0
header: X-Frame-Options: SAMEORIGIN
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Accept-Ranges: none
header: Vary: Accept-Encoding
header: Connection: close
header: Transfer-Encoding: chunked

[download] 1.00KiB at  Unknown B/s (00:00)
[download] 3.00KiB at  Unknown B/s (00:00)
[download] 7.00KiB at  797.79KiB/s (00:00)
[download] 15.00KiB at    1.67MiB/s (00:00)
[download] 31.00KiB at  557.05KiB/s (00:00)
[download] 38.37KiB at  538.42KiB/s (00:00)
[download] 100% of 38.37KiB in 00:00       
[info] Downloading video thumbnail 41 ...
[info] Writing video thumbnail 41 to: Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].webp
send: b'GET /vi_webp/NbtszSKYCYM/maxresdefault.webp HTTP/1.1\r\nHost: i.ytimg.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nAccept-Encoding: gzip, deflate, br\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Accept-Ranges: bytes
header: Vary: Origin
header: Cross-Origin-Resource-Policy: cross-origin
header: Cross-Origin-Opener-Policy-Report-Only: same-origin; report-to="youtube"
header: Report-To: {"group":"youtube","max_age":2592000,"endpoints":[{"url":"https://csp.withgoogle.com/csp/report-to/youtube"}]}
header: Content-Length: 48924
header: X-Content-Type-Options: nosniff
header: Server: sffe
header: X-XSS-Protection: 0
header: Date: Mon, 27 Jun 2022 05:47:28 GMT
header: Expires: Mon, 27 Jun 2022 07:47:28 GMT
header: Cache-Control: public, max-age=7200
header: Age: 710
header: ETag: "1648991473"
header: Content-Type: image/webp
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Connection: close
[ThumbnailsConvertor] Converting thumbnail "Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].webp" to jpg
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -f image2 -pattern_type none -i "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].webp" "-bsf:v" mjpeg2jpeg -movflags "+faststart" "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].jpg"
Deleting original file Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].webp (pass -k to keep)
[debug] Invoking http downloader on "https://rr6---sn-cx1x9-ua8s.googlevideo.com/videoplayback?expire=1656331150&ei=Lke5Yt3qIILO0wX107yQBA&ip=109.64.156.113&id=o-ABjFSiTzeU5OAhSwgWW_4jtIhN7Kc0CiZn9PrPMbvPIa&itag=140&source=youtube&requiressl=yes&mh=4p&mm=31%2C29&mn=sn-cx1x9-ua8s%2Csn-hgn7rn7r&ms=au%2Crdu&mv=m&mvi=6&pcm2cms=yes&pl=24&gcr=il&initcwndbps=1505000&vprv=1&mime=audio%2Fmp4&gir=yes&clen=3743244&dur=231.247&lmt=1650735917593211&mt=1656309407&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5318224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhALmnWOKF1cVL_jCX1ElI6yEW0aZaza_3FQKsarAH9BYQAiEAibEuwbpECIMx6LfhkvlMfArBnD6WGgJTq0026qD1iXs%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAM1b3bovWWk9oo_VzhldcU3cXTb9WzZ84ZID0d_w6HsIAiEA2g5_DBPteoiPYGV2kF4xK-tclRPECYvSrMz_gvGesqQ%3D"
[download] Sleeping 2.05 seconds ...
[download] Destination: Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].m4a
send: b'GET /videoplayback?expire=1656331150&ei=Lke5Yt3qIILO0wX107yQBA&ip=109.64.156.113&id=o-ABjFSiTzeU5OAhSwgWW_4jtIhN7Kc0CiZn9PrPMbvPIa&itag=140&source=youtube&requiressl=yes&mh=4p&mm=31%2C29&mn=sn-cx1x9-ua8s%2Csn-hgn7rn7r&ms=au%2Crdu&mv=m&mvi=6&pcm2cms=yes&pl=24&gcr=il&initcwndbps=1505000&vprv=1&mime=audio%2Fmp4&gir=yes&clen=3743244&dur=231.247&lmt=1650735917593211&mt=1656309407&fvip=2&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&txp=5318224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cgcr%2Cvprv%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRgIhALmnWOKF1cVL_jCX1ElI6yEW0aZaza_3FQKsarAH9BYQAiEAibEuwbpECIMx6LfhkvlMfArBnD6WGgJTq0026qD1iXs%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpcm2cms%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAM1b3bovWWk9oo_VzhldcU3cXTb9WzZ84ZID0d_w6HsIAiEA2g5_DBPteoiPYGV2kF4xK-tclRPECYvSrMz_gvGesqQ%3D HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: rr6---sn-cx1x9-ua8s.googlevideo.com\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4599.0 Safari/537.36\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-us,en;q=0.5\r\nSec-Fetch-Mode: navigate\r\nRange: bytes=0-10432077\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 206 Partial Content\r\n'
header: Last-Modified: Sat, 23 Apr 2022 17:45:17 GMT
header: Content-Type: audio/mp4
header: Date: Mon, 27 Jun 2022 05:59:20 GMT
header: Expires: Mon, 27 Jun 2022 05:59:20 GMT
header: Cache-Control: private, max-age=21290
header: Content-Range: bytes 0-3743243/3743244
header: Accept-Ranges: bytes
header: Content-Length: 3743244
header: Connection: keep-alive
header: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
header: Vary: Origin
header: Cross-Origin-Resource-Policy: cross-origin
header: X-Content-Type-Options: nosniff
header: Server: gvs 1.0

[download]   0.0% of 3.57MiB at  Unknown B/s ETA  Unknown
[download]   0.1% of 3.57MiB at  193.48KiB/s ETA 00:18   
[download]   0.2% of 3.57MiB at  451.45KiB/s ETA 00:08
[download]   0.4% of 3.57MiB at  967.40KiB/s ETA 00:03
[download]   0.8% of 3.57MiB at    1.95MiB/s ETA 00:01
[download]   1.7% of 3.57MiB at    1.98MiB/s ETA 00:01
[download]   3.5% of 3.57MiB at    3.98MiB/s ETA 00:00
[download]   7.0% of 3.57MiB at    3.99MiB/s ETA 00:00
[download]  14.0% of 3.57MiB at    6.38MiB/s ETA 00:00
[download]  28.0% of 3.57MiB at    7.99MiB/s ETA 00:00
[download]  56.0% of 3.57MiB at    8.98MiB/s ETA 00:00
[download] 100.0% of 3.57MiB at    6.90MiB/s ETA 00:00
[download] 100% of 3.57MiB in 00:00                   
[FixupM4a] Correcting container of "Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].m4a"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].m4a" -map 0 -dn -ignore_unknown -c copy -f mp4 -movflags "+faststart" "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].temp.m4a"
[ExtractAudio] Not converting audio Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].m4a; the file is already in a common audio format
[VideoRemuxer] Remuxing video from m4a to mkv; Destination: Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].mkv
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].m4a" -map 0 -dn -ignore_unknown -c copy -movflags "+faststart" "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].mkv"
Deleting original file Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].m4a (pass -k to keep)
[EmbedSubtitle] Embedding subtitles in "Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].mkv"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].mkv" -i "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].en.srv3" -i "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].iw-en.srv3" -i "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].ja.srv3" -map 0 -dn -ignore_unknown -c copy -map "-0:s" -map "1:0" "-metadata:s:s:0" "language=eng" "-metadata:s:s:0" "handler_name=English" "-metadata:s:s:0" "title=English" -map "2:0" "-metadata:s:s:1" "language=heb" "-metadata:s:s:1" "handler_name=Hebrew from English" "-metadata:s:s:1" "title=Hebrew from English" -map "3:0" "-metadata:s:s:2" "language=jpn" "-metadata:s:s:2" "handler_name=Japanese" "-metadata:s:s:2" "title=Japanese" -movflags "+faststart" "file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].temp.mkv"
ERROR: Postprocessing: file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].en.srv3: Invalid data found when processing input
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3202, in process_info
  File "yt_dlp\YoutubeDL.py", line 3372, in post_process
  File "yt_dlp\YoutubeDL.py", line 3354, in run_all_pps
  File "yt_dlp\YoutubeDL.py", line 3333, in run_pp
  File "yt_dlp\postprocessor\common.py", line 25, in run
  File "yt_dlp\postprocessor\common.py", line 126, in wrapper
  File "yt_dlp\postprocessor\ffmpeg.py", line 643, in run
  File "yt_dlp\postprocessor\ffmpeg.py", line 313, in run_ffmpeg_multiple_files
  File "yt_dlp\postprocessor\ffmpeg.py", line 350, in real_run_ffmpeg
yt_dlp.postprocessor.ffmpeg.FFmpegPostProcessorError: file:Kyori-kan by Hakoniwa Lily - Aharen-san wa Hakarenai Ending Full Lyrics [NbtszSKYCYM].en.srv3: Invalid data found when processing input


D:\DOS\yt-dlp_kit>set "EXIT_CODE=1" 
```

</details>

<hr/>

related:  
- #26
- #1622
- #1734
- #2175
- #2799
- #4127
- #5158
- #5357
- #5498
- #5746
- #5780
- #5833
- #5853
- #6054

to sum it up,  
the issues are mostly either due to ffmpeg's poor support of `.vtt` (and in some cases `.ass`),  
or players unable to parse `.vtt` stream,  
or the various web-vtt standards which deems whatever you'll try to process "corrupted".

the last problem makes the first two problems worst,  
yt-dlp does its best trying to work-around some of the issues,  
by having more than few text-based fixes to handle common "corrupted" (but really - variations) of the web-vtt.


(b.t.w. YTSubConverter also handles `.srt` conversions better than ffmpeg,  
I'm mostly using it as a quick way of removing complex styles from `.ass` or `.vtt` then converting them back to `.ass` and adding my own styles based on a template.)

<hr/>

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [x] I've verified that I'm running yt-dlp version **2022.06.22.1** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/ytdl-org/youtube-dl#video-url-contains-an-ampersand-and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

<br/>

<details>

<summary><sub>checklist at the bottom - why?</sub></summary>

to gain back useful information on mouse-over:  

<img src="https://user-images.githubusercontent.com/415238/214996495-564faa15-0d27-42e1-b4b3-9ed42e1a754b.png" /> 

blame GitHub's templates for not having some sort of a container that does not render in the preview..

</details>