Opened 8 years ago

Last modified 8 years ago

#2789 new enhancement

2-pass processing of inputs, generating statistics

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


I would like to suggest a new feature which would first read an entire input file (if it is a finite source, like a file, not a live stream) and generate a lot of statistics, needed for the further processing requested on the command line.

For example, something like this:

ffmpeg -generate_statistic -i input.mp4 -ss -45 -c:v copy output.mp4

would make a 2-pass reading of the input source. First time, it will read entire file, generating various statistics, one of which could be the number of total frames in a video stream. The second time it reads the input file and now it can "understand" that "-45" time point means "45 seconds before the end", because it has got a number of total frames, gathered in the 1st pass.

This would help implement other features too, which can't be easily implemented in a 1-pass reading of the input, which ffmpeg implements so far.

Change History (1)

comment:1 by Carl Eugen Hoyos, 8 years ago

Priority: normalwish
Note: See TracTickets for help on using tickets.