[FFmpeg-user] Programmatically convert a sequence of jpeg files and a wav file into a video file
Moritz Barsnick
barsnick at gmx.net
Thu Mar 12 16:39:26 CET 2015
On Thu, Mar 12, 2015 at 16:04:00 +0100, Pierrick Chabi wrote:
> Is there a recent sample that illustrates how to programmatically convert a
> sequence of jpeg files and a wav file into a video file ?
Yes:
https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images
Something like this for video only, and dropping the slideshow effect:
$ ffmpeg -i img%03d.jpg -c:v libx264 -pix_fmt yuv420p out.mp4
See particularily the section "Adding audio", but note that it's for a
still image, so you want to add something like:
$ [...] -i audio.wav -c:a aac -strict experimental -b:a 192k -shortest [...]
Resulting in:
$ ffmpeg -i img%03d.jpg -i audio.wav -c:v libx264 -pix_fmt yuv420p -c:a aac -strict experimental -b:a 192k -shortest out.mp4
(with 25 fps).
Just an example.
Moritz
More information about the ffmpeg-user
mailing list