#7542 closed defect (fixed)
Low encoding performance depending on input method with filter complex
Reported by: | daneelveloper | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avfilter |
Version: | git-master | Keywords: | movie |
Cc: | Marton Balint | Blocked By: | |
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | yes |
Description
For testing video encoding performance (audio is negligible) I'm using command line ffmpeg.exe (4.0.2) and a single video clip. 1920x1080, 29.97 fps, h264 video, aac audio 48000khz stereo.
The following command encodes at an average 4.5x speed:
ffmpeg -i input.mp4 -filter_complex "negate" -c:v mpeg4 -y output.mpeg
But the next command only gets to 1.7x speed:
ffmpeg -filter_complex "movie=input.mp4,negate" -c:v mpeg4 -y output.mpeg
The difference is quite remarkable considering both are basically the same process. Maybe movie filter could be improved to speed encoding up.
Thank you.
Change History (8)
comment:1 by , 6 years ago
Analyzed by developer: | set |
---|---|
Cc: | added |
Component: | undetermined → avfilter |
Reproduced by developer: | set |
Version: | unspecified → git-master |
comment:2 by , 6 years ago
Let me add that split filter derived sources seems to be also single threaded. It be great if both input methods could be multithreaded as -i ones.
comment:4 by , 6 years ago
In this examples I'm splitting the input clip (1920x1080, 29.97 fps, h264 video, aac audio 48000khz stereo. Audio negligible) into two separate inputs.
Speed values as reported by ffmpeg.exe (4.0.2)
This one runs at 4.15x speed.
ffmpeg -i input.mp4 -filter_complex "split[v0][v1],[v0][v1]blend=extremity" -c:v mpeg4 -y output.mp4
And the next just goes up to 1.65x speed.
ffmpeg -filter_complex "movie=input.mp4,split[v0][v1];[v0][v1]blend=extremity" -c:v mpeg4 -y output.mp4
In the second example it's obvious the slowness comes from movie filter but it also states that split filter derived inputs won't improve speed.
Thank you.
follow-up: 6 comment:5 by , 6 years ago
Sorry, but how split filter could improve speed over movie slowness?
comment:6 by , 6 years ago
Replying to richardpl:
Sorry, but how split filter could improve speed over movie slowness?
As you point out, I agree it seems split filter is not a bottleneck but the non-optimized operation of movie filter source compared to -i input alternative.
comment:7 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Should be fixed in 7ffa458d600eccbd2582d755af75c03bdaa9e51f
comment:8 by , 5 years ago
Keywords: | movie added |
---|
The movie source does not set the thread count to auto, therefore it uses a single threaded video decoder.