1

(8 replies, posted in Using SVP)

Avisynth 2.6MT
SVP4 Free (4.0.0.60) (core.flow32 1.2.2)

1. Run SVP4 and play "24fps.avi".
2. Copy C:\Users\username\AppData\Roaming\SVP4\scripts\******.avs to C:\test\test.avs
3. Edit test.avs
      ffdShow_source()
        -> AVISource("24fps.avi")
4. Preview with AvsPmod. -> Error  (cf. Success with core.flow32 1.2.0)
         Script error: Invalid arguments to function "SVSmoothFps"
         (C:\test\test.avs, line 39)
         (C:\test\test.avs, line 54)

5. Edit test.avs
      global super_params="{scale:{up:0},gpu:1,rc:true}"
        -> global super_params="{scale:{up:0},gpu:1,rc:false}"
6. Preview with AvsPmod. -> Success


What does "rc" of SVSuper() mean ?

Hi developers, You should merge this pull request.

  update Japanese =>rev.52 by svp4ja · Pull Request #11 · svpteam/svp4-i18n · GitHub
  https://github.com/svpteam/svp4-i18n/pull/11

move to:

  Completely disable video crop in SVP 4
  http://www.svp-team.com/forum/viewtopic.php?id=2928

4

(13 replies, posted in Using SVP)

MAG79 wrote:

Something wrong with H.264 format in this video. H/W decoding is not working on it.

DXVA doesn't support H.264 High 10 Profile.(10bit-depth)

I found one more problem. That's about demonstration mode.
Function "demo()" causes size change when video width is not mod4.

e.g. 854x480 -> demo() -> 856x480


It's better to improve "demo()".

Current version. (not good)

function demo(clip src,clip smooth)
{
    srcd = src.crop(0,0,-Int(src.width/4)*2-2,0)
    srcd = srcd.ChangeFPS(FramerateNumerator(src)*5, FramerateDenominator(src)*2)
    res = smooth.crop(Int(src.width/4)*2,0,0,0)
    return StackHorizontal(srcd.Subtitle("Source", align=2),srcd.BlankClip(width=2),res.Subtitle("Smooth", align=2))
}


Example1:  Line is on left area when video width is mod4.

function demo(clip src,clip smooth)
{
    d = (src.width % 4 == 0) ? 2 : 0
    cp=src.width/4*2+2
    srcd = src.crop(0,0,-cp,0).ChangeFPS(smooth)
    res = smooth.crop(cp-d,0,0,0)
    return StackHorizontal(srcd.Subtitle("Source", align=2),srcd.BlankClip(width=2),res.Subtitle("Smooth", align=2))
}


Example2:  Line is always on center. But line width is 4 when video width is mod4.

function demo(clip src,clip smooth)
{
    lineW = (src.width % 4 == 0) ? 4 : 2
    cp=(src.width+lineW)/4*2
    srcd = src.crop(0,0,-cp,0).ChangeFPS(smooth)
    res = smooth.crop(cp,0,0,0)
    return StackHorizontal(srcd.Subtitle("Source", align=2),srcd.BlankClip(width=lineW),res.Subtitle("Smooth", align=2))
}

And I found problem about 3D stereo mode in SVP4 Free.

1. playback 854x480 movie. (854 is not mod4)
        -> global crop_string="crop(2,0,-4,-0)"

2. Choose "3D side-by-side stereo pair"
        -> global crop_string="crop(0,0,-2,-0)"
        -> AVS error
                Crop: YUV image can only be cropped by Mod 2 (right side)


In SVP3, 3D mode options are displayed in a grayout state when video is not  "mod4".

"mod4" causes cropping(resizing) such as 854x480->852x480, 1366x768->1364x768, etc.
So I'll set that parameter value to 2.

For reference, please let me know the reason why SVP4 recommends "mod4".

You said,

*Cause video width should be divisible by 8 to be compatible with SVP GPU-accelerated processing.
*The question is video width must be divisible by 8 to pass SVP w/o issues. And not only SVP but some video renderers too.

but "mod2" seems to work fine.
And performance of "mod2(1366x768)" is equal to "mod8(1360x768)". (by AVSMeter)

Of course, "3D stereo mode" needs "mod4".
But I think "default value = 2 (mod2)" is better, and force "mod4" when "3D stereo mode" only.

I think many of users maybe want to avoid cropping(resizing) as much as possible.

Oh,right.Thanks so much.

SVP3:

function interpolate(clip src)
{
    input = crop_params=="" ? src : eval("src.crop("+crop_params+")")
    input = resize_string=="" ? input : eval("input."+resize_string)

    super=SVSuper(input, super_params)
    vectors=SVAnalyse(super, analyse_params, src=input)
    smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, url="www.svp-team.com")

    return demo_mode==0 ? smooth : demo(input,smooth)
}


SVP4:

function interpolate(clip src)
{
    input = crop_string=="" ? src : eval("src."+crop_string)
    input = resize_string=="" ? input : eval("input."+resize_string)

    super=SVSuper(input, super_params)
    vectors=SVAnalyse(super, analyse_params, src=input)
    smooth=SVSmoothFps(input, super, vectors, smoothfps_params, mt=threads, src=src)

    return demo_mode==0 ? smooth : demo(input,smooth)
}


In SVP4, SVSmoothFPS() has parameter "src=src". But is it correct ?
I don't know why SVSmoothFPS() needs "src" clip that's before cropping and resizing.

recommend:

LoadPlugin("LSMASHSource.dll")
function LSMASHSourceVA(string src, bool "audio")
{
    audio = Default(audio, true)
    ext = RightStr(src, 3)
    v = ((ext=="mp4") || (ext=="mov")) ? LSMASHVideoSource(src) : LWLibavVideoSource(src)
    clip = audio ? ((ext=="mp4") || (ext=="mov")) ? AudioDub(v,LSMASHAudioSource(src)) : AudioDub(v,LWLibavAudioSource(src)) : v
    return clip
}

file="Input.webm"
LSMASHSourceVA(file)

But "VP9+AAC"? webM ?
WebM normally use "VP9+Vorbis" or "VP9+Opus".

"mod 4" is decoder chain issue.

    http://www.svp-team.com/forum/viewtopic … 280#p55280

I think SVP(YV12) need mod 2 only, don't need mod 4 and higher.

Mystery wrote:

Here's the AviSynth code that's working best so far

I think LSMASHSource is better.

TimestretchYV12.avs:

file="Imput.mp4"
SetMTMode(3,4)
LoadPlugin("LSMASHSource.dll")
LSMASHVideoSource(file).AudioDub(LSMASHAudioSource(file))
/*
LoadPlugin("ffms2.dll")
Import("FFMS2.avsi")
FFmpegSource2(file, atrack=-1, cache=false, threads=1)
*/
SetMTMode(2)
ResampleAudio(48000)
SemiTone = -0.3176665363342977
TimeStretch(pitch = 100.0 * pow(2.0, SemiTone / 12.0))
# if you need 16bit Integer audio
#ConvertAudioTo16bit()

Mystery wrote:

With the above script, some videos play corrupted with SVP.

That's maybe decoder chain problem.
(maybe "AVI Decompressor(I420)" and "ffdshow raw video filter"....)
You should re-check "Play->Filters".

There's two solutions.

    Solution1.  Install LAV Filters. (and make it prefer)

    Solution2. Uncheck  "Options->Internal Filters->Source Filters->Avisynth"


When "Avisynth" is checked and LAV Filters is not installed : (Corrupted video and IEEE Float)

Properties: (TimestretchYV12.avs)
        Video: I420 854x480 29.97fps [V: rawvideo, yuv420p, 854x480]
        Audio: IEEE Float 48000Hz stereo 3072kbps [A: pcm_f32le, 48000 Hz, 2 channels, fp32, 3072 kb/s]

    Video filter chain:
        LAV Splitter Source (internal) -> (I420, 854x480) ->
        AVI Decompressor (I420) -> (RGB24, 854x480) ->
        ffdshow raw video filter -> (RGB32, 864x480) ->
        Enhanced Video Renderer (custom presenter)

    Audio filter chain:
        LAV Splitter Source (internal) ->
        LAV Audio Decoder (internal) -> (IEEE Float 48000Hz) ->
        Audio Switcher -> (IEEE Float 48000Hz) ->
        Internal Audio Renderer


When "Avisynth" is checked and LAV Filters is installed : (Fine video and IEEE Float)

Properties: (TimestretchYV12.avs)
        Video: I420 854x480 29.97fps [V: rawvideo, yuv420p, 854x480]
        Audio: IEEE Float 48000Hz stereo 3072kbps [A: pcm_f32le, 48000 Hz, 2 channels, fp32, 3072 kb/s]

    Video filter chain:
        LAV Splitter Source (internal) -> (I420, 854x480) ->
        LAV Video Decoder -> (YV12, 854x480) ->
        ffdshow raw video filter -> (NV12 896x480) ->
        Enhanced Video Renderer (custom presenter)

    Audio filter chain:
        LAV Splitter Source (internal) ->
        LAV Audio Decoder (internal) -> (IEEE Float 48000Hz) ->
        Audio Switcher -> (IEEE Float 48000Hz) ->
        Internal Audio Renderer


When "Avisynth" is unchecked: (Fine video and PCM)

Properties: (TimestretchYV12.avs)
        Video: YV12 854x480 29.97fps [Avisynth video #1]
        Audio: PCM 48000Hz stereo 1536kbps [Avisynth audio #1]

    Video filter chain:
        AVI/WAV File Source -> (YV12, 854x480) ->
        ffdshow raw video filter -> (NV12, 896x480) ->
        Enhanced Video Renderer (custom presenter)

    Audio filter chain:
        AVI/WAV File Source -> (PCM 48000Hz) ->
        Audio Switcher -> (PCM 48000Hz) ->
        Internal Audio Renderer


I don't know why "LAV Video Decoder (internal)" don't work with I420....

>Though it must be noted that most (if not all) of those displays accept an input video signal at 1360x768.

Really?

For reference:
    1920x1080, Decrease to screen size(1366,768)
    Renderer Input (SVP3.1.7a, 1366x768):  http://pastebin.com/u0r6kBuG
    Renderer Input (SVP4 Free 4.0.0.52, 1360x768):  http://pastebin.com/26wNDzUR

I think "x8 limitation" is unnecessary.

  SVP4 resize(crop) problem (video frame width to x8)
  http://www.svp-team.com/forum/viewtopic.php?id=2965

(I'm afraid my expressions may be rude or hard to read, because I'm not so good at English.)

I use SVP4 Free 4.0.0.52 and 1366x768@60Hz display.
SVP4 resizes(crops) video frame width to multiples of 8.(x8 limitation)

  e.g.
    1920x1080 -> 1360x768 (not 1366x768)
    1012x720 -> 1008x720 (cropped)

This causes unnecessary processing, and increases system load.
I think x8 limitation is unnecessary. Please improve this problem.
"BicubicResize(1366(not x8),768,b=0,c=0.75)" seems to work fine.
And SVP3.1.7a uses "LanczosResize(1366(not x8),768)".


Example1(resize):

  Sintel.2010.1080p.mkv 1920x818@24  ( https://durian.blender.org/download/ )

  Resize to screen:
      SVP3:  "LanczosResize(1366,582)"
      SVP4:  "BicubicResize(1360,580,b=0,c=0.75)"

  Scaling process:
       SVP3:  1920x818 -> SVP3(1920x818->1366x582) -> Renderer(no scaling)
       SVP4:  1920x818 -> SVP4(1920x818->1360x580) -> Renderer(1360x580->1366x583)

  SVP4 Log:
    Media: video 1920x818 [PAR 1.000] at 24.000 fps [constant]
    Playback [2f133a]: resulting video frame 1360x580 [1920x818 -> scaled -> 1360x580]

  =>SVP4 causes unnecessary scaling on renderer, and increases system load.


Example2(crop):

  SVP4 Log:
    Media: video 1012x720 [PAR 1.000] at 25.000 fps [constant]
    Playback [37071e]: resulting video frame 1008x720 [1012x720 -> cropped -> 1008x720]

  =>SVP4 causes unnecessary cropping.

  Related topic:
    Completely disable video crop in SVP 4
    http://www.svp-team.com/forum/viewtopic.php?id=2928


Environment:
  SVP4 Free 4.0.0.52
  OS: Windows 8.1 [6.3.9600]
  CPU: Intel Core i7-4702MQ [base frequency 2201 MHz, 8 threads]
  Video: registry info - Intel HD Graphics 4600
  Video: 1 GPU OpenCL device(s) on Intel(R) OpenCL [OpenCL 1.2] (Intel(R) Corporation)
  Video 1: device name 'Intel(R) HD Graphics 4600' (Intel(R) Corporation, ver.10.18.14.4222) [gpuID=11]: OK
  Memory:  8116  MB total,  6259 MB free
  Screens: screen 0 - 1366x768 @59.999 Hz [measured], 96 PPI
  Screens: primary screen is 0