Allow fine-grained control of accurate frame count


In the current implementation, the configuration property accurate_frame_count found in etc/org.opencastproject.inspection.ffmpeg.MediaInspectionServiceImpl.cfg globally controls whether the Media Inspection Service should determine the exact frame count.

The motivation behind the introduction of accurate frame count is WOH partial import which is supposed to be capable to extract the exactly last frame of a given video stream.

Globally enabling this option yields a severe disadvantage, however: Letting ffmpeg count the frames is significantly slower (requires decoding of complete video stream) over just reading the frame count from the media file header. This is in particular bad since a POST /ingest/ingest will required the caller to wait until media inspection is finished which can take a long time of using the accurate frame count option.

Note that optimizing the frame count would be an option (see ), but for cases where the exact frame count is not strictly required, it would be preferable to no do it at all and really just depend on the headers.
From point of view of WOH partial-import, it is sound, however, to expect the information (frame count) to be exact and it makes sense to use WOH inspect to ensure this.

The goal of this task is to re-implement the option accurate_frame_count as non-global setting so that individual operations can decide whether frames should be counted (default: no).

Fixed and reviewed


Sven Stauber


Sven Stauber

Tags (folksonomy)



Fix versions

Affects versions