Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is kind of hard to explain, so bear with me. So I'm looking for some way to export video GOP frames to jpegs. I'd like to preserve the I-Frames, P-Frames, B-Frames, etc. So that the next frame has black squares where the previous image data is unchanged.

Basically, rather then having a jpeg sequence where each frame is a full frame picture, I'd like to export the jpegs so that if the next frame were overlayed onto the previous frame it would become an entire image.

Any ideas?

share|improve this question
It's unlikely you're easily going to achieve this other than by programming a solution yourself by e.g. extracting motion vectors and composing the output pictures. Are you strictly looking at macroblocks? Or just pixel-by-pixel difference? In that case, you could maybe just subtract the differences between decoded output pictures. Can I ask why you want to do this or what your exact application is? What input video codec? MPEG-4 Visual? H.264? – slhck Aug 29 '12 at 20:19
Starting with H.264 mostly. I've done some tests using a basic php/GD script doing some pixel-by-pixel comparison, and didn't really like the results. I'm still trying some different approaches and thought maybe there was something that could be done in ffmpeg to preserve or create these types of jpegs. – ndmweb Aug 29 '12 at 21:19
FFmpeg surely doesn't do this; you could maybe try scripting this with Avisynth using MVTools and MaskTools. Why do you want to do this, actually? – slhck Aug 31 '12 at 14:47

You must log in to answer this question.

Browse other questions tagged .