toastedDeli
toastedDeli

Reputation: 580

using ffmpeg in C: system() or C api?

I want to use ffmpeg's transcoding features multiple times in my program. This can be achieved by doing

ffmpeg -i input output

in a terminal. I believe I can use some shell or C code to execute these commands programmatically.

I could also directly use ffmpeg's c libraries to do this. My question is, will there be a noticeable performance difference between the 2 approaches? Obviously the first will be simpler to implement, but will I pay a big performance cost?

Upvotes: 0

Views: 562

Answers (1)

Alex Cohn
Alex Cohn

Reputation: 57163

It's quite typical these days to use the executable (system()) version even on mobile phones. If time-to-start is not critical for you, don't bother. If it is, consider making ffmpeg executable available for immediate start, e.g. with prelink.

Upvotes: 1

Related Questions