I want to reproduce this command
ffmpeg -i image.png -i audio.wav -acodec libvo_aacenc -vcodec libx264 output.flv
with PHP-FFMpeg
I can't find in documentationa way to add multiple input file (-i image.png -i audio.wav
)
I want to reproduce this command
ffmpeg -i image.png -i audio.wav -acodec libvo_aacenc -vcodec libx264 output.flv
with PHP-FFMpeg
I can't find in documentationa way to add multiple input file (-i image.png -i audio.wav
)
This is currently not possible. It's a feature request, open since 2013.
My guess is that the library was built around being able to handle only one open stream, which makes the refactoring required a little harder.
Best to run the command manually.
I found a simply solution (hack): to add the second input as a filter
$video = $this->ffmpeg->open($imageSource);
$video->addFilter(new SimpleFilter(['-i ', $audioSource]));
it seems to works as expected