AviSynth Script for Motion Interpolation

For help and support with PS3 Media Server in general
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply.

AviSynth Script for Motion Interpolation

Postby elyts » Wed Apr 04, 2012 5:50 pm

Hey guys,

is it possible to use the following script to double up the framerate of a videofile in the PMS?
When i copied this following script in the AviSynth script section, it tells me that the data is corrupted.

That is the script:


SetMemoryMax(1080)
SetMTMode(3,8)
ffdShow_source()
SetMTMode(2)
#change pel=1 to pel=2 if you have enough power left; however max CPU load should not exceed 75%;
super=MSuper(pel=1, hpad=16, vpad=8)
#change searchparam=1 to 2 or 3 if you have no artifacts; The higher the number, the smoother it is;
backward_1=MAnalyse(super, chroma=false, isb=true, blksize=32, blksizev=16, searchparam=1, search=3, badrange=(-24))
forward_1=MAnalyse(super, chroma=false, isb=false, blksize=32, blksizev=16, searchparam=1, search=3, badrange=(-24))
backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=16, blksizev=8, searchparam=1, search=3)
forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=16, blksizev=8, searchparam=1, search=3)
MBlockFps(super, backward_2, forward_2, num=50, den=1, mode=2)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last


Greetings
Last edited by elyts on Thu Apr 05, 2012 6:39 am, edited 1 time in total.
elyts
 
Posts: 17
Joined: Wed Apr 04, 2012 5:39 pm

Re: AviSynth Script for 50FPS

Postby meskibob » Wed Apr 04, 2012 6:08 pm

Use of AviSynth isn't really recommended. I think it would be better to figure out why you want to double the framerate (or convert to 50FPS) and try to find a workable solution with MEncoder before going back to AviSynth.
I provide NO application support via PM or email, so please post your question to the forum.
meskibob
Moderator
 
Posts: 4545
Joined: Mon Jan 19, 2009 4:11 pm

Re: AviSynth Script for 50FPS

Postby elyts » Wed Apr 04, 2012 6:19 pm

Its like an alternative to TrueMotion that is built in in newer TVs. My TV doesn't have this function. I tested the script on my computer and the videos look amazingly smooth. Converting is not an option for me, because it takes too much time.
elyts
 
Posts: 17
Joined: Wed Apr 04, 2012 5:39 pm

Re: AviSynth Script for 50FPS

Postby Zogundar » Thu Apr 05, 2012 5:20 am

meskibob wrote:Use of AviSynth isn't really recommended. I think it would be better to figure out why you want to double the framerate (or convert to 50FPS) and try to find a workable solution with MEncoder before going back to AviSynth.
Is it possible to use just Mencoder with 10-bit videos? I thought you had to use Avisynth/Mencoder or FFMpeg/Mencoder with those.
Zogundar
 
Posts: 34
Joined: Mon Oct 17, 2011 7:16 pm

Re: AviSynth Script for Motion Interpolation

Postby elyts » Thu Apr 05, 2012 11:36 am

if found another post on the forum which is about the same problem.
viewtopic.php?f=6&t=6091

the script used there differs from the one i posted(mvtools2 is used in the script i posted and it should play 24fps videos with 50fps, not 48).
i tested it and i can watch the video, but there is no change in the fps. even though, when i put this script into ffmpeg's avisynth tab on my computer, it works perfectly.

why exactly isnt it recommended to use avisynth in ps3 media? and is there a possibility to realize something like this in PMS?

greetings
elyts
 
Posts: 17
Joined: Wed Apr 04, 2012 5:39 pm

Re: AviSynth Script for Motion Interpolation

Postby SubJunk » Fri Apr 06, 2012 12:01 am

Yeah AviSynth isn't recommended as much as MEncoder but it would be cool to add this feature. I have been thinking of adding an option called true motion or something for a while. I'll look at it :)
SubJunk
 
Posts: 1208
Joined: Fri Mar 27, 2009 5:25 am

Re: AviSynth Script for Motion Interpolation

Postby elyts » Sat Apr 07, 2012 5:39 pm

Nice, tell me if there is any progress :) Maybe it is possible to realize this feature with MEncoder itself
elyts
 
Posts: 17
Joined: Wed Apr 04, 2012 5:39 pm

Re: AviSynth Script for Motion Interpolation

Postby elyts » Tue Apr 10, 2012 8:17 pm

The following script seems to work, if I add

framerate == 23.976 :: -ofps 50 -mt -lavdopts threads=4

to the MEncoder Expert-Settings. But the video stutters like sh**.

#AviSynth script is now fully customisable !
#You must use the following variables ("clip" being the avisynth variable of the movie):
#<movie>: insert the complete DirectShowSource instruction [ clip=DirectShowSource(movie, convertfps) ]
#<sub>: insert the complete TextSub/VobSub instruction if there's any detected srt/sub/idx/ass subtitle file
#<moviefilename>: variable of the movie filename, if you want to do all this by yourself
#Be careful, the custom script MUST return the clip object
<movie>
<sub>
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mvtools2.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\MT.dll")
SetMemoryMax(1280)
SetMTMode(3,8)
clip
SetMTMode(2)
super=MSuper(pel=1, hpad=16, vpad=8)
backward_1=MAnalyse(super, chroma=false, isb=true, blksize=32, blksizev=16, searchparam=1, search=3, badrange=(-24))
forward_1=MAnalyse(super, chroma=false, isb=false, blksize=32, blksizev=16, searchparam=1, search=3, badrange=(-24))
backward_2 = MRecalculate(super, chroma=false, backward_1, blksize=16, blksizev=8, searchparam=1, search=3)
forward_2 = MRecalculate(super, chroma=false, forward_1, blksize=16, blksizev=8, searchparam=1, search=3)
MBlockFps(super, backward_2, forward_2, num=50, den=1, mode=2)
SetMTMode(1)
GetMTMode(false) > 0 ? distributor() : last
return clip


Any way to fix the stuttering? I mean, I stream via LAN and my computer is not really exhausted with the calculating. I beleive it must be a problem with AviSynth or rather MEncoder.
elyts
 
Posts: 17
Joined: Wed Apr 04, 2012 5:39 pm

Re: AviSynth Script for Motion Interpolation

Postby SubJunk » Tue Apr 10, 2012 10:42 pm

elyts wrote:The following script seems to work, if I add

framerate == 23.976 :: -ofps 50 -mt -lavdopts threads=4

to the MEncoder Expert-Settings. But the video stutters like sh**.
Because MEncoder doesn't have any motion interpolation capability; ofps isn't meant for that, and neither is any MEncoder command.

I'm working on the feature and it will probably be released in the next SubJunk Build
SubJunk
 
Posts: 1208
Joined: Fri Mar 27, 2009 5:25 am

Re: AviSynth Script for Motion Interpolation

Postby ExSport » Wed Apr 11, 2012 4:59 pm

SubJunk wrote:I'm working on the feature and it will probably be released in the next SubJunk Build

Hopefully without AviSynth usage :mrgreen:
ExSport
 
Posts: 2107
Joined: Mon Jan 19, 2009 5:40 pm

Next

Return to General Help and Support

Who is online

Users browsing this forum: Google [Bot] and 17 guests