0

How, in C++, can i convert a video from 1 format to another?
Currently the only way i know how is by using an external exe called FFmpeg and using the function

system("ffmpeg -i file.avi file.mp4");
3
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by Narue
0

is there a tutorial somewhere that shows me how to use the functions? i found one tutorial on how to make a video player in sdl with this lib but it did not explain how to do a simple format conversion.

0

Apparently there isn't, so you'll probably have to review the ffmpeg and/or libavcodec source code.
There doesn't seem to be anything wrong with calling an external program such as ffmpeg or mencoder to do your work.

0

Well by calling and external program an unwanted console window pops-up and i also cant the progress so that i can display it in anyway i want(ex: a progress bar)

0

A better way than using system is popen.
Doesn't ffmpeg display its current progress? With popen, you should be able to parse that output and use it to display your own progress bar.

0

popen isn't a standard C++ function, but you'll typically find it as an extension in <cstdio>.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.