View Full Version : 30i > 24p
XviDEncoder
31st March 2005, 07:30
I once did it by separating fields. then using motion perfect by dynapel to convert the 60fps to 48fps and then wove it back together, and did a decomb. And i think it looked pretty well. Nice filmish motion. I'm not looking for cheesy film blurs motionblurs, or dust and scratches. But just that amazingly subtle choppyness (not jerkyness) that comes from film. which was well achived by this process.
But. dynapel seems to have this unwanted blending effect. it kindof warps areas of the picture every now and then. and i know that professional NTSC > PAL conversions don't have this. Are there any ideas on any other conversion methods? I know that real video to film conversions by processing companies, require 60i video, and say that 30p video wont work. so i assume that they use all that infromation to and down it to 48. but what process do they use? and are there any plugins that emulate these techniques? because i'm sure that they are probably using hardware converters.
i've also tried the built in avisynth framerate conversion plugin, and it wasn't quite what i'm looking for.
any ideas?
edit: this isn't an IVTC. Pure video to 24p. from DV source.
XviDEncoder
31st March 2005, 10:11
how does something like this sound?
avi in
DGBob double rate
MVTools to 48fps.
and then.. beats me. i wouldn't want to just dump 50% of all that information.
weave and decomb?
scharfis_brain
31st March 2005, 14:46
http://forum.doom9.org/showthread.php?s=&threadid=89601
bob your video to 59.94 fps and use myfps afterwards to alter the fps to 23.976 and the motionblur.
XviDEncoder
31st March 2005, 20:27
that topic is about going from low framerates to higher ones. should the same things be true for downsampling?
scharfis_brain
31st March 2005, 20:30
mvfps() handles both ways very nice.
XviDEncoder
31st March 2005, 21:58
AviSource("C:\test.avi")
function mvfps(clip i, float fps, int "oversample", int "blurradius")
{
oversample=default(oversample,1)
blurradius=default(blurradius,1)
j=i.temporalsoften(4,4,8)
fwd=mvanalyse(j,isb=false,lambda=4000)
bwd=mvanalyse(j,isb=true, lambda=4000)
i.mvconvertfps(bwd,fwd,fps=fps*oversample)
(oversample>1) ?
last.temporalsoften(blurradius,255,255,mode=2).selectevery(oversample,0) : last
}
ConvertToYV12()
DGBob(order=0, mode=1, thresh=12)
mvfps(23.976)
I don't have SSE so temprol soften doesn't work.
but. i'm having some problems with this script and virtualdub. if i put ConvertToYUY2() or ConvertToRBG() at the end of the script, i get a blank clip when opened in virtualdub. i don't even know if i have a program that opens YV12 streams.
XviDEncoder
1st April 2005, 03:03
so i got this script to work
AviSource("C:\Documents and Settings\Nathan\Desktop\test.avi")
function mvfps(clip i, float fps, int "oversample", int "blurradius")
{
oversample=default(oversample,1)
blurradius=default(blurradius,1)
j=i.temporalsoften(2,4,5)
fwd=mvanalyse(j,isb=false,lambda=4000)
bwd=mvanalyse(j,isb=true, lambda=4000)
i.mvconvertfps(bwd,fwd,fps=fps*oversample)
(oversample>1) ? last.temporalsoften(blurradius,255,255,mode=2).selectevery(oversample,0) : last
}
ConvertToYV12()
DGBob(order=0, mode=1, thresh=12)
mvfps(23.976, 20, 2)
there is some visible artifacting and such. what would be some recommended oversampling, and blurring values for this framerate? would these values be variable to the motion of the clip?
dbzgundam
1st April 2005, 04:24
I have MVTools 0.9.9.1 but I get "No such command as MVConvertFPS"
Huh?
XviDEncoder
1st April 2005, 04:47
it was taken out at a certain version
i use 0.9.6.2
google it. i forgot where i got it.
but after trying it out. i kindof like the look of Dynapel Motion Perfect better. and its all about what you think looks good. i may need to work with the script a little more. but i don't really like the idea of motion blurring. for some reason any blurring that isn't really needed. or only used to cover up artifacts doesn't seem to cool to me. some say it makes it have more natural flow. but i mean, if you shoot film with a high shutter speed. same 24fps. less blur. so blurring doesn't really make film what it is.
but. well converted 24p material looks very very different than 30i. 30i has very smooth motion. like a soap opera. or the news.
i'm gonna try Hicon32 out tonight. I'll post my opinion about the results.
Backwoods
1st April 2005, 07:49
Originally posted by XviDEncoder
30i has very smooth motion. like a soap opera. or the news.
Because they are shot with 30i.
There is a blur to 24p captured on film. Go frame by frame on some movies, you'll see it. The added blur is needed when converting to 24p from 30i. Do some tests with and without blur, also with less blur. Find which setting is pleasing to you. I know the idea of bluring doesn't sound right and you just do not want to, but there is a need for it.
Mug Funky
1st April 2005, 10:50
and i know that professional NTSC > PAL conversions don't have this.
hehe... i wish.
the extremely expensive converters will do what you say (and more), but most of the converters simply blend fields (and the expensive ones will blend fields if they're unable to motion-compensate properly, like if there's insufficient motion-blur in the source, or none at all like with anime).
my advice: if you're not actually going to print this footage to film, just leave it as is :)
btw, some 60i -> film conversions are horrible... look at Supersize Me, Tibet, Cry of the Snow Lion or any other film release with a relatively low budget.
a lot of the time it's just "average 3 fields, average 2 fields, average 3 fields, average 2 fields...."
scharfis_brain
1st April 2005, 11:23
a lot of the time it's just "average 3 fields, average 2 fields, average 3 fields, average 2 fields...."
hehe. This is the way, that my function
convert60ito24p()
goes.
A more advanced way to do a 60i-Video to 24p-Film transfer reaches this function:
function mv60ito24p(clip x, int "mode")
{
mode = default(mode,2)
mbl=0.1
fwd=mvtools0962_mvanalyse(x,isb=false,lambda=4000)
bwd=mvtools0962_mvanalyse(x,isb=true, lambda=4000)
y=x.mvtools0962_mvinterpolate(bwd, fwd, nb = 4,bl = 0.5-mbl, el = 0.5+mbl, wf = "uniform")
interleave(y,x)
mode0=selectevery(5,2)
mode1=overlay(selectevery(5,3),selectevery(5,2),opacity=0.5)
mode2=overlay(overlay(selectevery(5,1),selectevery(5,3),opacity=0.5),selectevery(5,2),opacity=0.3)
mode3=overlay(overlay(selectevery(5,0),selectevery(5,3),opacity=0.5),overlay(selectevery(5,1),selectevery(5,2),opacity=0.5),opacity=0.5)
(mode==0) ? mode0 : (mode==1) ? mode1 : (mode==2) ? mode2 : mode3
}
together with my mvbob() it currently is unbeatable in terms of
- image detail :)
- motion fluidity :)
- speed ;) (yeah, it is a CPU-killer!)
- costs! all software needed is for free :)
here a sample: http://home.arcor.de/scharfis_brain/mvbob/filmlook-anamorphicD1.avi
It has been done using this functions:
avisource("4x3-NTSC-60i").assumetff()
mvbob(...)
crop(0,60,0,-60) # crop 4:3 to 16:9
resize(width,480) # anamorphic upscale
mvfps(...) # convert 60i to 24p
limitedsharpen(...) # sharpen edges
Didée
1st April 2005, 15:22
@ scharfis_brain
Compare yourself
Overlay( a, b, opacity=0.5 )
with
BL = "x y + 2 /"
YV12lutxy( a, b, BL,BL,BL, Y=3,U=3,V=3 )
in terms of speed. For me, in a clinic test with 10 chained instances, performance of the YV12lutxy() variant is 250% ~ 300% of the Overlay() one.
Then, your frame arrangement through SelectEvery() is not optimally ordered to perform the blending - this slows down especially mode=3. A sequential order performs much better.
After integrating the following:
function yv12average(clip clp1, clip clp2, float "amount", int "l", int "c")
{
amount = default(amount, 0.5)
l = default(l, 3)
c = default(c, 3)
BL="x "+string(1.0-amount)+" * y "+string(amount)" * +"
yv12lutxy(clp1,clp2,BS,BS,BS,Y=l,U=c,V=c)
}
###
mode2 = yv12average( yv12average(selectevery(5,1),selectevery(5,2),amount=0.46), selectevery(5,3),amount=0.35 )
mode3 = yv12average( yv12average(selectevery(5,0),selectevery(5,1)), yv12average(selectevery(5,2),selectevery(5,3)) )
###
producing "mode3" directly from a source (without mvinterpolate'ing), speed jumped from ~10.2 fps to ~15 fps. For mode=2, it was about ~13.2 fps vs. ~17.5 fps.
Of course this doesn't help on the mvinterpolate part, but still: unnecessarily throwing CPU cycles down the drain in the averaging part should be avoided.
BTW, mode=2 could be also done by temporalsoften(1,255,255,255,2).selectevery(5,2) (except for the slightly non-symmetric blending you use for mode=2). However, although the operation seems more simple, performance was a tad worse (minus ~0.5 fps) then yv12average().
scharfis_brain
1st April 2005, 15:55
haahaa, I just took out the old function, modifyed it, took a look whether it worked and then posted it
without caring about speed or the special blending.
I will take a closer look later.
dbzgundam
3rd April 2005, 07:23
This is probably a stupid question (considering the nature of the material), but could there at least be *feasible* solution be used on anime that has 30fps effects? (Gundam Seed is almost entirely 30fps)
Ignoring blur/ghosting for now, how would one go about getting rid of the annoying artifacting of MVTools? (Or is that a side effect of the ghosting)
http://x2.putfile.com/4/9200205390.png
Scipt used:
Import("F:\Encoding Stuff\MiscAVS\mvfps.avs")
Import("F:\Encoding Stuff\MiscAVS\mv60ito24p.avs")
Import("F:\Encoding Stuff\MiscAVS\Fastlinedarken_1.3.avs")
MPEG2Source("F:\Encoding Stuff\GUNDAM_SEED_VOLUME_01\VIDEO_TS\d2v.d2v",ipp=true,cpu=1,idct=7)
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MVTools-v0.9.9.1\MVTools.dll")
Telecide(1)
b=MVAnalyse(isb=true)
f=MVAnalyse(isb=false)
g=MVInterpolate(last, b, f, nb=1, bl=0.5, el=0.5, fbw=4).Trim(1,0)
Interleave(last,g)
mv60ito24p(mode=3)
Note: The material is almost entirely progressive, if that matters (I think it does ^^;;), telecide is merely there to remove a couple of combs that appear on three or four effects in the entire episode.
Leak
3rd April 2005, 10:43
Originally posted by dbzgundam
Ignoring blur/ghosting for now, how would one go about getting rid of the annoying artifacting of MVTools? (Or is that a side effect of the ghosting)
Are you sure using MVTools on anime is a good idea? MVTools is probably best used with live action material, as the motion there is mostly smooth and except for scene changes there's almost no huge changes in the image (or the huge changes are motionblurred, in the case of fast action).
I don't think MVTools has much chance of finding good motion vectors with anime, as far as the actual animation is concerned (pans and zooms are of course a different matter) - why not you try using TIVTC to apply inverse telecine or blending where appropriate?
np: DJ Koze - Brutalga Square (Speicher 2)
Mug Funky
3rd April 2005, 11:05
(Gundam Seed is almost entirely 30fps)
there's your answer... encode it at 30fps :)
the actual cel animation (well, it's rarely done with cels anymore, but...) is usually very minimal in anime, and only very very rarely will it live up to 24fps - even the big budget animations will only be animated at 12fps unless there's special stuff happening, so it seems that 30p is the lesser of 2 evils - you're far less likely to notice problems with something like Gundam Seed (which i've somehow never watched, though i'll have to look at it next week) if you decimate to 30p.
scharfis_brain
3rd April 2005, 12:18
@dbzgundam: for 30p -> 24p you went a totally weird way here, introducing artifacts.
Try this:
Import("F:\Encoding Stuff\MiscAVS\mvfps.avs")
Import("F:\Encoding Stuff\MiscAVS\Fastlinedarken_1.3.avs")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MVTools-v0.9.9.1\MVTools.dll")
MPEG2Source("F:\Encoding Stuff\GUNDAM_SEED_VOLUME_01\VIDEO_TS\d2v.d2v",ipp=true,cpu=1,idct=7)
Telecide(1)
mvfps(23.976)
dbzgundam
3rd April 2005, 18:48
Originally posted by Mug Funky
there's your answer... encode it at 30fps :)
the actual cel animation (well, it's rarely done with cels anymore, but...) is usually very minimal in anime, and only very very rarely will it live up to 24fps - even the big budget animations will only be animated at 12fps unless there's special stuff happening, so it seems that 30p is the lesser of 2 evils - you're far less likely to notice problems with something like Gundam Seed (which i've somehow never watched, though i'll have to look at it next week) if you decimate to 30p.
Oh, how I miss good old cels. ;)
But yeah, I have been encoding this as 30p for a while now, and it's just annoying to me. It's not a question of filesize or anything either (Due to the extra frames), it's merely my hatrid for the look of 30fps effects in anime. :angry:
And scharfis_brain, I'm still getting artifacts with that method, and in higher numbers! (despite how simplistic it seems ;) ) :(
Now that I revisit the function, your old Convert60ito24p seems to give "cleanest" result, and something tells me it wouldn't be so displeasing in the ghosting department if somehow the blended frames could be motion blurred... :D
scharfis_brain
3rd April 2005, 19:19
Originally posted by dbzgundam
And scharfis_brain, I'm still getting artifacts with that method, and in higher numbers! (despite how simplistic it seems ;) ) :(
then play with oversample and blurradius of mvfps()
XviDEncoder
4th April 2005, 10:24
scharfis_brain
on the sports girl clip. which looks better? the original 60i? or the 24p?
And btw. Awesome conversion. I think it looks better than alot of professional conversions. and its all with free tools!
scharfis_brain,
I'm using mvfps to do 25i to 25p conversion and it's worked great, however on scene changes/cuts with motion it's leaving blocky artifacts. Is there a way to detect scene changes?. It's only minor and hardly noticable, but a solution or any tips for dealing with it would be great.
@ nexx:
old story (http://forum.doom9.org/showthread.php?s=&threadid=90271&) ;)
I ever wondered why that thread got no replies ...
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.