VideoHelp Forum




+ Reply to Thread
Results 1 to 18 of 18
  1. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    So I got a video that seemed to be recorded at a shitty webcam shutter speed so 3/4 of the frames are doubled. Having ripped out all the duplicate frames leaves the video at about 7.5 fps. I need a framerate converter that employs a modern scheme to interpolate missing frames, something like this. Anyone know the best out there?
    Quote Quote  
  2. In my experience MvTools is better than MSU's FRC. But all of the motion compensated frame rate conversion tools don't do well with some types of material. You may find that leaving your video at 7.5 fps, or simply duplicating frames will work better.

    Bad example with MvTools:

    mvt.avi

    Code:
    function SmoothFPS(clip source, float fps) { 
    fp=fps*100
    backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1) 
    # we use explicit idx for more fast processing 
    forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1) 
    cropped = source.crop(4,4,-4,-4) # by half of block size 8 
    backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2) 
    forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2) 
    return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=int(fp),den=100, idx=1,idx2=2) 
    }
    I started with a 29.97 fps progressive video, decimated it to 7.5 fps, then used SmoothFPS(29.97) to interpolate back to 29.97 fps.
    Quote Quote  
  3. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    The frames already were duplicated, hence the decimating and ending up with an fps of 7.5. I'm not really aiming at restoring it to 30 fps; 15 is just fine, as long as it's not 7.5. The jagged motion is giving me a goddamn headache.

    MVTools seems to have multiple methods. I'm looking for the slowest, most advanced, highest quality and accurate. Which do you recommend? MVFlowFps gets my attention, but I see you using SmoothFPS.

    Oh, and should I use version 1 or 2?
    Quote Quote  
  4. SmoothFPS() calls MvFlowFps2().
    Quote Quote  
  5. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Allright, the contexts in this script confuse the hell outta me and I don't got time to study them, but what's with the "cropped" lines? I don't want my video cropped. And "we use explicit idx for more fast processing" -- I don't want faster processing, I'm aiming for quality. Either way, the script ain't working 'cuz it's incomplete. It says there's no return video clip, but since I have no idea what the mechanism of this algorithm is (splitting and interleaving the processed frames as it looks like) what do I do?

    Code:
    source=("G:\Taber (Jun 19 2009).avi, 750")
    function SmoothFPS {
    fp=fps*100
    backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
    # we use explicit idx for more fast processing
    forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
    cropped = source.crop(4,4,-4,-4) # by half of block size 8
    backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
    forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
    return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=int(fp),den=100, idx=1,idx2=2)
    }
    [/code]
    Quote Quote  
  6. Code:
    function SmoothFPS {
    fp=fps*100
    backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
    # we use explicit idx for more fast processing
    forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
    cropped = source.crop(4,4,-4,-4) # by half of block size 8
    backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
    forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
    return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=int(fp),den=100, idx=1,idx2=2)
    }
    
    source=("G:\Taber (Jun 19 2009).avi, 750")
    SmoothFPS(source, 29.97)
    Quote Quote  
  7. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Now it wants a parameter name. Look, should I scratch the "750?" It says fp=fps*100, as ******* vague as that is I assumed it wanted the source fps x100. Did I get that part right?
    Quote Quote  
  8. Yeah, remove the 750.
    Quote Quote  
  9. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Still expects a parameter name.

    Code:
    source=("G:\Taber (Jun 19 2009).avi") 
    function SmoothFPS(source, 15) {
    fp=fps*100
    backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
    # we use explicit idx for more fast processing
    forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
    cropped = source.crop(4,4,-4,-4) # by half of block size 8
    backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
    forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
    return 
    
    source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=int(fp),den=100, 
    
    idx=1,idx2=2)
    }
    Quote Quote  
  10. function SmoothFPS{...} defines a funtion. You need to call that function with a valid video and a desired frame rate. And since you put the 750 inside the filename I originally assumed it was part of the file name.

    Code:
    function SmoothFPS(clip source, float fps) {
    fp=fps*100
    backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
    # we use explicit idx for more fast processing
    forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
    cropped = source.crop(4,4,-4,-4) # by half of block size 8
    backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
    forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
    return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=int(fp),den=100, idx=1,idx2=2)
    }
    
    source=("G:\Taber (Jun 19 2009).avi")
    SmoothFPS(source, 29.97)
    Quote Quote  
  11. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    I did, notice the function SmoothFPS(source, 15) {? I defined "source" with source=("G:\Taber (Jun 19 2009).avi"), so what's the problem?
    Quote Quote  
  12. I didn't notice you didn't actually open a file with AviSource():

    Code:
    function SmoothFPS(clip source, float fps) {
    fp=fps*100
    backward_vec = source.MVAnalyse(isb = true, truemotion=true, pel=2, idx=1)
    # we use explicit idx for more fast processing
    forward_vec = source.MVAnalyse(isb = false, truemotion=true, pel=2, idx=1)
    cropped = source.crop(4,4,-4,-4) # by half of block size 8
    backward_vec2 = cropped.MVAnalyse(isb = true, truemotion=true, pel=2, idx=2)
    forward_vec2 = cropped.MVAnalyse(isb = false, truemotion=true, pel=2, idx=2)
    return source.MVFlowFps2(backward_vec,forward_vec,backward_vec2,forward_vec2,num=int(fp),den=100, idx=1,idx2=2)
    }
    
    source=AviSource("G:\Taber (Jun 19 2009).avi")
    SmoothFPS(source, 29.97)
    Sorry, I'm not paying much attention because I'm playing games...
    Quote Quote  
  13. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    I'm aware of that. It doesn't make a difference, still gettin' the parameter error. Avisource in the beginning masked previous errors so I left it out.
    Quote Quote  
  14. I made a file called "G:\Taber (Jun 19 2009).avi" and the last script I posted worked exactly as written. Have you installed MvTools?

    source=("G:\Taber (Jun 19 2009).avi") simply defines a text string called source and fills it with "G:\Taber (Jun 19 2009).avi". It doesn't open a video file.
    Quote Quote  
  15. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    I know what Avisource is, and I left it out because Avisynth, interestingly didn't detect this error and just kept on telling me to define my parameters, with or without Avisource(clip).

    Post your working script.
    Quote Quote  
  16. Originally Posted by Xpenguin17
    I know what Avisource is, and I left it out because Avisynth, interestingly didn't detect this error and just kept on telling me to define my parameters, with or without Avisource(clip).
    And how did you expect it to work without a clip?

    Originally Posted by Xpenguin17
    Post your working script.
    smooth.zip
    Quote Quote  
  17. Banned
    Join Date
    Jul 2009
    Location
    United States
    Search Comp PM
    Ok, script now works but what I don't get is why the **** I'd have to input SmoothFPS twice for it to work. I had no idea your repeated instance of "smooth FPS" in the script you posted on the thread as shown below was done on purpose. I thought you were emphasizing the first two important lines, hinting my fuckup.

    Code:
    function SmoothFPS(clip source, float fps)
    SmoothFPS(source, 29.97)
    The (clip source, float fps) also would be understood by any normal person as "insert clip here where it says clip source and framerate where it says fps," and the documentation failed to address this. Yet another retard software developer that can't instruct for shit...

    But whatever, the video is now more fluid and pleasant to watch at 15 fps. It becomes artifacted garbage at 30 but hell if I care. It's way easier on the eyes now.

    Thanks for your help. It really is a step-up from most nerd-ass dipshits on Doom9 that just tell you it's impossible and lecture you about information theory... heh. Thanks again.
    Quote Quote  
  18. The first occurrence of SmoothFPS() is defining a function that will be called later. Everything inside the curly braces is executed when the function is called. I have that function in it's own AVS script and import it with:

    Code:
    Import("C:\Program Files\AviSynth 2.5\plugins\SmoothFPS.avs")
    So I would normally use SmoothFPS like this:

    Code:
    Import("C:\Program Files\AviSynth 2.5\plugins\SmoothFPS.avs")
    source=AviSource("G:\Taber (Jun 19 2009).avi")
    SmoothFPS(source, 29.97)
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!