To convert jpg to avi this code works perfect on my server
shell_exec("ffmpeg -f image2 -r 1/10 -i image.png out.avi");
I need to convert jpg/png images to mp4/mpeg.
How do I do this?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityffmpeg -loop 1 -f image2 -i img.png -t 1 out.mp4
This will create 1 second video. If you need longer increase the 'loop' value.
-t
value". The -f image2
is superfluous when using a standard input file name. The H.264 output from your example will not be playable in non-FFmpeg based players unless you add -pix_fmt yuv420p
.