[FFmpeg-user] FFmpeg Architecture (was: Codec copy with -ss before -i and after -i is not documented)

Mark Filipak markfilipak.imdb at gmail.com
Tue Feb 13 00:40:05 EET 2024


On 12/02/2024 11.30, Paul B Mahol wrote:
> On Mon, Feb 12, 2024 at 9:48 AM Mark Filipak <markfilipak.imdb at gmail.com>
> wrote:
>> Does FFmpeg do any internal scripting or dynamic code building/linking?
> 
> Please define what you mean by these concepts.

Happy to, Paul.

Internal scripting is when a task is built using a scripting language (or pseudo language) that is 
then run by submitting it to a built-in interpreter -- much as you script a task in a terminal -- 
except that the interpreter and the script aren't made or seen by the user. I think that in video, 
such an internal script is sometimes called a workflow but I'm unsure of that. After the script has 
been run, it's usually discarded.

Dynamic, as opposed to static, means that execution changes based on run-time conditions that 
usually are not explicitly controlled by the user. It appears that FFmpeg currently does not use any 
dynamic code. Conditional logic alone does not make code dynamic.

Code building is when existing code blocks, such as library functions, are copied and linked. The 
behavior is very much like internal scripting but with faster execution. Code linking accomplishes 
the same result but via code blocks that accept parameters and are re-entrant. Dynamic code 
building/linking means that the copying/linking happens at run-time based on run-time conditions 
that are not explicitly controlled by the user.

Because they are run-time code structures, the dynamic stuff isn't suited to streaming because 
run-time in streaming means real-time. Dynamic is not well suited to real-time processing. Running 
an interpreter of any kind is not well suited to real-time, either.

Even though I used the word "or" in my post, the use of any of the architectural techniques can be 
mixed.



More information about the ffmpeg-user mailing list