0

The signalstats of a single image can be calculated via ffprobe with this command:

ffprobe -f lavfi -i "movie=0000002110.jpg,signalstats,metadata=print"

I'd like to do this in a folder with sequential file numbers. In ffmpeg I'm able to achieve this sort of input like this:

ffmpeg -start_number 1036 -i %010d.jpg -vf "crop=100:100:0:0" \cropped\%010d.jpg

The filter documentation for the movie parameter implies that if I might have the right format or stream specifier things might go better.

I am able to get ffmpeg to do it with a standard -i via:

ffmpeg -start_number 2110 -i %010d.jpg -vf signalstats,metadata=print -f null -

FFProbe would be better for my target environment.

troppoli
  • 558
  • 6
  • 13

1 Answers1

1

This would be the syntax for reading an image sequence with ffprobe.

ffprobe -f lavfi -i "movie='%010d.jpg':f=image2:format_opts='start_number=2110',signalstats,metadata=print" -v 0 -show_entries frame_tags

The data will be printed to stdout.

Gyan
  • 85,394
  • 9
  • 169
  • 201
  • This isn't working for me, it seems to have trouble extracting 'format_opts'. Removing the -v 0 here's what I get: ffprobe -f lavfi -i "movie='%010d.jpg':f=image2:format_opts='start_number=2110',signalstats,metadata=print" -show_entries frame_tags [Parsed_movie_0 @ 000001e4d923f000] Option 'format_opts' not found [lavfi @ 000001e4d923d300] Error initializing filter 'movie' with args '%010d.jpg:f=image2:format_opts=start_number=2110' movie='%010d.jpg':f=image2:format_opts='start_number=2110',signalstats,metadata=print: Option not found – troppoli Oct 11 '22 at 13:41
  • ffprobe version 4.0.2 – troppoli Oct 11 '22 at 13:42
  • You'll need 5.0 or newer. – Gyan Oct 11 '22 at 15:23