1

I am trying to generate a video with libavformat/Libavcodec with a bunch of images that are in memory.

Can someone point me in the right direction, please?

Thanks in advance.

Venkata K. C. Tata
  • 5,539
  • 4
  • 22
  • 35

1 Answers1

0

First, the basics of creating a video from images with FFmpeg is explained here.

If you simply want to change/force the format and codec of your video, here is a good start.

For the raw FFmpeg documentation you could use the Video and Audio Format Conversion, the Codec Documentation, the Format Documentation the and the image2 demuxer documentation (this demuxer will manage images as an input).

If you just want to take images and make a simple video out of it, just look at the 2 first links. FFmpeg's documentation gives you powerful tools but don't use them if you don't need them.

A sample command to create a video from images is:

ffmpeg -i image-%03d.png video.mp4

This will take all the files in sequence from image-000.png to the highest number available and make a video out of it. You can force the format with the extension of the output file. To force the video codec use -c:v followed by a codec name available in the codec documentation.

Jao
  • 558
  • 2
  • 12
  • Hi, Thanks for the comment. I tried this and it works but now I want to use the libs*.dll that is generated and call an internal function to pass images to generate video. Looking if there is way to do that. Thank you – Venkata K. C. Tata Sep 08 '20 at 13:39
  • Alright, for that you can go to this [page](https://trac.ffmpeg.org/wiki/Using%20libav*) it'll give you access to the libav* documentations and some tips. If you want to find more info or tutorials I found [this other question](https://stackoverflow.com/questions/2641460/ffmpeg-c-api-documentation-tutorial). They mention a [git repo](https://github.com/mpenkov/ffmpeg-tutorial) that has a few tutorials on using libav* but it seems old. So I found this [other repo](https://github.com/leandromoreira/ffmpeg-libav-tutorial) it seems up to date and complete. – Jao Sep 08 '20 at 13:51