<p>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</p>
<p>OpenCV always is the starting point, you may check <a href="https://www.pyimagesearch.com/2015/03/30/accessing-the-raspberry-pi-camera-with-opencv-and-python/" rel="nofollow noreferrer">https://www.pyimagesearch.com/2015/03/30/accessing-the-raspberry-pi-camera-with-opencv-and-python/</a> and <a href="https://www.pyimagesearch.com/2018/07/30/opencv-object-tracking/" rel="nofollow noreferrer">https://www.pyimagesearch.com/2018/07/30/opencv-object-tracking/</a></p>
<p>Good luck!</p>

CC BY-SA 4.0
2020-10-22T23:57:03.867Z
2020-10-22T23:57:03.867Z
xer-rex
<p>I'm trying to do &quot;scientific&quot; 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.</p>
<p>Is h264 an appropriate format for constant/fixed frame rate &quot;progressive&quot; images? I'm already noticing curvature of lines with motion, with the default settings.</p>
<p>Right now I'm using the open source <a href="https://tracker.physlets.org/" rel="nofollow noreferrer">Tracker</a> software to do the motion analysis.</p>
<p>What would be a good starting point for <code>raspivid</code> and <code>gpac</code> <code>MP4Box</code> settings, to get crisp &quot;progressive&quot; images (ie. full frame captures, with minimal compression/motion estimation), and preserving the frame rate through to the final MP4?</p>
<p>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!</p>

<framerate><h.264><motion><tracking><technical>
h264 Settings for Motion Tracking & Analysis (technical photography)?
float13
# h264 Settings for Motion Tracking & Analysis (technical photography)?

(Asked by: username_0 on 2020-10-22)

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](https://tracker.physlets.org/) 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!

**Tags:** framerate, h.264, motion, tracking, technical


---

## 1 answers

### Answer by username_1 on 2020-10-22. Score: 0

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!


---

