I have a lot of AviSynth scripts (.avs) which create a montage of text pics and video, but until yesterday I'd had no luck running AviSynth scripts in 'wine'.
I read about a 'Windows' program called Avs2YUV which, according to wineHQ, is platinum and is "intended for use under Wine to interface between Avisynth and Linux-based video tools".

I've had partial success with a couple of very simple scripts, but "partial" means I don't know how to use it properly, or the AviSynth-Avs2YUV combo doesn't work properly (or both).

Below, are 2 scripts:
The first one outputs and saves video only (as intended), but I'd like to know if it is possible to pipe Avs2YUV's stdout directly into a Linux media player... I've tried a few options, but nothing seems to work. On the other hand, the saved .264 file does play, so AviSynth and Avs2YUV are doing something right here. (A quick pre-posting EDIT: I've just corrected a typo where I had put .avi instead of .264, and I realized that I really don't know what x264 does (I'm so used to avi encoding, but I have this feeling that it may be video-only encoder???? ... so I'll mention it now, I have no particular interest in x246.. It was in the example I followed.. I just want to produce a playable video+audio .. the wrapper and codecs aren't particularly important to me.. I'm happy with avi.. actually I prefer it because it works well with AviSynth.. Catch-22...

The second one behaves very much as the first one, but it produces no audio; which it should.

AviSynth scripts are well known, and are directly playable by many players (in Windows), but with this need to use Avs2YUY, I'm somewhat in unknown territory...

I'd appreciate some pointers on these two issues, and perhaps there is an entirely different way to use AviSynth in wine, other than in conjunction with Avs2YUV... or is the idea of using AviSynth in Linux just a myth?

Here are the scripts:

# Script-1: The saved file plays fine (the source has no audio),
#            but how can I play it directly
cd $HOME/.wine/drive_c
echo 'version()' > version.avs
wine  avs2yuv.exe  version.avs - \
    | x264 --stdin y4m --output version.264 -
mplayer version.264

# Script-2: The saved file has no audio, but it should.
#        ...and like Script-1, how can I play it directly
cd $HOME/.wine/drive_c
echo 'avisource("video.avi")' > video.avs
wine  avs2yuv.exe  video.avs - \
    | x264 --stdin y4m --output video.264 -
mplayer video.264

2 Answers 2


I've found a reasonable working solution which allows both audio and video to be processed in a (normal) single pass of the AviSynth script...

avidemux2 and avsproxy to the rescue ...avidemux2 + avsproxy to the rescue!

It has some limitations, like not handling DirectShowSource() very well... DirectShowSource was handy, because it autodetected the type of video/audio, but there are typically other ways around that.

I've done some minor tests, and it has rendered a montage of two text panels (using .AAS subtitles format in unicode), and another panel of a subtitled picture. It seems to handle simple video without any problems... I have had to tweak a few minor things, but it seems manageable... It is certainly functional enough that I'll continue with it, to find it's quirks :)

Both avsproxy and avidemux2 have CLI and GUI interfaces... If I can get the CLI's to work together, then I'm pretty close to getting an AviSynth to play directly in a media player... avidemux2 can be set to "copy", and the resulting avi output can be piped directly into a player (hopefully)... It's looking good...


I've just asked myself (& google) the same question (of how to directly play the output of avisynth without going through an encoding proces first), and what google came up with was this nice wrapper that has a built in routine for that:


(you have to scroll down a bit)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .