GithubHelp home page GithubHelp logo

pinterf / avisynthplus Goto Github PK

View Code? Open in Web Editor NEW

This project forked from avisynth/avisynthplus

208.0 208.0 24.0 31.63 MB

AviSynth with improvements

Home Page: http://avs-plus.net

CMake 0.38% C++ 98.00% C 1.62% Makefile 0.01%

avisynthplus's People

Contributors

addewyd avatar chainikdn avatar chikuzen avatar ignus2 avatar innocenat avatar line0 avatar magiblot avatar mysteryx93 avatar nekopanda avatar pinterf avatar pylorak avatar qyot27 avatar timothygu avatar tp7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avisynthplus's Issues

"Evaluate: Unhandled C++ exception!" on "TimeStretch"

Lets consider small script with example of speed up with pitch compensation for audio.
For old AVS it works.

For AVS+

  • SpeedUpByX(scene, 4) => OK
  • SpeedUpByX(scene, 5) => "[avisynth @ 037e77c0] Evaluate: Unhandled C++ exception!"
audio = WavSource("d.wav").ConvertAudioToFloat().SSRC(48000)
video = Version()
scene = AudioDub(video, audio)

function SpeedUpByX(scene, times) {
    origaudiorate = scene.AudioRate 
    scene = scene.AssumeFPS(scene.FrameRate*times, sync_audio=true).ChangeFPS(24)
    scene = scene.TimeStretch(pitch=100.0/times)
    scene = scene.ResampleAudio(origaudiorate)
    return scene
}

#return SpeedUpByX(scene, 4) #ok
return SpeedUpByX(scene, 5) #NOT ok [avisynth @ 037e77c0] Evaluate: Unhandled C++ exception!

Sample files https://drive.google.com/file/d/1FFOJPMH32IaIFVPGHucQSEsouwMi0oAe/view?usp=sharing (41K)

AVS+ 32bit, debug, from

commit 4c4635eaa32689336d45a26c5b326598242d6b2b
Author: Pinterf <[email protected]>
Date:   Mon Nov 25 12:33:11 2019 +0100

Can not build with clang in r2819

Seems the MSVC version check didn't work fine with clang.

The C compiler identification is Clang 3.8.0
The CXX compiler identification is Clang 3.8.0
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/ClangC2/14.10.25903/bin/HostX86/clang.exe
Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/ClangC2/14.10.25903/bin/HostX86/clang.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Detecting C compile features
Detecting C compile features - done
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/ClangC2/14.10.25903/bin/HostX86/clang.exe
Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/ClangC2/14.10.25903/bin/HostX86/clang.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
CMake Error at CMakeLists.txt:26 (MESSAGE):
Visual C++ 2017 or newer required.

MixAudio() produces stitches

MixAudio() produces stitches.
When using MeGUI's downmix function

function c6_stereo(clip a)
{
fl = GetChannel(a, 1)
fr = GetChannel(a, 2)
fc = GetChannel(a, 3)
lf = GetChannel(a, 4)
sl = GetChannel(a, 5)
sr = GetChannel(a, 6)
fl_sl = MixAudio(fl, sl, 0.2929, 0.2929)
fr_sr = MixAudio(fr, sr, 0.2929, 0.2929)
fc_lf = MixAudio(fc, lf, 0.2071, 0.2071)
l = MixAudio(fl_sl, fc_lf, 1.0, 1.0)
r = MixAudio(fr_sr, fc_lf, 1.0, 1.0)
return MergeChannels(l, r)
}

It produces stitches. Additionally, the process speed is much lower than using official avs2.6 when MixAudio() is engaged.
Here's the file that can reproduce the issue without difficulty.
test.zip
When using official avs2.6, I tried to find anything wrong, but it works well.

Switch between x86 and x86_version

AnimeIVTC uses some old plugins that exist only in x86 versions and when I try to load them using LoadPlugin get message "Cannot load a 32 bit DLL in 64 bit Avisynth". My OS is Windows 10 x64, so is there any way to make Avisynyh+ r2772 start in x86 mode?

Subtitle halo size

I've been staring at the code for months and completely failed to figure out how to change the hardcoded subtitle halo width without breaking 100% of the subtitle functionality. I don't know why it was made so unbearably cryptic, fixed, and unexpandable.

Do you know if it's even possible at this point to make it more configurable? On standard DVD footage resolution it might look fine, but once you go HD or higher, increasing subtitle font size accordingly, halo gets vanishingly smaller compared to font size.

Wrong UV planes when converting from Y32

Many conversion functions give weird results with 32-bit Y sources, most probably due to not being adapted to the new range for the U and V channels. It looks like they want to fill the U and V planes with half_range but they fill them with 0.5 instead of 0.0.

Y8 source clip:
imatge

ConvertBits(32)
ConvertToYV12() #or YV16, or YV24, or RGB48, or RGB64, or PlanarRGB
ConvertBits(8)

imatge

ConvertBits(32)
ConvertToYV12() #or YV16, or YV24
Expr("x","x 0.5 -")
ConvertBits(8)

imatge

ConvertBits(16)
ConvertToYV12() #or YV16, or YV24
ConvertBits(8)

imatge

In addition, converting Y to YUY2 at any bitrate other than 8 will cause a severe crash:

imatge

I'm sorry.

Avisynth+ x86 and Windows Server 2008 R2 x64

When trying SupTitle plugin with Avisynth+ x86 on Windows Server 2008 R2 x64 Standard, there is no output and the Avisynth process is hanging - example. Tested different older versions, the behavior is the same.
Removing SupTitle, there is no problem - example.
Using SupTitle plugin with AviSynth 2.6.0/2.6.1, there is no problem - example.
Using SupTitle x64 and Avisynth+ x64, there is no problem.
Here SupTitle plugin x86.
On Windows 10 there is no such problem.

Expr: crash when YV12 -> RGBP*

Hi,
I have found the following to cause a crash instead of throwing an error:

#Source colorspace: YV12
Expr(last,"x 255.0 /","x 255.0 /","x 255.0 /",format="RGBPS") # or any other RGB bitdepth

I guess because input planes U, V have a different width and height (in pixels) than the output G, B planes?

In addition, imagine my intention was to process the source Y channel for each output RGB plane, instead of processing U and V. Isn't there any way to do so?

Anyway, thank you, pinterf. This is a very great function.

x64 version crash

Hi.

r2728-MT x64/r2664-MT x64 - these version are crashing when I have:

cLeft=2
StackHorizontal(Crop(cLeft, 0, cLeft, 0).mt_convolution("0 1 0", "0 1 1", y=3, u=3 , v=3),Crop(cLeft, 0, 0, 0))

or

cRight=2
StackHorizontal(Crop(0, 0, width-cRight, 0),Crop(width-2*cRight, 0, cRight, 0).mt_convolution("0 1 0", "1 1 0", y=3, u=3, v=3))

When cLeft/cRight > 2, no problem. Removing mt_convolution(...) = no problem.

r2728-MT x86 doesn't crash with cLeft/cRight = 2 + mt_convolution(...).

Here both x64 and x86 doesn't crash:

cTop=2
StackVertical(Crop(0, cTop, 0, cTop).mt_convolution("0 1 1", "0 1 0", y=3, u=3, v=3),Crop(0, cTop, 0, 0))
cBottom=2
StackVertical(Crop(0, 0, 0, height-cBottom),Crop(0, height-2*cBottom, 0, cBottom).mt_convolution("1 1 0", "0 1 0", y=3, u=3 , v=3))

Thanks for everything you're doing.

ConvertToYV1* are notably slower than ConvertToYV24 when converting from RGB

Hi there,

I have experienced some issues with the performance of the ConvertToYV12 and ConvertToYV16 functions (and their ConvertToYUV4xx equivalents).

In summary, doing a RGB->YV24->YV1* conversion path results in a higher processing speed than a direct RGB->YV1* conversion, in my IvyBridge (up to AVX) processor. I have made some measurements which show what I'm saying (the numbers are average FPS measured with AVSMeter):

imatge

I used the following source to run these tests. Then I added the Convert calls below:

ImageSource("tivissa-turisme-terres-ebre-ribera-catalunya-2.jpg",end=400)

The picture (1746x1200) can be found here: http://www.turismeriberaebre.org/municipi/tivissa/tivissa-turisme-terres-ebre-ribera-catalunya-2/. However, the issue is not exclusive to image sources.

Cheers.

Crash when ternary operator is used with HBD

Hi, using this script with 8-bit video everything is fine. When the video is > 8-bit there is crash without any error message.
Replacing NumComponents(input) > 1 ? input == ExtractY(input) : NOP() with if (NumComponents(input) > 1) { input = ExtractY(input) } works fine with every bit depth.
Used avs+ r2915 / 3.4.

Using VirtualDub plugins causes exceptions

Just calling LoadVirtualdubPlugin(..) doesn't cause any problems. But trying to apply the filter to a clip causes exceptions. The exceptions are "ignored" by AvsPmod or MPC-HC (AvsPmod might show notifications on its error window without crashing, and MPC reports the exception when closing).
I'm using the last version of Avs+ (r2508) and AVSMeter (264), which reports:

AviSynth+ 0.1 (r2508, MT, i386) (0.1.0.0)
System exception - Access Violation

The same error is reported by VirtualDub FilterMod, so it can't run the script.
I've tried filters like colorize and gradation. Everything works fine in AviSynth 2.6.
I can provide more information about how I'm using the filters in my script if you need it, but I expect you to reproduce the error easily, so I'll leave it here.

Thanks!

Expr AVX2 alignment bug

When video width is less than modulo 16, the expressions for the second and third planes (alpha not tested) may produce wrong results.

optAVX2=false prevents the issue, so it seems to be related to AVX2.

Sample code:

expr_r = "x 127 < 0.98 x * -0.02 1.02 x * + ?"
expr_g = "x 127 < 1.02 x * 0.02 0.98 x * + ?"
expr_b = "x 127 < 0.9864 x * -0.0136 1.0136 x * + ?"

ColorBarsHD(1024 + 8, pixel_type="YV24") # Module 8, bug triggers
Y = ConvertToY()
# One Expr per channel
R = Expr(Y, expr_r)
G = Expr(Y, expr_g)
B = Expr(Y, expr_b)
# All at once
e = Expr(Y, expr_r, expr_g, expr_b, format="RGBP8")

Compare(R, e.ExtractR(), "Y") # Equal
Compare(G, e.ExtractG(), "Y") # Not equal!
Compare(B, e.ExtractB(), "Y") # Not equal!

AudioTrim() not atually trim first seconds

If you want to mix video (containing audio track, but probably it doesn`t matter) with a distinct audio track, like this:

video = FFMS2("some.video")
audio = FFAudioSource("some_audio.mp3")

audio = DelayAudio(AudioTrim(audio, 10.0, 0.0), 10.0)

MixAudio(video, audio)

Then audio will not be trimmed from the beginning, it simply shifts "start_time" seconds to the beginning of the clip. Audio in example above will start from very beginning of the video.

the .avs file icon

AviSynth_260.exe
snipaste_2018-04-30_11-46-25

Now AviSynthPlus-MT-r2664-with-vc_redist.exe
snipaste_2018-04-30_11-43-19

How to make the .avs file icon like AviSynth_260 in win10 x64 1709?

some issues in autoload plugins

1st one is colors_rgb.avsi it's not work in avs+ at all unless you load it, for more info see https://forum.doom9.org/showpost.php?p=1714618&postcount=1045
(this one is fixed)

2nd one is the order of directories https://forum.doom9.org/showthread.php?p=1800799#post1800799 and https://forum.doom9.org/showthread.php?p=1880154#post1880154
(this one is fixed too)

3rd is avs+ don't unload the loaded plugins after autoload like normal avs https://forum.doom9.org/showthread.php?p=1814912#post1814912
(this one not fixed yet)

and thanks

violation "_ASSERTE(index<array_size)" on "const AVSValue& AVSValue::OPERATOR_INDEX(int index) const"

I see
violation "_ASSERTE(index<array_size)" on "const AVSValue& AVSValue::OPERATOR_INDEX(int index) const"
(actually, I see index=4 on array_size=2, array=args

  static AVSValue __cdecl Create(AVSValue args, void* user_data, IScriptEnvironment* env) {
...
    const int vtrack = args[4].AsInt(0);
    const int atrack = args[5].AsInt(0);
...

To reproduce

     audio = WavSource("wtf.wav")

( sample file to reproduce:
https://drive.google.com/file/d/1NHjeJiKFPz4otu9h1x5dm-3ZB9eUNr2W/view?usp=sharing
https://cloud.mail.ru/public/5eRX/5yNVrUpkr )

If I use released version of AVS+, I got crush on ffmpeg/VirtualDub exit.
On debug version I got this assert violation.

AviSynth crashes if use ConverttoYV24 with UnSharpMask filter

As title really. Crashes using built in UnSharpMask with ConverttoYV24.

Simply put this in an avs file:

AVIFileSource("test.avi", audio=true).converttoYV24().UnsharpMask(strength=60, radius=3, threshold=8)

And render it in ffmpeg or open in AvsPMod. It will crash out in AvsPMod and ffmpeg just doesn't output anything, just returns to command.

Tested with DirectShowSource which also crashes.

Crashes with ConverttoYUV444 as well.

It doesn't mention any limitations in the wiki for UnSharpMask.

Works fine with ConverttoYV12 though.

Edit:
Program Versions
Avisynth+ v2772 (20181220)
FFMpeg 4.2

How to build the latest codebase?

Hi. Probably the instructions from the original post still fully apply, but it feels like it's better to get an official confirmation.

@pinterf what's your current setup for building avs+? At least the VS version is different now. I just want to contribute some code, so it's better to have everything fully compatible.

Allow to use {} instead eval(""" """)

You extended script language for using
If (x>0) {

}
Instead of
x>0? eval("""

""")

But if you want to use easier format, you need to rewrite your script.

If you allow {} instead eval(""" """) you just can find and replace eval(""" to { and """) to }
So you get syntax highlight and you do not need rewrite script

[Documentation] Would it be possible to list which platforms are currently supported by AviSynthPlus? E. g. Linux, Windows and so forth? Ideally in the main README.md if possible.

[Documentation] Would it be possible to list which platforms are currently supported by AviSynthPlus? E. g. Linux, Windows and so forth? Ideally in the main README.md if possible.

I just discovered the project. I used to use AviSynth back when I was using windows.

These days I use linux and program as well, although mostly in ruby (lighter weight than C, C++, C# etc...).

I was sad when avisynth 3.0 never came, and discovered other projects I think ... and just now avisynth+.

Error trying to display the clip

Hi,

I have that error when trying to load YUV video with AvsPmod with avs+ compiled from 27fceb4. I tried ConvertToRGB() and got "ConvertYUV444ToRGB: Only 4:4:4 data input accepted".
avs+ compiled from 4a86862 is ok.

Could it be possible to provide a zipped version for the fileonly?

Hello

Could it be possible to provide a zipped version for the fileonly? AvisynthPlus-r2728-MT-filesonly.zip

The reason of a such request is that it make it available for developpers to directly script the extraction from Maven, Gradle or Ant...
7Z is not widely supported as Zip or Tar.gz so the direct extraction is often not possible, also if some specific plugin sometimes exist, so it ask us host such compressed files on sites like Sourceforge or Bintray, for example, and uncompressed them.

Cheers

Reddish colors

VC1 video, decoded with AviSynth+ r2772 has reddish colors.

K-Lite Codec Pack settings window:
58

FFmpegSource2("Equilibrium-001.mkv")
ffmpegsource2

DirectShowSource("Equilibrium-001.mkv")
orig

ffmpeg.exe -i Equilibrium-001.mkv -frames:v 1 ff.png
ffmpeg

All screenshots (when AviSynth+ was used) above were taken with ffmpeg: ffmpeg.exe -i 01.avs -frames:v 1 ff.png

As you can see ffmpeg decoder provides natural colors.

http://www.framecompare.com/image-compare/screenshotcomparison/10J1NNNU

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.