-2

Hi I saw THIS Question.There is no proper rather vague answer.

He said ffmpeg -r 10 -b 1800 -i %03d.jpg test1800.mp4 .Pretty vague.

What i want is I have 2 inputs i wil give from php file . Image,Audio ,And Output will be Video . I saw people saying ffmpeg And all that .But does it/can it convert Image+Audio to Video ?? If yes then what should be done ?? I saw lots of questions .but NONE of then answers properly.I didnt see ANY PHP code to do so online.Thanks.

Community
  • 1
  • 1
Pratik Joshi
  • 11,485
  • 7
  • 41
  • 73

1 Answers1

3

From https://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images

the ffmpeg command

ffmpeg -loop 1 -i img.jpg -i audio.wav -c:v libx264 -c:a aac -strict experimental -b:a 192k -shortest out.mp4

Will produce a video with a duration matching audio.wav using img.jpg as a still for the video stream.

You can use the exec() function (http://php.net/manual/en/function.exec.php) to run an external program from php code.

user3770489
  • 186
  • 4