cobalt icon indicating copy to clipboard operation
cobalt copied to clipboard

Allow fallback expressions for codecs, quality to /api/json

Open codeHusky opened this issue 1 year ago • 1 comments

describe the feature you'd like to see It would be great if there was a way to specify fallback quality selections or codecs for downloads, or at least some sort of order of preference. Something I'm currently trying to do is pull down the highest resolution video I can get up to a limit.

Something along the lines of "vQuality": "<=480" or "vQuality":["480","360","144","worst"] would be nice. Alternatively, something like "best[<=480]" would be great for this particular situation as well.

A similar fallback array system for vCodec and aFormat would be ideal too. I'm doing some weird stuff with ffmpeg and it'd be ideal to have a little more control over things in the request directly rather than just getting an ambiguous 400 error

Maybe providing the valid qualities, formats, etc in the error could be useful for the UI?

describe alternatives you've considered #571 is the only real alternative to this, but IMO it's a bit less elegant and requires more requests than this

codeHusky avatar Jun 19 '24 21:06 codeHusky

good one!

lostdusty avatar Jun 20 '24 02:06 lostdusty

cobalt already falls back to closest resolution if preferred one isn't available! youtube video codec does, too. forgot to close this issue, sorry!

wukko avatar May 29 '25 15:05 wukko