I implement a video player using QMediaPlayer. I want to add an editing function with ffmpeg. No one will tell you how to edit a downloaded video, apply ffmpeg filters to it, maybe you need to split it into frames. Or if for this you advise opening a video file with ffmpeg, tell me how to output it in Qt. Edit means change the color channel or brightness.

  • To answer your question, you will have to change the label from the guide to the creator and write the entire application yourself. And yet, what specifically in the listed functionality put you into a dead end and leveled your approval worthy of the idea of ​​the possibility of self-implementation of the code? - alexis031182

1 answer 1

Learn the FFmpeg API (or use my C ++ wrapper (but work with filters is not finished there)), look at the examples . Check out the list of supported filters and their options . And other documentation , especially in the "Component Documentation" section, lists the supported formats, codecs, their options, and so on, which will be necessary in the work.

Then proceed to the implementation. Start with the implementation of algorithms in the form of console applications: they gave the file to the input, applied transformations, recorded the output - in such examples it will be easier to localize errors (and they will, I guarantee you - API FFmpeg is not for the faint of heart, but all the pitfalls I can’t tell you in a week, despite the fact that new ones open regularly). In any case, already with specific questions one can already ask specific questions.

And yes, FFmpeg filters can be used independently of other components - the main thing is to create and fill in the AVFrame that you will feed them correctly. Note that there may be a delay in the filters, which means sticking one frame, you will not necessarily get the converted output, but only get it after N frames fed to the input - some filters depend on the results of processing neighboring frames. In such cases it is necessary, at the end, to push through the remaining frames by sending NULL frames. Another situation is possible when you have N days off for one sent frame.