Log in

View Full Version : Farscape - Cap @ what -> 25fps?


FreQi
7th January 2003, 02:57
With Farscape being cancled after the next 11 episodes air, I want to make sure I do everything perfectly for the next couple of encodes. The last time I encoded the show (some 5 months ago) I was doing captures at 352x240 @ 29.97fps (I live in the states, NTSC broadcasts) and I encoded them to 352x183 @ 29.97fps to make a widescreen encode. I now have a better card and will be doing captures at 640x480 and encode it to 640x352.

Last Friday, SciFi aired 3 of the most recent episodes as a catch-up, so I captured them to test the new encode format and ran into a bit of a problem. I captured at 29.97 like usual, but the process of IVTC'ing to 23.976fps yeilded some pretty choppy playback in the encode. I looked back at Hironimo's DVD rips of earlier seasons, and they are 25fps. So now I believe I must find the best way to capture and encode to 25fps. Here is what i tried so far using the current 29.97 source captures...

This was my first attempt, and how I have always used decomb.dll for all other shows.

LoadPlugin("C:\Program Files\AviSynth2\plugins\decomb.dll")
Telecide(guide=1)
Decimate(cycle=5) # converts 29.97 to 23.976
Crop(0,4,640,476)
LoadPlugin("C:\Program Files\AviSynth2\plugins\Convolution3D.dll")
Convolution3D(0,8,16,8,8,3,0)
BilinearResize(640,352)


The resulting video was choppy (as I said before), so when I found out the dvd rips are at 25fps, I tried this:

LoadPlugin("C:\Program Files\AviSynth2\plugins\decomb.dll")
Telecide(guide=1)
Decimate(cycle=6) # converts 29.97 to 24.976
Crop(0,4,640,476)
LoadPlugin("C:\Program Files\AviSynth2\plugins\Convolution3D.dll")
Convolution3D(0,8,16,8,8,3,0)
BilinearResize(640,352)


That resulted in a frame rate of 24.976, which makes sense because it came out of a 29.97 source. But I never heard of 24.976 as being any kind of "true" frame rate, so I dug around in the AVISynth docs and found ConvertFPS (http://www.avisynth.org/index.php?page=FPS). So I added that and came up with this:

LoadPlugin("C:\Program Files\AviSynth2\plugins\decomb.dll")
Telecide(guide=1)
Decimate(cycle=6) # converts 29.97 to 24.976
ConvertFPS(25) # converts 24.976 to 25
Crop(0,4,640,476)
LoadPlugin("C:\Program Files\AviSynth2\plugins\Convolution3D.dll")
Convolution3D(0,8,16,8,8,3,0)
BilinearResize(640,352)


The end result was really pretty good. There was a little bit of ghosting, mostly indestinguishable from a motion blur, but I also noticed some scene changes were blended into the same frame (like a one frame blend), which is usually only seen when looking at the original interlaced frame, except there was no interlacing (I am pretty sure Telecide took care of that). My guess is ConvertFPS added these frames, or it is because I captured it at 29.97...

I was thinking, maybe I should try using ConvertFPS before I Decimate it. Something like this:

LoadPlugin("C:\Program Files\AviSynth2\plugins\decomb.dll")
Telecide(guide=1)
ConvertFPS(30) # converts 29.7 to 30
Decimate(cycle=6) # converts 30 to 25


Or maybe I should capture at 30 instead of 29.97, but that would only work if SciFi actualy broadcasts at 30fps, and Time Warner (my cable company) transmits it at 30fps. Isn't everything supposed to be sent to me at 29.97 since I am on an NTSC cable network?

So in summary, does anyone have an opinion on how I should go about capturing and encoding Farscape to 25fps from an NTSC broadcast?

a) Cap @ 29.97 Decimate(cycle=6) ConvertFPS(25)
b) Cap @ 29.97 ConvertFPS(30) Decimate(cycle=6)
c) Cap @ 30 Decimate(cycle=6)
d) Other

Thanks for your insight / guesses. ;]

wotef
7th January 2003, 03:14
er, didn't the guy just rip pal dvds?

FreQi
7th January 2003, 03:33
Yeah I'm pretty sure Hironimo's dvd's were pal. But 23.976fps on Farscape was choppy... 25 was smooth. Am I on crack?

wotef
7th January 2003, 15:38
look at it this way, you have to capture at your normal broadcast fps, 29.97 or whatever fraction

once you've captured it, you should then determine for sure whether IVTC is appropriate - do this by stepping through the file in virtualdub; if you only see combing/interlacing artifacts 2 out of every 5 frames, then you need to IVTC using decomb

because you say you've done IVTC before and got bad results, my suspicion is that this show does NOT actually require IVTC, i.e. it is being broadcast as video, and therefore you would be better off deinterlacing it using tomsmocomp

the worst case would be that there's been some bad mastering from PAL to NTSC conversion...

bottom line is don't assume just cause somebody else's 25fps rips (which may simply have come from a PAL DVD source) mean that you need to convert your NTSC broadcast shows into 25fps, too

FreQi
8th January 2003, 02:51
I'd never heard of TomsMoComp before. I downloaded the one from http://www.trbarry.com/TomsMoComp.zip which I assume is the most recent version (there doesn't appear to be any version number assigned to the filter...).

Should TomsMoComp be used in place of, or in conjunction with Decomb? There seems to be many methods being tossed around. I'm not sure if I should just use decomb to Telecide(guide=1) and then TomsMoComp(1,7,0), or instead if I should use some combination of SeperateFields, TomsMoComp, SelectEven, SelectOdd, and Interleave as suggested on the AVISynth page (http://www.avisynth.org/index.php?page=TomsBob).

Lastly, the zip contains two .dll's for avisynth. One is in a Pre_2.05\Avisynth dir, the other is in 205_Alpha\...\release. Since I am using 2.0.7 ... should I be using the one in the release dir or...?

Thanks for your suggestions.

wotef
8th January 2003, 14:46
use tomsmocomp in replacement of decomb

the zip extraction is confusing, but ALL you need is the readme.txt and d:\TomsMoComp\Avisynth_Pre_2.05\Avisynth\TomsMoComp.dll

this filter needs to know field-dominance, the correct way to do it would be to first run this script

clip1=avisource("d:\farscape.avi")
function CheckTopFirst(clip v1){
v2=v1.subtitle(v1.GetParity?"TF":"BF")
v3=v2.GetParity?v2.ComplementParity:v2
t0=v3.ComplementParity
t1=t0.separatefields
t2=compare(t1.trim(1,0),t1)
b1=v3.separatefields
b2=compare(b1.trim(1,0),b1)
return stackvertical(t2,b2)}
v=clip1
CheckTopFirst(v)

open this in virtualdub and you will see your movie stacked vertically into different fields, top field is on the top, bottom field is on the bottom

now step through the movie (hold down the right arrow key) and you will see that one of the fields is moving smoothly and the other one is very jerky

if the one on the top is moving smoothly, use this script to deinterlace:
loadplugin("d:\TomsMoComp\Avisynth_Pre_2.05\Avisynth\TomsMoComp.dll")
avisource("e:\farscape.avi")
tomsmocomp(1,5,0)

if the one on the bottom is moving smoothly, use this script to deinterlace:
loadplugin("d:\TomsMoComp\Avisynth_Pre_2.05\Avisynth\TomsMoComp.dll")
avisource("e:\farscape.avi")
tomsmocomp(0,5,0)

hope this helps

FreQi
9th January 2003, 10:29
That does help, thank you. After using TomsMoComp, is there anything other than ConvertFPS (or changefps) to try to step back to the original film fps? As I step through the video it's pretty obvious that 2 in every 5 frames are blurs of each other, but if I were to simply drop the frame, there is a fair bit of motion that is lost, which must be what results in the choppy playback when using decomb.

Or am I'm probably better of leaving it at the captured frame rate and having some slightly blurred motion rather than pretty frames and choppy play?

wotef
9th January 2003, 11:06
i can't offer any advice on conversion to PAL
what i'd say is, if it does need 3:2 pulldown, go back to decomb
you probably need to make a quality-decision between fluidity of motion vs jerkiness vs frame clarity vs blurring

try different usages of telecide to see which you prefer:

#base script
loadplugin("d:\decomb.dll")
avisource("d:\farscape.avi")
telecide(guide=1)
decimate(quality=3)

#or replace the appropriate line with any of the following
telecide()
telecide(guide=1,post=false)
telecide(guide=1,blend=false,chroma=true)

#if you use avisynth 2.5 beta and the latest decomb beta (http://forum.doom9.org/attachment.php?s=&postid=234367), you could try:
telecide(guide=1,agg=true,mm=1)
telecide(guide=1,mm=2)

#if none of these work, you could try:
telecide()
decimate(mode=1)

or finally:
telecide()
decimate(mode=2)

if you still don't like the results, post a small clip (raw) to the avisynth forum for more expert advice on what to do

FreQi
11th January 2003, 09:30
I just posted to the avisynth forum (http://forum.doom9.org/showthread.php?s=&threadid=42690) in case anyone wanted to follow-up.

scmccarthy
14th February 2003, 17:33
ConvertFPS was working correctly, It does blend all the frames together, preventing the jitter of dropping frames. Changing the framerate from 24.975 to 25 can be accomplished by speeding out the audio. This will bring the audio back to the original pitch.

AudioDub(video,audio)
Assume(25,true)
ResampleAudio(back to the original samplerate)

If it is being encoded to NTSC from a PAL source, decimate(cycle=6) might be the best way. It is made in Australia.

Stephen

Boulder
18th February 2003, 16:24
Originally posted by scmccarthy

AudioDub(video,audio)
Assume(25,true)
ResampleAudio(back to the original samplerate)

Stephen

AssumeFPS(25,true) :D

Just to make sure no-one gets all mixed up..