After poking YouTube for a few days I discovered 1080p streams that are compatible with AVPro, featuring unified audio/video formats.
yt-dlp requires extra options to return these formats from the YouTube api.
This has been tested with various content, including 1080p live streams / YouTube music / normal YouTube with 1080p working just fine and lower resolutions being returned otherwise.
Switching the used client to return only merged MP4 streams
- Add the following options to yt-dlp line
--impersonate safari --extractor-args "youtube:player_client=web"
- Impersonation is required which currently effects all extractors
this will be resolved once is merged as it can then be specified as a extractor specific argument
Testing in ClientSim
  • Tested with ProTV, AVPro 2.8.5 and the required Shim
  • Make sure the player resolution is set to 1080 or above.
  • Make the following changes to
ResolveURLCallback -> ytdlProcess.StartInfo.Arguments
ytdlProcess.StartInfo.Arguments = $"--no-check-certificate --no-cache-dir --rm-cache-dir -f \"mp4[height<=?{resolution}]/best[height<=?{resolution}]\" --impersonate safari --extractor-args \"youtube:player_client=web\" --get-url \"{url}\"";