What version of yt-dlp is on the other OS? Nix has the most recent release “2022.10.04”. And according to the man pages “ts” is not a valid merge output format.
–merge-output-format FORMAT
Containers that may be used when merging formats,separated by “/”, e.g. “mp4/mkv”. Ignored if no merge is required. (currently supported: avi, flv, mkv, mov, mp4, webm)
Is “ts” a deprecated format or were you using another variant of youtube-dl?
yt-dlp -h on the other (Rocky Linux) system also lists the valid options to --merge-output-format as mkv, mp4, ogg, webm and flv – no others.
I’m definitely running yt-dlp and not youtube-dl.
yt-dlp --version on the Rocky Linux system outputs 2022.07.18 and on NixOS, 2022.10.04. So it is possible that for some reason the ts output option has been removed from yt-dlp.
[Later] The command yt-dlp --embed-metadata --hls-use-mpegts -o -U3BgoGwQv4.ts -- -U3BgoGwQv4 works on both, so I’ll run with that.
Looking at the relaese notes, the version after “2022.07.18” has " * Validate --merge-output-format" in it’s changelog. I don’t know enough about yt-dlp but I don’t think the --merge-output-format in your original command is used correctly, it just wasn’t caught in the older version. If it was used right, you can get an older version of yt-dlp by either writting an overlay or downloading from an older version of nixpkgs
Should give you version “2022.05.18” and it seems like the original command you gave is working for me (no longer getting the “invalidi merge output format” error.