Giter VIP home page Giter VIP logo

hsvideomanagement's Introduction

Highspeed video compression

Introduction

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

Process

  1. Acquire highspeed video with StreamPix (Norpix software) as *.seq file
  2. Use batch conversion utilities from StreamPix (Norpix software) to convert *.seq to *.avi
  3. Convert/encode the *.avi to *.mp4 using ffmpeg
    • windows open cmd
    • go to the folder (with cd) where the script avi2mp4.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. The mpeg4 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. The mpeg4 encoding is not suported with GPU encoding.

Downstream analysis

Analysis with whisk

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

  1. slice the video with sliceForWhisk.py
  2. use git Bash
  3. setup GNU parallel for Windows see
  4. 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
  5. important note for analysis
    • if error when saving missing segment use Save As instead of Save
    • alternatively re-run the begining of the analysis to have the proper detector binaries created within folder of interest

hsvideomanagement's People

Contributors

waondering avatar

Watchers

James Cloos avatar  avatar

Forkers

rumbaughlab

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.