Repository: yt-dlp
Issue: [Vimeo] Fail to embed sub completely + Fail to download video when sub returns 404
Labels: bug,site-bug,triage

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version **2023.03.04** ([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/yt-dlp/yt-dlp/wiki/FAQ#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 [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and 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)

### Provide a description that is worded well enough to be understood

I have done many rips and this is the first time i encounter an issue.

https://player.vimeo.com/video/89237579 -> This video will download subs normally and try to embed them. However the temp file with the embed file is a few seconds shorter and i am not sure of the reason it fails. Could be ffmpeg issue.

https://player.vimeo.com/video/472430544 -> The subs for this video are missing from the server (404) but instead of downloading the video it just skips it completely. Not sure if this is intended default behavior but without --embed-subs it downloads normally

This is a great tool and i feel the least i can do is to post any issues i encounter. 

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [x] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', '-o', '%(title)s.%(ext)s', '--embed-subs', '-a', 'list.txt']
[debug] Batch file urls: ['https://player.vimeo.com/video/89237579', 'https://player.vimeo.com/video/472430544']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 6.0-essentials_build-www.gyan.dev (setts), ffprobe 6.0-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.03.04, Current version: stable@2023.03.04
Current Build Hash: 5590c57bd0433ed239a2deaaf92e2ad6f37fe50f53664c821575cafe106a9421
yt-dlp is up to date (stable@2023.03.04)
[vimeo] Extracting URL: https://player.vimeo.com/video/89237579
[vimeo] 89237579: Downloading webpage
[vimeo] 89237579: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 89237579: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 89237579: Downloading fastly_skyfire m3u8 information
[vimeo] 89237579: Downloading fastly_skyfire m3u8 information
[vimeo] 89237579: Downloading akfire_interconnect_quic MPD information
[vimeo] 89237579: Downloading akfire_interconnect_quic MPD information
[vimeo] 89237579: Downloading fastly_skyfire MPD information
[vimeo] 89237579: Downloading fastly_skyfire MPD information
[info] 89237579: Downloading subtitles: en
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, lang, vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 89237579: Downloading 1 format(s): http-720p
[info] Writing video subtitles to: Practical Dyno Tuning - 503.mov.en.vtt
[debug] Invoking http downloader on "https://vimeo.com/texttrack/7960565.vtt?token=642ed240_0x38c69ef5890819a6735f31aae2ca328feb85f6eb"
[debug] File locking is not supported. Proceeding without locking
[download] Destination: Practical Dyno Tuning - 503.mov.en.vtt
[download] 100% of    4.87KiB in 00:00:00 at 16.16KiB/s
[debug] Invoking http downloader on "https://vod-progressive.akamaized.net/exp=1680790080~acl=%2Fvimeo-prod-skyfire-std-us%2F01%2F2847%2F3%2F89237579%2F236100252.mp4~hmac=e206161edcbbe165ce3eae2a5c682308905fc8613a5f86571c1b42e74c6f70ac/vimeo-prod-skyfire-std-us/01/2847/3/89237579/236100252.mp4"
[download] Destination: Practical Dyno Tuning - 503.mov.mp4
[download] 100% of   42.63MiB in 00:00:03 at 11.00MiB/s
[EmbedSubtitle] Embedding subtitles in "Practical Dyno Tuning - 503.mov.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Practical Dyno Tuning - 503.mov.mp4" -i "file:Practical Dyno Tuning - 503.mov.en.vtt" -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:Practical Dyno Tuning - 503.mov.temp.mp4"
[debug] ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12.2.0 (Rev10, 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-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl --enable-libgme --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-librubberband
  libavutil      58.  2.100 / 58.  2.100
  libavcodec     60.  3.100 / 60.  3.100
  libavformat    60.  3.100 / 60.  3.100
  libavdevice    60.  1.100 / 60.  1.100
  libavfilter     9.  3.100 /  9.  3.100
  libswscale      7.  1.100 /  7.  1.100
  libswresample   4. 10.100 /  4. 10.100
  libpostproc    57.  1.100 / 57.  1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'file:Practical Dyno Tuning - 503.mov.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    creation_time   : 2014-03-17T23:42:03.000000Z
  Duration: 00:03:05.13, start: 0.000000, bitrate: 1931 kb/s
  Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], 1766 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
    Metadata:
      creation_time   : 2014-03-17T23:42:03.000000Z
      handler_name    : L-SMASH Video Handler
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
  Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)
    Metadata:
      creation_time   : 2014-03-17T23:42:03.000000Z
      handler_name    : L-SMASH Audio Handler
      vendor_id       : [0][0][0][0]
Input #1, webvtt, from 'file:Practical Dyno Tuning - 503.mov.en.vtt':
  Duration: N/A, bitrate: N/A
  Stream #1:0: Subtitle: webvtt
Multiple -c, -codec, -acodec, -vcodec, -scodec or -dcodec options specified for stream 2, only the last option '-c:s mov_text' will be used.
Output #0, mp4, to 'file:Practical Dyno Tuning - 503.mov.temp.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41isomavc1
    encoder         : Lavf60.3.100
  Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 1766 kb/s, 29.97 fps, 29.97 tbr, 30k tbn (default)
    Metadata:
      creation_time   : 2014-03-17T23:42:03.000000Z
      handler_name    : L-SMASH Video Handler
      vendor_id       : [0][0][0][0]
      encoder         : AVC Coding
  Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 160 kb/s (default)
    Metadata:
      creation_time   : 2014-03-17T23:42:03.000000Z
      handler_name    : L-SMASH Audio Handler
      vendor_id       : [0][0][0][0]
  Stream #0:2(eng): Subtitle: mov_text (tx3g / 0x67337874)
    Metadata:
      encoder         : Lavc60.3.100 mov_text
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
  Stream #1:0 -> #0:2 (webvtt (native) -> mov_text (native))
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=-1.0 size=       0kB time=-00:00:00.06 bitrate=  -0.0kbits/s speed=N/A
[mp4 @ 000002b9f331a940] Application provided duration: 86219695000 is invalid
av_interleaved_write_frame(): Invalid argument
[out#0/mp4 @ 000002b9f3319200] Error muxing a packet
[mp4 @ 000002b9f331a940] Starting second pass: moving the moov atom to the beginning of the file
frame= 5407 fps=0.0 q=-1.0 Lsize=   43276kB time=00:03:00.61 bitrate=1962.8kbits/s speed=3.69e+03x
video:39551kB audio:3525kB subtitle:3kB other streams:0kB global headers:0kB muxing overhead: 0.456144%
Conversion failed!

ERROR: Postprocessing: Conversion failed!
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 3323, in process_info
  File "yt_dlp\YoutubeDL.py", line 3502, in post_process
  File "yt_dlp\YoutubeDL.py", line 3484, in run_all_pps
  File "yt_dlp\YoutubeDL.py", line 3462, in run_pp
  File "yt_dlp\postprocessor\common.py", line 24, in run
  File "yt_dlp\postprocessor\common.py", line 129, in wrapper
  File "yt_dlp\postprocessor\ffmpeg.py", line 657, in run
  File "yt_dlp\postprocessor\ffmpeg.py", line 324, in run_ffmpeg_multiple_files
  File "yt_dlp\postprocessor\ffmpeg.py", line 362, in real_run_ffmpeg
yt_dlp.postprocessor.ffmpeg.FFmpegPostProcessorError: Conversion failed!

[vimeo] Extracting URL: https://player.vimeo.com/video/472430544
[vimeo] 472430544: Downloading webpage
[vimeo] 472430544: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 472430544: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 472430544: Downloading fastly_skyfire m3u8 information
[vimeo] 472430544: Downloading fastly_skyfire m3u8 information
[vimeo] 472430544: Downloading akfire_interconnect_quic MPD information
[vimeo] 472430544: Downloading akfire_interconnect_quic MPD information
[vimeo] 472430544: Downloading fastly_skyfire MPD information
[vimeo] 472430544: Downloading fastly_skyfire MPD information
[info] 472430544: Downloading subtitles: en
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, lang, vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 472430544: Downloading 1 format(s): http-1080p
[info] Writing video subtitles to: Adaptronic-WE_01-06 Idle Tuning.en.vtt
[debug] Invoking http downloader on "https://vimeo.com/texttrack/11071005.vtt?token=642ed248_0x574eae12a597f389706304d557787e0c565b0366"
ERROR: Unable to download video subtitles for 'en': HTTP Error 404: Not Found
Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 4021, in _write_subtitles
  File "yt_dlp\YoutubeDL.py", line 2970, in dl
  File "yt_dlp\downloader\common.py", line 444, in download
  File "yt_dlp\downloader\http.py", line 376, in real_download
  File "yt_dlp\downloader\http.py", line 129, in establish_connection
  File "yt_dlp\YoutubeDL.py", line 3742, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 404: Not Found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "yt_dlp\YoutubeDL.py", line 1518, in wrapper
  File "yt_dlp\YoutubeDL.py", line 1615, in __extract_info
  File "yt_dlp\YoutubeDL.py", line 1674, in process_ie_result
  File "yt_dlp\YoutubeDL.py", line 2779, in process_video_result
  File "yt_dlp\YoutubeDL.py", line 3037, in process_info
  File "yt_dlp\YoutubeDL.py", line 4029, in _write_subtitles
yt_dlp.utils.DownloadError: Unable to download video subtitles for 'en': HTTP Error 404: Not Found
```