master-of-zen / Av1an

Cross-platform command-line AV1 / VP9 / HEVC / H264 encoding framework with per scene quality encoding
GNU General Public License v3.0
1.51k stars 155 forks source link

Support Avisynth #829

Open videocorr opened 6 months ago

videocorr commented 6 months ago

Please, add support Avisynth, ability to use a script AVS

LastBreeze commented 6 months ago

I've always had a fascination with AviSynth use in modern day. Looking at their sourceforge, it seems the last update was in 2016? https://sourceforge.net/projects/avisynth2/files/

I remember using AviSynth in the early 2000s for encoding DVDs to Xvid. Are there any advantages to using AviSynth compared to VapourSynth? av1an has VapourSynth support.

If ever consider transitioning to VapourSynth, you might find it helpful to start with some basic scripts via Chat GPT. Here's an example I tested out for the sake of it:

You Write a vapoursynth script for c:\encoding\input.mkv

Chat GPT Here's a basic VapourSynth script that you can use to process a video file located at c:\encoding\input.mkv. This script will just open the video file and display its frames without any additional processing. For the purposes of demonstration, I will use the built-in core.ffms2.Source function from the FFmpegSource plugin to read the video file.


# Create a VapourSynth environment
core = vs.core

# Load the video source
video = core.ffms2.Source(source='c:\\encoding\\input.mkv')

# Output the video
video.set_output()
BlueSwordM commented 6 months ago

Please, add support Avisynth, ability to use a script AVS

We will accept any pull requests, but we will not perform the work required to implement and support AVS/AVS+.

videocorr commented 6 months ago

I've always had a fascination with AviSynth use in modern day. Looking at their sourceforge, it seems the last update was in 2016? https://sourceforge.net/projects/avisynth2/files/

I remember using AviSynth in the early 2000s for encoding DVDs to Xvid. Are there any advantages to using AviSynth compared to VapourSynth? av1an has VapourSynth support.

If ever consider transitioning to VapourSynth, you might find it helpful to start with some basic scripts via Chat GPT. Here's an example I tested out for the sake of it:

You Write a vapoursynth script for c:\encoding\input.mkv

Chat GPT Here's a basic VapourSynth script that you can use to process a video file located at c:\encoding\input.mkv. This script will just open the video file and display its frames without any additional processing. For the purposes of demonstration, I will use the built-in core.ffms2.Source function from the FFmpegSource plugin to read the video file.


# Create a VapourSynth environment
core = vs.core

# Load the video source
video = core.ffms2.Source(source='c:\\encoding\\input.mkv')

# Output the video
video.set_output()

Avisynth is needed for more than just opening files. For example, Vapoursynth does not have the function to add timecode in SMPTE format - ShowSMPTE, create an empty clip from an audio file - BlankClip(length=(round (a.AudioDuration*25^)^), etc. There are many reasons to use Avisynth, the last one the version of the program was released not in 2016, but in 2023, the program continues to develop.

dnjulek commented 6 months ago

ShowSMPTE is so simple that a python script can do the same thing in VS, and the current version has audio support