3

Is there a way to run avisynth on linux?

OR

Is there a similar tool? That is, a way to write a script file that can be played in a video player and/or fed into an encoder, etc.

Update:

My distro is min (ubuntu based).

I tried to build from source and failed (it's complicated, I might try again sometime).

Let me Clarify

I don't want to get avisynth to run as much as I want to be able to montage videos with a text/script file.

The real question here: is there something else on linux that allows this?

For instance: is it possible to use gstreamer to montage videos through scripts? If yes, then how?

hasen
  • 5,269

6 Answers6

4

Since no one mentioned it yet:

There's VapourSynth, a cross-platform toolkit very similar to AviSynth, which uses Python as its scripting language.

http://www.vapoursynth.com/

Example syntax:

import vapoursynth as vs
core = vs.get_core()
video = core.ffms2.Source(source='Rule6.mkv')
video = core.std.Transpose(video)
video.set_output()

To play a script file in a player (mpv):

vspipe --y4m script.vpy - | mpv -

To encode the script output using ffmpeg:

vspipe --y4m script.vpy - | ffmpeg -i pipe: encoded.mkv
1

These days (2024, note dates of other answers) you can use the AviSynth+ frameserver, which is fork of AVISynth that is cross-platorm, 64-bit-capable, and actually maintained. It builds and runs on Linux, and is actually packaged on Debian.

einpoklum
  • 10,666
1

Looks like wine + avs2yuv is the way to go

Quoting from http://akuvian.org/src/avisynth/avs2yuv/:

Sample usage:
wine avs2yuv.exe foo.avs - | mencoder - -o hfyu.avi -ovc lavc -lavcopts vcodec=ffvhuff:vstrict=-1:pred=2:context=1

hasen
  • 5,269
0

avs2yuv is an AviSynth proxy for programs which are not AviSynth aware. However avs2yuv only handles the video stream; audio is ignored.

That means that the audio must be handled seperately. This often voids some of the strong features of AviSynth.. eg. to manipulate a section of audio, or if you want to cut the stream. you will of course want to cut the audio too...


A wine combination of the following 2 apps, enables the handling both audio and video streams concurrently, as you would normally expect from AviSynth...

avidemux2 and avsproxy to the rescue


You can also feed AviSynth scripts via wine to VirtualDub (for Windows).
It too handles both audio and video streams (as expected).

VirtualDub

Peter.O
  • 3,093
0

If you are willing to compile it, there is Avisynth 3.0 - source is available & there's a Gentoo binary distro.

DaveParillo
  • 14,761
0

If you have an AviSynth build from Windows that you really like, and building your own doesn't work for you, you could try it in Wine. You don't give your distribution but it's likely available (if not already installed).

quack quixote
  • 43,504