View Full Version : Fixing frame order?
Blight
14th July 2002, 14:45
hi,
I've come into contact with a badly encoded video.
What I assume the encode did was, drop one field resize to 320x240 and encode. The problem is, his field order was reversed! so, what happens is that every other frames is in fact ordered in reverse.
So, anyone have an idea if I can re-encode the video with the correct frame order (switching between every 2 frames) ?
Koepi
14th July 2002, 14:56
Does
ComplementParity()
help it?
after that it could be necessary to do something like Trim(1,0) - but s it is 320x240 there's a bad chance that this can help as the damage is done...
Regards,
Koepi
Belgabor
14th July 2002, 15:46
I don't think complementparity alone will do the job as the damage is already done and its not fieldbased anymore. what you would have to to is the following (i think):
- (opposite command of SeparateFields, i cant remember atm the name, might be Bob() but i'm not sure)
- ComplementParity()
- SeparateFields()
That should do it.
EDIT: And yes, it might be necessary to do the Trim(1,0) before or after the whole operation.
Cheers
Belgabor
Koepi
14th July 2002, 15:55
Well, you mean something like this:
ComplementParity()
SeparateFields()
Trim(1,0)
Weave()
But this works on interlaced, "shifted" content - unfortunately that video seems to be badly broken because there just has been done something like
BilinearResize(320,240)...
Even if you'd resized it to full res. again you won't be able to repair that, the information is lost.
I have no idea what to do in such a case...
Regards,
Koepi
Belgabor
14th July 2002, 16:15
Hm, after rereading (and rethinking ;)) I must say I'm quite puzzled, because Blight said:
What I assume the encode did was, drop one field resize to 320x240 and encode. The problem is, his field order was reversed! so, what happens is that every other frames is in fact ordered in reverse.
I don't know how to get reversed field order (EDIT: well, its rather frame order in this case) if you drop one field?!? What I'd say (though i might be entirely wrong) is someone captured the clip at half current fps and deinterlaced by doubling framerate and putting the fields behind each other.
If thats the case,
Weave()
ComplementParity()
SeparateFields()
should restore the order.
Puzzled,
Belgabor
Koepi
14th July 2002, 16:54
Sounds reasonable. :)
Somehow Blight should step in and give us some results ;)
Regards,
Koepi
poptones
14th July 2002, 18:18
If it's just frame order, why not use
selectevery(2,1,0)
I've done that with video I needed to "reverse" to match up with an overlay and it seems to work just fine.
Blight
17th July 2002, 21:55
It turned out that whomever was the a$$ that encoded did a 50fps MPEG1 with the wrong field order, no data lost. I assume it was an attempt at a lame Bob encode, but really ... wrong field order, it looked like those flashing japanimation.
In the end I just loaded it in VDub and decimated by 2 returning it to 25fps.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.