Back Forum Reply New

Avisynth under Linux?

Does anyone know if Avisynth will run under Linux running Wine (Winbloze API emmulator for Linux)?  Would like to give MS the heave-ho and switch over to Linux at home, as we are doing the same here at work.  I have heard that were some steps had been taken to port Avisynth to Linux, but as an interim, would it run under Wine?Thanks,

T

I tried it once and basically it works. But please do consider some native apps like mencoder for encoding. That is far more stable.

it works??
hehe i never actually tried but this rox :gt;

oh, while i use mencoder as well, i just love the flexibility of avisynth

avisynth uses directshow. how can it works under linux? wine does not quot;emulatequot; it yet IIRC.

Originally posted by Sirber
avisynth uses directshow. how can it works under linux? wine does not quot;emulatequot; it yet IIRC.

I think it uses DirectShow only in the DirectShowSource plugin. Avisynth works under Wine, but it's very unstable: only works well with simple scripts and filters.

avisynth uses directshow

There are DirectShow, VfW, C++, and C interfaces for Avisynth. All except DirectShow work for me.

Avisynth works under Wine, but it's very unstable: only works well with simple scripts and filters.

Unstable?
I've encountered exactly one problem: If there's anything wrong with an avisynth script (typo, forgot to load a plugin, etc), I get a crash instead of an error message.
But any complicated script that works under Windows will also work under Wine. And while I'm sure one could write a filter that didn't work under Wine (DLLs can contain arbitrary code, after all), I haven't encountered any.

My versions:
Wine 20040615
Avisynth 2.5.2
Avisynth C Interface 0.14 (for piping output to mencoder)
VirtualDub 1.5.10 (only for previewing / frame stepping)
MEncoder CVS

I am quite interested in a more detailed description on just how you got everthing installed and working [on Linux].

You don't need to be completely accurate (sometimew we forget how we did something) but a quot;Avisynth on Linuxquot; HowTO would be great!  I for one have stayed with Windows only because of Avisynth, if I can do all my video stuff on Linux, I'll jump ASAP.

Search this forum, there are detailed instructions on getting avisynth working, the instructions are about a year old but they are still relevant.

HTH
Mad.

Sorry about my english,

To get avisynth working in wine I installed wine from sources as non-root (it request root password in some stage of installation) and I told it to make a fake windows setup.

Next step is to customice ~/.wine/dosdevices. After that simply run avisynth installer.

Then I install VirtualDub and some codec (DivX 5, huffyuv) in order to test avisynth scripts.

Tested versions: Avisynth 2.5.3, VirtualDub 1.5.10, wine-20040716

Now I can't get avisynth 2.5.5 working in wine-20040914 maybe because I'm running a unstable nptl and gcc-3.4 based optimized gentoo linux  .

EDIT:

Originally posted by akupenguin
Avisynth C Interface 0.14 (for piping output to mencoder)I'm very inetrested in how to piping output to mencoder. Can you explain it, please?

ThanksWhile you can load Avisynth scripts in VirtualDub under Wine, I find the graphical interface cumbersome, and I would have to rely on the binary distributions of ffdshow rather than my own builds of MEncoder from CVS. Also, Wine (my setup at least) doesn't support files bigger than 4GB even on an ext3 partition, while MEncoder doesn't support multiple input files.

So I wrote a simple program than can read AVS and write raw video to a pipe: Avs2YUV

Thus I can:
wine avs2yuv.exe foo.avs - | mencoder - -o foo.avi -ovc lavc -lavcopts mbd=2:trell:v4mv:vqscale=2

Thank you very much.

I'm now compiling a stable version of my gentoo. I will try your app as soon as I get avisynth working with wine again.

I tested your app using wine-20040813 and avisynth-2.5.5 on gentoo-2004.2 with this simple script:
File: Prueba.avs
ColorBars(720, 576)
AssumeFPS(25.0)
ConvertToYV12()
info()

Xvid (or ffdshow) codec must be installed to allow avs2YUV or any other app to import YV12 data from avisynth.

I piped it to mplayer-1.0pre5 and It works.

I get the image that I was expecting but I get it only at arround 2fps on my Pentium 4 3GHz. Is It normal? What can I do in order to improve performance?

This is the command line that I was used: 'wine avs2yuv quot;x:\Prueba.avsquot; - | mplayer -ao null -'

I'm unable to load this script into Virtualdub (it segfaults or shows it's crash and debug window). I tested version 1.5.10 and 1.5.4. I don't know why virtuldub crashes. A few months ago it worked almost perfectly this way.

I confirm that that script runs at 1.5 fps (AMD Barton 2500). (It does so also in VirtualDub.) But if I remove the quot;info()quot;, it then runs at 110 fps.
I haven't noticed any performance problems with real scripts. (Not that I've ever run them under Windows to compare, but the speeds seem reasonable based on discussions with my friend encoders.)

And I can't get Avisynth gt;= 2.5.3 to do anything. It immediately crashes Wine if I either run avs2yuv or load an avs in vdub.

Yes, it's true. Removing the quot;info()quot; line it boosts it's speed. I don't remember this quot;slownessquot; in windows but it seems to me that text rendering is not a complete success with avisynth under wine.

I tested a simple 'subtilte(quot;hello worldquot;)' instead of the quot;info()quot; line and it is not slow, but the text is so small that it is unreadabe. Even I tryed 'Subtitle(quot;Hello worldquot;, size=100)' and the text size remains equaly small.

Btw, I'm very happy because I can finally pipe frames from avisynth to a linux native app.

Thank you very much akupenguin.

P.D.: The Avisynth version that I'm running with your app is 2.5.5 (I just tested it in command history to be sure) but VirtualDub crashes if I load an avs script into it.

EDIT: I just tested another script. The simple line 'LoadPlugin(quot;C:\Video\Avisynth\undot.dllquot;)' at the top of file, causes that avs2yuv throws: 'err:seh:setup_exception stack overflow 124 bytes in thread 0009 eip 401feac0 esp 40800f84 stack 0x40800000-0x40a0000'.Maybe our efforts are better invested in some native apps like gstreamer?Originally posted by patxitron
The simple line 'LoadPlugin(quot;C:\Video\Avisynth\undot.dllquot;)' at the top of file, causes that avs2yuv throws: 'err:seh:setup_exception stack overflow 124 bytes in thread 0009 eip 401feac0 esp 40800f84 stack 0x40800000-0x40a0000'.
That's just the generic error message: Something went wrong somewhere, but my program is written in C, so couldn't catch the C++ exception. I think.
Maybe our efforts are better invested in some native apps like gstreamer?
If you mean, a real port of Avisynth with a gstreamer plugin, then sure. Right after I finish x264 .

If you mean, a real port of Avisynth with a gstreamer plugin

Just be patience till AviSynth v3.0 is out  I'm sure that the devs appreciate some help if you are interested!

Oh yes. A Linux native Avisynth with gstreamer source, filter and sink plugins will be great.

Avisynth 3 is a very interesting project but it seems not to have activity in the groups from July.

Lamentably I am not a capable programmer, nor I have long free time, although I am trying to learn C, C++ and Pyhton.

Avisynth 3 is a very interesting project but it seems not to have activity in the groups from July.

It's very active. But the progress is not discussed here, but on IRC:

#avisynth @freenode

Hi,

I have been attempting to use avs2yuv and can't seem to get the desired results.

All the windows programs work and I can get VirtualDubMod to load the avs files.

avs2yuv works fine for me unless I try to pipe the output.  That is it will write raw video to a file which can be processed correctly by mplayer/mencoder.

however if I try to pipe the output or use a fifo I get the following error:

$ wine ~/avs2yuv/avs2yuv.exe db.avs - | mplayer - -ao null 2gt;/dev/null gt;/dev/null
db.avs
fixme:avifile:AVIFileInit (): stub!
total frames: 36272
Output error: wrote only 327595 of 345600 bytes
wine: Unhandled exception (thread 0015), starting debugger...I have tried this with Crossover Office 3.0 and with wine 20040914Any thoughts?

Originally posted by evade
$ wine ~/avs2yuv/avs2yuv.exe db.avs - | mplayer - -ao null 2gt;/dev/null gt;/dev/null

No need for -ao null, avs2yuv doesn't produce any audio. But that shouldn't cause an error.
It looks like mplayer just read 320KB and then stopped. Can you post a version including mplayer's output?
¥
Back Forum Reply New