VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 36
Thread
  1. Hi everyone,

    I am looking for a tool which is able to convert 29.97 fps, 30 fps to 25 fps and vice-versa. Preferably in the batch because I have many files with different fps.
    The resulting video should be smooth in terms of frames - no visible dropped-frames, no ghosting.
    What would you recommend ?

    Thanks
    Quote Quote  
  2. One can only ask "why"? If they aren't native 25fps, why? If they are films then they can be IVTC'd to 23.976fps and then speeded up to 25fps without dropped frames. Is there a sample available of one of these?
    Quote Quote  
  3. Hi,

    I live in Europe where the standard is 25 fps. My camera captures at 25 fps. The smartphone captures video at 29.970 fps. I want to build a long video which contains segments taken from both camera and phone.
    At the following link I uploaded a 8 secs video, for testing purposes. It is 29.97 fps footage taken from the phone. Please try to convert it at 25 fps without ghosting effect and keeping audio in sync.

    https://mega.nz/#F!EVc00aJS!zhNbI6CnLs7RyaMorcB3WQ

    Thank you
    Quote Quote  
  4. An alternative AVIsynth approach might be to try optical flow - maybe using MVTools? ...
    It only needs a simple script (sample script attached). Converted sample of your clip using that technique also attached..
    Image Attached Files
    Quote Quote  
  5. Originally Posted by pippas View Post
    An alternative AVIsynth approach might be to try optical flow - maybe using MVTools? ...
    It only needs a simple script (sample script attached). Converted sample of your clip using that technique also attached..
    JVRaines' suggestion of FrameRateConverter uses MVtools2.

    Originally Posted by marius2du View Post
    The resulting video should be smooth in terms of frames - no visible dropped-frames, no ghosting.
    That's generally not possible. Though FrameRateConverter and other optical flow (aka motion interpolation) filters can work fairly well with panning shots, they will resort to blending or generate gross distortions with complex motions.
    Quote Quote  
  6. Originally Posted by jagabo View Post

    JVRaines' suggestion of FrameRateConverter uses MVtools2.
    Ah .. sorry, I hadn't realised that....
    So (as you have already noted)FrameRateConverter has many of the same advantages and disadvantages as using MVTools...
    i.e results can be impressive -- but not always!
    Quote Quote  
  7. Mr. Computer Geek dannyboy48888's Avatar
    Join Date
    May 2007
    Location
    Texas, USA
    Search Comp PM
    What's the target media?
    if all else fails read the manual
    Quote Quote  
  8. Originally Posted by pippas View Post
    An alternative AVIsynth approach might be to try optical flow - maybe using MVTools? ...
    It only needs a simple script (sample script attached). Converted sample of your clip using that technique also attached..
    @pippas, @JVRaines Thank you for support. Your conversion to 25 fps looks adequate - there still might be some visible dropped frames during the motion- but I want to test a longer footage using your technique, to see if audio stays in sync. Therefore could you please elaborate the steps on how to perform the conversion, how to apply the script. I have never used AVIsynth or MVTools before.

    Originally Posted by dannyboy48888 View Post
    What's the target media?
    The target media would be mp4 or m2ts, 25 fps. I am using NLE to edit these files. By the way, Vegas is not doing such great job when handling videos with different fps (or maybe I am missing something).

    Is there any professional video fps converter (free/not free, does not really matter)?

    Thx
    Quote Quote  
  9. Originally Posted by marius2du View Post
    ...but I want to test a longer footage using your technique, to see if audio stays in sync.
    The length remains the same; the audio remains in synch.
    Is there any professional video fps converter (free/not free, does not really matter)?
    Professional? Any interpolating program will have problems, The AviSynth solutions are as good as any and better than most. But, as jagabo mentioned, the sample provided doesn't really demonstrate the problems you'll run into trying to do this.
    Quote Quote  
  10. OK.
    I started using Avisynth with VirtualDubMod. I loaded the script provided here, in this thread, renamed it from txt --> avs (30 to 25fps sample script.avs), edited the first line:
    avisource("test.mp4")
    The script and the mp4 file are in the same folder.
    Any attempt to open the avs file, in VirtualDubMod gives me the following error:
    Avisynth open failure: AviFileSource couldn't open file "test.mp4" (C:\Users\.... line1)

    Then, I see the other suggestion mentioned here: use FrameRateConverter filter for AviSynth. I downloaded the FramerateConversion script but this one has the extension *.avsi, not *.avs. What is the difference between avs and avsi ?

    As I said, I am newbie for Avisynth.........
    Quote Quote  
  11. I've had a similar issue, and opted to convert the 25 FPS footage to 29.97 FPS, rather than the other way around. I had other considerations (29.97 FPS part badly needed stabilization, which wouldn't have worked well with a framerate change), but generally speaking, isn't it the better choice, with regards to fluidity of playback ? (Adding duplicated frames should be less detrimental than getting rid of random frames, which is irreversible.) Is there a reason why you need / want 25 FPS ? Even if it's not standard, all software players and most hardware players should be able to handle 29.97 FPS.

    This reply by StainlesS might interest you :
    https://forum.doom9.org/showthread.php?p=1859267#post1859267
    I have not yet tried this method, if I understand correctly, the idea is to choose which frames to duplicate or decimate based on their estimated level of relative motion; it also randomizes the time interval between duplications / decimations, making the resulting stutter less noticeable.

    By the way, Vegas is not doing such great job when handling videos with different fps (or maybe I am missing something).
    What does it do exactly ?

    Any attempt to open the avs file, in VirtualDubMod gives me the following error:
    Avisynth open failure: AviFileSource couldn't open file "test.mp4" (C:\Users\.... line1)
    I feel like a newbie too, considering how vast and versatile that thing is...
    But in this case, it's normal, AVISource is meant to open AVI files, for MP4 files you could use FFVideoSource, which requires ffms2.dll, or LWLibavVideoSource which requires LSMASHSource.dll.

    What is the difference between avs and avsi ?
    Roughly, if I'm not mistaken, .avs are user scripts, meant for a particular purpose, while .avsi are general purpose scripts containing one or more functions which can be called inside user scripts, instead of having to copy the whole function script (which can be quite long) inside the user script. If an .avsi file is placed in Avisynth's “plugins” directory, it's loaded automatically; if it's located elsewhere, it has to be first loaded within the user script (with “Import("D:\PathToTheScript\NameOfTheScript.avsi") ”), before calling the name of the relevant function.
    Last edited by abolibibelot; 25th Dec 2018 at 04:35.
    Quote Quote  
  12. Originally Posted by marius2du View Post
    As I said, I am newbie for Avisynth.........
    You may need to take a little time to get acquainted with the concept of Avisynth...There are quite lot of guides online....
    Maybe start here?: http://avisynth.nl/index.php/Guides
    Last edited by pippas; 25th Dec 2018 at 04:29.
    Quote Quote  
  13. Originally Posted by pippas View Post
    Originally Posted by marius2du View Post
    As I said, I am newbie for Avisynth.........
    You may need to take a little time to get acquainted with the concept of Avisynth...There are quite lot of guides online....
    Maybe start here?: http://avisynth.nl/index.php/Guides
    Actually I started here:
    https://www.youtube.com/watch?v=RXByaCFgIHc
    This tutorial is indicated on Avisynth's download VideoHelp webpage ("Avisynth video tutorials").
    Quote Quote  
  14. Originally Posted by abolibibelot View Post
    What does it do exactly ?
    It will introduce ghosting or dropping frames (quite visible) when you toggle resample function.

    I have not yet tried this method, if I understand correctly, the idea is to choose which frames to duplicate or decimate based on their estimated level of relative motion; it also randomizes the time interval between duplications / decimations, making the resulting stutter less noticeable.
    I feel like a newbie too, considering how vast and versatile that thing is...
    But in this case, it's normal, AVISource is meant to open AVI files, for MP4 files you could use FFVideoSource, which requires ffms2.dll, or LWLibavVideoSource which requires LSMASHSource.dll.
    When I read this I already find it complex and time consuming. Where should I copy the dll files ? Or is something else I need to install ? That's why I say that I would even pay for a software capable of converting NTSC to PAL or 29.97 fps to 25 fps or both ways or whatever. Conversion in good quality, not decent. I am not saying that I want a one-click solution, I am just looking for a user-friendly piece of tool.
    And I don't think this forum is exclusively dedicated to Avisynth. Or ?
    Quote Quote  
  15. Originally Posted by marius2du View Post
    I am not saying that I want a one-click solution, I am just looking for a user-friendly piece of tool.
    Twixtor is commercial software that uses optical flow -- and is available for use with Vegas

    See here: https://revisionfx.com/products/twixtor/
    Quote Quote  
  16. Originally Posted by marius2du View Post
    Hi,

    I live in Europe where the standard is 25 fps. My camera captures at 25 fps. The smartphone captures video at 29.970 fps. I want to build a long video which contains segments taken from both camera and phone.
    I would suggest to convert the 25fps clips to 29.97 using standard telecining. Every player should play it.
    Quote Quote  
  17. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Originally Posted by marius2du View Post
    Your conversion to 25 fps looks adequate - there still might be some visible dropped frames during the motion- but I want to test a longer footage using your technique, to see if audio stays in sync. Therefore could you please elaborate the steps on how to perform the conversion, how to apply the script.
    What you are seeing is less-smooth motion, which is to be expected in any video at a lower frame rate. FrameRateConverter does not drop frames.

    AviSynth is an invisible server application. Applications which know how to talk to it, such as VirtualDub, hand it a script and AviSynth returns frames in a pseudo-filestream. Here is the script I used. It requires AviSynth plus the FFmpegSource, MaskTools, MVTools, and FrameRateConverter plugins.

    Code:
    FFmpegSource2("test.mp4", atrack=-1)
    FrameRateConverter(25)
    Quote Quote  
  18. Originally Posted by abolibibelot View Post

    By the way, Vegas is not doing such great job when handling videos with different fps (or maybe I am missing something).
    What does it do exactly ?
    It does what every NLE does for frame rate conversions either :
    1) duplicate or drop frames (smart resample off in vegas)
    2) blend frames (smart resample on in vegas)

    The 3rd method is 3) optical flow or interpolation , which are those mvtool2 derivatives or commerical options like twixtor . Most NLE's don't have this option by default. As jagabo mentioned above - some shots work ok, but you will get 100% definitely get bad artifacts such as ghosting, blobby edge morphing artifacts in other situations. It's not clean without lots of manual clean up work or user intervention of some sort
    Last edited by poisondeathray; 25th Dec 2018 at 10:34.
    Quote Quote  
  19. Originally Posted by marius2du View Post
    What is the difference between avs and avsi ?
    The only difference is that AVSI scripts, when located in AviSynth's plugins folder, will load automatically every time AviSynth is used. You typically use them to make often used functions available without having to manually import them into your scripts.
    Quote Quote  
  20. Where should I copy the dll files ? Or is something else I need to install ?
    In Avisynth's “plugins” directory as I said. Or anywhere you want, but if it's not in the “plugins” directory you have to explicitly import the needed DLL plugins within the script.
    For instance, I have scripts I used recently where LSMASHSource is imported from MeGUI :
    Code:
    LoadPlugin("C:\Logiciels autonomes\MeGUI\tools\lsmash\LSMASHSource.dll")
    LWLibavVideoSource("20151224_100029.m2ts", threads=1)
    Just because it happened to be there. If I copy that DLL file into the “plugins” directory (inside the Avisynth or Avisynth+ directory, which should be inside “Program Files (x86)”), the first line is no longer required because all DLL files put there are loaded automatically (same for AVSI files). Some experienced Avisynth users advise to only put in the auto-load directory the plugins which are used constantly, because loading too many plugins at the same time could have adverse effects.

    From “poisondeathray” :
    Autoloading directory will attempt to autoload everything. If there is a problematic .dll, it will give you error message, even if it's not used in the script. That's why some people keep very clean autoload directory (sometimes empty). Some prefer to manually load everything (LoadPlugin). I keep minimal autoload (so in between; only frequently used items are autoloaded for me). Another reason is it's slower with more "junk" in the autoload directory to initialize avisynth, because everything is loaded.
    And yes, that's one of the tedious aspects of Avisynth : for every single filter / function, you have to check if all the dependencies (DLL / AVSI) are already on your system, and if not find them and download them one by one... Sometimes a required plugin has vanished from its original source, ’cause it was made 10 years ago and the author himself vanished and noone cared to put it in a safe, convenient place, and you have to track it down on Archive.org ! But most of the commonly used ones are well maintained and usually relatively easy to find. There are some packages which contain a collection of common plugins, or plugins necessary for a particular kind of purpose... And there are conversion GUIs which rely on Avisynth and include a selection of prominent plugins, like MeGUI or StaxRip.

    And I don't think this forum is exclusively dedicated to Avisynth. Or ?
    No, but despite its steep learning curve and many annoyances, it's tremendously powerful and versatile; for some tasks you have to pay a hefty price to get a commercial tool performing at least as well.

    Question : is there a VirtualDub plugin for framerate conversion which is performing as well as the MVTools-based Avisynth functions ? This may be a tad more user-friendly...
    Last edited by abolibibelot; 25th Dec 2018 at 15:39. Reason: added quote
    Quote Quote  
  21. And I don't think this forum is exclusively dedicated to Avisynth. Or ?
    I wish Vapoursynth was pushed in here more often. I know no audio support, but if working with NLE, you just fix video and use audio from original. There is packages out there now (FATPACK) that is portable, no installations, all filters available, editor included, all 64bit, you can load avisynth script as well, threaded , not like Avisynth. I loaded first time QTGMC and it was using 100% of CPU. You can easily limit RAM and it works. You choose number of threads (if not using defaults).

    And it has a curve as well. Because it is Python you can immediately have access to all moduls in Python, thousands of scripts available. You can have about 10 lines in the script to get graphical preview of your script yourself using opencv, etc., etc.
    Last edited by _Al_; 25th Dec 2018 at 16:08.
    Quote Quote  
  22. After intensive testing (including the file I have attached here - "test.mp4") I found out that Premiere will do the perfect conversion from 29.97 to 25fps, using Optical Flow. Unfortunately Vegas does not have this feature implemented(?) (yet?).

    Thank you everyone for your suggestions!
    Quote Quote  
  23. Good to know, maybe they are using some codes from After Effects to spice up Premiere because it is trendy to create slow-mo nowadays. Vegas might be behind now regarding that.

    Note that results also might differ depending on what your shutter speed actually was. If it was very short and all objects in frames are pretty sharp and defined and in the background, it is going to be more prone to artifacts at the end, more visible artifacts.
    Quote Quote  
  24. No, it's different than the "pixel motion" or "timewarp" algorithms that AE uses - PP has had optical flow since CC2015, but it uses GPU acceleration

    I wouldn't call it "perfect" like he's calling it. Maybe he's not looking closely enough, or only very limited testing

    It has the same problems with edge morphing artifacts as every other optical flow solution. Some shots are riddled with artifacts and just unsuable. Some shots work ok with only minor artifacts
    Quote Quote  
  25. Okay, I get back to you guys to let you know that I have started using Avisynth once in a while. On some of my rendered clips, Premiere's Optical Flow will produce more likely the so-called opera effect, that is how I perceive it. And then, to avoid this, I am using Avisynth with the code posted by @JVRaines:

    Code:
    FFmpegSource2("test.mp4", atrack=-1)
    FrameRateConverter(25)
    Using the above code for conversion of 29.97 fps progressive to 25 fps progressive is what I want, and looks good.
    For conversion of 25 fps interlaced to 29.97 fps progressive "FrameRateConverter(29.97)" will not do such a good job. Or maybe I need to add a line for interlaced video, like AssumeTFF() ?

    Thx
    Quote Quote  
  26. Originally Posted by marius2du View Post
    For conversion of 25 fps interlaced to 29.97 fps progressive "FrameRateConverter(29.97)" will not do such a good job.
    You need to deinterlace before the frame rate conversion. If you really want 30p from 30i:

    Code:
    Yadif(mode=0) #30i to 30p
    If you want more jerky 25p:
    Code:
    Yadif(mode=0) # 30i to 30p
    FrameRateConverter(25)
    Quote Quote  
  27. He wants 25i to 29.97p now, so
    Code:
    Yadif(mode=1)
    FrameRateConverter(30000, 1001)
    ?
    Quote Quote  
  28. Oops. You're right. I read the post wrong. I don't think FrameRateConverter() allows 50p to 30p.
    Quote Quote  
  29. Oh, it only increases the frame rate? Too bad.
    Quote Quote  



Similar Threads

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