Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: key frame extraction (DEV-1513) #2300

Merged
merged 1 commit into from Nov 24, 2022

Commits on Nov 24, 2022

  1. 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
    seakayone committed Nov 24, 2022
    Copy the full SHA
    1cfee67 View commit details
    Browse the repository at this point in the history