Jump to content

Avisynth integration


Tin2tin
 Share

Recommended Posts

  • 1 month later...

Do you think that it would be possible run avisynth scripts in autoit with stuff like this?

http://forum.doom9.org/showthread.php?p=772595#post772595

(I don't know anything about dllcalls and such)

Or are there better ways?

I would really like to try to give this a shot, but it would be really helpful if anyone could point me in the right direction of how to implement the AVSredirect.dll(from the link above) functions in autoitscript? Are there any turorials or examples I could look at or simply point me to the main function I should use in autoitscript?

Link to comment
Share on other sites

  • 4 months later...

Found your post on Doom9. I am also interested in this...

Here is the header for the DLL. DLL is C or C++

#ifndef AVISYNTHDLL_H
#define AVISYNTHDLL_H

typedef struct AVSDLLVideoInfo {
    // Video
    int width;
    int height;
    int raten;
    int rated;
    int aspectn;
    int aspectd;
    int interlaced_frame;
    int top_field_first;
    int num_frames;
    int pixel_type;

    // Audio
    int audio_samples_per_second;
    int sample_type;
    int nchannels;
    int num_audio_frames;
    int64_t num_audio_samples;
} AVSDLLVideoInfo;

typedef struct AVSDLLVideoPlane {
    int width;
    int height;
    int pitch;
    BYTE *data;
} AVSDLLVideoPlane;


typedef struct FRAME {
    int *data;
} FRAME;



typedef struct AVSDLLVideoFrame {
    AVSDLLVideoPlane plane[3];
} AVSDLLVideoFrame;

typedef struct AVSDLLAudioPos {
    int64_t start;
    int64_t count;
} AVSDLLAudioPos;


#endif /* AVISYNTHDLL_H */

I converted all struct's excpet for AVSDLLVideoFrame, which by the name sounds fairly important.

DllOpen("AVSredirect.dll")
$str = "int width; int height; int raten; int rated; int aspectn; int aspectd; int interlaced_frame; int top_field_first; int num_frames; int pixel_type; int audio_samples_per_second; int sample_type; int nchannels; int num_audio_frames; int64 num_audio_samples;"
$AVSDLLVideoInfo = DllStructCreate($str)
$str = "int width; int height; int pitch; BYTE *data;"
$AVSDLLVideoPlane = DllStructCreate($str)
$str = "int width; int height; int pitch; BYTE *data;"
$AVSDLLVideoPlane = DllStructCreate($str)
$str = "int64 start; int64 count;"
$AVSDLLAudioPos = DllStructCreate($str)

Functions that are available in AVSredirect.dll

_avs_close
_avs_create
_avs_getaframe
_avs_getlasterror
_avs_getlasterrorb
_avs_getvframe
_avs_open
_avs_script

What to put in DllCall() is what's needed as well as the missing AVSDLLVideoFrame struct, how can that be done in AviSynth?

An Example using PureBasic is here (Post #59)

http://forum.doom9.org/showthread.php?p=800030#post800030

I second Tin2tin's request for some help...

Link to comment
Share on other sites

  • 5 weeks later...
  • 7 months later...

It appears that the AVSredirect has been changed into AvisynthWrapper. C++ sourcecode included. I hope that helps someone to write an Autoit UDF that wrapper, so the great Avisynth video scripting language finally can partner up with Autoit.

Btw. if you don't know what Avisynth can do for you, then take a look at the link at my signature. All the videos in the flv player are made with Avisynth.

Edited by Tin2tin
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...