Repository: yt-dlp
Issue: [Vimeo] various issues
Labels: site-enhancement

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2023.01.06** ([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 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)
- [ ] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and I'm willing to share it if required

### Region

worldwide

### Provide a description that is worded well enough to be understood

I have encountered a number of issues looking at this video:

https://player.vimeo.com/video/789171492

For reference, I will include the output of yt-dlp when run with the -F option here:

```
[info] Available formats for 789171492:
ID                                                EXT RESOLUTION FPS │    FILESIZE   TBR PROTO │ VCODEC        VBR ACODEC      ABR ASR MORE INFO                                                                                                                        
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────                                                                                                             
hls-akfire_interconnect_quic_sep-audio-high-audio mp4 audio only     │                   m3u8  │ audio only        unknown             audio
hls-fastly_skyfire_sep-audio-high-audio           mp4 audio only     │                   m3u8  │ audio only        unknown             audio
dash-akfire_interconnect_quic_sep-audio-cdeb8db1  m4a audio only     │ ~   2.81MiB  192k dash  │ audio only        mp4a.40.2  192k 48k DASH audio, m4a_dash
dash-fastly_skyfire_sep-audio-cdeb8db1            m4a audio only     │ ~   2.81MiB  192k dash  │ audio only        mp4a.40.2  192k 48k DASH audio, m4a_dash
dash-akfire_interconnect_quic_sep-audio-4cc3d583  m4a audio only     │ ~1005.00KiB   67k dash  │ audio only        opus        67k 48k DASH audio, m4a_dash
dash-fastly_skyfire_sep-audio-4cc3d583            m4a audio only     │ ~1005.00KiB   67k dash  │ audio only        opus        67k 48k DASH audio, m4a_dash
dash-akfire_interconnect_quic_sep-audio-7725063d  m4a audio only     │ ~   1.45MiB   99k dash  │ audio only        opus        99k 48k DASH audio, m4a_dash
dash-fastly_skyfire_sep-audio-7725063d            m4a audio only     │ ~   1.45MiB   99k dash  │ audio only        opus        99k 48k DASH audio, m4a_dash
hls-akfire_interconnect_quic-115                  mp4 240x240     30 │ ~   1.68MiB  115k m3u8  │ avc1.640015  115k video only
hls-fastly_skyfire-115                            mp4 240x240     30 │ ~   1.68MiB  115k m3u8  │ avc1.640015  115k video only
dash-akfire_interconnect_quic-video-c3bf218a      mp4 240x240     30 │ ~   2.70MiB  184k dash  │ avc1.640015  184k video only          DASH video, mp4_dash
dash-akfire_interconnect_quic_sep-video-c3bf218a  mp4 240x240     30 │ ~   2.70MiB  184k dash  │ avc1.640015  184k video only          DASH video, mp4_dash
dash-fastly_skyfire-video-c3bf218a                mp4 240x240     30 │ ~   2.70MiB  184k dash  │ avc1.640015  184k video only          DASH video, mp4_dash
dash-fastly_skyfire_sep-video-c3bf218a            mp4 240x240     30 │ ~   2.70MiB  184k dash  │ avc1.640015  184k video only          DASH video, mp4_dash
hls-akfire_interconnect_quic_sep-306              mp4 240x240     30 │ ~   4.48MiB  306k m3u8  │ avc1.640015  306k video only
hls-fastly_skyfire_sep-306                        mp4 240x240     30 │ ~   4.48MiB  306k m3u8  │ avc1.640015  306k video only
hls-akfire_interconnect_quic-200                  mp4 360x360     30 │ ~   2.93MiB  200k m3u8  │ avc1.64001E  200k video only
hls-fastly_skyfire-200                            mp4 360x360     30 │ ~   2.93MiB  200k m3u8  │ avc1.64001E  200k video only
dash-akfire_interconnect_quic-video-1fc5d1f6      mp4 360x360     30 │ ~   3.96MiB  270k dash  │ avc1.64001E  270k video only          DASH video, mp4_dash
dash-akfire_interconnect_quic_sep-video-1fc5d1f6  mp4 360x360     30 │ ~   3.96MiB  270k dash  │ avc1.64001E  270k video only          DASH video, mp4_dash
dash-fastly_skyfire-video-1fc5d1f6                mp4 360x360     30 │ ~   3.96MiB  270k dash  │ avc1.64001E  270k video only          DASH video, mp4_dash
dash-fastly_skyfire_sep-video-1fc5d1f6            mp4 360x360     30 │ ~   3.96MiB  270k dash  │ avc1.64001E  270k video only          DASH video, mp4_dash
hls-akfire_interconnect_quic_sep-391              mp4 360x360     30 │ ~   5.73MiB  391k m3u8  │ avc1.64001E  391k video only
hls-fastly_skyfire_sep-391                        mp4 360x360     30 │ ~   5.73MiB  391k m3u8  │ avc1.64001E  391k video only
hls-akfire_interconnect_quic-310                  mp4 540x540     30 │ ~   4.54MiB  310k m3u8  │ avc1.64001F  310k video only
hls-fastly_skyfire-310                            mp4 540x540     30 │ ~   4.54MiB  310k m3u8  │ avc1.64001F  310k video only
dash-akfire_interconnect_quic-video-032fe00f      mp4 540x540     30 │ ~   5.96MiB  407k dash  │ avc1.64001F  407k video only          DASH video, mp4_dash
dash-akfire_interconnect_quic_sep-video-032fe00f  mp4 540x540     30 │ ~   5.96MiB  407k dash  │ avc1.64001F  407k video only          DASH video, mp4_dash
dash-fastly_skyfire-video-032fe00f                mp4 540x540     30 │ ~   5.96MiB  407k dash  │ avc1.64001F  407k video only          DASH video, mp4_dash
dash-fastly_skyfire_sep-video-032fe00f            mp4 540x540     30 │ ~   5.96MiB  407k dash  │ avc1.64001F  407k video only          DASH video, mp4_dash
hls-akfire_interconnect_quic_sep-501              mp4 540x540     30 │ ~   7.34MiB  501k m3u8  │ avc1.64001F  501k video only
hls-fastly_skyfire_sep-501                        mp4 540x540     30 │ ~   7.34MiB  501k m3u8  │ avc1.64001F  501k video only
hls-akfire_interconnect_quic-512                  mp4 720x720     60 │ ~   7.50MiB  512k m3u8  │ avc1.640020  512k video only
hls-fastly_skyfire-512                            mp4 720x720     60 │ ~   7.50MiB  512k m3u8  │ avc1.640020  512k video only
dash-akfire_interconnect_quic-video-daf5145b      mp4 720x720     60 │ ~  10.09MiB  689k dash  │ avc1.640020  689k video only          DASH video, mp4_dash
dash-akfire_interconnect_quic_sep-video-daf5145b  mp4 720x720     60 │ ~  10.09MiB  689k dash  │ avc1.640020  689k video only          DASH video, mp4_dash
dash-fastly_skyfire-video-daf5145b                mp4 720x720     60 │ ~  10.09MiB  689k dash  │ avc1.640020  689k video only          DASH video, mp4_dash
dash-fastly_skyfire_sep-video-daf5145b            mp4 720x720     60 │ ~  10.09MiB  689k dash  │ avc1.640020  689k video only          DASH video, mp4_dash
hls-akfire_interconnect_quic_sep-703              mp4 720x720     60 │ ~  10.30MiB  703k m3u8  │ avc1.640020  703k video only
hls-fastly_skyfire_sep-703                        mp4 720x720     60 │ ~  10.30MiB  703k m3u8  │ avc1.640020  703k video only
hls-akfire_interconnect_quic-760                  mp4 1080x1080   60 │ ~  11.13MiB  760k m3u8  │ avc1.64002A  760k video only
hls-fastly_skyfire-760                            mp4 1080x1080   60 │ ~  11.13MiB  760k m3u8  │ avc1.64002A  760k video only
hls-akfire_interconnect_quic_sep-951              mp4 1080x1080   60 │ ~  13.93MiB  951k m3u8  │ avc1.64002A  951k video only
hls-fastly_skyfire_sep-951                        mp4 1080x1080   60 │ ~  13.93MiB  951k m3u8  │ avc1.64002A  951k video only
dash-akfire_interconnect_quic-video-5bad7797      mp4 1080x1080   60 │ ~  14.77MiB 1008k dash  │ avc1.64002A 1008k video only          DASH video, mp4_dash
dash-akfire_interconnect_quic_sep-video-5bad7797  mp4 1080x1080   60 │ ~  14.77MiB 1008k dash  │ avc1.64002A 1008k video only          DASH video, mp4_dash
dash-fastly_skyfire-video-5bad7797                mp4 1080x1080   60 │ ~  14.77MiB 1008k dash  │ avc1.64002A 1008k video only          DASH video, mp4_dash
dash-fastly_skyfire_sep-video-5bad7797            mp4 1080x1080   60 │ ~  14.77MiB 1008k dash  │ avc1.64002A 1008k video only          DASH video, mp4_dash
hls-akfire_interconnect_quic-1059                 mp4 1440x1440   60 │ ~  15.51MiB 1059k m3u8  │ avc1.640033 1059k video only
hls-fastly_skyfire-1059                           mp4 1440x1440   60 │ ~  15.51MiB 1059k m3u8  │ avc1.640033 1059k video only
hls-akfire_interconnect_quic_sep-1250             mp4 1440x1440   60 │ ~  18.31MiB 1250k m3u8  │ avc1.640033 1250k video only
hls-fastly_skyfire_sep-1250                       mp4 1440x1440   60 │ ~  18.31MiB 1250k m3u8  │ avc1.640033 1250k video only
dash-akfire_interconnect_quic-video-7078f8a0      mp4 1440x1440   60 │ ~  20.73MiB 1415k dash  │ avc1.640033 1415k video only          DASH video, mp4_dash
dash-akfire_interconnect_quic_sep-video-7078f8a0  mp4 1440x1440   60 │ ~  20.73MiB 1415k dash  │ avc1.640033 1415k video only          DASH video, mp4_dash
dash-fastly_skyfire-video-7078f8a0                mp4 1440x1440   60 │ ~  20.73MiB 1415k dash  │ avc1.640033 1415k video only          DASH video, mp4_dash
dash-fastly_skyfire_sep-video-7078f8a0            mp4 1440x1440   60 │ ~  20.73MiB 1415k dash  │ avc1.640033 1415k video only          DASH video, mp4_dash
hls-akfire_interconnect_quic-1708                 mp4 2160x2160   60 │ ~  25.02MiB 1708k m3u8  │ avc1.640034 1708k video only
hls-fastly_skyfire-1708                           mp4 2160x2160   60 │ ~  25.02MiB 1708k m3u8  │ avc1.640034 1708k video only
hls-akfire_interconnect_quic_sep-1899             mp4 2160x2160   60 │ ~  27.82MiB 1899k m3u8  │ avc1.640034 1899k video only
hls-fastly_skyfire_sep-1899                       mp4 2160x2160   60 │ ~  27.82MiB 1899k m3u8  │ avc1.640034 1899k video only
dash-akfire_interconnect_quic-video-6481f8a4      mp4 2160x2160   60 │ ~  34.19MiB 2334k dash  │ avc1.640034 2334k video only          DASH video, mp4_dash
dash-akfire_interconnect_quic_sep-video-6481f8a4  mp4 2160x2160   60 │ ~  34.19MiB 2334k dash  │ avc1.640034 2334k video only          DASH video, mp4_dash
dash-fastly_skyfire-video-6481f8a4                mp4 2160x2160   60 │ ~  34.19MiB 2334k dash  │ avc1.640034 2334k video only          DASH video, mp4_dash
dash-fastly_skyfire_sep-video-6481f8a4            mp4 2160x2160   60 │ ~  34.19MiB 2334k dash  │ avc1.640034 2334k video only          DASH video, mp4_dash
```

Yes, the number of formats appears unnecessary.

1. The biggest problem in my opinion. The program selects (without any format options) a 99 kpbs opus audio format over a 192 kpbs m4a audio format (see output below) - clearly not the "best" audio.

2. Two of the video formats (at least) will not download (hls-akfire_interconnect_quic-1708 and hls-fastly_skyfire-1708). The output (not included in the verbose output in the next section) produces:

```
[download] Destination: visualized-hls-akfire_interconnect_quic-1708.mp4
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (1/10)...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (2/10)...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (3/10)...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (4/10)...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (5/10)...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (6/10)...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (7/10)...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (8/10)...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (9/10)...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 1 (10/10)...
[download] fragment not found; Skipping fragment 1 ...
[download] Got error: HTTP Error 400: Bad Request. Retrying fragment 2 (1/10)...

[...]

```

3. Regarding the last eight formats (all 2160 x 2160, and it appears that a similar situation exists for other video sizes), the undownloadable ones (hls-akfire_interconnect_quic-1708 and hls-fastly_skyfire-1708) appear to have the correct bit rate. The video sizes of all of the others differ by a modest amount (likely just differences in the container, as the hls formats require "Fixing MPEG-TS in MP4 container" to make the output files seekable). In other words, the last four formats (dash-akfire_interconnect_quic-video-6481f8a4, dash-akfire_interconnect_quic_sep-video-6481f8a4, dash-fastly_skyfire-video-6481f8a4, dash-fastly_skyfire_sep-video-6481f8a4) all have actual bit rates of about 1708 kbps (and file sizes of about 25 MB). I realize that you have to work with the information returned by the site, but in this case, the other formats with the same resolution have more accurate information than the dash formats.

Finally, the last four formats (2160 x 2160 dash) all produce byte-identical downloads. While some risk exists to assume that this behavior will remain in the future, eliminating duplicates (perhaps as an option selectable via a command-line option) might represent an enhancement that some users would appreciate.

### 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] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['--restrict-filenames', '-o', '%(title)s-%(id)s-%(uploader)s.%(ext)s', '-w', '-v', 'https://player.vimeo.com/video/789171492']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.06 [6becd25] (pip)
[debug] Python 3.9.16 (CPython x86_64 64bit) - Linux-5.15.69-with-glibc2.36 (OpenSSL 1.1.1s  1 Nov 2022, glibc 2.36)
[debug] exe versions: ffmpeg 4.4.3 (setts), ffprobe 4.4.3
[debug] Optional libraries: Crypto-3.16.0, certifi-3021.03.16
[debug] Proxy map: {}
[debug] Loaded 1760 extractors
[vimeo] Extracting URL: https://player.vimeo.com/video/789171492
[vimeo] 789171492: Downloading webpage
[vimeo] 789171492: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 789171492: Downloading akfire_interconnect_quic m3u8 information
[vimeo] 789171492: Downloading fastly_skyfire m3u8 information
[vimeo] 789171492: Downloading fastly_skyfire m3u8 information
[vimeo] 789171492: Downloading akfire_interconnect_quic MPD information
[vimeo] 789171492: Downloading akfire_interconnect_quic MPD information
[vimeo] 789171492: Downloading fastly_skyfire MPD information
[vimeo] 789171492: Downloading fastly_skyfire MPD information
[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] 789171492: Downloading 1 format(s): dash-fastly_skyfire_sep-video-6481f8a4+dash-fastly_skyfire_sep-audio-7725063d
[debug] Invoking dashsegments downloader on "https://skyfire.vimeocdn.com/1673851568-0xe618c7f85e965dc8bf411751461eb639a21a7ac1/985796e1-9403-4e9d-b41b-2edc62c0a830/sep/video/5bad7797,032fe00f,daf5145b,7078f8a0,6481f8a4,1fc5d1f6,c3bf218a/audio/7725063d,4cc3d583,cdeb8db1/master.mpd?query_string_ranges=1&base64_init=1"
[dashsegments] Total fragments: 21
[download] Destination: Visualized_The_Rise_and_Fall_of_Music_Format_Sales.mp4-789171492-Visual_Capitalist.fdash-fastly_skyfire_sep-video-6481f8a4.mp4
[download] 100% of   24.46MiB in 00:00:31 at 790.54KiB/s
[debug] Invoking dashsegments downloader on "https://skyfire.vimeocdn.com/1673851568-0xe618c7f85e965dc8bf411751461eb639a21a7ac1/985796e1-9403-4e9d-b41b-2edc62c0a830/sep/video/5bad7797,032fe00f,daf5145b,7078f8a0,6481f8a4,1fc5d1f6,c3bf218a/audio/7725063d,4cc3d583,cdeb8db1/master.mpd?query_string_ranges=1&base64_init=1"
[dashsegments] Total fragments: 21
[download] Destination: Visualized_The_Rise_and_Fall_of_Music_Format_Sales.mp4-789171492-Visual_Capitalist.fdash-fastly_skyfire_sep-audio-7725063d.m4a
[download] 100% of    1.41MiB in 00:00:20 at 69.03KiB/s
[Merger] Merging formats into "Visualized_The_Rise_and_Fall_of_Music_Format_Sales.mp4-789171492-Visual_Capitalist.mp4"
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i file:Visualized_The_Rise_and_Fall_of_Music_Format_Sales.mp4-789171492-Visual_Capitalist.fdash-fastly_skyfire_sep-video-6481f8a4.mp4 -i file:Visualized_The_Rise_and_Fall_of_Music_Format_Sales.mp4-789171492-Visual_Capitalist.fdash-fastly_skyfire_sep-audio-7725063d.m4a -c copy -map 0:v:0 -map 1:a:0 -movflags +faststart file:Visualized_The_Rise_and_Fall_of_Music_Format_Sales.mp4-789171492-Visual_Capitalist.temp.mp4
Deleting original file Visualized_The_Rise_and_Fall_of_Music_Format_Sales.mp4-789171492-Visual_Capitalist.fdash-fastly_skyfire_sep-audio-7725063d.m4a (pass -k to keep)
Deleting original file Visualized_The_Rise_and_Fall_of_Music_Format_Sales.mp4-789171492-Visual_Capitalist.fdash-fastly_skyfire_sep-video-6481f8a4.mp4 (pass -k to keep)
```