Encode file with FFmpeg

Encode file with FFmpeg

Example of using FFmpeg

You may download example of encoding with FFMpeg or get it from GitHub/UnickSoft. Sample has no full functionality, it only demonstrates base function to encode media file with ffmpeg. Program creates video with sound. Here is example settings:

// Frame size.
#define W_VIDEO 320
#define H_VIDEO 240
// Output file name.
#define FILE_NAME          "c:\\temp\\1.avi"
// Cound of frames in output file.
#define FRAME_COUNT        150
// Container.
#define CONTAINER          "auto"

CONTAINER - which container will we use. "auto" - use file extention. Another value is: "avi", "mp4", "mpeg", "wmv", "mov".

If you want to decode file with FFMpeg, please read this article Decode video with ffmpeg.

(Вы можете прочитать полную статью на русском языке).

Теги: C++ Видео FFmpeg English