how to convert series of jpegs to flv using imagemagik and php?

前端 未结 1 1480
暖寄归人
暖寄归人 2021-01-28 23:14

I have series of jpegs , i want to make flv or mpg from all the images . How can i do it with using imagemagik and php .

exec(convert image1.jpg image2.jpg one.flv) ma

相关标签:
1条回答
  • 2021-01-28 23:51

    Well I would jump stright into using ffmpeg. You can also do it using ImageMagick; however the docs state you need ffmpeg installed, so why have the middleman?

    I haven't tested this, fair warning.

    /*   cmd                 img series    codec       bitrate framerate  optional -s WidthxHeight and output filename */
    exec(ffmpeg -f image2 -i image%d.jpg -vcodec mpeg4 -b 800k -r 12 video.avi);
    /* For Mpeg4 *
    
    /*For FLV */
    exec(ffmpeg -f image2 -i image%d.jpg -vcodec flv -b 800k -r 12 video.flv);
    

    If you want to use the outdated mpeg2 or mpeg1 formats you can do that as well. I would suggest connecting via ssh and testing these commands, and hopefully you have ffmpeg installed. a ffmpeg -formats will show you which formats are supported:

    See the docs: http://ffmpeg.org/ffmpeg.html#Video-and-Audio-file-format-conversion

    and this great answer which I stole various things from:

    Image sequence to video quality

    0 讨论(0)
提交回复
热议问题