3

Most applications of ffmpeg both in terminal and code seem to be passing ffmpeg commands to the ffmpeg library with specific parameters. For example, you might run the following command to get an overlayed gif out of a video input and a png input:

-i i.mp4 -i me.png -filter_complex 'overlay' -pix_fmt yuv420p -c:a copy output.gif

Is it possible to work with the library without using commands and only programmatically? For example, by creating an FFmpeg object, passing it relevant parameters and then reading the output file from a specific directory, preferrably using C++ or Java.

Mehdi Haghgoo
  • 3,144
  • 7
  • 46
  • 91

2 Answers2

2

It is possible to use underlying libraries of FFmpeg programmatically (C/C++).

Check following links:

Using libav* - FFmpeg

FFmpeg coding examples

tyb
  • 201
  • 4
  • 13
  • If possible please post the relevant information from the links as links by themselves will be useless if they die. Cheers – d219 Aug 01 '18 at 12:51
0

Yes, definitely, addition to above answer, also study these on libav (FFmpeg):
AVFrame structure, AVPixelFormat, and libswscale library and it's sws_getContext and sws_scale API calls.

Hope that helps.

the kamilz
  • 1,860
  • 1
  • 15
  • 19