Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#7381 closed defect (invalid)

ffprobe slow for many files

Reported by: forthrin Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Using ffprobe -show_streams -print_format json for a lot of files (1000+) is quite slow compared to exiftool which seems almost instantaneous.

Is this because A) the probing code has optimisation potential, or B) mostly because of the overhead because ffprobe doesn't support multiple files per run, ie. you can't do find . -type f -exec ffprobe {} +.

Please clarify A or B, but also regardless, is there any reason why ffprobe shouldn't support multiple files?

ffprobe 4.0.2 on macOS

Change History (7)

comment:1 by Elon Musk, 6 years ago

It is because it decodes each single file.

comment:2 by Carl Eugen Hoyos, 6 years ago

Resolution: invalid
Status: newclosed

comment:3 by forthrin, 6 years ago

Resolution: invalid
Status: closedreopened

I don't understand your reply. Could you be more specific and explain why ffprobe for many files is slow? Is it simply the overhead of having to launch ffprobe once per file? (B)

comment:4 by Carl Eugen Hoyos, 6 years ago

Resolution: invalid
Status: reopenedclosed

This is a bug tracker, if you have questions concerning parts of FFmpeg, please use the user mailing list.

comment:5 by forthrin, 6 years ago

Where are feature requests posted? Can they be posted here?

comment:6 by mkver, 6 years ago

Yes, this is the right place for feature requests.

comment:7 by forthrin, 6 years ago

Well, maybe I was unclear, then.

The feature request is support for multiple files per run, ie. find . -type f -exec ffprobe -print_format son -show_streams {} +, as to increase speed when probing thousands of files.

This would mean the output would have to generate an array of probe objects in order to connect the files and the probe data, eg.

[

{"filename": "movie1.mkv", "streams": [ ...]},
{"filename": "movie2.mkv", "streams": [ ...]},
(etc.)

]

Would this be doable? Perhaps you have a better suggestion?

Note: See TracTickets for help on using tickets.