Opened 7 years ago
Closed 6 years ago
#6987 closed enhancement (fixed)
Showinfo halves decoding speed
Reported by: | tkalliom | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avfilter |
Version: | git-master | Keywords: | showinfo |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
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)
Attachments (1)
Change History (7)
comment:1 by , 7 years ago
Version: | 3.4 → unspecified |
---|
comment:2 by , 7 years ago
Version: | unspecified → git-master |
---|
I tried the development version. The delta was still there, which is not surprising considering there haven’t been any recent major changes to showinfo.
I’m a bit confused that you ask me to provide the command line I tested? It is right there in the “how to reproduce” section.
There is nothing special about the particular runs I made. This is not some isolated special case; I could not find a file where the performance impact does not occur. I nevertheless attached the output you requested.
comment:3 by , 7 years ago
How did you get the sources (I don't understand how you get the version number)?
follow-up: 5 comment:4 by , 7 years ago
Since showinfo calculates plane checksums, this is expected and hardly a bug.
comment:5 by , 7 years ago
Priority: | normal → wish |
---|---|
Type: | defect → enhancement |
Replying to cus:
Since showinfo calculates plane checksums, this is expected and hardly a bug.
But the filter would also be useful if the checksums could be turned off, no?
comment:6 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 8be56ee211f9ee4c8f44f0a95b18bb2fffc44602.
Please test current FFmpeg git head and provide the command line you tested together with the complete, uncut console output.