About frame decimation

Anything related to video and my tools that is not a support request.
Post Reply
DAE avatar
SpasV
Posts: 11
Joined: Fri Jan 14, 2011 12:50 pm

About frame decimation

Post 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
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: About frame decimation

Post 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.
DAE avatar
SpasV
Posts: 11
Joined: Fri Jan 14, 2011 12:50 pm

Re: About frame decimation

Post 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
DAE avatar
Didée
Posts: 22
Joined: Wed Oct 27, 2010 2:19 pm

Re: About frame decimation

Post 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."
DAE avatar
SpasV
Posts: 11
Joined: Fri Jan 14, 2011 12:50 pm

Re: About frame decimation

Post 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
Post Reply