voxel51 / eta

ETA: Extensible Toolkit for Analytics
https://voxel51.com
Apache License 2.0
29 stars 13 forks source link

adding explicit start_number to ffmpeg #562

Closed aturkelson closed 2 years ago

aturkelson commented 2 years ago

When ffmpeg is searching for files it looks for a sequence pattern containing "%d" or "%0Nd", where the first filename of the file list specified by the pattern must contain a number inclusively contained between start_number and start_number+start_number_range-1. By default start_number=0 and start_number_range=5. If a file sequence begins at or after start_number_range=5 an exception is thrown:

Could find no file with path '/fake/path/%06d.jpg' and index in the range 0-4

This change automatically determines the start_number to use based on the ffmpeg inpath parameter. If no sequence is found then it will default to 0, otherwise it will use the result of sequence pattern parsing.

aturkelson commented 2 years ago

Additional testing revealed that the parameter is unintentionally added multiple times during calls to to_frames. Working on a fix now.

aturkelson commented 2 years ago

Added handling for duplicate options and inpath sequence pattern checking. Ready for someone to take a look now.

brimoor commented 2 years ago

nit: PR conventions: