Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd July 2018, 19:14   #1  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
I need some help with interpolation videos, lots of detail in post

I have been trying to get some interpolation right for a few weeks now, and I need some help with it. I have tried a lot of things, all of which I will go into detail about in this post.

I started trying to interpolate videos as I read that a lot of TVs did this and wondered if there was a way I can do it on my computer. I went on youtube and searched for interpolation and found loads of videos of varying quality. After a while I started to look more specifically at interpolations of animation, as I am a fan of animated movies. I found numerous examples of interpolations of animation, this probably being the best I found: https://www.youtube.com/watch?v=sPAP...A&index=4&t=0s

I also focused on this one as in the comments of the video the person who uploaded it said it was done with SVP, so that gave me a hint as to where to start.

I tried this tutorial: http://www.spirton.com/convert-videos-to-60fps/
and wasn't impressed by the results. The camera looked smooth, but motion on screen still looked like it was running at 30fps.

I then made a post about this: https://forum.videohelp.com/threads/...e3#post2524201

and I got a lot of useful advice, which allowed me to produce a much better interpolation, the best example of which is probably this: https://1drv.ms/u/s!AiOx2LWATSlvzjpQLo1axA8V3dqT

However, it still didn't look as good as the youtube video. There are also quite a few duplicate frames in that video.

The script I was using to make that video was something like this:

Code:
PluginPath = "C:\Users\bradw\Downloads\MeGUI-2836-32\tools\lsmash\"
LoadPlugin(PluginPath+"LSMASHSource.dll")
LoadPlugin("C:\Users\bradw\Downloads\MeGUI-2836-32\tools\avisynth_plugin\svpflow1.dll")
LoadPlugin("C:\Users\bradw\Downloads\MeGUI-2836-32\tools\avisynth_plugin\svpflow2.dll")
LSMASHVideoSource("C:\Users\bradw\Documents\file.mkv") 
AssumeFPS(24000,1001)
super=SVSuper("{gpu:0}")
vectors=SVAnalyse(super, "{block:{w:16}}") # 16 is the default, you can try 8, 24, and 32 also
SVSmoothFps(super, vectors, "{rate:{num:5, den:2, algo:2, scene:{mode:1}}}", url="www.svp-team.com", mt=1)
My original source for these tests is here: https://1drv.ms/v/s!AiOx2LWATSlvzjxoZFpKvN_R2yu_

I am not very knowledgeable on the subject of interpolation, nor am I of avisynth or video encoding in general, however I do have a basic understanding of these scripts.


Any advice on what I can do in order to make my interpolations look smoother would be greatly appreciated, I hope I have provided enough information and enough samples in this post, but if you need more, I will be happy to find them.

Also, I use MeGUI to run these avisynth scripts.

My computer specs (incase it matters):

AMD 10-7300
8GB RAM
1TB HDD
Radeon R6 integrated graphics.
It's a Lenovo Z50-75 laptop.
bradwiggo is offline   Reply With Quote
Old 23rd July 2018, 20:04   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
See here,

https://forum.doom9.org/showthread.php?t=174793

Something smaller and simpler

Code:
# jm_fps.avs

Global G_DCT=1

function jm_fps(clip source) {
	fps_num = 60
	fps_den = 1

	prefiltered = RemoveGrain(source, 22)
	super = MSuper(source, hpad = 16, vpad = 16, levels = 1) # one level is enough for MRecalculate
	superfilt = MSuper(prefiltered, hpad = 16, vpad = 16) # all levels for MAnalyse
	backward = MAnalyse(superfilt, isb = true, blksize = 16, overlap = 4, search = 3, dct = G_DCT)
	forward = MAnalyse(superfilt, isb = false, blksize = 16, overlap = 4, search = 3, dct = G_DCT)
	forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
	backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
	out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)

	return out
}
EDIT:

Manolito mod of above, from here:- https://forum.doom9.org/showthread.p...39#post1800439

Code:
# Motion Protected FPS converter script by johnmeyer from Doom9
# Slightly modified interface by manolito
# Requires MVTools V2 and RemoveGrain
# Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0


function jm_fps(clip source, float "fps", int "BlkSize", int "Dct")
{
fps = default(fps, 25.000)
fps_num = int(fps * 1000)
fps_den = 1000
BlkSize = default(BlkSize, 16)
Dct = default(Dct, 0)

prefiltered = RemoveGrain(source, 22)
super = MSuper(source, hpad = 16, vpad = 16, levels = 1, sharp = 1, rfilter = 4) # one level is enough for MRecalculate
superfilt = MSuper(prefiltered, hpad = 16, vpad = 16, sharp = 1, rfilter = 4) # all levels for MAnalyse
backward = MAnalyse(superfilt, isb = true, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
forward = MAnalyse(superfilt, isb = false, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)

return out
}
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 23rd July 2018 at 20:12.
StainlessS is offline   Reply With Quote
Old 23rd July 2018, 20:32   #3  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by StainlessS View Post
See here,

https://forum.doom9.org/showthread.php?t=174793

Something smaller and simpler

Code:
# jm_fps.avs

Global G_DCT=1

function jm_fps(clip source) {
	fps_num = 60
	fps_den = 1

	prefiltered = RemoveGrain(source, 22)
	super = MSuper(source, hpad = 16, vpad = 16, levels = 1) # one level is enough for MRecalculate
	superfilt = MSuper(prefiltered, hpad = 16, vpad = 16) # all levels for MAnalyse
	backward = MAnalyse(superfilt, isb = true, blksize = 16, overlap = 4, search = 3, dct = G_DCT)
	forward = MAnalyse(superfilt, isb = false, blksize = 16, overlap = 4, search = 3, dct = G_DCT)
	forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
	backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
	out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)

	return out
}
EDIT:

Manolito mod of above, from here:- https://forum.doom9.org/showthread.p...39#post1800439

Code:
# Motion Protected FPS converter script by johnmeyer from Doom9
# Slightly modified interface by manolito
# Requires MVTools V2 and RemoveGrain
# Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0


function jm_fps(clip source, float "fps", int "BlkSize", int "Dct")
{
fps = default(fps, 25.000)
fps_num = int(fps * 1000)
fps_den = 1000
BlkSize = default(BlkSize, 16)
Dct = default(Dct, 0)

prefiltered = RemoveGrain(source, 22)
super = MSuper(source, hpad = 16, vpad = 16, levels = 1, sharp = 1, rfilter = 4) # one level is enough for MRecalculate
superfilt = MSuper(prefiltered, hpad = 16, vpad = 16, sharp = 1, rfilter = 4) # all levels for MAnalyse
backward = MAnalyse(superfilt, isb = true, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
forward = MAnalyse(superfilt, isb = false, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)

return out
}
Thanks, I will try those out, are they for avisynth?

Also, where do I put the path for the input video?

Last edited by bradwiggo; 23rd July 2018 at 20:38.
bradwiggo is offline   Reply With Quote
Old 23rd July 2018, 21:51   #4  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by StainlessS View Post
See here,

https://forum.doom9.org/showthread.php?t=174793

Something smaller and simpler

Code:
# jm_fps.avs

Global G_DCT=1

function jm_fps(clip source) {
	fps_num = 60
	fps_den = 1

	prefiltered = RemoveGrain(source, 22)
	super = MSuper(source, hpad = 16, vpad = 16, levels = 1) # one level is enough for MRecalculate
	superfilt = MSuper(prefiltered, hpad = 16, vpad = 16) # all levels for MAnalyse
	backward = MAnalyse(superfilt, isb = true, blksize = 16, overlap = 4, search = 3, dct = G_DCT)
	forward = MAnalyse(superfilt, isb = false, blksize = 16, overlap = 4, search = 3, dct = G_DCT)
	forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
	backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
	out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)

	return out
}
EDIT:

Manolito mod of above, from here:- https://forum.doom9.org/showthread.p...39#post1800439

Code:
# Motion Protected FPS converter script by johnmeyer from Doom9
# Slightly modified interface by manolito
# Requires MVTools V2 and RemoveGrain
# Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0


function jm_fps(clip source, float "fps", int "BlkSize", int "Dct")
{
fps = default(fps, 25.000)
fps_num = int(fps * 1000)
fps_den = 1000
BlkSize = default(BlkSize, 16)
Dct = default(Dct, 0)

prefiltered = RemoveGrain(source, 22)
super = MSuper(source, hpad = 16, vpad = 16, levels = 1, sharp = 1, rfilter = 4) # one level is enough for MRecalculate
superfilt = MSuper(prefiltered, hpad = 16, vpad = 16, sharp = 1, rfilter = 4) # all levels for MAnalyse
backward = MAnalyse(superfilt, isb = true, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
forward = MAnalyse(superfilt, isb = false, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)

return out
}
I have tried to gte this working but I have a few questions:

1. Where do I put the path to the input video? As meGUI gives the error "the scripts return was not a video clip"

2. Is should I use that as a .avs file for MeGUI, is that the right way to use it?
bradwiggo is offline   Reply With Quote
Old 25th July 2018, 14:07   #5  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by StainlessS View Post
See here,

https://forum.doom9.org/showthread.php?t=174793

Something smaller and simpler

Code:
# jm_fps.avs

Global G_DCT=1

function jm_fps(clip source) {
	fps_num = 60
	fps_den = 1

	prefiltered = RemoveGrain(source, 22)
	super = MSuper(source, hpad = 16, vpad = 16, levels = 1) # one level is enough for MRecalculate
	superfilt = MSuper(prefiltered, hpad = 16, vpad = 16) # all levels for MAnalyse
	backward = MAnalyse(superfilt, isb = true, blksize = 16, overlap = 4, search = 3, dct = G_DCT)
	forward = MAnalyse(superfilt, isb = false, blksize = 16, overlap = 4, search = 3, dct = G_DCT)
	forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
	backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
	out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)

	return out
}
EDIT:

Manolito mod of above, from here:- https://forum.doom9.org/showthread.p...39#post1800439

Code:
# Motion Protected FPS converter script by johnmeyer from Doom9
# Slightly modified interface by manolito
# Requires MVTools V2 and RemoveGrain
# Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0


function jm_fps(clip source, float "fps", int "BlkSize", int "Dct")
{
fps = default(fps, 25.000)
fps_num = int(fps * 1000)
fps_den = 1000
BlkSize = default(BlkSize, 16)
Dct = default(Dct, 0)

prefiltered = RemoveGrain(source, 22)
super = MSuper(source, hpad = 16, vpad = 16, levels = 1, sharp = 1, rfilter = 4) # one level is enough for MRecalculate
superfilt = MSuper(prefiltered, hpad = 16, vpad = 16, sharp = 1, rfilter = 4) # all levels for MAnalyse
backward = MAnalyse(superfilt, isb = true, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
forward = MAnalyse(superfilt, isb = false, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)

return out
}
I tried this script with the framerate at 25fps and at 23.978 fps (which is the source framerate), and both times the result had a lot of stutter: https://1drv.ms/u/s!AiOx2LWATSlvzj80scSHeGeZ30Ur (that is with the fps = 23.978)
bradwiggo is offline   Reply With Quote
Old 23rd July 2018, 20:50   #6  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Frame interpolation is always going to be a hit or miss, when it hits, you'll get a nice looking interpolated frame, when it misses, you'll get a frame with artifacts. For example, when the original frame rate is low and there's a fast moving object and you're trying to achieve a frame rate that is more than twice of the original, more than likely it's going to be a miss.

However, there should not be any difference on "smoothness" between all of the different converter filters because they all shared the same backbone. What you should be focusing on are the differences in the interpolation quality and their handling of artifact.

To get less artifact, you should only do double frame rate conversion. So if your source is 24fps, you should be doing 48fps conversion instead of 60fps because interpolating 1 frame in between frames is always going to have less chance of artifact than interpolating 2 frames in between.
lansing is offline   Reply With Quote
Old 23rd July 2018, 20:53   #7  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by lansing View Post
Frame interpolation is always going to be a hit or miss, when it hits, you'll get a nice looking interpolated frame, when it misses, you'll get a frame with artifacts. For example, when the original frame rate is low and there's a fast moving object and you're trying to achieve a frame rate that is more than twice of the original, more than likely it's going to be a miss.

However, there should not be any difference on "smoothness" between all of the different converter filters because they all shared the same backbone. What you should be focusing on are the differences in the interpolation quality and their handling of artifact.

To get less artifact, you should only do double frame rate conversion. So if your source is 24fps, you should be doing 48fps conversion instead of 60fps because interpolating 1 frame in between frames is always going to have less chance of artifact than interpolating 2 frames in between.
Why does my video look less smooth than the youtube video if the interpolation is the same?
bradwiggo is offline   Reply With Quote
Old 23rd July 2018, 21:06   #8  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by bradwiggo View Post
Why does my video look less smooth than the youtube video if the interpolation is the same?
Because you're using blend mode?
lansing is offline   Reply With Quote
Old 23rd July 2018, 21:11   #9  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by lansing View Post
Because you're using blend mode?
What should I change to stop that? Is that the Scene Mode argument?
bradwiggo is offline   Reply With Quote
Old 23rd July 2018, 21:19   #10  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,657
Quote:
Originally Posted by bradwiggo View Post
What should I change to stop that? Is that the Scene Mode argument?
I don't know, I'm using the older 3.1.7 version. There was an option called "artifact masking", you have to disable it, turning it to "strongest" will blend the frames.
lansing is offline   Reply With Quote
Old 23rd July 2018, 22:00   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
# Whatever.avs

Code:
# Motion Protected FPS converter script by johnmeyer from Doom9
# Slightly modified interface by manolito
# Requires MVTools V2 and RemoveGrain
# Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0

Function jm_fps(clip source, float "fps", int "BlkSize", int "Dct") {
    fps = default(fps, 25.000)
    fps_num = int(fps * 1000)
    fps_den = 1000
    BlkSize = default(BlkSize, 16)
    Dct = default(Dct, 0)
    prefiltered = RemoveGrain(source, 22)
    super = MSuper(source, hpad = 16, vpad = 16, levels = 1, sharp = 1, rfilter = 4) # one level is enough for MRecalculate
    superfilt = MSuper(prefiltered, hpad = 16, vpad = 16, sharp = 1, rfilter = 4)    # all levels for MAnalyse
    backward = MAnalyse(superfilt, isb = true, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
    forward = MAnalyse(superfilt, isb = false, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
    forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
    backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
    out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)
    return out
}

DCT     = 0    # EDIT: 1 is SLOW
BLKSIZE = 16

c=Avisource("D:\whatever.avi")

Return jm_fps(c,fps=c.FrameRate*2,blkSize=BLKSIZE,dct=DCT)
1) See above.
2) Yes.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 23rd July 2018 at 22:12.
StainlessS is offline   Reply With Quote
Old 23rd July 2018, 22:39   #12  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by StainlessS View Post
# Whatever.avs

Code:
# Motion Protected FPS converter script by johnmeyer from Doom9
# Slightly modified interface by manolito
# Requires MVTools V2 and RemoveGrain
# Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0

Function jm_fps(clip source, float "fps", int "BlkSize", int "Dct") {
    fps = default(fps, 25.000)
    fps_num = int(fps * 1000)
    fps_den = 1000
    BlkSize = default(BlkSize, 16)
    Dct = default(Dct, 0)
    prefiltered = RemoveGrain(source, 22)
    super = MSuper(source, hpad = 16, vpad = 16, levels = 1, sharp = 1, rfilter = 4) # one level is enough for MRecalculate
    superfilt = MSuper(prefiltered, hpad = 16, vpad = 16, sharp = 1, rfilter = 4)    # all levels for MAnalyse
    backward = MAnalyse(superfilt, isb = true, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
    forward = MAnalyse(superfilt, isb = false, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
    forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
    backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
    out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = false, ml = 200, mask = 2)
    return out
}

DCT     = 0    # EDIT: 1 is SLOW
BLKSIZE = 16

c=Avisource("D:\whatever.avi")

Return jm_fps(c,fps=c.FrameRate*2,blkSize=BLKSIZE,dct=DCT)
1) See above.
2) Yes.
It said it couldn't open the file, it might be because I was using an mp4 or mkv file, not avi, do I need a different instruction to avisource?
bradwiggo is offline   Reply With Quote
Old 23rd July 2018, 23:10   #13  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
What, you aint even sure if its mp4 or mkv ?

Not really sure that you should be posting in the Avisynth forum if you have not even attempted to figure out how to use Avisynth.

Suggest that you look at ffmpegsource or LSMASHSource (I rarely use either and convert all except VOB/MPG to avi, doing anything else usually
involves too much messing about trying to figure out the better source filter to use).
I do not recommend DirectshowSource.

EDIT:

_CLIP_To_UT_YV12_D.cmd - Script for ffmpeg -> AVI UT_Video YV12 PCM audio to D:\ (dont like SPACE's in filenames)
Code:
setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory
set INDIR="."


REM Where to place output file, No terminating Backslash.
set OUTDIR="D:"


FOR %%A IN (*.wmv *.mpg *.avi *.flv *.mov *.mp4 *.m4v *.RAM *.RM *.mkv *.TS *.ogv) DO (
  %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"

)

Pause

EDIT: A bit more help

Code:
REM We DO NOT LIKE SPACES IN FILE NAMES (REM == REMark ie comment)

setlocal

REM Where to Find ffmpeg
set FFMPEG="C:\BIN\ffmpeg.exe"

REM Where to get input file, No terminating Backslash, "." = current directory (ie same as dir .bat file)
set INDIR="."

REM Where to place output file, No terminating Backslash. "." would be same as .bat file
set OUTDIR="D:"

REM Below, can add extensionas as eg *.WMV (SPACE separated)
FOR %%A IN (*.mp4 *.vob *.mpg *.TS) DO (

REM ****** Un-REM ONLY one of below lines *******.
    %FFMPEG% -i "%INDIR%\%%A" -vcodec copy    -acodec copy      "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec copy      "%OUTDIR%\%%~nxA.MKV"
REM %FFMPEG% -i "%INDIR%\%%A" -vcodec utvideo -acodec pcm_s16le "%OUTDIR%\%%~nxA.AVI"
REM *********************************************.

)

REM ... Above UN-REM'ed lines :
REM      (1) Remux, copy both video and audio   (output MKV).
REM      (2) UtVideo lossless video, copy audio (output MKV).
REM      (3) UtVideo lossless video, PCM audio  (output AVI).

Pause
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 24th July 2018 at 11:20.
StainlessS is offline   Reply With Quote
Old 23rd July 2018, 23:12   #14  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by StainlessS View Post
What, you aint even sure if its mp4 or mkv ?

Not really sure that you should be posting in the Avisynth forum if you have not even attempted to figure out how to use Avisynth.

Suggest that you look at ffmpegsource or LSMASHSource (I rarely use either and convert all except VOB/MPG to avi, doing anything else usually
involves too much messing about trying to figure out the better source filter to use).
I do not recommend DirectshowSource.
I have a few files that are mkv and a few that are mp4, I can't remember which one this is. I have a basic knowledge of avisynth, but I don't know a huge amount about it.
bradwiggo is offline   Reply With Quote
Old 23rd July 2018, 23:54   #15  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Suggest LSMASHVideoSource(), and LSMASHAudioSource()
if one of these, mov, mp4, m4v, 3gp, 3g2, mj2, dvb, dcf, m21.

No idea what is best for mkv.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 25th July 2018, 01:57   #16  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by StainlessS View Post
Suggest LSMASHVideoSource(), and LSMASHAudioSource()
if one of these, mov, mp4, m4v, 3gp, 3g2, mj2, dvb, dcf, m21.

No idea what is best for mkv.
I tried the second script you posted in your first comment, and there is quite a lot of stutter, however I have just noticed I didn't change the fps bit to 24, could that be causing the stutter, as it is 24fps not 25?
bradwiggo is offline   Reply With Quote
Old 24th July 2018, 00:32   #17  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,685
I suggest that anyone trying to help the OP read the following because this thread is going down the same path as the thread he started a month ago on Videohelp.com:

Why don't my interpolated videos look as good as examples I see on youtube?

The problem is that everyone there -- and it is now true of the posts so far in this thread -- didn't initially understand the real problem at the heart of what he is trying to do. Here's that problem:

He wants to create smoother motion for animation and, as most people reading this know, animation repeats some frames, but not others, and does so in a way that does not follow a regular pattern, like telecine patterns usually do. So, if you simply apply MVTools2, SVP, or Interframe motion estimation to create more frames, you end up with a real visual mess, and the motion doesn't look that much smoother.

What first needs to be done is to replace the dups in a way that takes into account the variable time gap between frames that are actually different. Thus, I don't think you can simply use FillDrops() (a function I've posted many times) to replace all duplicates, first because there are some situations where there is more than one dup in a row which will cause FillDrops() to fail, but also because some gaps in time between non-duplicate frame are going to be larger than others. THAT is where you want to insert a motion estimated frame, after you've deleted a duplicate, NOT at the place where the dup is removed.

One thing I would suggest to the OP, now that he is here on doom9, is to take a look at this thread I started several years ago:

Automatically fix dups followed (eventually) by drops

What I tried to do in that thread -- and with the help of some old code written by Didée I was able to accomplish -- was measure the temporal gaps between each non-dup frame. Then, after I deleted each duplicate, rather than insert an interpolated frame at the location of the deleted frame, I instead used my "gap logic" to insert an interpolated frame at a nearby location that had the biggest apparent jump in motion.

It wasn't perfect, but I think I was on the right track, and I believe that it might be a way to fix the OP's problem.

BTW, if someone can figure this out, what he wants is actually something that might be useful to other animation fans.
johnmeyer is offline   Reply With Quote
Old 24th July 2018, 22:36   #18  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by johnmeyer View Post
I suggest that anyone trying to help the OP read the following because this thread is going down the same path as the thread he started a month ago on Videohelp.com:

Why don't my interpolated videos look as good as examples I see on youtube?

The problem is that everyone there -- and it is now true of the posts so far in this thread -- didn't initially understand the real problem at the heart of what he is trying to do. Here's that problem:

He wants to create smoother motion for animation and, as most people reading this know, animation repeats some frames, but not others, and does so in a way that does not follow a regular pattern, like telecine patterns usually do. So, if you simply apply MVTools2, SVP, or Interframe motion estimation to create more frames, you end up with a real visual mess, and the motion doesn't look that much smoother.

What first needs to be done is to replace the dups in a way that takes into account the variable time gap between frames that are actually different. Thus, I don't think you can simply use FillDrops() (a function I've posted many times) to replace all duplicates, first because there are some situations where there is more than one dup in a row which will cause FillDrops() to fail, but also because some gaps in time between non-duplicate frame are going to be larger than others. THAT is where you want to insert a motion estimated frame, after you've deleted a duplicate, NOT at the place where the dup is removed.

One thing I would suggest to the OP, now that he is here on doom9, is to take a look at this thread I started several years ago:

Automatically fix dups followed (eventually) by drops

What I tried to do in that thread -- and with the help of some old code written by Didée I was able to accomplish -- was measure the temporal gaps between each non-dup frame. Then, after I deleted each duplicate, rather than insert an interpolated frame at the location of the deleted frame, I instead used my "gap logic" to insert an interpolated frame at a nearby location that had the biggest apparent jump in motion.

It wasn't perfect, but I think I was on the right track, and I believe that it might be a way to fix the OP's problem.

BTW, if someone can figure this out, what he wants is actually something that might be useful to other animation fans.
Is that the script you think the video might have been using, as that is my ultimate goal, to find a script that gets me as close to that video as possible.

Last edited by bradwiggo; 25th July 2018 at 00:02.
bradwiggo is offline   Reply With Quote
Old 25th July 2018, 20:59   #19  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
Quote:
Originally Posted by johnmeyer View Post
as most people reading this know, animation repeats some frames, but not others, and does so in a way that does not follow a regular pattern
As johnmeyer said
This nature of animation leads to ugly results instead of getting smoother video.

For example,
Think that there are 2 objects move in the video.
They don't move together sometimes. They might even animated separately.
One moves at 12 fps and other one is 8 fps etc...
Not full 24 fps.

Any interpolation isn't smart enough to see this.
They will just add duplicate of that object since it can't see objects as 'moving'.
Result wouldn't be not much smoother than the original if not any smoother.

That's why he is saying it's impossible.
But you can try.

Last edited by bxyhxyh; 25th July 2018 at 21:02.
bxyhxyh is offline   Reply With Quote
Old 25th July 2018, 21:32   #20  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by bxyhxyh View Post
As johnmeyer said
This nature of animation leads to ugly results instead of getting smoother video.

For example,
Think that there are 2 objects move in the video.
They don't move together sometimes. They might even animated separately.
One moves at 12 fps and other one is 8 fps etc...
Not full 24 fps.

Any interpolation isn't smart enough to see this.
They will just add duplicate of that object since it can't see objects as 'moving'.
Result wouldn't be not much smoother than the original if not any smoother.

That's why he is saying it's impossible.
But you can try.
I know it isn't impossible though, as I have found a video of it. My current goal is simply to reproduce the linked youtube video.
bradwiggo is offline   Reply With Quote
Reply

Tags
frame rate, framerateconverter, interpolation, smoothness, svp

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.