I am writing a program that needs to generate a video from multiple images. Sounds like a job for ffmpeg. However, I also need to distribute that program to other computer, which may not come with ffmpeg installed. So I want wondering if there are any rust library that can do this natively, or any other non-painful solution? Thank you.
To help to install ffmpeg to the target machine would be the easiest way to do so, otherwise you may ask to a lawyer first. Many media codecs are under patent and it's hard to say it's legal to distribute them without payment.
The only clear way to be free from the legal issue is to not distribute those media codecs yourself. Let the user download the ffmpeg. Otherwise ask lawyer first.
ffmpeg-sys crate also has an optional feature to statically link ffmpeg into your program.
Is there any syntax or example for me to follow. Specifically, the follow command would fulfill my request:
ffmpeg -framerate 24 -i img%03d.png output.mp4
But I could not find any proper example for the library. If ffmpeg is preinstalled in the machine, I can just pass the command through terminal. However, that's not what really I am after, as I want the program to be distributable. (Preferably with a loyalty free codec)