Showinfo halves decoding speed
|Reported by:||tkalliom||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Summary of the bug:
Adding -vf showinfo slows down decoding by a factor of 2–3.5x compared to the same operation without showinfo.
I am trying to process some videos per-frame and utilize PTS information for the frames. I guess I should use ffprobe as a first step, but my workflow would be simpler using just ffmpeg.
Test 1: 1,5-hour 608x336 MPEG-4 video, Intel i3-3120M
-showinfo: real 2m38.671s, user 2m36.568s, sys 0m13.524s
-without: real 0m43.250s, user 1m58.456s, sys 0m3.480s
Test 2: 22-second 3840x1920 HEVC video, 2x Intel E5-2630 v4
-showinfo: real 0m16.380s, user 0m57.284s, sys 0m3.488s
-without: real 0m6.470s, user 0m44.716s, sys 0m3.800s
Maybe it’s due to the calculation of the checksums, or “mean”/“stdev” (seem undocumented)? If this is the case, could there be options for the user to choose which columns to display in showinfo, so the expensive fields could be left out?
For comparison, the “copy” filter only adds something like 20% to the decode time.
How to reproduce:
% time ffmpeg -i input.mp4 -f image2pipe -codec rawvideo -vf showinfo - 1>/tmp/frames.dat 2>/tmp/err.txt % time ffmpeg -i input.mp4 -f image2pipe -codec rawvideo - 1>/tmp/frames.dat 2>/tmp/err.txt ffmpeg version 3.4.1 built on gcc 7 (Debian 7.2.0-19)