Open octaviospain opened 1 year ago
I need this also! @octaviospain did you find a workaround for this or ended up using File
?
@ovistoica no workaround, I have to use a File
. Maybe we should study jave2 code and implement this ourselves
Jav2 is starting the ffmpeg executabe, and it is writing the output to a file.
I see two potential solutions for the request you have:
What is the best option depends on your requirements ffmpeg also has the option to stream the outputdata
Instead of encoding to a file and waiting for the process to complete, a nice feature would be to do the encoding to a stream of bytes so that audio manipulation can be chained and more efficient without the need to write the file to disk.
For instance using a BufferedInputStream as destination instead of a
File
would look like:Or even better, using
PipedOutputStream
that can do the same but without the need to write into file and at the same time to the same code as the one above.FFmpeg can write to UNIX pipes as described here