This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Vaporsynth pseudo "slow-mo"
#1
Using Avisynth I can produce "slow-mo" effect using the following settings:

- QTGMC +bob

- FrameRateConverter or MvToolsFPSmod with 96000/1001;

- "Custom" AssumeFPS(23.976) after AdjustFrameRate;

-  Change Speed or Interpolate frame rate 23.976;

https://mediaechelon.com/images/slow_mo_avisynth.mp4



Attempt to reproduce the same effect with Vaporsynth with suggested settings:



[*]set "Filtering->(De-)Interlace/Telecine->Deinterlace/Telecine Settings->Deinterlacer" "QTGMC (Vapoursynth)"
enable "Filtering->(De-)Interlace/Telecine->QTGMC Vapoursynth->Bob" (CHECK: calculated output frame rate and frame count should be doubled)
enable "Filtering->Vapoursynth->Other->Frame Interpolation"
set "Filtering->Vapoursynth->Other->Frame Interpolation" to "Interframe/SVP"
set "Filtering->Vapoursynth->Other->Frame Interpolation->FPS" to "95,9041" (adjust the other Interframe settings if you want) (CHECK: calculated output frame rate and frame count should be doubled)
enable "Filtering->Speed Change->Speed Settings->Change Speed"
set "Filtering->Speed Change->Speed Settings->Change Speed" to "23.976 / "10" or whatever frame rate you want your output to have

caused:
1. Output mp4 - Crashed with exit status 0 (Debug attached);
2. Output AVI (FFvHuff) - produces 23.974 stream with no "slow-mo" effect (Debug attached).
Reply
#2
Output AVI (FFvHuff) - produces 23.974 stream with no "slow-mo" effect
Looking at the debug output I see why the 'slow-mo' effect does not work. Smile
The encoding call:
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" "D:\Hybrid_test\encodingTempSynthSkript_2020-10-26@15_09_28_9310.vpy" - --y4m | "C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -noautorotate -nostdin -threads 4 -f yuv4mpegpipe -i - -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0  -vcodec ffvhuff -coder 0 -context 0 "D:\Hybrid_test\input_2020-10-26@15_09_28_9310_03.avi"
does not set a frame rate when encoding to ffvhuff, which is why it uses 96.94fps. Smile
-> will fix

Quote:Output mp4 - Crashed with exit status 0
This happens since encoding is aborted due to "y4m [error]: bad sequence header magic" which normally indicates that there is a problem with decoding the used script.
Looking at the script:
# Imports
import os
import sys
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import vapoursynth as vs
core = vs.get_core()
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.append(os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/FrameFilter/Interframe/svpflow2_vs64.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/FrameFilter/Interframe/svpflow1_vs64.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/EEDI3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/d2vSource/d2vsource.dll")
# Import scripts
import havsfunc
# source: 'D:\Hybrid_test\input.m2v'
# current color space: YUV420P8, bit depth: 8, resolution: 720x480, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
# Loading D:\Hybrid_test\input.m2v using D2VSource
clip = core.d2v.Source(input="D:/Hybrid_test/2020-10-26@14_39_47_4410.d2v")
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# setting field order to what QTGMC should assume (bottom field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Placebo", TFF=False) # new fps: 59.94
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
# adjusting frame count with Interframe/SVP
clip = havsfunc.InterFrame(clip, NewNum=9594100, NewDen=100000, OverrideAlgo=13) # new fps: 95.941
# Output
clip.set_output()
I see no problem.
Looking at the encoding call:
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" "D:\Hybrid_test\encodingTempSynthSkript_2020-10-26@14_39_47_4410.vpy" - --y4m | "C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -loglevel fatal -noautorotate -nostdin -threads 4 -f yuv4mpegpipe -i - -an -sn -vf zscale=rangein=tv:range=tv -pix_fmt yuv420p -vsync 0  -f rawvideo - | "C:\Program Files\Hybrid\64bit\x264.exe" --preset veryfast --bitrate 1500 --profile high --level 4.1 --ref 3 --direct auto --b-adapt 0 --sync-lookahead 6 --ratetol 2.0 --qcomp 0.5 --rc-lookahead 40 --qpmax 81 --partitions i4x4,p8x8,b8x8 --no-fast-pskip --subme 5 --aq-mode 0 --vbv-maxrate 1500 --vbv-bufsize 78125 --sar 8:9 --non-deterministic --range tv --colormatrix bt709 --demuxer y4m  --input-range tv --fps 24000/1001 --output-depth 8 --output "D:\HYBRID~1\2020-10-26@14_39_47_4410_03.264" -
I see the problem. There's an unnecessary ffmpeg decoding call in the middle, which should not be there.
-> I'll try to reproduce and fix this. (would have helped if your debug output, would have also contained the job creation and not just the job processing)


Cu Selur
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)