pinchflat
pinchflat copied to clipboard
[FR] Mutli-codec Support
Is your feature request related to a problem? Please describe. I like to download all codecs of the highest resolution. For example, 1080p videos usually have AVC & VP9, and even AV1 sometimes. I want them all. usually some frames have better detail by codec X, which helps tremendously. Also the quality is not stable, sometimes AVC is nicer than VP9 and so. Basically I'd like to have the best whenever possible. This about x2.5 the filesize, but for me it's pretty worth it. Same goes for audio.
Describe the solution you'd like Grab all codecs available, or preferred, and mux them into a single mp4/mkv file. It could work like the "Video Codec Preference" option in "Codec Options", where you add a list of codecs separated by a comma ("avc,vp9,av1"), and it would grab all of the available ones in that list. It has to be of the highest resolution, otherwise it would be not worthwhile (For example, if avc is only 1080p, while VP9 is 1440p, there's no point in grabbing the 1080p avc stream).
Describe alternatives you've considered Manually, but that doesn't have "updating" features that something like pinchflat offers.
Additional context I understand it may not practical (or sane) to some, but to me it's quite important, not sure how many care about this but given that most selfhosted options don't even have anything for this, I think it's a pretty low number.
Hey there! Thanks for the suggestion (:
I agree that this is a niche feature, but if yt-dlp already has support for it then it could be a relatively simple change while being transparent to most users. Do you know if yt-dlp has support for this and, if so, is there a yt-dlp command you've been using to accomplish this?
Hey there! Thanks for the suggestion (:
I agree that this is a niche feature, but if yt-dlp already has support for it then it could be a relatively simple change while being transparent to most users. Do you know if yt-dlp has support for this and, if so, is there a yt-dlp command you've been using to accomplish this?
Yeah it's pretty niche. For the command, I hacked together a command but there's probably something more robust. What I've ended up doing is basically repeating a series of format preferences along with a set resolution, so that no lower quality res format is picked:
bv[vcodec^=vp09][height>=2000] + bv[vcodec^=avc1][height>=2000] + bv[vcodec^=av01][height>=2000] + ba[acodec^=opus] + ba[acodec^=mp4a]"/"bv[vcodec^=vp09][height>=2000] + bv[vcodec^=av01][height>=2000] + ba[acodec^=opus] + ba[acodec^=mp4a]"/"bv[vcodec^=vp09][height>=2000] + bv[vcodec^=avc1][height>=2000] + ba[acodec^=opus] + ba[acodec^=mp4a]"/"bv[vcodec^=vp09][height>=2000] + ba[acodec^=opus] + ba[acodec^=mp4a]"/"bv[vcodec^=avc1][height>=2000] + ba[acodec^=opus] + ba[acodec^=mp4a]"
This is a slightly old command, I think an updated one needs an * after each bv, so it becomes bv*[vcodec^=vp09][height>=2000] + bv*[vcodec^=avc1][height>=2000]....
With this command, it will first look for ALL codecs at 4k and above (avc+vp9+av1+opus+aac) then it will try with less codecs (vp9+av1+opus+aac)... etc, until it hits the last one, then it proceeds to the next res with the same thing at 1440p. This prevents lower quality resolutions from being picked, if for example there's 1080p AVC & 360p VP9 where the vp9 is completely useless.
I'm sure there's more of a robust way, I will ask some people in yt-dlp as I have yet to check the updated format selection behavior that happened a while ago.