I want to write a small program with help of ffmpeg. I want to process a video by cut the video into several parts, left part, right part...etc. How can I do it using ffmpeg? By the way, are there any documentation explain the API of the ffmpeg?
1 Answer
You can use ffmpeg crop filter to "cut" part of the video and save it to a file. The following example saves the bottom right quarter of the input image (taken from the link):
ffmpeg -i input.avi -vf crop=in_w/2:in_h/2:in_w/2:in_h/2 output.avi See doc/examples/filtering.c for an example of how to do it in C.
2 Comments
Himiko
thank you very much first, but how can I use the library to do that, not CLI?I mean in a C code, how can I invoke it?
Dmitry Shkuropatsky
I added a reference to a coding example to the post.