Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.