[FFmpeg-user] Seeking Efficient Video Redaction Using FFMPEG with Limited Memory Usage

Srikanth Kotagiri srikanthk at gmail.com
Tue Nov 7 19:53:41 EET 2023


On Mon, Nov 6, 2023 at 9:13 AM sreekar manchukonda
<sreekarcool123 at gmail.com> wrote:
>
> Hello,
>
> I'm seeking help on how to utilize ffmpeg to apply an extensive number of
> filters—specifically over 2000, each filter including a crop, boxblur, and
> overlay—to a video over an hour long. The intention is to redact certain
> sections of the input at various times without consuming excessive memory.
>
> Could you advise if there's a method to manage thread pooling to limit the
> number of concurrent threads to prevent memory overflow?
>
> Also, I'm looking for a strategy to process these threads in a sequence,
> incorporating the output directly into the final video, while periodically
> clearing the memory utilized by intermediate filter operations. Presently,
> memory is only freed after the complete processing concludes.
>
> I would greatly appreciate an efficient approach to this.
>
> Thank you.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".

Since you seem to have different operations happening on different
parts of the timeline (based on assumption that running 2000 filters
on the same frame is knda excessive), you can run different processes
to operate on segments maybe 5-10 minutes long outputting to an
intermediate mostly lossless format. You can merge them back together
to a 1 hour long output and transcode to whatever final format just
once.

-Srikanth


More information about the ffmpeg-user mailing list