Write a code to edit a video

As I wrote in this post, a image data is usually compressed. You need to decode (uncompressed) it, when you edit a video. Because you cannot access a frame without decoding(uncompress) it.

ffmpeg enables you to access a frame easily by taking advantage of its filtering function.

There have already been a lot of filters in ffmpeg. For example, you can change hue, saturation, brightness and etc by using these filters.

You can create a your own custom filter by yourself.

What you need to do is to write codes that do something for a frame. ffmpeg libraries do decode the file and get a frame and encode it back.

You can find filter design guidelines in the ffmpeg repo. And you can refer other filter implementations under libavfilter. I think the simplest one is vf_copy.c which just copies a source frame to send it to output without changing it.

You can put your own code to do what do you do instead of av_frame_copy(out, in);. gist.github.com