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. |
6th August 2007, 16:17 | #1 | Link |
phjbdpcrjlj2sb3h
Join Date: Sep 2005
Location: Western Australia
Posts: 1,691
|
Centralised avisynth plugin repository
Hi all, just wondering if there are any opinions on an idea for an avisynth utility I've been mulling over for the past few weeks. I've also actually built a functioning prototype in python too, it's linked at the end of this message.
In a nutshell, the program will be a specialised repository tool for avisynth, along the lines of programs such as apt-get and yum on linux. So far, this is what my prototype can do. It provides five functions: o update: download a fresh copy of the repository metadata file Code:
C:\>avup.py update Downloading latest repository file now... Successfully downloaded an updated repository file! Code:
C:\>avup.py info limitedsharpenfaster Name: LimitedSharpenFaster Version: 29 Oct 2005 Author: didee Homepage: forum.doom9.org/showthread.php?t=84196 Description: None Functions implemented: limitedsharpen Requires Plugins: masktools2, removegrain, warpsharp Code:
C:\>avup.py info removegrain* No exact matches, checking for glob matches now... Matches: removegrain, removegrain-SSE3, removegrain-SSE2 Code:
C:\>avup.py whatprovides *sharp* Matches: removegrain: denoisesharpen, rsharpen limitedsharpenfaster: limitedsharpen warpsharp: warpsharp, xsharpen, unsharpmask removegrain-SSE3: denoisesharpen, rsharpen removegrain-SSE2: denoisesharpen, rsharpen Code:
C:\>avup.py download limitedsharpenfaster Downloading limitedsharpenfaster now... Successfully downloaded the plugin. Successfully downloaded limitedsharpenfaster! I was originally driven to write this program to help for two cases in particular: o know a function, don't know the plugin it's part of. Useful when searching back through the doom9 archives and looking at ancient scripts in particular, but would be also useful for the many who won't remember that warpsharp contains xsharpen. o know a plugin, don't know the latest version. Some plugins, like limitedsharpen, mvbob, removegrain are perenially asked after for the latest version, and different people have different versions. Some sort of central version control / download system would make much of this problem dissappear. I am less interested in creating a high level package management system, which handles installation, package tracking and dependancies. Installing avisynth plugins is easy enough to do by hand, I just want a tool to make it easier to *get* these files. The true strength of a program like this would be in the above two cases. Some issues that this program will run into: o needs maintainers! Package management tools need people to create the packages. This is almost certainly the biggest potential problem, so I've tried to create a system which is extremely easy to use. The YAML repository metadata file is dead simple to manually edit, and the zip files just need a standardised name and that's it. The only hard part is needing to keep the repository in sync with multiple people changing it, but a basic system like svn + patches would be fine. o needs servers & bandwidth! Probably not a real problem. I couldn't see this utility using more than 50gb/month for a long time, and I can happily donate that myself. A mirror system would be easy to implement though, and I'm sure volunteers could be found. o People need python installed! Lies, you can pack up the script and the interpreter w/ required modules into a single executable as per AvsP. The only catch is that the interpreter + modules add up to around 2mb, which is a lot compared to the 2kb script. o People need a GUI! That's not a problem to create at all, it would be trivial to adapt the current prototype to run with a GUI. o ??? Sorry for the longpost, Here is the prototype, written in pure python. It works on windows and unix (whyever you'd want to run it on that..., but that's what I developed it on), and requires python 2.5 to be installed (should run with earlier versions, just with peculiar exception handling (such as keyboard interrupts not working)) along with PyYAML. Note that the repository and packages currently in there (all 5ish of them) are samples, but should be complete (apart from fft3dfilter, which is missing the library it requires). Feedback welcome and requested |
6th August 2007, 17:16 | #2 | Link |
Registered User
Join Date: Oct 2006
Location: Gotham City, USA
Posts: 389
|
Very cool idea! Thanks for the work!
As much as I love the various sites that archive plugins, sometimes its easy to get the different versions of a particular plugin mixed up. Hopefully you'll get some support from the people who work on plugins... I'll download and fool around with it. |
6th August 2007, 18:39 | #3 | Link |
Registered User
Join Date: Aug 2004
Location: Denmark
Posts: 807
|
Could you create an AvsP version. That way people wouldn't have to download python if they have AvsP installed
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/ |
7th August 2007, 00:09 | #4 | Link | ||
phjbdpcrjlj2sb3h
Join Date: Sep 2005
Location: Western Australia
Posts: 1,691
|
New mode planned for addition, will probably be named 'requires'. This will scan an input avs and return the packages needed.
Code:
C:\>avup.py requires test.avs This script requires the following packages: removegrain: removegrain() masktools2: mt_lutxy(), mt_edge() o detecting import()ed scripts, and those called which are autoloaded. This would just need every package found to be needed for the original file to be checked recursively for dependencies too. o detecting plugins referenced with the plugin name prepended, ie dgdecode_mpeg2source(). Getting around this should be easy: if the full text of the filter doesn't match, try everything after the first underscore. Quote:
Quote:
o Build a version that runs from avsp as a macro. Could be interesting, but I think it would be more flexible to build the backend as a standalone executable. You could always build a frontend into AvsP easily, which is probably the more flexible solution. o Build a version that can use the avsp python libraries. I could, but there are a few problems that probably prevent this being useful. The first is that you need to hardcode the path to the libraries at packing time. This means everyone will need their own build.. and to build, you need python, which means you don't need a build. >_> |
||
9th August 2007, 14:44 | #6 | Link | |
phjbdpcrjlj2sb3h
Join Date: Sep 2005
Location: Western Australia
Posts: 1,691
|
Quote:
I also added the first test of the new mode 'requires'. Behaviour is similar to what I originally thought of: Code:
>avup.py requires "Restore24.avs" Required functions: removegrain-sse, warpsharp, avisynth-internal Functions which no package could be found for: countnewpattern, yv12lutxy, leakkernelbob, soothe,...<etc> For now, I will do up a quick GUI frontend tonight, and then add a few more packages into the repository. Requirements: .py (3kb): Python 2.5, pyYAML .exe (2mb): Windows 2k+ (possibly XP) EDIT: one sort of bug that you will need to watch out for. The repository is looked for in the current directory. If the program is in C:\ but the command window is in C:\WINDOWS, your repo needs to be in the latter. |
|
9th August 2007, 17:19 | #7 | Link |
phjbdpcrjlj2sb3h
Join Date: Sep 2005
Location: Western Australia
Posts: 1,691
|
Newer versions are up, same address as the previous post. What's important enough to warrant a double post? A GUI! The wxPython libraries have blown the exe version out to 4mb though
I am now planning on writing a few utilities to facilitate creating repository entries for plugins, mostly because I want to convince a few other people to help too Any volunteers? |
|
|