Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Linux, Mac OS X, & Co

Reply
 
Thread Tools Display Modes
Old 3rd September 2004, 00:06   #1  |  Link
tedkunich
Potentate
 
Join Date: Mar 2003
Posts: 210
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
tedkunich is offline   Reply With Quote
Old 3rd September 2004, 12:36   #2  |  Link
frodoontop
Registered User
 
frodoontop's Avatar
 
Join Date: Jan 2003
Location: Netherlands
Posts: 126
I tried it once and basically it works. But please do consider some native apps like mencoder for encoding. That is far more stable.
frodoontop is offline   Reply With Quote
Old 4th September 2004, 04:00   #3  |  Link
shevegen
Registered User
 
Join Date: Nov 2003
Posts: 409
it works??
hehe i never actually tried but this rox :>

oh, while i use mencoder as well, i just love the flexibility of avisynth
__________________
OS: Paldo (Linux)
AviSynth for Linux, go go go!
shevegen is offline   Reply With Quote
Old 12th September 2004, 05:23   #4  |  Link
Sirber
Registered User
 
Sirber's Avatar
 
Join Date: Oct 2002
Location: Canada
Posts: 8,732
avisynth uses directshow. how can it works under linux? wine does not "emulate" it yet IIRC.
__________________
download RealAnime and Bencos
Sirber is offline   Reply With Quote
Old 12th September 2004, 11:54   #5  |  Link
albertgasset
Registered User
 
albertgasset's Avatar
 
Join Date: Jan 2003
Location: Catalonia
Posts: 68
Quote:
Originally posted by Sirber
avisynth uses directshow. how can it works under linux? wine does not "emulate" 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.
albertgasset is offline   Reply With Quote
Old 19th September 2004, 01:54   #6  |  Link
akupenguin
x264 author
 
akupenguin's Avatar
 
Join Date: Sep 2004
Location: /dev/tty0
Posts: 2,326
Quote:
avisynth uses directshow
There are DirectShow, VfW, C++, and C interfaces for Avisynth. All except DirectShow work for me.

Quote:
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
akupenguin is offline   Reply With Quote
Old 4th October 2004, 18:39   #7  |  Link
MrTibs
Registered User
 
Join Date: Jan 2003
Posts: 90
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 "Avisynth on Linux" 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.
MrTibs is offline   Reply With Quote
Old 4th October 2004, 19:33   #8  |  Link
madluther
Registered User
 
Join Date: Oct 2001
Location: The other side of the Black Stump
Posts: 83
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.
madluther is offline   Reply With Quote
Old 4th October 2004, 19:37   #9  |  Link
patxitron
Registered User
 
patxitron's Avatar
 
Join Date: Jul 2003
Location: Vitoria (Spain)
Posts: 44
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:

Quote:
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?

Thanks

Last edited by patxitron; 4th October 2004 at 19:44.
patxitron is offline   Reply With Quote
Old 4th October 2004, 21:24   #10  |  Link
akupenguin
x264 author
 
akupenguin's Avatar
 
Join Date: Sep 2004
Location: /dev/tty0
Posts: 2,326
While 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
akupenguin is offline   Reply With Quote
Old 4th October 2004, 21:33   #11  |  Link
patxitron
Registered User
 
patxitron's Avatar
 
Join Date: Jul 2003
Location: Vitoria (Spain)
Posts: 44
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.
patxitron is offline   Reply With Quote
Old 6th October 2004, 22:47   #12  |  Link
patxitron
Registered User
 
patxitron's Avatar
 
Join Date: Jul 2003
Location: Vitoria (Spain)
Posts: 44
I tested your app using wine-20040813 and avisynth-2.5.5 on gentoo-2004.2 with this simple script:
Quote:
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 "x:\Prueba.avs" - | 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.

Last edited by patxitron; 6th October 2004 at 22:51.
patxitron is offline   Reply With Quote
Old 7th October 2004, 04:29   #13  |  Link
akupenguin
x264 author
 
akupenguin's Avatar
 
Join Date: Sep 2004
Location: /dev/tty0
Posts: 2,326
I confirm that that script runs at 1.5 fps (AMD Barton 2500). (It does so also in VirtualDub.) But if I remove the "info()", 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 >= 2.5.3 to do anything. It immediately crashes Wine if I either run avs2yuv or load an avs in vdub.
akupenguin is offline   Reply With Quote
Old 7th October 2004, 23:27   #14  |  Link
patxitron
Registered User
 
patxitron's Avatar
 
Join Date: Jul 2003
Location: Vitoria (Spain)
Posts: 44
Yes, it's true. Removing the "info()" line it boosts it's speed. I don't remember this "slowness" in windows but it seems to me that text rendering is not a complete success with avisynth under wine.

I tested a simple 'subtilte("hello world")' instead of the "info()" line and it is not slow, but the text is so small that it is unreadabe. Even I tryed 'Subtitle("Hello world", 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("C:\Video\Avisynth\undot.dll")' 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?

Last edited by patxitron; 7th October 2004 at 23:47.
patxitron is offline   Reply With Quote
Old 8th October 2004, 05:49   #15  |  Link
akupenguin
x264 author
 
akupenguin's Avatar
 
Join Date: Sep 2004
Location: /dev/tty0
Posts: 2,326
Quote:
Originally posted by patxitron
The simple line 'LoadPlugin("C:\Video\Avisynth\undot.dll")' 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.
Quote:
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 .
akupenguin is offline   Reply With Quote
Old 8th October 2004, 12:11   #16  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 5,579
Quote:
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!
Wilbert is offline   Reply With Quote
Old 8th October 2004, 14:46   #17  |  Link
patxitron
Registered User
 
patxitron's Avatar
 
Join Date: Jul 2003
Location: Vitoria (Spain)
Posts: 44
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.
patxitron is offline   Reply With Quote
Old 8th October 2004, 15:06   #18  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 5,579
Quote:
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
Wilbert is offline   Reply With Quote
Old 8th October 2004, 18:11   #19  |  Link
evade
Registered User
 
Join Date: Nov 2003
Posts: 97
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 2>/dev/null >/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 20040914


Any thoughts?
evade is offline   Reply With Quote
Old 8th October 2004, 18:44   #20  |  Link
akupenguin
x264 author
 
akupenguin's Avatar
 
Join Date: Sep 2004
Location: /dev/tty0
Posts: 2,326
Quote:
Originally posted by evade
$ wine ~/avs2yuv/avs2yuv.exe db.avs - | mplayer - -ao null 2>/dev/null >/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?
akupenguin is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:06.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.