View Full Version : FrameRateConverter (Official)
Pages :
1
2
3
[
4]
5
6
7
8
9
10
11
Groucho2004
28th May 2019, 15:27
AviSynth is closed for understanding. You need use knowledges and logics from ~1990.I still use knowledge and logic from the late 17th century such as Newton's calculus and the laws of gravity. Should we forget about these too?
If Avisynth is so closed to you, try Vapoursynth, maybe that's more to your liking.
By the way - here's (https://www.youtube.com/watch?v=fPV05eZgEpc) a funny video about Millennials.
StainlessS
28th May 2019, 18:03
As I know you used interframe
Actually, that was MvTools2[in interframe thread]. (I have on occasion used interframe, but only ever with defaults, apart from output framerate).
My point was that best place to seek advise was from people that are likely to have used it (avisynth) with your player,
I'm certainly not gonna go figure out how it works and what is required.
Also, if anything should insert filename into an avisynth script, then it is you (or your player, where source script would be some kind of template [probably created by you or your lackey]).
Seriously, player forum best place. If regular AVS user wanted use in player, would likely not even bother to figure out how presets work, would be no effort at all to set up script exactly how he/she/it wanted it.
Dreamject
28th May 2019, 20:07
~_~ it's only one popular project on avisynth (as I know) - SVP, cause it usable, like click and run, but it's not very perfect. If avisynth(vs) will be more usable for people, better postprocessing filter will be.
StainlessS
31st May 2019, 14:37
@G2K4,
Your vs suggestion [EDIT: not to me] was a stroke of genius, thanx muchly :)
MysteryX
1st June 2019, 07:50
Dreamject, most people using Avisynth use it for high-quality video encoding, heavy-processing often running at 1 to 5 fps.
If you want to do high-quality video encoding at 60fps, use FrameRateConverter.
If you want real-time playback, use SVP which uses GPU acceleration but doesn't provide the same level of quality.
Groucho2004, GREAT video!! Shared it on Facebook.
MysteryX
1st June 2019, 13:47
Got tons of more important stuff to do but figured out this would be quick to implement.
FrameRateConverter was doing a great job at identifying artifact areas, but the backup plan sucked (plain frame blending) so the quality of artifact mask wasn't resulting in that much better output -- replacing artifacts with double-shadows. This version eliminates double-shadows and thus greatly enhance the overall result by having clearer pictures in the artifact areas without breaking the motion.
Version 1.3 is ready! (https://github.com/mysteryx93/FrameRateConverter/releases/tag/v1.3)
What's new:
- Greatly enhanced quality in artifact areas! Ghost effect eliminated.
- Added ConvertFpsLimit to blend with reduced blending ratios. Ratio=0 is frame copy and Ratio=100 is full blending. Ratio=50 reduces blending by half.
- Now perform soft blending with a default ratio of 40, meaning frames blending at 50/50 will blend as 20/80 (50 * .4 = 20)
- You can adjust frame blending ratio with BlendRatio
I haven't done much testing to find the best blend ratio but 40 is working good. Post your findings.
Another version could done so that ConvertFpsLimit falls back to the standard ConvertFps or ChangeFps when ratio is 0 or 100, and the soft vs hard blend option can be removed as setting this BlendRatio completely replaces it: hard blend is BlendRatio=0.
MysteryX
1st June 2019, 16:16
I'm just realizing that this program blows every commercial solution completely out of the water for frame interpolation.
videoh
1st June 2019, 16:39
Be careful with your hyperbole!
Dreamject
1st June 2019, 17:25
>I'm just realizing that this program blows every commercial solution completely out of the water for frame interpolation.
How to try it in any player?
MysteryX
1st June 2019, 17:45
>I'm just realizing that this program blows every commercial solution completely out of the water for frame interpolation.
How to try it in any player?
You can open AVS script in MPC-HC but only for preview. As I said twice already, you cannot use this for real-time playback, so I won't repeat it a 4th time.
Dreamject
1st June 2019, 18:43
You said it blows commercial projects, I thought now it's work in real time. BTW svp is not fully commercial, mostly it's free
MysteryX
2nd June 2019, 04:04
Commercial is mostly for video editing softwares such as Optical Flow in Adobe Premiere.
There are other consumer real-time solutions being implemented in graphic cards and TVs, as well as SVP, but real-time consumer interpolation can never equal professional video editing tools.
For consumer (real-time) playback, SVP does the best job. For professional video editing, FrameRateConverter does the best job. Period.
Although both are based on the same old MvTools2 code that nobody really understands. The most critical part is in the DCT modes which I don't think even Pinterf understands that were written 50 years ago. If someone could understand that part and implement new and more modern DCT modes, we could see further quality and/or performance improvement. I'm sure there's been progress in that kind of algorithm over the years.
manolito
2nd June 2019, 07:17
Any chance that somebody could compile a separate ConvertFpsLimit plugin for classic AVS 2.60 which does not require SSE2? The latest FrameRateConverter.dll does not work for my machines.
MysteryX
2nd June 2019, 08:44
Should be pretty easy to do for someone with an older compiler; I only have Visual Studio 2019 installed on my machine, and no XP support. Just copy the project and cut out a few files.
The source code contains a non-SIMD version of GetFrame that is commented so it can be put back easily.
Oh, forgot to mention, the latest version requires VC++ 2019!
btw I'm surprised there are still lots of people using Avisynth with old CPUs. Modern CPUs are designed mostly FOR video encoding; it's pretty much the only use nowadays for such computing power.
wonkey_monkey
2nd June 2019, 10:58
Manolito's dual monitor video processing setup (http://magazine.loyola.edu/issue/fall09/images/stories/mainframe/old_comp.jpg).
ChaosKing
2nd June 2019, 11:02
Manolito's dual monitor video processing setup (http://magazine.loyola.edu/issue/fall09/images/stories/mainframe/old_comp.jpg).With touch support! :O
StainlessS
2nd June 2019, 12:33
MX, can you update first page of thread with current version, still points at v1.0 from 2017.
Thanks.
EDIT: You seem to be using an old Avisynth.h(+) header from 2017 (presume that other headers are likewise dated).
EDIT:
Also, Capi.h has been updated this year,
Alignment.h and config.h were updated 17 days ago.
And C header, avisynth_c.h also updated this year.
Suggest that you update ALL avs+ headers.
Headers on github:- https://github.com/pinterf/AviSynthPlus/tree/MT/avs_core/include
(update at least for next version, dont suppose any great need to update to new ver$ immediately - unless P disagrees).
MysteryX
2nd June 2019, 13:55
Thanks StainlessS, first post updated. Will update headers next time.
StainlessS
2nd June 2019, 16:40
Any chance that somebody could compile a separate ConvertFpsLimit plugin for classic AVS 2.60 which does not require SSE2? The latest FrameRateConverter.dll does not work for my machines.
Having a go, can't promise anything.
Attempting compile on VS2008, requires some headers from VS2010 (C99, stdint.h cstint), currently extracting VS2010 headers, dont know if any further problems will ensue).
Still dont know yet if any .NET crap is needed, if so then will probably abandon attempt.
Wish me luck as you wave me goodbye, ...
EDIT: Nice monitor setup Mani, I miss not havin' wot ewe got.
MysteryX
2nd June 2019, 18:04
nothing .NET-related in there at all
StainlessS
3rd June 2019, 01:58
MX,
I cant really continue.
I got no idea whatever bout how that template stuff works, nor the type auto and other thingy stuff that seems to require minimum VS 2013 (eg constexpr).
I might be able to expand the template to full source, but dont really wanna do that.
So, pretty much about to abandon attempt at Manolito Non SSE2 plug for ConvertFpsLimit().
Havin' said that, I think that I may have discovered why is not working for Mani, when I guess that you probably expected it to work ok.
From Merge.cpp
#include "merge.h"
//#include "merge_avx2.h"
//#include <emmintrin.h> // SSE2
//#include <smmintrin.h> // SSE4.1
#include <xmmintrin.h> // SSE, Not originally included
#include <mmintrin.h> // MMX Not originally included
#include "avs/alignment.h"
#include <stdint.h>
In red missing, could that be the problem ? (maybe just need recompile with the missing headers added [EDIT: or do the ones in BLUE include the lower SSE and MMX headers themselves])
EDIT: I guess I really could do as Mani requested, only supporting v2.60 standard and not avs+ additional colorspaces.
manolito
3rd June 2019, 02:32
I guess I really could do as Mani requested, only supporting v2.60 standard and not avs+ additional colorspaces.
This would be all I need... :)
The reason I would like to have this is that I find this blend concept very intriguing. Maybe this could be used for some other fps conversion tasks where the standard ConvertFPS looks terrible and ChangeFPS is just too jerky.
Nice monitor setup Mani, I miss not havin' wot ewe got.
Yeah, I love it,too. And this was at a time when I still had hair... :D
Cheers
manolito
MysteryX
3rd June 2019, 03:22
Merge.cpp is a direct copy from AVS. If you go in ConvertFpsLimit::GetFrame and comment out SIMD optimization, and uncomment the code right above, then you won't need Merge.cpp at all. It won't be as fast but for testing will work just fine.
StainlessS
3rd June 2019, 04:21
MX,
I've hacked it down to bare bones avs v2.60 std colorspace, no idea yet if it works at all (I no longer have either mmx or iSSE only machines, min P4).
You got any idea what will happen if just using below, compiles ok with the other mmx thing commented out. [merge.cpp]
#include "merge.h"
#include <xmmintrin.h> // SSE, Not originally included
//#include <mmintrin.h> // MMX Not originally included
I really wanna get some sleep soon.
StainlessS
3rd June 2019, 04:32
MX, compiler option "/arch:SSE" or "Not Set" better for PIII ? [VS2008]
Ill try post something before beddy-byes.
MysteryX
3rd June 2019, 05:02
I'm not the one to ask about SIMD optimizations and processor directives, but I'll change something if you point me to something to tweak.
The simple fact is, there's a commented routine in there using no SIMD optimizations at all and not using Merge.cpp -- so can just use that, exclude Merge.cpp from project, set project to no Arch, and it will compile without requiring any specific CPU.
manolito
3rd June 2019, 05:56
I dug out the old johnmeyer torture clip (the one with the antlers) and tested what the new ConvertFPSLimit routine can do. And the results are quite impressive IMO. Download here:
https://www.sendspace.com/file/4rh967
First I just did a blend conversion with a limit of 40, and I believe that it can be very useful in a lot of cases. Just don't step through the frames, you need to watch it in motion.
Then I did some conversions using the old pre-pinterf plugins which restrict the allowed block sizes and do not support deep color and high bitdepth. My simplified mx_fps modded version is also included.
The last thing I did was downloading the latest pinterf plugins and using FRC with default settings and with slowest settings.
All conversions used the default limit value of 40, I think this is a very good compromise. And at least with this clip my simplified mx_fps build with limited options does it just as well as the original FRC version. And IMO the "Slowest" parameter is not worth the speed sacrifice.
Cheers
manolito
StainlessS
3rd June 2019, 05:59
Thanks MX, already done dll's C + MMX/iSSE.
No idea at all if it works or not, wanna get some sleep. [only guarantee is that it compiles]
http://www.mediafire.com/file/mjxsdunsmdd93st/ConvertFpsLimit_v0.01_20190603.7z/file
Will be a nice surprise for me [when I wake] if it dont crash immediately :)
Goodnight.
EDIT: I think the iSSE only happens if 50.0/50.0 blend, otherwise MMX [obviously not in the C only version].
Included VS2008 hacked source.
MysteryX
3rd June 2019, 06:03
Will be a nice surprise for me [when I wake] if it dont crash immediately :)
Would be a nice surprise if it turns into a BSOD that corrupts his BIOS flash memory and grills his CPU.
Then he'd have to buy a new one. (upgrading, preferably)
manolito
3rd June 2019, 07:07
Will be a nice surprise for me [when I wake] if it dont crash immediately :)
Tested the MMX/iSSE version on my ancient machine, works wonderfully, no problems whatsoever. Many many thanks... :D
Cheers
manolito
manolito
3rd June 2019, 07:15
Would be a nice surprise if it turns into a BSOD that corrupts his BIOS flash memory and grills his CPU.
Then he'd have to buy a new one. (upgrading, preferably)
I know that you hate me for my philosophy to support sustainability, no problem... :mad:
My tests with your latest ConvertFPSLimit addition only showed that all these "modernized" plugins and new fancy deep color and high bitdepth capabilities did absolutely nothing to the core conversion quality. I will continue to use older hardware (and repair it instead of buying new gadgets every year), and I do not feel like I am giving up anything.
wonkey_monkey
3rd June 2019, 09:54
and I do not feel like I am giving up anything.
I hope you never need any of my recent plugins then ;)
manolito
3rd June 2019, 10:36
Hi David,
well, I did not need any of your previous plugins so far, and I think I won't need any in the future... :devil:
Just to make things clear, this is my basic profile:
Birth Date: 1953
First Computer: 1986
Turbo Pascal, MASM+TASM, always hated GUI programming
Viewing device: CRT, 100Hz no-flicker
Media streaming box: Xtreamer Sidewinder, no HEVC
Smart Phone: None
Car: None
Motorcycle: Yamaha XJ 900 from 1991
I generally do not care for HD video content, my TV does not support it, and I will not give up this TV set for any LCD because so far nothing can match its natural colors. HDR, Deep Color, High Bitdepth are things I will certainly not explore in my lifetime. And my general goal is sustainability, I refuse to throw away things which work just because they are not in fashion any more.
So you can ridicule me as much as you want, I can live with this.
wonkey_monkey
3rd June 2019, 10:44
Oh, no, I don't ridicule you at all - any teasing is meant in good spirits. If you were to complain about a lack of compatibility for very old systems from new plugins, then perhaps I would, but you don't as far as I know (complaining about a lack of <AVX-512 support would be valid; <SSE, not so much!). And sustainability is a very worthy goal. I hate replacing things unless it's truly necessary and I'm only begrudgingly considering getting a new laptop now because my current one is literally falling to pieces. And even then I may just get the same model from Ebay and swap the parts around.
StainlessS
3rd June 2019, 11:13
no problems whatsoever.
Dont know why, all I did was remove SSE2/AVX stuff, and change to use iSSE header (which presumably also includes the mmx header).
Did not notice anything that could have been responsible for prev probs.
[I presume that there aint any bugs in the VS2008 SSE2/SSE4.1 intrinsic headers.]
[EDIT: Or rather, in the VS2019 (or whatever MysteryX used) headers.]
EDIT: Smart Phone: None
I only just recently upped from non-smart SamSung SGH-E250 (my real phone, I had 3 of them over bout 10/12 years), to Motorola RAZRi (circa 2012, I think), I always fancied
one of those with the Kevlar case back (I wear it in my shirt pocket, just incase I get shot in the heart, might save my bacon). Got about 5 or 6 other
Android phones (but all locked to some network, only use them as Wifi devices). Also [recently] got a Blackberry Samoa, nice little £20.00 unlocked backup phone but browser is crap
as screws up on any HTTPS site. I still miss an old Nokia that I had for a time (non-smart, got nicked), 1661 I think, had 21 day standby, dont get that often on your smarts.
Currently looking at UmiDigi with VoLTE 4G and dual SIM, as next buy [android], or might even get a Lumia 950 XL, now that nobody else wants them (I like being awkward).
Groucho2004
3rd June 2019, 18:13
Just to make things clear, this is my basic profile:You forgot your bra size. :D
Motorcycle: Yamaha XJ 900 from 1991Very nice. I had a XJ650 back in the 80's, loved it.
Dreamject
3rd June 2019, 18:23
>For consumer (real-time) playback, SVP does the best job. For professional video editing, FrameRateConverter does the best job.
What is the problem for realtime processing?
SVP in first releases used mvtools https://www.videohelp.com/software/SmoothVideo-Project/old-versions#downloadold . There is a lot of directions for mvtools, but they just not works in realtime. For my (user) side avisynth is like pixel shader. If it works correct, I do not want to know how it works, its syntax, a code is not interesting for me until it begins works bad.
From quality side, SVP reduces quality of video a lot (it has no noises and frames, it has a lot of artifacts). If you replace all frames to svp frames (or blended frames) it will be bad. By default SVP wants to drop half of original frames in 24fps, dev says in 25fps it wants to leave only 5 original frames. For quality its very bad solution (but maybe good for smoothness). It has settings for autodetection of scenes, but they just do not works in auto mode and you have to create profile manually
real.finder
3rd June 2019, 23:16
manolito, You are older than of my parents
I agree with your CRT vs LCD, but all SONY TVs in our Home dead now, there are no replacement Except LCD and those new technologies like OLED, HD and HDR are good, but I don't mind life with SD things
we have pentium 4 1.7 ghz pc (made in 2001-2002) which I upgrade many things in it previous years and it still work but no one use it
also even if I have Smart Phones I hate use them
manolito
4th June 2019, 02:32
You forgot your bra size. :D
Sorry, forgot about this, but my boobs are not really worth mentioning... :eek:
MysteryX
4th June 2019, 04:40
What is the problem for realtime processing?
You have to cut corner to process at very high speed. It's always a trade-off between quality and performance.
SVP in first releases used mvtools
It's still based on mvtools, except they made their own version with GPU acceleration. Which is why it can render in real-time.
For my (user) side avisynth is like pixel shader. If it works correct, I do not want to know how it works, its syntax, a code is not interesting for me until it begins works bad.
AFAIK VapourSynth is in a more "it just works" state -- although I have yet to port this plugin to it. Even if it works more smoothly with multi-threading and full CPU usage, you can't process heavy script in real-time. In fact, VapourSynth doesn't even have audio support so forget about live playback.
Also, I tried taking the auto-generated script from SVP and running it manually as an AVS script instead of passing through ffdshow. Curiously enough, it rendered better through ffdshow than when opening the clip directly! Problems start occurring when skipping a frame -- when playing the script directly it wants to render every single frame so it never catches up.
Sorry, forgot about this, but my boobs are not really worth mentioning... :eek:
Are you shy?
Dreamject
4th June 2019, 09:18
>It's still based on mvtools, except they made their own version with GPU acceleration. Which is why it can render in real-time.
NO. You can use GPU acceleration, it decrease CPU load, thats it. My laptop has i7 3232QM with hd4000 (nvidia burned) and its not enought for 60fpsSVP 1080p with GPU + deband shader. My cpu can use highest svp profiles. Your words are like 'you even cant play video without gpu decoding"
hfrforever
5th June 2019, 00:09
Hey, I am interested in making this work, but I have almost no experience in scripting (some highschool java and matlab). I have been looking for the past week to see if i can find a decent tutorial on how to make it work properly. I would appreciate any direction you could provide, or point me to some instructions... I am interested in converting some of my videos to 60 fps, but I do not know how to use most of the software involved... what are the prerequisites, and if someone could post a working script, I am quite good at modifying scripts. any help would be appreciated.
MysteryX
5th June 2019, 04:32
if someone could post a working script, I am quite good at modifying scripts. any help would be appreciated.
Both of you, start by learning the basics here
https://www.spirton.com/convert-videos-to-60fps/
then can easily replace InterFrame with FrameRateConverter
hfrforever
5th June 2019, 15:17
I followed the instructions, and I think i have it set up properly
this is my best attempt at making the script work... can someone critique my work please?
also, I am unsure of the file format i am supposed to use, and if i need to convert the mp4, to mkv or avi?
Cores=4
SetMemoryMax(6000)
SetMTMode(4,Cores)
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin"
LoadPlugin(PluginPath+"FrameRateConverter-x64.dll")
Import(PluginPath+"FrameRateConverter.avsi")
<input>.ConvertToYV12()
SetMTMode(2)
<deinterlace>
<crop>
<denoise>
<resize>
InterFrame(Cores=Cores)
hfrforever
5th June 2019, 18:04
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin"
LoadPlugin(PluginPath+"FrameRateConverter.dll")
Import(PluginPath+"FrameRateConverter.avsi")
FrameRateConverter()
# I get an error with this code that says "error parsing avs file, script error: invalid arguments to function 'FrameRateConverter'
StainlessS
5th June 2019, 18:10
hfrforever,
Can you clarify, are you only using Avisynth provided by MeGUI ? [do you have a version of avisynth installed, if so which one].
If using avisynth installed by you, then put plugins in the Avisynth autoload directory, not the MeGUI avisynth_plugin directory, and they will be autoloaded automatically without LoadPlugin thing.
Likewise, *.avsi files are autoloaded from Avisynth plugins directory.
(MeGUI only uses it's own default version of Avisynth, if you do not have your own version of it installed).
Apart from that, you need to have a source clip, your script dont have one, so nothing to process.
EDIT: Also suggest that you forget about multithreading and such until you get the basics sorted out, and let SetMemoryMax default, at least for now.
EDIT:
invalit arguments to function 'FrameRateConverter'
It needs a clip arg.
Suggest try something like
Avisource("D:\MyVideoClip.avi") # This implicitly assigns clip to a special variable called Last (when not explicitly assigned to anything else)
FrameRateConverter() # defaults FrameRate * 2, both takes and produces clip Last
return Last
EDIT: With your own version of Avisynth installed, you can also use eg VirtualDub2 to view/edit script and view results, and load your avs file into MeGUI for final output to eg MP4.
VDub2 AVS script editing via Tools menu. Also good idea to have a good text/script editor.
EDIT: Spotted problem in original script
PluginPath = "C:\Program Files (x86)\MeGUI\tools\avisynth_plugin[B]\" # <<<<<<===== in red, Need directory node separator (BACKSLASH ie '\') at end of path, else BAD PATH.
LoadPlugin(PluginPath+"FrameRateConverter.dll")
Import(PluginPath+"FrameRateConverter.avsi")
FrameRateConverter()
hfrforever
5th June 2019, 19:36
Thank you very much for your thorough answer!
Ok, so to answer your first question, I have avisynth installed separately, and I have the FrameRateConverter plugin in both. I tried your code and got an error saying that it could not open the file. I think it might be because I am trying to use an mp4, but I do not know how to convert it to an avi. also, what is the code for making the FrameRateConverter produce a 60fps result?
Avisource("C:\Users\padge\Documents\test video.mp4") # This implicitly assigns clip to a special variable called Last (when not explicitly assigned to anything else)
FrameRateConverter() # defaults FrameRate * 2, both takes and produces clip Last
return Last
StainlessS
5th June 2019, 20:09
Avisource() only opens AVI files [although it (a little surprisingly) will open WAV audio files].
Can use DirectShowSource () for most files, BUT, everybody will advise against this as DirectShow is not frame accurate.
Suggest either FFMS [FFVideoSource] or LSMash [LSMASHVideoSource for ISO files like mp4, and LWLibavVideoSource for non ISO],
unless AVI or MPG [use DGIndex, MPeg2SourcE("d:\somepath\mympg.d2v"), d2v files created by DGIndex].
Weirdly, FFMS/FFMS2 and LSmash only have threads on Development forum (go figure - devs probably think nobody uses them).
Here script TEMPLATE for Avisynthesizer that I posted a few weeks back:- http://forum.doom9.org/showthread.php?p=1874068#post1874068
I've removed the template insertion point for this post for use without Avisynthesizer.
#ASYNTHER Simple_AVI_LSmash_FFMS_Reader ### EDIT: This line is used only in Avisynthesizer: where template name is Simple_AVI_LSmash_FFMS_Reader.avst
# Requires RT_Stats
###########################
Function GetSeq(String vFn,String "aFn") {
Function IsISOFileName(String s) {s=RT_GetFileExtension(s) Return(s==".mov"||s==".mp4"||s==".m4v"||s==".3gp"||s==".3g2"||s==".mj2"||s==".dvb"||s==".dcf"||s==".m21")}
Function IsRiffFileName(String s) {s=RT_GetFileExtension(s) Return(s==".avi"||s==".wav")}
myName="GetSeq: " aFn = Default(aFn,"") aFn = (aFn=="") ? vFn : aFn
Assert(vFn!="",RT_String("%sVFn Cannot be ''",myName)) vFn = vFn.RT_GetFullPathName IsRiffV = vFn.IsRiffFileName IsIsoV = vFn.IsISOFileName
Assert(aFn!="",RT_String("%saFn Cannot be ''",myName)) aFn = aFn.RT_GetFullPathName IsRiffA = aFn.IsRiffFileName IsIsoA = aFn.IsISOFileName
c=0 a=0
Try { # 1st Try specialized AVI
c = (IsRiffV) ? vFn.AviSource : NOP
(c.IsClip) ? RT_DebugF("AviSource opened Video\n '%s'",vFn,name=myName) : NOP
} catch (msg) { RT_DebugF("Catch: %s",msg,name=myName) }
Try {
a = (c.IsClip && c.HasAudio && aFn==vFn) ? c : (IsRiffA) ? aFn.WavSource : NOP
(a.IsClip && a.HasAudio) ? RT_DebugF("%s opened Audio\n '%s'",(c.IsClip && c.HasAudio && aFn==vFn)?"AviSource":"WavSource",aFn,name=myName) : NOP
} catch (msg) { RT_DebugF("Catch: %s",msg,name=myName) }
# Next try specialized ISO LSMash
Try {
IsOpenV=(c.IsClip && c.HasVideo)
c = (IsIsoV) ? LSMASHVideoSource(vFn) : c
(IsIsoV) ? RT_DebugF("LSMASHVideoSource opened Video\n '%s'",vFn,name=myName) : NOP
} catch (msg) { RT_DebugF("Catch: %s",msg,name=myName) }
Try {
IsOpenA=(a.IsClip && a.HasAudio)
a = (IsIsoA) ? LSMASHAudioSource(aFn) : a
(IsIsoA) ? RT_DebugF("LSMASHAudioSource opened Audio\n '%s'",aFn,name=myName) : NOP
} catch (msg) { RT_DebugF("Catch: %s",msg,name=myName) }
# Next try FFMS2
Try {
IsOpenV=(c.IsClip && c.HasVideo)
(!IsOpenV) ? FFIndex(vFn) : NOP
c=(!IsOpenV) ? FFVideoSource(vFn) : c
(!IsOpenV) ? RT_DebugF("FFVideoSource opened Video\n '%s'",vFn,name=myName) : NOP
} catch (msg) { RT_DebugF("Catch: %s",msg,name=myName) }
Try {
IsOpenA=(a.IsClip && a.HasAudio)
a=(!IsOpenA) ? FFAudioSource(aFn) : a
(!IsOpenA) ? RT_DebugF("FFAudioSource opened Audio\n '%s'",aFn,name=myName) : NOP
} catch (msg) { RT_DebugF("Catch: %s",msg,name=myName) }
# Next try LSmash non ISO Video
Try {
IsOpenV=(c.IsClip && c.HasVideo)
c = (!IsOpenV && !IsIsoV) ? LWLibavVideoSource(vFn) : c
(!IsOpenV && !IsIsoV) ? RT_DebugF("LWLibavVideoSource opened Video\n '%s'",vFn,name=myName) : NOP
} catch (msg) { RT_DebugF("Catch: %s",msg,name=myName) }
Try {
IsOpenA=(a.IsClip && a.HasAudio)
a = (!IsOpenA && !IsIsoA) ? LWLibavAudioSource(aFn) : a
(!IsOpenA && !IsIsoA) ? RT_DebugF("LWLibavAudioSource opened Audio\n '%s'",aFn,name=myName) : NOP
} catch (msg) { RT_DebugF("Catch: %s",msg,name=myName) }
Assert(c.IsClip, RT_String("%s failed open on\n '%s'",myName,vFn))
(!c.HasAudio && a.IsClip && a.HasAudio) ? AudioDubEx(c,a) : c
(!HasAudio) ? RT_DebugF("Audio failed Open on\n '%s",aFn,name=myName) : NOP
return Last
}
#[GetSeq("___FILE___")] ### COMMENTED OUT, NOT FOR USE in Avisynthesizer
GetSeq("C:\Users\padge\Documents\test video.mp4")
Return last
The above
requires RT_Stats but should make things easier for you. [also needs FFMS and LSMash, see Dev Forum]
RT_Stats here:- http://forum.doom9.org/showthread.php?t=165479&highlight=RT_Stats
ABove script will use either AVISource, or the other mentioned source filters, but not MPeg2Source().
EDIT:
I have the FrameRateConverter plugin in both
The one in MeGUI directory will never be used.
EDIT:
You may have to inquire in devs forum about which is better version of FFMS/FFMS2(FFmpegSource/FFVideoSource) as there seem to be dozens of versions (and apparently names too) knocking about. (I dont often use it).
hfrforever
5th June 2019, 20:31
I am getting yet another error, ffindex cant open C:\Users\padge\Documents\test video.mp4 and says line 1 is the problem
ffms2("C:\Users\padge\Documents\test video.mp4") # This implicitly assigns clip to a special variable called Last (when not explicitly assigned to anything else)
FrameRateConverter() # defaults FrameRate * 2, both takes and produces clip Last
return Last
EDIT I am using the link below for the ffmpeg
http://avisynth.nl/index.php/FFmpegSource
StainlessS
5th June 2019, 20:39
Alas, FFMS/FFMS2 is the hip (modern/fashionable) name for it, but is not the name you use in scripts (go figure),
Give me a few moments to put something together.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.