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

Closed
opened 2025-11-09 09:46:13 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @codeHusky on GitHub (Jun 19, 2024).

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

Originally created by @codeHusky on GitHub (Jun 19, 2024). **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
GiteaMirror added the feature request label 2025-11-09 09:46:13 -06:00
Author
Owner

@lostdusty commented on GitHub (Jun 20, 2024):

good one!

@lostdusty commented on GitHub (Jun 20, 2024): good one!
Author
Owner

@wukko commented on GitHub (May 29, 2025):

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 commented on GitHub (May 29, 2025): cobalt already falls back to closest resolution if preferred one isn't available! youtube video codec does, too. forgot to close this issue, sorry!
Sign in to join this conversation.