I'm trying to do "scientific" video motion analysis. Right now I'm using a Raspberry Pi camera, which records natively in h264, which then needs to be converted/wrapped as MP4.

Is h264 an appropriate format for constant/fixed frame rate "progressive" images? I'm already noticing curvature of lines with motion, with the default settings.

Right now I'm using the open source Tracker software to do the motion analysis.

What would be a good starting point for raspivid and gpac MP4Box settings, to get crisp "progressive" images (ie. full frame captures, with minimal compression/motion estimation), and preserving the frame rate through to the final MP4?

Or is a different capture format better for this purpose? Eventually I'd like to get high frame rate (~250 FPS or so) - low cost camera suggestions also appreciated!


My suggestion is MPEG-2. For tracking and analysis, latency is the concern. H.264 is more complex than MPEG2, it introduces high latency as well. Since your content is not going to stream over network, i suggest MPEG-2

OpenCV always is the starting point, you may check https://www.pyimagesearch.com/2015/03/30/accessing-the-raspberry-pi-camera-with-opencv-and-python/ and https://www.pyimagesearch.com/2018/07/30/opencv-object-tracking/

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.