Log in

View Full Version : Frame doubliing/interpolation for xbox 360


ddxxlll
7th November 2010, 08:58
So I'm a newb to this interpolation game. I use a modified gpu assisted avs script to make my framrate viewing anime 48 instead of 24. Fluid, crispe, beautifull. I love it.

I want to encode it perminantly so I can send it to my friend on a dvd. Xbox's support h264 so it needs to be in that. Right now I have handbreak for encoding, and it works, but it doesn't have the fluid look. I want my script to be applied, and filters.

What do for frame interpolation and x264?

Dark Shikari
7th November 2010, 09:11
So I'm a newb to this interpolation game. I use a modified gpu assisted avs script to make my framrate viewing anime 48 instead of 24.You know most anime is 4, 6, 8, or 12 fps, not 24, right?

aegisofrime
7th November 2010, 10:13
So I'm a newb to this interpolation game. I use a modified gpu assisted avs script to make my framrate viewing anime 48 instead of 24. Fluid, crispe, beautifull. I love it.

I want to encode it perminantly so I can send it to my friend on a dvd. Xbox's support h264 so it needs to be in that. Right now I have handbreak for encoding, and it works, but it doesn't have the fluid look. I want my script to be applied, and filters.

What do for frame interpolation and x264?

Care to share the script? I haven't heard of any GPU assisted frame doubling before.

ddxxlll
7th November 2010, 18:18
Care to share the script? I haven't heard of any GPU assisted frame doubling before.

Only works if its a width of a multiple of 4.
Its assisted, meaning the gpu decodes the video, the cpu interpolates it. Interpolating on a gpu is like something from star wars etc.

multinum=2
multiden=1
SetMTMode(X,X)
ffdShow_source()
super=MSuper(pel=1, hpad=4, vpad=4,rfilter=3,levels=0)
backward_vec1=MAnalyse(super,chroma=false, isb=true, blksize=16, blksizev=16, searchparam=0, plevel=2,levels=0,search = 5)
forward_vec1=MAnalyse(super,chroma=false, isb=false, blksize=16, blksizev=16, searchparam=0, plevel=2,levels=0,search = 5)
backward_re = MRecalculate(super,chroma=false, backward_vec1,blksize=8, blksizev=8, thSAD=200, searchparam=0,search = 5)
forward_re = MRecalculate(super,chroma=false, forward_vec1,blksize=8, blksizev=8, thSAD=200, searchparam=0,search = 5)
MBlockFps(super,backward_re, forward_re, num=FramerateNumerator(last)*multinum, den=FramerateDenominator(last)*multiden, mode=2)
fps=60 #last.framerate()*4
last.CombineFPS(fps, last. MotionFPS(fps, warpfast, move), last.MotionFPS(fps, source = next, warpfast, move))
distributor()

ddxxlll
7th November 2010, 18:19
You know most anime is 4, 6, 8, or 12 fps, not 24, right?

The show is in 24 fps?
IDK what your talking 'bout.

Anyway how do I encode the interpolation I get from my avs script?

multinum=2
multiden=1
SetMTMode(X,X)
ffdShow_source()
super=MSuper(pel=1, hpad=4, vpad=4,rfilter=3,levels=0)
backward_vec1=MAnalyse(super,chroma=false, isb=true, blksize=16, blksizev=16, searchparam=0, plevel=2,levels=0,search = 5)
forward_vec1=MAnalyse(super,chroma=false, isb=false, blksize=16, blksizev=16, searchparam=0, plevel=2,levels=0,search = 5)
backward_re = MRecalculate(super,chroma=false, backward_vec1,blksize=8, blksizev=8, thSAD=200, searchparam=0,search = 5)
forward_re = MRecalculate(super,chroma=false, forward_vec1,blksize=8, blksizev=8, thSAD=200, searchparam=0,search = 5)
MBlockFps(super,backward_re, forward_re, num=FramerateNumerator(last)*multinum, den=FramerateDenominator(last)*multiden, mode=2)
fps=60 #last.framerate()*4
last.CombineFPS(fps, last. MotionFPS(fps, warpfast, move), last.MotionFPS(fps, source = next, warpfast, move))
distributor()

I'm really a newb. But I can follow instructions.

Dark Shikari
7th November 2010, 19:10
The show is in 24 fps?
IDK what your talking 'bout.In anime, most frames are duplicates (particularly when it comes to the animation of objects, e.g. characters). The actual animation is done at a much lower framerate (http://en.wikipedia.org/wiki/Limited animation).

sneaker_ger
7th November 2010, 19:44
Did you try to post a URL?

ddxxlll
7th November 2010, 21:01
In anime, most frames are duplicates (particularly when it comes to the animation of objects, e.g. characters). The actual animation is done at a much lower framerate (http://en.wikipedia.org/wiki/Limited animation).

Agreed. Your right.

So how do I encode the frame interpolation?
The only way I see is if I screen cap it, then compress with x264.
IMO there HAS to be an easier way!

How do I encode my avs script thing in the video?

ddxxlll
7th November 2010, 21:30
So I downloaded megui.
Can I just add the script?
I know nothing about this.
How can I make the script I posted earlier work.

Can someone make me an avs script that outputs everything at 1920x1080 with this

SetMtmode(2,16)
global idx1 = 10
global source=ffdshow_source()
source=changefps(source,source,true)
# assume progressive PAL 25 fps or NTSC Film 23.976 source
idx1 = idx1 + 1
backward_vec = source.MVAnalyse(blksize=16, isb = true, chroma=false, pel=1, searchparam=1, idx=idx1)
# we use explicit idx for more fast processing
forward_vec = source.MVAnalyse(blksize=16, isb = false, chroma=false, pel=1, searchparam=1, idx=idx1)
source.MVFlowFps(backward_vec, forward_vec, num=2*FramerateNumerator(source), den=FramerateDenominator(source), mask=0, idx=idx1)
distributor()


I don't know where to go from here.

nm
7th November 2010, 22:39
How do I encode my avs script thing in the video?
You could use x264 CLI in cmd.exe. It supports AviSynth input directly.

Or try LoRd_MuldeR's x264 launcher (http://forum.doom9.org/showthread.php?t=144140). It should suit you well since you already know something about AviSynth scripts.

For encoding, you'll need to change ffdshow_source() to something else. FFmpegSource2 (FFMS2) and DirectShowSource2 (DSS2) can cover most input formats. So, instead of ffdshow_source(), try something like this:


LoadPlugin("ffms2.dll")
source=FFVideoSource("c:\path\to\input.mpg")

ddxxlll
7th November 2010, 22:50
You could use x264 CLI in cmd.exe. It supports AviSynth input directly.

Or try LoRd_MuldeR's x264 launcher (http://forum.doom9.org/showthread.php?t=144140). It should suit you well since you already know how to write AviSynth scripts.

Dude I don't know anything. I used this script from the internet.
I do not understand how or why it makes anime and live action look really good (frame doubling)

However I'll google it; but this is what I got so far

AviSource("G:\Not_porn\anime\blood_plus\ep1.avi")
BilinearResize(clip clip, int target_width, int target_height)
#Its 640x480 I want it at 1920x1080
#Yeah I know, don't make fun of me
#Yeah I know, its not going to add quality, this is 4 compatibility
#What do I do for max quality resize
#Here is the script I got from the internet for on the fly doubling
#Don't know what to do so I past it here.
SetMtmode(2,16)
global idx1 = 10
global source=ffdshow_source()
#don't know where to put this so I'll append the encoding thing here
LoadPlugin("ffms2.dll")
source=FFVideoSource("c:\path\to\input.mpg")
source=changefps(source,source,true)
# assume progressive PAL 25 fps or NTSC Film 23.976 source
idx1 = idx1 + 1
backward_vec = source.MVAnalyse(blksize=16, isb = true, chroma=false, pel=1, searchparam=1, idx=idx1)
# we use explicit idx for more fast processing
forward_vec = source.MVAnalyse(blksize=16, isb = false, chroma=false, pel=1, searchparam=1, idx=idx1)
source.MVFlowFps(backward_vec, forward_vec, num=2*FramerateNumerator(source), den=FramerateDenominator(source), mask=0, idx=idx1)
distributor()
#Please help I'm dumb
#Also I'm smart enough to understand how to load a dll (in megui) for this to work

nm
7th November 2010, 23:36
Maybe something like this:


SetMtmode(2,16)

global idx1 = 10

FFVideoSource("c:\path\to\video.mpg")

Lanczos4Resize(1280, 720)

source=last
source=changefps(source,source,true)
# assume progressive PAL 25 fps or NTSC Film 23.976 source
idx1 = idx1 + 1
backward_vec = source.MVAnalyse(blksize=16, isb = true, chroma=false, pel=1, searchparam=1, idx=idx1)
# we use explicit idx for more fast processing
forward_vec = source.MVAnalyse(blksize=16, isb = false, chroma=false, pel=1, searchparam=1, idx=idx1)
source.MVFlowFps(backward_vec, forward_vec, num=2*FramerateNumerator(source), den=FramerateDenominator(source), mask=0, idx=idx1)
distributor()

But try a simpler script first; just up to the *Resize part and leave the rest out. I'm not sure if and how the idx stuff is supposed to work here, and the changefps line appears redundant.

Note that you are supposed to edit the "c:\path\to\video.mpg" part to point to your video file.

Also, upscaling to 1080p for compatibility doesn't make any sense because Xbox360 can't play anything over 1080p30. 720p48 might have some chance, but i doubt it. 720p60 should work when encoded with compliant settings. Xbox360 is not the best device for H.264 playback though.