Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: key frame extraction (DEV-1513)
Fixes bugs which prevent the key frame extraction and matrix file creation of the two files: https://github.com/dasch-swiss/4124-xmlperformance-testdata/blob/main/bitstreams/0.1.mp4 https://github.com/dasch-swiss/4124-xmlperformance-testdata/blob/main/bitstreams/100.mp4 Both files suffer from two different bugs: Fixes processing of very short moving images (0.1.mp4) The file is too short for any frame to be extracted with the previous implementation which assumed at least five keyframes to be extracted. Change the script to start extracting keyframes at time unit 0, i.e. the beginning of the file and use the first extract frame as the start of the matrix instead of a later possibly non existing one. Fix rounding error in calculation of number of matrix files to created (100.mp4) For some reason the calculation of the number of matrix files was rounded from 0.8... to 2 where the next bigger integer should be 1 fixes issue DEV-1513 Additional changes: * Add support for debugging output to export-moving-image-frames.sh Introduce $DEBUG for the export script as a way to turn on debug out * Mount scripts folder into sipi for local dev purposed * Declare function with function keyword * Formatting - use spaces instead of tabs akin to scala source code * Fix mimetype check being skipped/failing Failed with + file -b --mime-type ./1.mp4 -ne video/mp4 Usage: file [-bcCdEhikLlNnprsSvzZ0] [--apple] [--extension] [--mime-encoding] [--mime-type] [-e <testname>] [-F <separator>] [-f <namefile>] [-m <magicfiles>] [-P <parameter=value>] <file> ... file -C [-m <magicfiles>] file [--help] * Use double quotes in order to prevent globbing and word splitting * Remove unused code: function collect, unused num variable,unused framestart variable * Fix warning for read without -r https://github.com/koalaman/shellcheck/wiki/SC2162 * Simplify calculation and rename number_of_frame_files
- Loading branch information
Showing
2 changed files
with
82 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters