Skip to content

Concurrency

ffmpegkit-maintained edited this page Jun 23, 2026 · 1 revision

Concurrency

Logs are tied to the thread that runs the session, not the session itself. If two sessions run on the same thread at the same time, FFmpegKit sends both sessions' logs to whichever session's callback was registered most recently — not a crash, just silently wrong logs.

executeAsync() handles this for you automatically by giving each session its own thread. You only need to think about this if:

  • You supply your own thread pool (ExecutorService) and call executeAsync() through it, or
  • You call the synchronous execute() method yourself from multiple threads

In either case, make sure each concurrent session runs on a distinct thread.

Clone this wiki locally