kkStep
kkStep

Reputation: 31

Calling ffmpeg from a C++ program

I have seen a similar question here How to wrap H264 into a mp4 container? and Calling a C++ function from a C program but i still need some examples to understand.

  1. How can ffmpeg command line be launched from a c++ program to for instance convert a video?

  2. Is it possible to use it in a loop for instance where there are a couple of videos in a directory which need to be converted?

I intend converting raw videos in a folder to mp4 but i want to do so using the command line.Relevant link or sample code will be most helpful.

Thanks in advance

Upvotes: 1

Views: 667

Answers (1)

Ron
Ron

Reputation: 15501

  1. The same way you would launch any other external program using C++ program.
  2. Yes. Enumerate the videos you need, parse accordingly.

Upvotes: 1

Related Questions