This is a set of scripts to facilitate the management of acquisition video and ensuring there proper encoding with software like whisk
The main objective is to obtain readable video that can be compressed while retaining software compatibility. As some of the highspeed video aquired are
- Acquire highspeed video with StreamPix (Norpix software) as
*.seq
file - Use batch conversion utilities from StreamPix (Norpix software) to convert
*.seq
to*.avi
- Convert/encode the
*.avi
to*.mp4
using ffmpeg- windows open
cmd
- go to the folder (with
cd
) where the scriptavi2mp4.py
is located - run the script
python avi2mp4.py
- for
-qscale:v 10
this enables the conversion of 14Tb --> 0.04Tb (44Gb) overnight CPU based with IntelCore i9-9820X CPU @ 3.30GHz 10 cores. Thempeg4
encoding is not suported with GPU encoding. - for
-qscale:v 4
this enables the conversion of 14Tb --> 0.19Tb (190Gb) overnight CPU based with IntelCore i9-9820X CPU @ 3.30GHz 10 cores. Thempeg4
encoding is not suported with GPU encoding.
- windows open
important consideration: - we encountered memory issues when running long highspeed video with whisk thus the video can be sliced - encoding is critical to have tbc, tbn and tbr consistent (see whisk issues here)
key points for ffmpeg usage:
-codec:v
: mpeg4 necessary to be able to have good fps tbn tbr matching
-r
: enables to have the frame rate of intres
-qscale:v
: this is the quality of the video (from 1 highest quality/larger file to 31 smallest quality/smaller file)
-codec:a
: needed to have audio codec
-video_track_timescale
: force the tbn value
- slice the video with
sliceForWhisk.py
- use git Bash
- setup GNU parallel for Windows see
- for install see []
- tutorial
- run bash script for parallel analysis of the task
- see
bashForWhisk.sh
- TODO: complete and improve the script
- TODO: better naming convention
- TODO: run script one after the other
- see
- important note for analysis
- if error when saving missing segment use
Save As
instead ofSave
- alternatively re-run the begining of the analysis to have the proper detector binaries created within folder of interest
- if error when saving missing segment use