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
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 2nd December 2008, 22:26   #1  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
avisynth scripts as avidemux2 video filter in Linux

Hello!

I'm write external video filter for avidemux2 for Linux. This filter is used for load avisynth script as native avidemux2 video filter. Filter supports external binary Windows dll in avisynth script (thanks wine), several AvsFilter instance with different avisynth script and many other features.

Filter, description, sources, usage tips and tutorial here:
http://avsfilter.berlios.de/index.html

Thanks,
fahr
fahr is offline   Reply With Quote
Old 3rd December 2008, 07:32   #2  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
uoho!!

great work!
sl1pkn07 is offline   Reply With Quote
Old 3rd December 2008, 13:42   #3  |  Link
disturbed1
Registered User
 
Join Date: Oct 2001
Location: home
Posts: 72
Cool. But, what if any advantage over the included and built in avsproxy that already comes with Avidemux?
disturbed1 is offline   Reply With Quote
Old 3rd December 2008, 23:19   #4  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
Quote:
Originally Posted by disturbed1 View Post
Cool. But, what if any advantage over the included and built in avsproxy that already comes with Avidemux?
1. You use native avidemux2 parser for videofiles instead ffdshow/xvid/other windows codecs/container parser under wine
2. You use avisynth script in depth of videofilters of avidemux2 (after equalizer or other prefiltering).
3. You can use several scripts in any point between avidemux2 filters. Each script work independently.
4. Do not need restart avidemux2 if you change avisynth script, simple store script with other filename and change avsfilter scriptname parameter in avidemux2 filter list.
5. You can use several avidemux2 with various avisynth scripts for video processing simultaneously.
6. Avidemux2 sheduler(joblist) work normally (project file contain avsfilter parameters), but if you use avsproxy, we cannot work with differents input video and need to start avsproxy before start avidemux2.
7. To work with video, we could open it with avidemux2 and add avisynth script (with avsfilter) at any stage of video processing. If you use avsproxy, we should be open video with proxy before edit or any other stage of video processing.

If all video processing work only in avisynth script, then no advantages over avsproxy.

Last edited by fahr; 4th December 2008 at 11:00.
fahr is offline   Reply With Quote
Old 19th January 2009, 05:56   #5  |  Link
defaulk9
Registered User
 
Join Date: Feb 2005
Posts: 59
Your instructions say to patch sources using "patch.prefs.in", but I don't see that in the download. Did you forget to add it?
defaulk9 is offline   Reply With Quote
Old 19th January 2009, 07:05   #6  |  Link
defaulk9
Registered User
 
Join Date: Feb 2005
Posts: 59
I went on ahead and just removed the -DPREFSINCHANGE and did it that way. It doesn't work though. I go to add AvsFilter to the Active Filters list, fill in the information and click OK. It never gets added.

This is what I get in the console when attempting to add:


01:01:49 Create AVSfilter
01:01:49 avsfilter : before dialog init
01:01:56 avsfilter : configure before SetParameters
01:01:56 avsfilter : SetParameters try to start new loader and script
01:01:56 avsfilter : good tmpdirname /home/dan/.wine/dosdevices/c:/windows/temp/
01:01:56 avsfilter : precreate thread time Mon Jan 19 01:01:56 2009

01:01:56 avsfilter : new.flags 1, old.flags 0
01:01:56 avsfilter : preopen time Mon Jan 19 01:01:56 2009

01:01:56 avsfilter : try to open /home/dan/.wine/dosdevices/c:/windows/temp/plr7f.tmp fifo
01:01:56 avsfilter : new.flags 0, old.flags 1
01:01:56 avsfilter : new.flags 0, old.flags 1
01:01:56 avsfilter : pthread time Mon Jan 19 01:01:56 2009

01:01:56 pthread start ok
avsloader : Mon Jan 19 01:01:56 2009
C:\windows\temp\plr7f.tmp C:\windows\temp\plw7f.tmp C:\windows\temp\pfw7f.tmp
01:01:57 avsloader : pipe_timeout is 10, pipe handles 01:01:57 3 01:01:57 4
01:01:57 avsload : start load source filter dll and test filter pipe
01:01:57 avsfilter : try to open /home/dan/.wine/dosdevices/c:/windows/temp/plw7f.tmp fifo
01:01:57 avsfilter : try to open /home/dan/.wine/dosdevices/c:/windows/temp/pfw7f.tmp fifo
01:01:57 failed to load pipe_source.dll
01:01:57 avsload : cannot call SetPipeHandle
01:01:57 avsload : try exit
01:01:57 avsload : really exit
01:01:57 End parse
01:01:57 avsfilter : loader down, try to close waiting (for open) main thread
01:01:57 avsfilter : try to open /home/dan/.wine/dosdevices/c:/windows/temp/plr7f.tmp fifo
01:01:57 avsfilter : try to open /home/dan/.wine/dosdevices/c:/windows/temp/plw7f.tmp fifo
01:01:57 avsfilter : try to open /home/dan/.wine/dosdevices/c:/windows/temp/pfw7f.tmp fifo
01:01:57 all pipes open ok
01:01:57 open_pipes failed
01:01:57 avsfilter : deinit_pipe 50FEFB0
01:01:57 avsfilter : deinit_pipe /home/dan/.wine/dosdevices/c:/windows/temp/plr7f.tmp
01:01:57 avsfilter : deinit_pipe 5BB39C0
01:01:57 avsfilter : deinit_pipe /home/dan/.wine/dosdevices/c:/windows/temp/plw7f.tmp
01:01:57 avsfilter : deinit_pipe 5BD0820
01:01:57 avsfilter : deinit_pipe /home/dan/.wine/dosdevices/c:/windows/temp/pfw7f.tmp
01:01:57 avsfilter : delete AVSFilter
01:01:57 avsfilter : partially UNLOAD check-> 0 0
01:01:57 all pipes open ok
01:01:57 avsfilter : open ok, try to deinit
01:01:57 avsfilter : deinit done
defaulk9 is offline   Reply With Quote
Old 22nd January 2009, 00:35   #7  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
Quote:
Originally Posted by defaulk9 View Post
Your instructions say to patch sources using "patch.prefs.in", but I don't see that in the download. Did you forget to add it?
http://avsfilter.berlios.de/src/patch.prefs.in

sorry, I'm forget add it to archive
fahr is offline   Reply With Quote
Old 22nd January 2009, 00:40   #8  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
Quote:
Originally Posted by defaulk9 View Post
01:01:57 failed to load pipe_source.dll
01:01:57 avsload : cannot call SetPipeHandle
Your script is not contain string
LoadPlugin ("pipe_source.dll")
OR
pipe_source.dll is not find inside call LoadLibrary()

What path for pipe_source.dll?

Try store pipe_source.dll to script directory.
fahr is offline   Reply With Quote
Old 22nd January 2009, 10:39   #9  |  Link
defaulk9
Registered User
 
Join Date: Feb 2005
Posts: 59
That put me on the right track. My path to avsload.exe had spaces in it, so I had to quote it. Just the opposite with the path to the script. That seemed to want an unquoted path.

Thanks for the assistance. And thanks for the patch too. I'll try it out.

One other question: is there a way to reload the script without having to restart avidemux? I seem to have to restart every time I change it in order for the changes to take effect.

Thanks again.
defaulk9 is offline   Reply With Quote
Old 22nd January 2009, 15:35   #10  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
Quote:
Originally Posted by defaulk9 View Post
One other question: is there a way to reload the script without having to restart avidemux? I seem to have to restart every time I change it in order for the changes to take effect.
You may save script with other filename and change filename in filter properties. No need to restart, but in future, I planned some improvement for this happened. Unfortunately, reload script after each filterobject creation get many processing time.

What binary filters(dll's) you use with avsfilter?
fahr is offline   Reply With Quote
Old 22nd January 2009, 18:22   #11  |  Link
defaulk9
Registered User
 
Join Date: Feb 2005
Posts: 59
Quote:
Originally Posted by fahr View Post
You may save script with other filename and change filename in filter properties. No need to restart, but in future, I planned some improvement for this happened. Unfortunately, reload script after each filterobject creation get many processing time.
I thought about that. The only solution I can think of is to first test if a significant amount of time has passed since the processing of the last frame (I'm unfamiliar with avidemux's filter API, so that may be off base), and if the time interval is large enough, do a check against the script's file date, and finally if that has changed, reload.

Quote:
Originally Posted by fahr View Post
What binary filters(dll's) you use with avsfilter?
I don't have a set list. Currently I'm doing some film restoration, so I'm using deflicker and a conditional temporal median filter and trying out some others as well. I'm experimenting with different plugins and approaches here, so that's why the reloading helps.
defaulk9 is offline   Reply With Quote
Old 2nd February 2009, 22:38   #12  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
Quote:
Originally Posted by defaulk9 View Post
One other question: is there a way to reload the script without having to restart avidemux? I seem to have to restart every time I change it in order for the changes to take effect.
I implemented script change feat:
============================================
In this version, avsfilter checked timestamp of script. If timestamp of script change, avsfilter reload fresh script to avisynth. For use this feature, you can remove avsfilter from videofilter list, change script and reload avsfilter again to videofilter list with the same script name. No need to rename script and reload them with changed filename.
=============================================
fahr is offline   Reply With Quote
Old 3rd March 2009, 22:54   #13  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
site update

04 March 2009

Fixed serious bug in the time of encode frames span(A - B in avidemux2). At the moment of processing frame with number > (B - A), frame replace by frame 0. All following frames also replace by frame 0. This is no happens, if you encode whole input video.

05 March 2009
Stupid (but serious) bug was fixed. These bug inserted by 04 March of 2009. Under processing video with complex binary avisynth filter (like fft3dfilter), several frames need to render one frame. This bug (before it fixed) breaks normal frame sequence. Version 0.4a is out.

Update linux/wine sources

http://avsfilter.berlios.de/src/filt...3.2009.tar.bz2

and wine binaries (who not compile it from sources)

http://avsfilter.berlios.de/src/avsl...binary.tar.bz2

Last edited by fahr; 5th March 2009 at 21:30.
fahr is offline   Reply With Quote
Old 17th April 2009, 22:09   #14  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
18 Apr 2009

Update compile and build docs, add FAQ for use .avs with VDF-filters from Donald's Graft VirtualDub. Add example script what is load external VDF-filter (_VD_Logo) in .avs script for use with avidemix2. Fix error with span start/end framenumber for preview mode. This error is show only in framenumber-specific filters (like ShowFrameNumber()). Update linux sources
fahr is offline   Reply With Quote
Old 23rd April 2009, 18:05   #15  |  Link
shevegen
Registered User
 
Join Date: Nov 2003
Posts: 420
Can this link be added to avisynth homepage (the wiki)?

I think not everyone reads this forum here, although of course this forum is the biggest I know of

I think I am here since 6 years hehe
__________________
OS: Paldo (Linux)
AviSynth for Linux, go go go!
shevegen is offline   Reply With Quote
Old 23rd April 2009, 20:10   #16  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
Can this link be added to avisynth homepage (the wiki)?
Yes of course. It would be nice if there would be a section about AviSynth & Wine and stuff like this. The problem is that i never have used Wine, so i'm not the most suitable person to write something about this. Could you volunteer to write such a section?
Wilbert is offline   Reply With Quote
Old 17th May 2009, 20:20   #17  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
filter update

17 May 2009
Version is 0.5a. Fix other error with span start/end framenumber for encode and preview mode. Update linux sources
http://avsfilter.berlios.de/src/filt...5.2009.tar.bz2
and wine binaries
http://avsfilter.berlios.de/src/avsl...binary.tar.bz2
fahr is offline   Reply With Quote
Old 22nd June 2009, 20:02   #18  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
hello. is possible compiling this filter for QT avidemux version?

this filter only appears in GTK version, no in QT version


thanks
sl1pkn07 is offline   Reply With Quote
Old 29th June 2009, 20:33   #19  |  Link
fahr
Registered User
 
fahr's Avatar
 
Join Date: Nov 2008
Location: Russia, Spb
Posts: 29
Quote:
Originally Posted by sl1pkn07 View Post
hello. is possible compiling this filter for QT avidemux version?

this filter only appears in GTK version, no in QT version


thanks
Hello!

This filter not intended for avidemux GTK version only, but this happen is not checked. You can compile and it is difficult, write me (fahr at inbox dot ru).

In avsfilter no any GTK parts, no interface part. In fact, avsfilter is skeleton of avidemux video filter (with some code for start loader in wine environment, pipe read/write and other smallest helpers/routines).

Bye
fahr is offline   Reply With Quote
Old 29th June 2009, 22:32   #20  |  Link
sl1pkn07
Pajas Mentales...
 
Join Date: Dec 2004
Location: Spanishtán
Posts: 496
hi!

the plugins not compile in the latest Avidemux 2.5

greetings
sl1pkn07 is offline   Reply With Quote
Reply

Tags
avisynth avidemux2 linux


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 22:25.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.