Page 1 of 1

About frame decimation

Posted: Wed Feb 16, 2011 9:18 am
by SpasV
Is there a filter to decimate a 30/1.001 progressive H264 encoded video to 24/1.001 without re-encoding it?
It seems to me quite possible.
SpasV

Re: About frame decimation

Posted: Wed Feb 16, 2011 11:00 am
by admin
The only case where it would be possible is when the video is pulled down with 3:2 pulldown using flags (pic timing SEIs). In that case, you can use a tool to strip the pulldown flags and reset the frame rate.

Re: About frame decimation

Posted: Thu Feb 17, 2011 3:31 am
by SpasV
OK, this is obvious.
I thought it is easy to program a filter to work this way:
It opens (decodes) a sequence of frames to examine them and to decide which one to drop.
Then it output the rest without changing (decoding) them.
Actually, I don't know the format of the source stream so I cannot think in essence.
SpasV

Re: About frame decimation

Posted: Thu Feb 17, 2011 5:45 am
by Didée
It is impossible to do that. Broken down to the basics, Mpeg compression calculates the difference between currentFrame and previousFrame. This difference then is compressed. During playback, the current frame can only be decoded after the previous frame has been decoded, and so on.
In other words, the frame sequence is a chain where each segment is dependent on the previous chain segment. When you remove segments from the chain, then the chain is broken.

Of course, AVC actually is a little more complex than this description. While everything is more complicated, in fact it could be possible for some frame-types to get removed (namely: non-referenced B-Frames). But since the existing frame types are fixed & cannot be changed, this is rather useless for the given purpose.

Practically, the simple answer is: "No, that's not possible."

Re: About frame decimation

Posted: Fri Feb 25, 2011 8:06 am
by SpasV
Yes, I know that I understand that.
Yes, part of the H264 encodingprocess is prediction. And yes, the encoder works on the difference between predicted and the real frame.
But,
how the preprocessing wich decimates works?
I thought, as long as this process drops one out of five frame, it was possible just to decode copies of the currently processed five frmes.
Then, when the decission is made to output the unencoded four frames.
The frame chain must be defined in the header.
SpasV