PDA

View Full Version : 60fps to 24fps w/ film and video sections?


puffpio
6th August 2006, 03:12
I have an HD clip at 60fps progressive

there are some 24fps sections that run like 'aabbbaabbb' so a straight 3 in 5 decimation would work

but then there are sections that are straight 60fps video progressive..so I wanna blend those sections into 24 fps

suggestions?
I was thinking of using TDecimate(mode=1, cycleR=3) for the first case...but I can't use the hybrid=1 blend mode because that only works with cycleR=1

Blue_MiSfit
6th August 2006, 03:26
Why would you want to blend 60p into 24p? Are you outputting to film or DVD or something like that??

~MiSfit

puffpio
6th August 2006, 03:35
what would you suggest?

the clip contains 24p that has duplciated frames to 60p, and sections that are 60p video...

So since sections of it can be recovered to 24p..I thought it would make sense to turn the other sections into 24p as well so the whole clip has the same framerate

puffpio
6th August 2006, 03:38
if I just use a 3 in 5 decimation then the 60fps video sections come out jerky since they dont have duplicated frames...

actionman133
6th August 2006, 04:03
60p downconverted to 24p will always look quite jerky compared to the original stream, because you're throwing away 60% of the data.

You have a couple options. If you want the 60p sequences to stay smooth, you'll have to leave the video as it is. If you need 24p, you can use FDecimate (). That should remove all of the duplicates in the 24p sequences, but motion in the 60p sequences may appear to jitter a little.

I can't think of how to do it at the moment, but if you were to use FDecimate () the 24p sequences and use MVConv () on the 60p shots, you could probably get a good lookng 24p output (MVConv will smooth out the motion when converting 60p to 24p).

foxyshadis
6th August 2006, 04:23
Weave
TFM().TDecimate(mode=4+5)

For more on the second line, see VFR (http://www.avisynth.org/mediawiki/wiki/VFR#3.3_Encoding_to_vfr_.28mkv.29). This will only work if you're going to mp4 or mkv. Otherwise just leave it alone (or use fdecimate if you just must get it to 24).

puffpio
6th August 2006, 04:56
after doing a weave and tfm, I end up w. a 30fps clip...the sections that were 'aaabb' are now abcdd, and the 60fps video sections are now 30fps...

so my avs script looks like this:

mpeg2source("x.d2v")
crop(112, 0, -112, 0)
assumefieldbased()
weave()
tfm()
tdecimate(hybrid=1)
LanczosResize(1056, 720)
ColorMatrix()

I had to resize because the weave doubled the vertical resolution

foxyshadis
6th August 2006, 05:12
Oh yeah, I forgot it would do that, you can convert to a proper interlaced (tff) by using:

assumeframebased()
separatefields()
selectevery(4,0,3)
weave()

I highly recommend if you go this route that you use true vfr. (I still have to update the guide for mp4 vfr, a tool for which showed up recently, but mkv is all explained.) If you have the latest TIVTC you can also ignore the framerate subsection. Encoding to cfr is guaranteed to be either jerky or blended (which causes bitrate spikes), or 120fps; all of the newer containers support true vfr to some extent.

Of course, you can vfr 24/60, which is a little smoother than 24/30 my method gives, but it needs more bitate and tivtc doesn't fully support automating it yet.

You know what, don't even reinterlace, just use selecteven().tdecimate(). What was I thinking, it's silly to reinterlace just to deinterlace. >.>

puffpio
6th August 2006, 05:16
yeah i plan on encoding to mp4...
does mp4box support VFR? do the decoders support it? (ffdshow, nero showtime, etc)

foxyshadis
6th August 2006, 05:19
http://forum.doom9.org/showthread.php?t=112199

See this thread. Decoders don't need to support it, only splitters, and every splitter I've tried (mp4 and mkv) support it fine.

puffpio
6th August 2006, 05:23
I think i'll go this route :) VFR FTW

puffpio
6th August 2006, 05:49
saw your edit...

so my first pass would be:
mpeg2source("x.d2v")
crop(112, 0, -112, 0)
selecteven()
tdecimate(mode=4, output="stats.txt")

--------
2nd pass is:
mpeg2source("x.d2v")
crop(112, 0, -112, 0)
selecteven()
tdecimate(mode=5, hybrid=2, dupthresh=1.0, input="stats.txt", mkvout="timecodes.txt")
ColorMatrix()

Mug Funky
6th August 2006, 06:34
it'd be a simple matter to modify "NTSCtools" to allow for this... 60p gets mocomped to 24p, 24p stays as is.

i might have a go at it later tonight...