The mentioned application is, as previously noted, large and complex
Oh, yes !
Apart from this, any Kind of extended Multimedia-Processing will be quite slow with FPC.
It's much better and easier to use some C-Libs or -CLIs, that already exist.
@zhogar (if still here)
The Best, I know for this Purpose is
'FFmpeg', which was already mentioned above:
www.ffmpeg.org.
It does everything, You need for Editing Audio-/VideoFiles and -Streams (and much, much more ! ).
There are a lot of video editors that uses it (...) because it is very easy to interface
This is only true for the FFmpeg-CLIs:
http://www.ffmpeg.org/documentation.html -> see "
Command Line Tools".
The FFmpeg-Libraries are not that easy to use, as You may see if You take a Look at
my FFmpeg-DataReader
'FFInfo4Laz':
https://forum.lazarus.freepascal.org/index.php/topic,22038.msg208700.html#msg208700 or
my FFmpeg-MediaPlayer
'FFPlay4Laz':
https://forum.lazarus.freepascal.org/index.php/topic,26666.msg337046.html#msg337046.
Both link directly to the FFmpeg-Libs - Advantage: Faster and more flexible.
If You decide for the FFmpeg-CLIs, You only have to apply the adequate CommandLines, and
'FFmpeg' will do the entire Job for You w/o bigger ProgrammingEfforts:
http://www.ffmpeg.org/ffmpeg-all.html.
you can use stdin-stdout pipes and command-line calls to send commands
Some Time ago, I wrote a small App to easily work with FFmpeg-CommandLines and read out the Outputs:
https://forum.lazarus.freepascal.org/index.php/topic,43411.msg303762.html#msg303762-> GoTo
"RunFFmpeg".
This App shows the Basics for how to do it with the
Lazarus-TProcess-Component, and it's expandable to what ever You want.
I use it mostly for Recording TV via USB-AV-Grabber and for Transcoding AV-Streams, like 'mpeg' -> 'mp4'.
You may take the SourceCode and modify or extend it for Your Needs.
BTW: Of course, You may do the same with Scripts, but then You cannot read out the Outputs directly, e.g.
to show diverse StreamData or for ProgressBars, and so on...