PDA

View Full Version : Detecting the field order with Avisynth ?


Tsui
24th August 2003, 14:49
As you know interlaced movies can have one of two possible field orders, bff and tff.
The correct field order is important to select the right field order in an mpeg encoder.

Manually I examine the field order with two scripts and watch them in VirtualDub :

# tff field order :
SegmentedAVISource("e:\capture\capture.avi")
SeparateFields()

# bff field order :
SegmentedAVISource("e:\capture\capture.avi")
ComplementParity()
SeparateFields()

If the script shows a smooth video then the field order ist correct, otherwise the field order is the opposite of the actual script.

No problems so far, but i want to have a script, that analyses the video and shows me the correct field order automatically.
Is that possible ?

I tried a bit with the ConditionalFilter and with the compare filter, I tried to subtract adjacent fields, but I have no solution so far.

I know that the right field order has less differences in luma an chroma than the video in wrong field order, but I don't know how I can configure avisynth to recognize those differences and create a string or something dependent on that field order and differences.

Can anyone help me ?

Si
24th August 2003, 14:57
No problems so far, but i want to have a script, that analyses the video and shows me the correct field order automatically.
Is that possible ?

AFAIK no-ones mangaged it yet - Tom (http://forum.doom9.org/showthread.php?s=&threadid=34511&highlight=trbarry) has come closest

regards
Simon

Dark-Cracker
24th August 2003, 15:11
go on www.avisynth.org in the shared part u can see 2 or 3 script to show u the correct field order.

Bye.

Tsui
24th August 2003, 15:56
thanx for your very fast reply.

Tsui
24th August 2003, 19:36
Sh0dan's script does the Trick :D

Is there any way to write the text in a textfile do the harddisc instead onto the picture ?