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 Development

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 22nd April 2015, 14:08   #1061  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Thanks for the info, I never had the best understanding for text encodings, it quite improved lately though.
stax76 is offline  
Old 23rd April 2015, 20:56   #1062  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Has anybody a idea on this, is it likely a ffmpeg or AviSynth+ bug? I use AviSynth+ r1576 (x86/x64 installer) and ffmpeg-20150422-win64-static

Quote:
BlankClip(length = 2999, fps = 23.974359, width = 16, height = 16, pixel_type = "YV12")
KillAudio()

"C:\Daten\Projekte\GitHub\staxrip\bin\Tools\ffmpeg\ffmpeg.exe" -i "C:\Daten\Temp\test.avs" -c:v copy -y "C:\Daten\Temp\test.avi"

ffmpeg version N-71633-gcbe2700 Copyright (c) 2000-2015 the FFmpeg developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --enable-decklink --enable-zlib
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
[avisynth @ 0000000002e51000] AviSynth version is too old. Please upgrade to either AviSynth 2.6 >= RC1 or AviSynth+ >= r1718.
C:\Daten\Temp\test.avs: Unknown error occurred

Last edited by stax76; 23rd April 2015 at 21:04.
stax76 is offline  
Old 23rd April 2015, 21:44   #1063  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by stax76 View Post
Has anybody a idea on this, is it likely a ffmpeg or AviSynth+ bug? I use AviSynth+ r1576 (x86/x64 installer) and ffmpeg-20150422-win64-static
It's ffmpeg - although the reasoning seems rather arbitrary:
Code:
#ifdef USING_AVISYNTH
    /* On Windows, FFmpeg supports AviSynth interface version 6 or higher.
     * This includes AviSynth 2.6 RC1 or higher, and AviSynth+ r1718 or higher,
     * and excludes 2.5 and the 2.6 alphas. Since AvxSynth identifies itself
     * as interface version 3 like 2.5.8, this needs to be special-cased. */

    if (avs_library.avs_get_version(avs->clip) < 6) {
        av_log(s, AV_LOG_ERROR,
               "AviSynth version is too old. Please upgrade to either AviSynth 2.6 >= RC1 or AviSynth+ >= r1718.\n");
        ret = AVERROR_UNKNOWN;
        goto fail;
    }
#endif
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 23rd April 2015, 21:55   #1064  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
So the ffmpeg bug tracker would be the right place to report it? Is there more info I should provide when I create a ticket?
stax76 is offline  
Old 23rd April 2015, 22:01   #1065  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by stax76 View Post
So the ffmpeg bug tracker would be the right place to report it? Is there more info I should provide when I create a ticket?
What makes you think it's a bug? The devs have decided to only support interface version 6 and up. I'm sure they have a reason for that.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 23rd April 2015 at 22:06.
Groucho2004 is offline  
Old 23rd April 2015, 22:06   #1066  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
Sorry I missed my AviSynth+ is outdated, thanks for helping, it's probably better to stop programming today.
stax76 is offline  
Old 23rd April 2015, 23:06   #1067  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I would like to thank everybody making 64-Bit possible and suggest releasing a updated installer.
stax76 is offline  
Old 24th April 2015, 03:47   #1068  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
ffmpeg dropping support for AviSynth 2.5x has already been a problem in earlier versions.
Quote:
Older versions created between March 2013 and September 2013 are not compatible with AviSynth versions prior to version 2.60.
Now the ffmpeg developers in their eternal wisdom have decided to drop support for AviSynth 2.5x for good. The last version which works with AviSynth 2.5x is ffmpeg-20150324-git-a2dd2d7-win32-static.7z.

Still the AviSynth SourceForge download page lists version 2.58 as the current stable release. Go figure...


Cheers
manolito

Last edited by manolito; 24th April 2015 at 04:19.
manolito is offline  
Old 24th April 2015, 05:59   #1069  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
The decision to drop support for anything below 2.6 RC1 was due to catastrophic header incompatibilities between 2.5 and 2.6 RC1* and the maintenance burden (and potential licensing minefield that could mean any additional 2.5 support would violate GPL) that would be incurred by trying to continue to support 2.5 while using properly updated 2.6 headers.

*technically, between 2.6a5 and RC1 too.


The gory details:
2.6 RC1 changes several functions in avisynth_c.h from AVSC_INLINE to AVSC_API, functions that libavformat's AviSynth demuxer uses. These changes mean that using the up-to-date version of the header from either classic or Plus would cause libavformat's AviSynth demuxer to fail compilation. The only solution was to change those standalone calls into struct-sourced calls from LOAD_AVSC_FUNC, which allows for supporting the up-to-date headers but breaks all prior versions. 2.5 was supported through a compat header sourced from FFMS2, and only contained the pieces that had been adapted there (regarding the internal functionality of avs_get_row_size_p/avs_get_height_p that changed between 2.5 and the 2.6 alphas).

Attempting to continue supporting 2.5 would require - similarly to what happened in AviSynth itself - moving the baked-in code from the old header into the compat header, swelling the latter with more things. But the compat header is under the MIT License, not the GPL. Moving GPL code into a non-GPL header is a no-no. So that would require trying to reverse engineer it. Further, the reverse engineered form would then require forcing more special-casing and code branching into the libavformat demuxer, which would work against the goal of it being [at least relatively] clean. And no one - not me, nor anyone else in the discussion on the FFmpeg-devel mailing list - were willing to or expressed any kind of interest in reverse engineering that for the sake of supporting a less stable, nearly 7 year old version of AviSynth when more stable and higher performance versions exist. Or for trying to support the 2.6 alphas when the support from the classic AviSynth devs for non-final versions has never lasted longer than the next alpha or RC release (see the CACHE_* changes in 2.6a4 requiring rebuilds of masktools-26).

In short, it was the state of the AviSynth headers themselves that burned this particular bridge. The real preference is for using official headers rather than the transitional form header it used to use.


The primary problem for Plus is that AviSynth+ 0.2 has yet to be formally released, so while we can say '2.6 RC1 or higher' for classic, users that go to avs-plus.net see the current stable version 0.1 (a.k.a. r1576), which is still in a pre-RC1 state and thus suffers from the same problem as classic 2.6a1-5 on this point.
qyot27 is online now  
Old 24th April 2015, 07:49   #1070  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by qyot27 View Post
The decision to drop support for anything below 2.6 RC1 was due to catastrophic header incompatibilities between 2.5 and 2.6 RC1* and the maintenance burden (and potential licensing minefield that could mean any additional 2.5 support would violate GPL) that would be incurred by trying to continue to support 2.5 while using properly updated 2.6 headers.

*technically, between 2.6a5 and RC1 too.


The gory details:
2.6 RC1 changes several functions in avisynth_c.h from AVSC_INLINE to AVSC_API, functions that libavformat's AviSynth demuxer uses. These changes mean that using the up-to-date version of the header from either classic or Plus would cause libavformat's AviSynth demuxer to fail compilation. The only solution was to change those standalone calls into struct-sourced calls from LOAD_AVSC_FUNC, which allows for supporting the up-to-date headers but breaks all prior versions. 2.5 was supported through a compat header sourced from FFMS2, and only contained the pieces that had been adapted there (regarding the internal functionality of avs_get_row_size_p/avs_get_height_p that changed between 2.5 and the 2.6 alphas).

Attempting to continue supporting 2.5 would require - similarly to what happened in AviSynth itself - moving the baked-in code from the old header into the compat header, swelling the latter with more things. But the compat header is under the MIT License, not the GPL. Moving GPL code into a non-GPL header is a no-no. So that would require trying to reverse engineer it. Further, the reverse engineered form would then require forcing more special-casing and code branching into the libavformat demuxer, which would work against the goal of it being [at least relatively] clean. And no one - not me, nor anyone else in the discussion on the FFmpeg-devel mailing list - were willing to or expressed any kind of interest in reverse engineering that for the sake of supporting a less stable, nearly 7 year old version of AviSynth when more stable and higher performance versions exist. Or for trying to support the 2.6 alphas when the support from the classic AviSynth devs for non-final versions has never lasted longer than the next alpha or RC release (see the CACHE_* changes in 2.6a4 requiring rebuilds of masktools-26).

In short, it was the state of the AviSynth headers themselves that burned this particular bridge. The real preference is for using official headers rather than the transitional form header it used to use.


The primary problem for Plus is that AviSynth+ 0.2 has yet to be formally released, so while we can say '2.6 RC1 or higher' for classic, users that go to avs-plus.net see the current stable version 0.1 (a.k.a. r1576), which is still in a pre-RC1 state and thus suffers from the same problem as classic 2.6a1-5 on this point.
Thanks for the detailed explanation.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 25th April 2015, 03:19   #1071  |  Link
manolito
Registered User
 
manolito's Avatar
 
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,078
@ qyot27

Thanks for the explanation, too. Looks like for the time being I will be stuck with versions before ffmpeg-20150324.

Right now I mainly use the point release 2.5.2 from Dec_30_2014. Do you know if there are any significant improvements for MPEG2 encoding between this point release and the version from 2015/03/24 which make it worth upgrading?


Cheers
manolito
manolito is offline  
Old 25th April 2015, 07:19   #1072  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I've finished porting StaxRip to 64-Bit and would like to release a first beta and need a AviSynth+ installer that is compatible with the latest ffmpeg.
stax76 is offline  
Old 25th April 2015, 14:02   #1073  |  Link
zero9999
Registered User
 
Join Date: Oct 2011
Posts: 52
Quote:
Originally Posted by stax76 View Post
I've finished porting StaxRip to 64-Bit and would like to release a first beta and need a AviSynth+ installer that is compatible with the latest ffmpeg.
what prevents you from building it yourself?
zero9999 is offline  
Old 25th April 2015, 14:27   #1074  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
I've not built an installer in ten years, I don't know how to do it.
stax76 is offline  
Old 26th April 2015, 06:58   #1075  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
Quote:
Originally Posted by manolito View Post
@ qyot27

Thanks for the explanation, too. Looks like for the time being I will be stuck with versions before ffmpeg-20150324.

Right now I mainly use the point release 2.5.2 from Dec_30_2014. Do you know if there are any significant improvements for MPEG2 encoding between this point release and the version from 2015/03/24 which make it worth upgrading?


Cheers
manolito
I have no idea, save for searching the git log for 'mpegvideo' and trying to extrapolate.

http://git.videolan.org/?p=ffmpeg.gi...it&s=mpegvideo

There have been commits, but to what effect I don't know.
qyot27 is online now  
Old 26th April 2015, 11:58   #1076  |  Link
jones1913
random user
 
Join Date: May 2014
Location: #Neuland
Posts: 116
Hey, after the recent StaxRip64 talk I've repeated my test from here and here with QTGMC and this time with x64 AVS+:

medium thread count:
Code:
SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("LWLibavVideoSource",3)
LWLibavVideoSource("sample.m2v") 
QTGMC(Preset="Medium")
SelectEven()
Prefetch(4)

AVSMeter 1.9.8.0 (x64)
AviSynth+ 0.1 (r1779, MT, x86_64) (0.1.0.0)

Number of frames:                 1754
Length (hh:mm:ss.ms):     00:01:10.160
Frame width:                       720
Frame height:                      576
Framerate:                      25.000 (25/1)
Colorspace:                       YV12

Frames processed:               1754 (0 - 1753)
FPS (min | max | average):      4.496 | 182612 | 39.56
Memory usage (phys | virt):     377 | 385 MB
Thread count:                   67
CPU usage (average):            52%

Time (elapsed):                 00:00:44.339

# x86 result was:
# FPS (min | max | average):      3.741 | 121742 | 35.30
# Memory usage (phys | virt):     350 | 366 MB
# Thread count:                   68
# CPU usage (average):            55%
high thread count:
Code:
SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("LWLibavVideoSource",3)
LWLibavVideoSource("sample.m2v") 
QTGMC(Preset="Medium")
SelectEven()
Prefetch(10)

AVSMeter 1.9.8.0 (x64)
AviSynth+ 0.1 (r1779, MT, x86_64) (0.1.0.0)

Number of frames:                 1754
Length (hh:mm:ss.ms):     00:01:10.160
Frame width:                       720
Frame height:                      576
Framerate:                      25.000 (25/1)
Colorspace:                       YV12

Frame (current | last):         983 | 1753
FPS (cur | min | max | avg):    53.29 | 2.133 | 100437 | 54.22
Memory usage (phys | virt):     685 | 706 MB
Thread count:                   122
CPU usage (current | average):  94% | 95%

Time (elapsed | estimated):     00:00:18.149 | 00:00:32.350

Press 'Esc' to cancel the process...

# x86 result was:
# FPS (min | max | average):      2.018 | 87337 | 48.62
# Memory usage (phys | virt):     703 | 731 MB
# Thread count:                   123
# CPU usage (average):            96%
There is a nice speed boost noticeable, the downside is that the latter script freezes at random points.
__________________
BeHappy Audio Transcoder > <Doom9 forum> <Gleitz forum> <GitHub>
MP4.tool GUI for MP4Box & L-SMASH muxer > https://www.mediafire.com/folder/3i6y6cbkyhblm/MP4.tool
jones1913 is offline  
Old 26th April 2015, 15:46   #1077  |  Link
jones1913
random user
 
Join Date: May 2014
Location: #Neuland
Posts: 116
Quote:
Originally Posted by jones1913 View Post
the latter script freezes at random points.
I've cleaned up my plugins folder and leave only AVS+ core plugins and QTGMC core plugins (masktool, mvtools, rgtools, nnedi3), but it is still freezing, even with medium thread count.
And further the x86 version is now freezing too.
Something strange is going on here, after the last M$ update round a few days ago the system wont booted so I had to recover.

Maybe it is related to overclocking (FX-8320 @ 4100 MHz) but until now it was running fine for more than 1 year.

However, the problem seems to be on my system, sorry for confusion.
__________________
BeHappy Audio Transcoder > <Doom9 forum> <Gleitz forum> <GitHub>
MP4.tool GUI for MP4Box & L-SMASH muxer > https://www.mediafire.com/folder/3i6y6cbkyhblm/MP4.tool
jones1913 is offline  
Old 27th April 2015, 01:25   #1078  |  Link
stax76
Registered User
 
stax76's Avatar
 
Join Date: Jun 2002
Location: On thin ice
Posts: 6,837
updated installer:

http://www.mediafire.com/download/wi....1.0_r1779.exe
stax76 is offline  
Old 27th April 2015, 03:59   #1079  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
What is the simplest way to properly activate MT with AviSynth+ ?

I have this script. I don't know if it's the most optimized but it works. How do I get that to work with AviSynth+ syntax?

Code:
SetMTMode(3,4)
PluginPath = ""
AviSource("Input.avi", audio=false, pixel_type="YV12")
SetMTMode(2)
LoadPlugin(PluginPath+"ColorMatrix.dll")
ColorMatrix(mode="Rec.601->Rec.709")
LoadPlugin(PluginPath+"FFT3DFilter.dll")
fft3dfilter(sigma=3, bt=5, bw=48, bh=48, ow=24, oh=24, ncpu=8)
LoadPlugin(PluginPath+"nnedi3.dll")
nnedi3_rpow2 (2)
LoadPlugin(PluginPath+"eedi3.dll")
eedi3_rpow2 (2)
Spline36Resize(960, 720)
fft3dfilter(bt=-1, sharpen=0.2, ncpu=8)
Distributor()

Last edited by MysteryX; 24th June 2015 at 06:13.
MysteryX is offline  
Old 27th April 2015, 07:49   #1080  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,419
http://avisynth.nl/index.php/AviSynth%2B#MT_Notes

Also of note that using "" in SetFilterMTMode to mean the default was changed; the wiki just hasn't been updated.

Personally, I'd format it differently:
Code:
SetFilterMTMode("DEFAULT_MT_MODE",2)
SetFilterMTMode("AviSource",3)

PluginPath = ""

LoadPlugin(PluginPath+"ColorMatrix.dll")
LoadPlugin(PluginPath+"FFT3DFilter.dll")
LoadPlugin(PluginPath+"nnedi3.dll")
LoadPlugin(PluginPath+"eedi3.dll")

AviSource("Input.avi", audio=false, pixel_type="YV12")
ColorMatrix(mode="Rec.601->Rec.709")
fft3dfilter(sigma=3, bt=5, bw=48, bh=48, ow=24, oh=24, ncpu=8)
nnedi3_rpow2 (2)
eedi3_rpow2 (2)
Spline36Resize(960, 720)
fft3dfilter(bt=-1, sharpen=0.2, ncpu=8)
Prefetch(4)
The only actual things that changed were SetMTMode->SetFilterMTMode and Distributor->Prefetch. That's it, generally.


But, because the goal is that the user shouldn't have to worry about proper mode setting, the encouraged practice is to use the MtModes.avsi master file (linked to the gist because it's more straight-forward for downloading) and have it in your plugin autoload directory. If a plugin or filter you use isn't in that list, you're encouraged to report back which mode should be used for it so it could be added to the list. And, you could always add the SetFilterMTMode lines you come up with personally to that .avsi and never bother with them in-script, only using Prefetch at the end.
qyot27 is online now  
Closed Thread

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 09:43.


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