New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Format Selection Limit Output File Total Size #2518
Comments
Currently not possible and implementing this would require some serious modifications to the format selection code |
Yeah I assumed so... Oh well, Thanks anyway! |
I have an initial implementation of this ready - master...pukkandan:yt-dlp-dev:features/formats (Also addresses #389, #1176). But, there is the issue of backward compatibility. Currently That is, unless someone can think of a syntax that would support this while maintaining compat |
Perhaps some way of automatically balancing out video size and audio size so that a good ratio comes out that meets the filelimit requirements. But yeah pretty hacky way of doing it. |
Checklist
Description
When using format selection with the default format (
-f bestvideo*+bestaudio/best
), I was trying to limit the size of the output file, using this syntax:-f "bestvideo*[filesize<400M]+bestaudio[filesize<400M]/best[filesize<400M]"
, which works except this limits video and audio individually, but my constraint (for example, I need to upload said output file to somewhere, but can't upload files bigger than 400MB) is on the output file total size, and not on the files (audio+video) making it.Can we have a format syntax to tell yt-dlp to limit the total output file size? if is it not exactly known (because combining will probably make it smaller by a bit), the approximate size is the sum of the audio and video anyway, and probably (I don't know for sure, if I'm wrong correct me please) this limit is an upper limit (meaning size(audio)+size(video) is always <= size(audio+video)), so even if it's not exact, that's still good as an approximate limit.
If this is currently possible, please let me know how can I do that right now.
Thanks!
The text was updated successfully, but these errors were encountered: