Log in

View Full Version : 23.976 to hard telecined PAL and back


Comatose
10th September 2008, 15:43
(anime)

So, as an exercise, I used this code recommended to me a while ago to go from 24000/1001 fps to 25 fps:
ChangeFPS(50)
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()

And then tried to go back to 23.976, but I could never hit exactly 23.976. I could hit 24 fps (1-in-25 with TDecimate mode 1), and with bigger numbers for cycle and cycleR, 23.975 and 23.977, but not 23.976.

So I started looking for dupe frames. I used a slow pan in the OP sequence for this.
Between frames 1550 and 1600, there are three dupes: 1551, 1575 and 1600 so shouldn't this work? (it only gives 23.5 fps):
TDecimate(mode=1,cycleR=3,cycle=50)

Where is the flaw in my logic? :/

edit: well, I can do
TDecimate(mode=1,cycleR=1,cycle=25)
TDecimate(mode=1,cycleR=1,cycle=1000)
...but it's insanely slow :/ (0.3 fps!)

Guest
10th September 2008, 15:55
You removed 3 per cycle of 50. That gives you 47/50 * 25 = 23.5.

Try FDecimate(23.976)

For TDecimate:

23.976/25 = 0.95904

So ignoring the last place, you need CycleR = (1000-959) = 41 and Cycle = 1000.

Comatose
10th September 2008, 16:02
This is weird. cycleR=959,cycle=1000 is giving me 1.025 fps somehow o_O I can't help but think I'm doing something wrong, but I quadruple checked and everything looks right...
ChangeFPS(50)
AssumeTFF()
SeparateFields()
SelectEvery(4,0,3)
Weave()
TFM()
TDecimate(mode=1,cycleR=959,cycle=1000)

Also, since this is done entirely in Avisynth and the difference is 0.0%, I should be using FDecimate like this, right?
FDecimate(23.976,threshold=0)
or does threshold=0 mean the threshold is not used? the manual hints in that direction:
If your clip has no duplicates and you simply want to decimate it to a slower frame rate, then this step does not apply and you can set the 'threshold' parameter to zero (threshold=0)

Guest
10th September 2008, 16:50
Sorry, CycleR should be the number to remove = 41. I have edited my post.

You want to set a threshold for FDecimate, so that the frames removed are closest to being duplicates. I need to revise that manual section.

Undead Sega
11th September 2008, 03:01
If it is from a DVD, demux it to get the streams, thus getting an .m2v file, which u take that into DGPulldown, and have 23.976 to 25fps applied which u will create a new stream. After that, take ur new .m2v file into VirtualDub MPEG-2 or the latest VirtualDub with the MPEG-2 plugin and honor the pulldown flags. From there, u can save it as an .avi file (preferably lossless if u want to retain the quality and of course if you have the space on ur Hard drive), which will now be a hard telecined video file.

But to get it back, i have not yet thought about that yet.

Comatose
11th September 2008, 12:55
It's not for a DVD, it was just as an exercise to learn more about doing this kind of thing.

neuron2: But in this case there would be (there is) 0% difference between the dupes, since it's all done in Avisynth. Would it be correct to use threshold=0 in this case, or does it have some special meaning?

Guest
11th September 2008, 14:03
Yes, you can use threshold=0 in that case. But if you ever have a duplicate with a slight difference it will not be seen as a duplicate and might be used. If you are SURE that your dupes are all exact, then you can set threshold=0.

IanB
11th September 2008, 14:32
Cheesessss!For TDecimate:

23.976/25 = 0.95904

So ignoring the last place, you need CycleR = (1000-959) = 41 and Cycle = 1000.
~23.976/25 = (24000/1001)/25 = 960/1001

So you need CycleR = (1001-960) = 41 and Cycle = 1001.

Guest
11th September 2008, 14:58
Yes, thank you. As you show, there is no need to approximate it.

Comatose
11th September 2008, 20:33
I just burned a DVD (hard telecined) with that slow pan and at 25 fps it's smooth, on both the interlaced CRT and the Samsung HDTV :3
This was a personal project for me as I was constantly seeing choppy anime on TV and I was wondering whether this has something to do with the FPS limitation, but I guess not.

There's one thing that bothered me, though. The HDTV did a really lousy job IVTCing it, but it did a good job previously on NTSC DVDs. Is there another way to do 23.976->25 pulldown? How do RFF flagged DVDs do it?
(I was seeing stuff like credits "jumping" horizontally (bad aliasing for 1 frame, pretty much) after a scene change, which I think is a sign of bad field matching)