Filker
1st May 2009, 14:34
Hi, this is my first post here so bear with my newbness plz!
I've captured my old analog PAL VHS tapes (video8 to be exact) to a lossless compressor (huffyuv)
Now I want to make a progressive version keeping as much info as possible. In the process of doing 25 fps to 50p deinterlacing (through mvbobmod, thx scharfis_brain!) I slammed into one of VHS's "features". Every field (now every frame because of deinterlacing) is either too reddish or too greenish (more pronounced in PAL than NTSC maybe?) so I made the following script to cope with it:
clip=AVISource("capture.avi").ConvertToYV12().Assumetff.mvbobmod
reddishA=SelectEvery(clip,4, 0).tweak(hue=-10,bright=+5,cont=1.1)
reddishB=SelectEvery(clip,4, 1).tweak(bright=+5,cont=1.1)
greenishA=SelectEvery(clip,4, 2).tweak(hue=+2,bright=+5,cont=1.1)
greenishB=SelectEvery(clip,4, 3).tweak(hue=-5,bright=+5,cont=1.1)
Interleave(reddishA,reddishB,greenishA,greenishB)
So far so good. This is how far searching the board and copy pasting may take any noob.
Next problem is that every time there's a scene change (handycam stopped recording and restarted) there's a 50% chance this code will get messed up and it will add red where it should be reducing and vice-versa.
Is it possible to have a routine detect if we're at a reddish or greenish frame and adjust accordingly knowing that every 2 frames should be reddish and every other 2 should be greenish (except when there's a scene change)? Or will I have to hunt down every scene change by hand?
The sequence can be for example:
nomenclature: Ff= Frame,field (ie field 2 of frame 4 = 42)
11reddish,12greenish,21greenish,22reddish,31reddish,32greenish,41greenish [scene change] 42greenish,51reddish,52reddish...
That's why it's not very noticeable when playing interlaced, the error is averaged out by the human eye since every frame has a bit of excess red and excess green (VHS look, :rolleyes: ).
http://www.mypicx.com/05012009/redgreeninterlaced/
Greenish:
http://www.mypicx.com/uploadimg/1877356972_05012009_1.jpg
Reddish:
http://www.mypicx.com/uploadimg/1890301667_05012009_2.jpg
Interlaced:
http://www.mypicx.com/uploadimg/556044523_05012009_3.jpg
I've captured my old analog PAL VHS tapes (video8 to be exact) to a lossless compressor (huffyuv)
Now I want to make a progressive version keeping as much info as possible. In the process of doing 25 fps to 50p deinterlacing (through mvbobmod, thx scharfis_brain!) I slammed into one of VHS's "features". Every field (now every frame because of deinterlacing) is either too reddish or too greenish (more pronounced in PAL than NTSC maybe?) so I made the following script to cope with it:
clip=AVISource("capture.avi").ConvertToYV12().Assumetff.mvbobmod
reddishA=SelectEvery(clip,4, 0).tweak(hue=-10,bright=+5,cont=1.1)
reddishB=SelectEvery(clip,4, 1).tweak(bright=+5,cont=1.1)
greenishA=SelectEvery(clip,4, 2).tweak(hue=+2,bright=+5,cont=1.1)
greenishB=SelectEvery(clip,4, 3).tweak(hue=-5,bright=+5,cont=1.1)
Interleave(reddishA,reddishB,greenishA,greenishB)
So far so good. This is how far searching the board and copy pasting may take any noob.
Next problem is that every time there's a scene change (handycam stopped recording and restarted) there's a 50% chance this code will get messed up and it will add red where it should be reducing and vice-versa.
Is it possible to have a routine detect if we're at a reddish or greenish frame and adjust accordingly knowing that every 2 frames should be reddish and every other 2 should be greenish (except when there's a scene change)? Or will I have to hunt down every scene change by hand?
The sequence can be for example:
nomenclature: Ff= Frame,field (ie field 2 of frame 4 = 42)
11reddish,12greenish,21greenish,22reddish,31reddish,32greenish,41greenish [scene change] 42greenish,51reddish,52reddish...
That's why it's not very noticeable when playing interlaced, the error is averaged out by the human eye since every frame has a bit of excess red and excess green (VHS look, :rolleyes: ).
http://www.mypicx.com/05012009/redgreeninterlaced/
Greenish:
http://www.mypicx.com/uploadimg/1877356972_05012009_1.jpg
Reddish:
http://www.mypicx.com/uploadimg/1890301667_05012009_2.jpg
Interlaced:
http://www.mypicx.com/uploadimg/556044523_05012009_3.jpg