1

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

kkStep
  • 31
  • 1
  • 7
  • Some answers here: [What is the equivalent to Posix popen() in the Win32 API?](https://stackoverflow.com/q/450865/45249) – mouviciel Oct 04 '17 at 13:26

1 Answers1

1
  1. The same way you would launch any other external program using C++ program.
  2. Yes. Enumerate the videos you need, parse accordingly.
Ron
  • 14,674
  • 4
  • 34
  • 47