0

i am doing motion detection in c# using emgu.

i am comparing a jpeg to jpeg in a constant 'stream'.

I want to record only the P‑frame.

Does anyone have any links?

I tried googling but nothing came up..

Thanks

Andrew Simpson
  • 6,883
  • 11
  • 79
  • 179
  • Motion JPEG does not have P frames; it is a video format made by stringing together JPEG images without inter-frame compression. – Kaz Oct 20 '13 at 08:53
  • @kaz HI. Thanks for that. Someone suggested I do this approach but I could see how to implement it. My original question was this. http://programmers.stackexchange.com/questions/214994/best-way-to-store-motion-changes-to-reduce-memory – Andrew Simpson Oct 20 '13 at 09:01
  • If you use a camera that puts out a more sophisticated encoding method than MJPEG, then perhaps you can parse the stream and take advantage of P frames somehow to deduce that motion is going on. That is, look at the motion vectors. The encoder has done the hard work of searching for sections of the picture that appear to move from one frame to another; you just have to decode that info. Take a look at ffmpeg's sample player, ffplay. It has a mode in which the motion vectors are dynamically visualized on the screen, over the video, with little arrows. – Kaz Oct 21 '13 at 19:07
  • Hi, unfortunately i am stuck with jpegs. But thanks for that info! – Andrew Simpson Oct 22 '13 at 08:06

0 Answers0