View Full Version : want to do interpolated slow motion -noob request
petermg
11th April 2015, 23:58
Hi all. Go easy on me I'm a beginner with AviSynth. I've used it in the past, but only for basic stuff like opening a directshow source and deinterlacing it and turning into 60fps from 30fps.
I don't really know the syntax very well, but here is what I am wanting to do with it.
I want to take a 30ifps input and convert it to 60pfps (yeah I once knew how to do this with only 2 or 3 lines in a script, but I cannot remember how nor find a script online which was as simple as the one I used to use).
Then I want to take that 60p output and feed it to a frame interpolation plugin and play around with something like 120 to 240 fps slowmotion.
So far I've looked a MVTools, and SVP, but even using the sample scripts they come with are bringing up errors.
I'm sorry if I've not provided enough info, I'm not sure what exactly I should post, like my PC specs or ?
Help is greatly appreciated!!!
StainlessS
12th April 2015, 00:07
bringing up errors
Most people here that I'm aware of are not clairvoyant, would you like to suggest what those error messages might say ?
Not sure that I could help but without further input I dont think much more assistance would be forthcoming.
StainlessS
12th April 2015, 00:15
SVP is probably your best bet, what messages spurt out of that ?
I'm on XP32SP3 Core Duo 2 core 2.4Ghz, and I can do that(ie weak m/c), so there is no reason that you cannot (probably).
petermg
12th April 2015, 00:31
Most people here that I'm aware of are not clairvoyant, would you like to suggest what those error messages might say ?
Not sure that I could help but without further input I dont think much more assistance would be forthcoming.
I didn't post the errors because I wasn't asking for help with them as of yet. I don't know enough as to which route to even go with or should I try another plugin altogether. SVP has their own version of MVTools on their site, then they have two different SVP dlls. On top of that they even have their own Avisynth version. Very confusing when you're in the state of noobdom as I am.
SVP is probably your best bet, what messages spurt out of that ?
I'm on XP32SP3 Core Duo 2 core 2.4Ghz, and I can do that(ie weak m/c), so there is no reason that you cannot (probably).
However since you say SVP is probably my best bet then I'll delve into that.
The error I'm getting from the SVP example script is:
Evaluate: operands of `==' and `!=' must be comparable
Here is my script:
SetMemoryMax(1024)
pel=2
recalc=true
svp_flow_lib="..\libflowgpu.dll"
LoadPlugin ("C:\Program Files (x86)\AviSynth 2.5\plugins\mvtools2.dll")
SetMTMode(3,10)
DirectShowSource("E:\Everio MediaBrowser 3D\HDDCAM\20141029\6495794897007572538\00610.mts")
ConvertToYV12()
SetMTMode(2)
super=MSuper(pel=pel)
finest=pel==1 ? super : MFinest(super)
backward_vec=MAnalyse(super, isb=true, blksize=16, overlap=4)
forward_vec=MAnalyse(super, isb=false, blksize=16, overlap=4)
backward_vec = recalc==0 ? backward_vec : MRecalculate(super, backward_vec, blksize=8, overlap=2)
forward_vec = recalc==0 ? forward_vec : MRecalculate(super, forward_vec, blksize=8, overlap=2)
MSmoothFps(super, backward_vec, forward_vec, finest=finest, num=60, den=1, algo=13, sadml=200, blend=false)
I only modified the path to my mts file and to the mvtools dll file.
Can anyone help me out with a simple script that turns an interlaced source into a double frame rate progressive source also? I did some searching and found very complicated scripts. I used to have a 2 or 3 line script laying around. I bet I could find it on some of my old CDs/DVD's I've burned..... that'll take a while to find.
Even if someone can post a link to tutorials for noobs, that would be helpful!!!
StainlessS
12th April 2015, 00:43
I'm not sure what is happening there (I'm a couple of days past my bedtime, feeling a bit knackered)
but, the error line number is probably a good thing to give here, I'll take a guess
(partly because I dont know what MFinest() is but that looks like most likely problematic line to me).
finest=pel==1 ? super : MFinest(super)
Plus it's the only thing that I see that matches to the
valuate: operands of `==' and `!=' must be comparable
Message
petermg
12th April 2015, 00:48
I'm not sure what is happening there (I'm a couple of days past my bedtime, feeling a bit knackered)
but, the error line number is probably a good thing to give here, I'll take a guess
(partly because I dont know what MFinest() is but that looks like most likely problematic line to me).
finest=pel==1 ? super : MFinest(super)
Plus it's the only thing that I see that matches to the
Message
I should have included the rest, here it is in full:
Evaluate: operands of `==' and `!=' must be comparable
(Error at script line 20)
Line 20 is:
backward_vec = recalc==0 ? backward_vec : MRecalculate(super, backward_vec, blksize=8, overlap=2)
Reel.Deel
12th April 2015, 00:55
How about using SVPflow (http://forum.doom9.org/showthread.php?t=164554)? Documentation and examples here (http://www.svp-team.com/wiki/Plugins:_SVPflow).
Also, to avoid headaches just say no to DirectShowSource. For .mts use LWLibavVideoSource (http://avisynth.nl/index.php/LSMASHSource), or at least FFMS2 (http://avisynth.nl/index.php/FFmpegSource).
StainlessS
12th April 2015, 00:55
Oh dear, Missed that
recalc==0
recalc is Bool, 0 is integer, ie diff types
Also, to avoid headaches just say no to DirectShowSource. For .mts use LWLibavVideoSource (http://avisynth.nl/index.php/LSMASHSource), or at least FFMS2 (http://avisynth.nl/index.php/FFmpegSource).
Cant disagree mit dat.
petermg
12th April 2015, 01:01
How about using SVPflow (http://forum.doom9.org/showthread.php?t=164554)? Documentation and examples here (http://www.svp-team.com/wiki/Plugins:_SVPflow).
Also, to avoid headaches just say no to DirectShowSource. For .mts use LWLibavVideoSource (http://avisynth.nl/index.php/LSMASHSource), or at least FFMS2 (http://avisynth.nl/index.php/FFmpegSource).
THANK YOU!!! I will look at those and try those other input methods!!:)
Reel.Deel
12th April 2015, 01:07
I forgot to mention InterFrame (http://forum.doom9.org/showthread.php?t=160226), it's just a wrapper script for SVPflow but it's more user friendly, especially for beginners.
StainlessS
12th April 2015, 01:20
Thanx RD, that is what I use on occasion, the SVP guys did all the hard work and the Interframe guy makes it look easy ( :))
(Big cuddles to both :) )
petermg
12th April 2015, 06:14
I forgot to mention InterFrame (http://forum.doom9.org/showthread.php?t=160226), it's just a wrapper script for SVPflow but it's more user friendly, especially for beginners.
THANK YOU again! I will try that out.
petermg
12th April 2015, 07:12
Can anyone help me out with a simple script that turns an interlaced source into a double frame rate progressive source also?
FOUND IT!!! :):)
After the source input just do
SeparateFields (Video)
Bob (Video)
So for example I have a script of
Video = LWLibavVideoSource("E:\Everio MediaBrowser 3D\HDDCAM\20140922\5587841238565069369\00577.mts")
SeparateFields (Video)
Bob (Video)
Works great!! :D
Found the info here:
http://avisynth.nl/index.php/Interlacing_and_deinterlacing
petermg
12th April 2015, 08:22
Ok getting somewhere now :D
I have created a deinterlacing script that takes 30i-fps and makes it 60p-fps. Weirdness a little bit however.
When is use "LWLibavVideoSource" as the input, VirtualDub thinks the file's original fps is 119.880 fps but if I change the source fps in VirtualDub to 59.97 the output avi plays correctly, otherwise it plays at double the speed.
However when I use "DirectShowSource", the framerate is correctly reported in VirtualDub at 59.97, but the fields are reversed, resulting in jerky motion.
This script:
LWLibavVideoSource("E:\Everio MediaBrowser 3D\HDDCAM\20140922\5587841238565069369\00577.mts")
SeparateFields ()
Bob ()
shows THIS in File information in VirtualDub
Video:
Frame size, fps (µs per frame): 1920x1080, 119.880 fps (8342 µs)
Length: 9996 frames (1:23.38)
Decompressor: Internal DIB decoder (YV12)
Number of key frames: 9996
Min/avg/max/total key frame size: 3110400/3110400/3110400 (30362850K)
Min/avg/max/total delta size: (no delta frames)
Data rate: 2983001 kbps (0.00% overhead)
Audio:
Sampling rate:
Channels:
Sample precision:
Compression:
Layout:
Length:
Min/avg/max/total frame size:
Data rate:
This script:
DirectShowSource("E:\Everio MediaBrowser 3D\HDDCAM\20140922\5587841238565069369\00577.mts")
SeparateFields ()
Bob ()
gets THIS from File Information in VirtualDub:
Video:
Frame size, fps (µs per frame): 1920x1080, 59.940 fps (16683 µs)
Length: 9994 frames (2:46.73)
Decompressor: Internal DIB decoder (YV12)
Number of key frames: 9994
Min/avg/max/total key frame size: 3110400/3110400/3110400 (30356775K)
Min/avg/max/total delta size: (no delta frames)
Data rate: 1491503 kbps (0.00% overhead)
Audio:
Sampling rate: 48000Hz
Channels: 2 (Stereo)
Sample precision: 16-bit
Compression: PCM (Uncompressed)
Layout: 10002 chunks (0.02s preload)
Length: 8001594 samples (2:46.70)
Min/avg/max/total frame size: 3176/3199/3200 (31257K)
Data rate: 1536 kbps (0.74% overhead)
but the fields are reversed.
Still looking at FAQs and readme's...
EDIT: Good ole' ComplementParity fixed the field problem. Found that info here:
http://avisynth.nl/index.php/SeparateFields which links to here:
http://avisynth.nl/index.php/ComplementParity
petermg
12th April 2015, 08:57
Or I can just use DGBob and make a script with only 2 lines ;)
LWLibavVideoSource("E:\Everio MediaBrowser 3D\HDDCAM\20140922\5587841238565069369\00577.mts")
DGBob(order=1)
Still lookin' to see which Bobber is considered the best..
petermg
12th April 2015, 09:18
Oh, and then there's "QTGMC", which seems to be generally accepted as the best quality for deinterlacing. Very nice. Like how it does the 30ifps to 60pfps :D
I'm having a lot of fun tonight :D
creaothceann
12th April 2015, 09:58
VirtualDub
Info() function and AvsPmod
DirectShowSource
f = "file.ext"
v = DSS2(f)
a = DirectShowSource(f, video=false)
AudioDub(v, a)
fields are reversed
AssumeTFF / AssumeBFF / SwapFields
petermg
12th April 2015, 18:04
A quick test I did :-)
https://youtu.be/iw48YdEDR_k
petermg
12th April 2015, 21:39
Info() function and AvsPmod
Thanks. Turns out all I had to do was use the latest version of LSMASHSource.dll. The reason I was using an older version is because I needed to use "LWLibavVideoSource" and so I used one from the folder named "with-Libav" from here:
https://www.dropbox.com/sh/3i81ttxf028m1eh/AAABkQn4Y5w1k-toVhYLasmwa?dl=0
but I guess I don't understand what that means because I downloaded the latest and the "LWLibavVideoSource" command works and now outputs the correct framerate!! :D :D :D
Sparktank
17th April 2015, 09:43
I was intrigued with this project.
I found it perplexing to follow at first until I realized the simplicity in it.
I found on svp forums a short example using InterFrame to interpolate to a higher framerate and then AssumeFPS() (lower target so that it plays back slower).
source() #15s 558ms
## convert to 599.4 fps
# 15s 558ms (insane)
InterFrame(GPU=true, NewNum=600000, NewDen=1001, Cores=x)
## slowed to 59.94 fps
# 2mn 35s (insanely slow)
AssumeFPS(60000,1001)
However, InterFrame has only a few options to work with.
If using (progressive source) SVP itself, you can finetune a lot of options if you don't know what you're doing in the script.
I don't know how to create a custom script so I just use SVP to generate one for me (using "generate AVS script for video encoder").
For higher frame rates to create a much slower video, I keep all the settings the same in the generated script and then manually change the fps target.
Of course, modifying the script to include AssumeFPS() at the end is tricky if you don't know what you're doing.
Anyway, back to the project results:
I remuxed Godzilla (2014) from BD to my external and then just took a short 16 second clip of the opening titles to use for this project.
Cropped black borders: crop_b=148, crop_t=140 (DGdecNV)
1920x800
Video 1: (ORIGINAL) can be played back in Firefox
https://www.youtube.com/watch?v=M7xyPpWEwMs
23.976 fps played in 23.976 fps
Converted: 23.976 (24000/1001)
Playback: 23.976 (24000/1001)
Run time: 15s 558ms
Video 2: (59in23) can be played back in Firefox
https://www.youtube.com/watch?v=CUk8fkZM1Ng
59.94 fps played in 23.976 fps
Converted: 59.94 (60000/1001)
Playback: 23.976 (24000/1001)
Run time: 38s 831ms
Video 3: (59in59) requires Google Chrome to view in "1080p60HD"
https://www.youtube.com/watch?v=cnFjbKsuzxY
59.94 fps played in 59.94 fps
Converted: 59.94 (60000/1001)
Playback: 59.94 (60000/1001)
Run time: 15s 533ms
Video 4: (599in59) requires Google Chrome to view in "1080p60HD"
https://youtu.be/OMxqabdMIzw
599.4 fps played in 59.94 fps
Converted: 599.4 fps (600/1.001)
Playback: 59.94 (60000/1001)
Run time: 2mn 35s
With video 4, you can see all the details of how Video 3 was created using Video 1.
It shows you all the differences and artefacts and ringing.
With video 3, should really be video 2 since it's the HFR version of the original video.
But, since it requires Google Chrome to view in actual 60fps via youtube, it has become Video 3 followed by video 4 (another GC-only view).
With youtube's "stats for nerds" you should see:
1920x 800@60 (Google Chrome only)
Pretty neat project. I've always wondered how to do this and never thought to search the forums for it or even ask about it.
It would be funny to take scenes from movies already in slow motion and extend the slow motion significantly.
No practical purpose, but amusing, nonetheless.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.