FFmpeg Lands CLI Multi-Threading As Its “Most Advanced Refactoring” In A long time
Present Your Assist: This web site is primarily supported by ads. Adverts are what have allowed this web site to be maintained every day for the previous 19+ years. We do our greatest to make sure solely clear, related advertisements are proven, when any nasty advertisements are detected, we work to take away them ASAP. If you need to view the location with out advertisements whereas nonetheless supporting our work, please contemplate our ad-free Phoronix Premium.
The long-in-development work for a fully-functional multi-threaded FFmpeg command line has been merged! The FFmpeg CLI with multi-threaded transcoding pipelines is now merged to FFmpeg Git forward of FFmpeg 7.0 releasing early subsequent 12 months. FFmpeg is widely-used all through many industries for video transcoding and in in the present day’s many-core world this can be a terrific enchancment for this key open-source venture.
In lately sharing a technical presentation on the FFmpeg multi-threading effort, FFmpeg builders called this work “some of the complicated refactoring of the FFmpeg CLI in a long time.” And in calling for testing in the present day added, “Please check and report points to [FFmpeg Trac] – this is among the most complicated modifications in FFmpeg ever!“
The code is now in FFmpeg Git. The patches embody including the thread-aware transcode scheduling infrastructure, transferring encoding to a separate thread, and varied different low-level modifications. In culminating with changing FFmpeg to a threaded structure is summed up as:
fftools/ffmpeg: convert to a threaded structure
Change the primary loop and each part (demuxers, decoders, filters, encoders, muxers) to make use of the beforehand added transcode scheduler. Each occasion of each such part was already working in a separate thread, however now they will truly run in parallel.
There is a latest presentation on this work by developer Anton Khirnov.
It is terrific seeing this merged and shall be fascinating to see the efficiency affect in apply.