-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ffmpeg: Persist filtergraph in between transcodes.
Re-initializing the filtergraph turns out to be expensive, especially if GPUs are in the picture. We get around 30% more performance by persisting the filtergraph. In order to flush the filter, we cache the most recent audio/video frame and feed those into the filter repeatedly with a sentinel value set (`AVFrame.opque`). Once we receive a frame from the filtergraph with the sentinel set, we know the filter has been completely flushed.
- Loading branch information
Showing
1 changed file
with
52 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters