1

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 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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?
I added a reference to a coding example to the post.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.