-
-
Notifications
You must be signed in to change notification settings - Fork 423
Support setting input arguments (such as format and bitrate) #17
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
Comments
I think #22 cover the -f part |
Ah for my future reference. The issue here is wanting to force the input format and audio rate. Right now, we only allow the output formats to be set. We can either add multiple methods on the FFmpegBuilder, or correct a new FFmpegInputBuilder. |
In the mean time I've committed c72b279 that allows you to specify extra input and output args, for when it's not directly supported. For example: List<String> args = new FFmpegBuilder()
.addExtraArgs("-f", "s16le", "-ar", "16000")
.setInput("input.pcm")
.addOutput("output.wav")
.done()
.build(); |
@bramp I've been trying to use this feature to add a different |
I think the Itoffset should be an attribute of the input... which would be an object instead of a simple string. |
@davinkevin Yes, it should be an attribute for the input. Let me rephrase the question better, then. Is it possible to set arguments for each input separately? I guess the answer is no. I've submitted PR #75, which should allow us to do precisely this. Please let me know if you find this approach feasible. |
Closed thanks to #339 |
Format and AudioSampleRate needed in FFmpegBuilder.
ffmpeg -f s16le -ar 16000 -i input.pcm output.wav
It wont work with
ffmpeg -i input.pcm -f s16le -ar 16000 output.wav
I added format and AudioSampleRate to get it to work but I don't think this is exactly how you have envisioned FFmpegBuilder and FFmpegOutputBuilder working. I don't mind fixing it and providing a pull request but just wanted to get an understanding of your vision.
The text was updated successfully, but these errors were encountered: