Log in

View Full Version : Telecine


kassandro
17th February 2004, 21:58
In Telecine of 18fps material (http://forum.doom9.org/showthread.php?s=&threadid=69873) there was the request for a filter, which can telecine super8 and 8mm material to NTSC. There was also mentioned a program for 69 bucks, which would just do that. The outrageous price stimulated me, to write a very simple and fast filter, which can do this and a lot more similar things. For more details and download visit the web site www.telecine.de.tf (http://www.telecine.de.tf) Please post all questions, comments, etc to this thread.

2004|02|17 version 0.1 released

scharfis_brain
18th February 2004, 01:54
please read this http://forum.doom9.org/showthread.php?s=&threadid=69876&highlight=fps+telecine thread.
this is a duplicate of the one you answered on.

18fps telecine can easily be done with avisynth using this command sequence:

avisource("blabla.avi")
assumefps(18)
changefps(59.94)
separatefields
selectevery(4,1,2)
weave()

kassandro
18th February 2004, 10:38
ok, you can do this. I mentioned the possibility of such a solution in the thread mentioned above. Your script is not quite correct, though. To emulate Telecine(input,true, 4,3,3) you have to use selectevery(6, 0,1,0,1,2,3,2,5,4,5) and you have to add some commands to make the script field based and to get the right field order. This example shows that Telecine is easier to use. It is also at least 5 times faster, because Telecine avoids any unnecessary bitblt operation. In the above example, for any 5 target frames, only the 4th requires a bitblt, while in the script weave must always use bitblt to merge the fields. Also the script cannot handle clips with odd height, while Telecine has no problem.

scharfis_brain
18th February 2004, 11:28
Your script is not quite correct, though.

this is not true.

avisource("blabla.avi") <--- progressive
assumefps(18) <--- staying progressive
changefps(59.94) <--- doing a progressive 4 : 3 : 3 repetition
separatefields <--- only now doing the field-based stuff
selectevery(4,1,2) <--- selecting the correct fields
<--- , for other f.order use (4,0,3)
weave() <--- reinterlace


now tell me, what is not corret with my solution.
I think, that my solution is very comfortable, because you do not need to crack your brain about a possible pattern.
Just doing assumefps(oldframerate).changefps(newframerate) creates the requirest pattern. the following separatefields.selectevery(4,0,3).weave does the reinterlacing.

Okay, it will be slower than your telecine().

btw., could you extend telecine() for floating framerates, so it makes the pattern itself? like my solution?

kassandro
18th February 2004, 14:10
Ok, you are right. I overlooked changefps(59.94), which really did the brain work. I had in mind the script:
separatefields()
selectevery(6, 0,1,0,1,2,3,2,5,4,5)
weave()
assumefps(30)
Both scripts are equally fast, because all the cpu intensive work is in weave. On the other hand, I never used changefps, because it is somewhat fuzzy for me. I simply don't know the algorithm how it arrives at a 4:3:3 pattern.

scharfis_brain
18th February 2004, 17:08
I simply don't know the algorithm how it arrives at a 4:3:3 pattern. it is quite simple:

input is 18 fps
uotput shall be 60 fps

then it repeats the input-frame as long as needed until the timestamp for the new frame is achieved. then it repeats the next frame as long as needed, until the next timestamp is reached or overstepped... an so on. the pattern creates itself, because of the 'rounding' on the timestamps.

you can comapare it with a resizer:
changefps (frame selection) = nearest neighbor resizing
convertfps(frame blending) = bilinear resizing

it can also be used for 3:2 Pulldown:
assumefps(23.976).changefps(59.94)

or any other pattern wished.

I like changefps. This think made it possible to write a function called unblendpattern, which manually (blind) selects the 'good' frames out of field-blended stream.

kassandro
18th February 2004, 17:24
Nice explanation, especially the comparison with a resizer. They should put such an explanation into documentation.
Thank you!