Los Angles
Los Angles

Reputation: 35

Video from array of images ffmpeg windows php

I have an array of images src. $src = array("folder1/imagejsbs124.jpg","folder2/image45125hsja.jpg", ");

I want to convert those images into a video.mp4 creating a animated slideshow.

I searched stackoverflow but it didn't work for me. Therefore I asked this personally and hope someone will find an answer.

Upvotes: 1

Views: 966

Answers (1)

Santosh Joshi
Santosh Joshi

Reputation: 3320

Try out as given here Create a video slideshow from images. Simple example to generate a video from some images using ffmpeg can be

ffmpeg -f image2 -i image%d.jpg video.mpg

This will bascically use all images from the current directory (named image1.jpg, image2.jpg .... imagen.jpg) to generate a video named video.mpg.

Using php you can also checkout for FFmpeg-php which i basically a php extension for ffmpeg.

if files are in different directory then use Concatenate:

Create a file concat.txt and then use it as input

file '/path/to/file1'
file '/path/to/file2'
file '/path/to/file3'

ffmpeg -f concat -i concat.txt video.mpg

Upvotes: 1

Related Questions