Comments (4)
Thanks for your feedback. I debated a few different implementations of supporting the OutputBuilder. However, I think you missed the done() method to go back to the original builder, for example:
List<String> args = new FFmpegBuilder()
.setInput("input.mp4") // Filename, or a FFmpegProbeResult
.addOutput("output.mp4") // Filename for the destination
.setFormat("mp4") // Format is inferred from filename, or can be set
.setVideoCodec("libx264") // Video using x264
.done()
.addOutput("output.flv") // Filename for the destination
.setFormat("flv") // Format is inferred from filename, or can be set
.done()
.build();
If I understand your proposal you would prefer something like:
List<String> args = new FFmpegBuilder()
.setInput("input.mp4") // Filename, or a FFmpegProbeResult
.addOutput(new FFmpegOutputBuilder()
.setName("output.mp4") // Filename for the destination
.setFormat("mp4") // Format is inferred from filename, or can be set
.setVideoCodec("libx264") // Video using x264
)
.addOutput(new FFmpegOutputBuilder()
.setName("output.flv") // Filename for the destination
.setFormat("flv") // Format is inferred from filename, or can be set
)
.build();
from ffmpeg-cli-wrapper.
Sorry, yes, I missed the done
functionality. If this exists, my proposal lowers in priority.
Your elaboration of my proposal is correct.
This can simplify your example to the following:
List<String> args = new FFmpegBuilder()
.setInput("input.mp4") // Filename, or a FFmpegProbeResult
.addOutput(createMP4Builder(15)) // with 15 FPS
.addOutput(createMP4Builder(30) // with diff FPS
.addOutput(createFLVBuilder()) // diff format
.build();
from ffmpeg-cli-wrapper.
So it turns out with very minimal changes, and without breaking the API, I was able to make this work. To avoid confusion, this won't be the main way used in the examples, but it will be documented, and tested.
from ffmpeg-cli-wrapper.
Wow, thanks for the enhancement, looks great :)
from ffmpeg-cli-wrapper.
Related Issues (20)
- Get console output of FFMPEG.run command | volume detect HOT 1
- CVE-2023-39018: Assumed code injection vulnerability of `net.bramp.ffmpeg.FFmpeg.<constructor>` HOT 12
- This is an issue created by mistake.
- Release a new version HOT 2
- How to perform screen recorder using this library?
- FFmpegChapter id needs to be a long HOT 4
- FFmpegJob running. how to do force stop job? HOT 1
- Re-attaching to the progress TCP port HOT 1
- How To Use FFmpegBuilder Create The Thumb Image
- invalid time 'N/A' when use progress listener HOT 6
- Add missing Attachment codec types
- Replace animal sniffer with javac parameters
- Plan for moving to newer java versions + modernising library HOT 20
- Add FFmpegInputBuilder to support per input options HOT 1
- Publish a 0.9 version HOT 11
- Generating an incorrect command with a parameter "-f" HOT 2
- Why does `.addExtraArgs` call have to be added after `.addOutput` call? HOT 1
- Can I output to memory as byte array or buffer directly without creating a file?
- How to create custom inputs arguments. HOT 1
- Build failed for PR: #304, ffmpeg commandline utility stdout output to Appendable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffmpeg-cli-wrapper.