PDA

View Full Version : Possibility of turning Avisynth into a full-fledged NLE


Zarxrax
19th November 2004, 04:48
Avisynth is great for processing and fixing up my video, but for years I have been dreaming of the possibilities of an NLE like Adobe Premiere built around avisynth. From time to time I would hear rumors of various projects in the works, but nothing has ever come of it.

Avisynth has EVERYTHING it needs to be a real graphical NLE... well... everything except a GUI. There are a lot of GUIs out there for the general video processing functions of avisynth, but none for actual editing.

I have tried literally every NLE out there, from Premiere, to Avid, to Windows Movie Maker. Never found a single one that I really liked, always for different reasons. One NLE might do something PERFECT, but it toally screws things up in some other area... then the next NLE might have things the other way around. The main problem, is that commercial NLEs are designed either for professionals, or for people that want to edit their home videos. There aren't any for people that just wanna mess around with their AVI files!

I'm making this post because I am curious if there are any others out there that would have an interest in such a project? Perhaps any people that could even be interested in coding such a thing?
If I could code something like this myself... I certainly would. Programming is just not my thing though. I do know a fair bit about it though and could maybe assist in some monkey-work programming as an assistant or whatever. I would also be able to assist greatly with GUI design (which is what the majority of the project would consist of).

Just what all does my vision of an Avisynth-based NLE consist of? Here are the key things:
- A project files management window, where files can be imported for later use. All files would of course need to be formatted to conform to the same colorspaces/framerates/etc.
- A multi-track timeline. The ability to drag files from the project window down to the timeline. The ability to cut up the clips and move them around on the timeline, and move them between tracks. Allow for opacity handles on the pieces. This would definately be the most complex part to program.
- A preview window. Displays the current frame (AND current bit of audio, if there is an audio track) as you scroll over the timeline.
- An effects window that allows you to apply simple avisynth effects to clips.
- Avi exporting. Both for rendering preview clips, and for rendering the script to avi when you finish.

And thats basically all of the key parts that would be required.
If you haven't figured it out already, all that this GUI does is simply generates an extremely complex avisynth script for you :)

I've been talking about this like its a fairly trivial process to make something like this... but I imagine it is actually quite complex and a huge thing to create. I am hopeing there are some good people out there that would like to see something like this as much as I do though :)

Wilbert
19th November 2004, 11:49
Perhaps this is a good start?

http://forum.doom9.org/showthread.php?s=&threadid=68392 (AVE Visual Editor of vion11)

Btw, (sadly) I never used this, so it might not be what you are looking for.

Schlumpf
19th November 2004, 11:52
I'm not familar with Linux and/or its programs, but I know a free NLE-application (Cinelerra) already exists for it. What would be the advantages of an Avisynth NLE-Gui over Cinelerra?
And afaik avisynth 2.5x is quite incomatible with Linux, wouldn't it be better to wait for the development team until version 3 (where they try to reach better portability IIRC) arrives at beta-stage?
Or was your general idea: Linux-world=Cinelerra / Windows-world= Avisynth-NLE ?

bill_baroud
19th November 2004, 13:10
If you haven't figured it out already, all that this GUI does is simply generates an extremely complex avisynth script for you

heh, i was thinking to exactly the same things ... but i'm quite busy atm :scared:

Zarxrax
19th November 2004, 13:38
Originally posted by Schlumpf
I'm not familar with Linux and/or its programs, but I know a free NLE-application (Cinelerra) already exists for it. What would be the advantages of an Avisynth NLE-Gui over Cinelerra?
And afaik avisynth 2.5x is quite incomatible with Linux, wouldn't it be better to wait for the development team until version 3 (where they try to reach better portability IIRC) arrives at beta-stage?
Or was your general idea: Linux-world=Cinelerra / Windows-world= Avisynth-NLE ?
Indeed, Cinelerra looks fairly nice, but its Linux only. This would be something aimed more towards windows users (but not ruling out support for other OS). Yes, avisynth 3 is on the horizon, and that is really what this would be aimed at. As this project is mostly a GUI interface though, quite a lot could be done without having a beta version available. And if the script format of avisynth 3 is known (similar to avisynth 2 for example), I see no reason why anything would need to wait.

Originally posted by Wilbert
Perhaps this is a good start?

http://forum.doom9.org/showthread.php?s=&threadid=68392 (AVE Visual Editor of vion11)

Btw, (sadly) I never used this, so it might not be what you are looking for.

It does look like a decent starting place in a very basic sense... seems to have a file bin, effects window, and fake preview window... just lacks a timeline :p

Zarxrax
19th November 2004, 18:36
Just for fun, i did an example of what this would actually do. I made up a sample timeline in Adobe Premiere, then converted it to an AVIsynth script. It seems like the code to generate the script would be fairly trivial.
Note that I did not test this script, so I probably have made errors somewhere. Also, I don't know if the Trim() function works on Audio sources or not, but I have used it on them anyways. Also, I'm pretty sure the way I am trying to use a blank audio clip wont work.
Here is the timeline I started from:
http://www4.ncsu.edu/~baclontz/avs-timeline.png
A bit of explanation for those who aren't familiar with this: The purple box in video track 1 represents a crossfade transition between clips vid1 & vid2. The orange lines represent the opacity level of the clips. On video track 3, "vid3" begins at 50% opacity and later decreases to 0%. "vid1" on that same track stays at 100% opacity. On video track 2, "vid3" starts at 0% opacity and goes to 100%.


And here is the script I wrote up:

#Source files
vid01 = AVISource("vid01.avi", false)
vid02 = AVISource("vid02.avi", false)
vid03 = AVISource("vid03.avi", false)
aud01 = WAVSource("audio01.wav")
aud02 = WAVSource("audio02.wav")
Blankv = BlankClip(length=24, width=640, height=480, pixel_type="YV12", fps=23.976).KillAudio()
Blanka = BlankClip(Blankv, audio_rate=48000)

#Video Track 01
v01_0001 = vid01.Trim(0,18)
v01_0002 = vid02.Trim(10,22)
v01_0003 = Blankv.Trim(22,34)

#Video Track 02
v02_0001 = Blankv.Trim(0,19)
v02_0002 = vid03.Trim(19,30)

#Video Track 03
v03_0001 = vid03.Trim(0,14)
v03_0002 = Blankv.Trim(14,29)
v03_0003 = vid01.Trim(29,34)

#Audio Track 01
a01_0001 = aud01.Trim(0,22)
a01_0002 = Blanka.Trim(22,29)
a01_0003 = aud02.Trim(29,34)

#Full Track Output
Vtrack_01 = Dissolve(v01_0001, v01_0002, 8) + v01_0003
VTrack_02 = v02_0001 + v02_0002
VTrack_03 = v03_0001 + v03_0002 + v03_0003
ATrack_01 = a01_0001 + a01_0002 + a01_0003

#Video Composition
#Comp01 = Video Tracks 1+2
Comp01_0001 = VTrack_01.Trim(0,19)
Comp01_0002 = Animate(0,3,"Overlay", VTrack_01.Trim(19,22),Vtrack_02.Trim(19,22),opacity=0, VTrack_01.Trim(19,22),Vtrack_02.Trim(19,22),opacity=1)
Comp01_0003 = VTrack_02.Trim(22,34)
Comp01 = Comp01_0001 + Comp01_0002 + Comp01_0003
#Comp02 = Comp01 + Video Track 3
Comp02_0001 = Overlay(Comp01.Trim(0,10),VTrack03.Trim(0,10), opacity=0.5)
Comp02_0002 = Animate(0,4,"Overlay", Comp_01.Trim(10,14),Vtrack_03.Trim(10,14),opacity=0.5, Comp_01.Trim(10,14),Vtrack_03.Trim(10,14),opacity=0)
Comp02_0003 = VTrack_03.Trim(22,30)
Comp02_0004 = Comp01.Trim(30,34)
Comp02 = Comp02_0001 + Comp02_0002 + Comp02_0003 + Comp02_0004

#Audio Composition
AComp01 = ATrack_01

#Output
Output = AudioDub(Comp02, AComp01)

vion11
19th November 2004, 18:43
@Zarxrax

What main points would distinguish the ultimate GUI
from existing ones, except it should have all good stuff
from premiere, vdub, after effects, combustion and avid?

Does this timeline thingy really makes sense,
if you want "to mess around"?
Look here in VJ Software listing (http://www.audiovisualizers.com/toolshak/vjprgpix/softmain.htm) to find many
different approaches of video editing.

In fact I can't understand advantages of timeslines if you want to do non linear editing :confused:

Zarxrax
19th November 2004, 19:01
Well, not so much for "messing around" really... so much as editing stuff together for whatever reason. If you don't see the point of a timeline, then I think you probably don't fully understand the concept of nonlinear editing.
If you work with NLEs like Premiere, I think you will understand the point.

But you ask what will distinguish this GUI from the others... as I said above, the other guis are all for the video processing aspects of avisynth. Cleaning up your source, resizing, and all that stuff. This gui would be for EDITING--cutting up clips, rearranging them, and making an entirely new video from it.

Bidoche
19th November 2004, 22:56
All this talk about a wish list for the GUI is good and well, but it's a bit too soon for that.

As the interface that avs3.0 should provide to any GUI for it to do its work is still unspecified.
There is still not even a reasonable list of things that should be possible/allowed.

vion11
19th November 2004, 23:19
There is a list decribing basically a two level interface
to a GUI in the newsgroup............. what's wrong with?

Zarxrax
19th November 2004, 23:36
Originally posted by vion11
There is a list decribing basically a two level interface
to a GUI in the newsgroup............. what's wrong with?

Hmm... what do you mean? What newsgroup?

Bidoche
19th November 2004, 23:56
Originally posted by vion11
There is a list decribing basically a two level interface
to a GUI in the newsgroup............. what's wrong with? It does not cover everything.

Those are mostly about communicating about available functions IIRC.
There are other things that may be desirable.

I recently had some talks with esby about graph exploring (which is possible) and edition of filters in the graph (which is damn harder)


@Zarxrax

There is an avisynth3_0_dev mailing list on yahoogroups and a corresponding newsgroup through the gmame list to news portal.

Fizick
21st November 2004, 01:13
Yes, cut-merge on timeline will be great.
may be we must ask Stax for it in next AVSEDIT version?

CraigBjorn
25th November 2004, 20:58
I think the only difference between the type of GUI that you're asking for and the one already available for avisynth is the timeline... you could probably very easily use some of the open source code from the other GUIs for the rendering of the effects etc...

I think the best way to set up a timeline type editor would be to use some bits and codes from other opensourced projects... you would need a video player that could export the frame numbers to the trim function obviously. In even a simple a manner as in virtual dub when you can click on a place on the time line and mark it as the begginig or end.

And there has been some requests for Audacity (an open source audio editor) to have their audio synched with a video player, so that you could use Audacity to edit the sound for a video.

Basically, I think the best way to do something like this would be to use some of the bits and codes already availible with some of these opensource projects and just comine them... and the AVS file should be the equivilaant of the project file for any of the other video editors. (to make this GUI would be kind of like reverse engineering, starting from the project file, and making a program that would render that)

vion11
26th November 2004, 17:00
I agree most algos for video stuff are available
as open source. But to achieve a useful GUI one
have to create a abstraction layer transforming
the video objects to adjustable 'mouse objects'.

In case of Trim() it sounds easy: a rectangle with
hotspots at both sides, knowing min/max values.

Actually not at least the windows small/big font option
makes headache, there are huge amounts of parameters and
contraints you have to know and handle.

And additional a data layer is needed, usable from
both the gui side and the video side. Sources for
data and abstraction layer are not existing up to
useless.

I'm not saying it is unpossible, but there should
exists a very good reason to build up something
claiming better video editing than premiere.

And why develop something less featured?

M7S
26th November 2004, 18:40
Originally posted by vion11
I'm not saying it is unpossible, but there should
exists a very good reason to build up something
claiming better video editing than premiere.

And why develop something less featured? [/B]

I might be an idealist but isn't US$ 699 vs. free a reason as good as any?

Regards,
M7S

vion11
26th November 2004, 23:17
If idealists feed their keyboards who feeds idealists? :confused:

smok3
26th November 2004, 23:52
I might be an idealist but isn't US$ 699 vs. free a reason as good as any? no it is not, would require painintheasshish amount of time, which no money can repay.

but
i was toying with an idea like that as well, building 3 simple apps:

1. see
(player, mark-park, flag, move-to, delete, ect)
2. manage
(wincmd type of file manager, simple avisynth prepare me for editing, convert, encode type of thingy, 100% configurable buttons - think directory opus)
3. edit
multiline editor, each clip gets its own avisynth script, so the final edit can be changed fast (like klip455+klip334+klipn) - there is a lot of features i can think of based on perception of curent edit - that no known editor has right now.

.................

i would be prepared to work on such project as gui designer with someone that knows lightworks editor very well (only decent video editors gui imho)

..................

edit: notes, things that i see right now, which seems very hard to do nicely:
- decent timeline, sync
- decent preview
- timecode management
- is there a need for intermediate (fast) database, robustnes

- it is very likely that very few users would use such an editor at the end: newbies - to damn complex to use, pros: they do need much more than that ;)

M7S
27th November 2004, 18:14
Originally posted by smok3
I might be an idealist but isn't US$ 699 vs. free a reason as good as any? no it is not, would require painintheasshish amount of time, which no money can repay.
I'm not really sure what you mean. What I meant is that premiere costs 699$. Nothing about being payed for making a gui.

Shubin
1st December 2004, 11:08
I thought about this already. It's not a big problem
to make such a tool, but it's a lot of work.
Also, there are several things that I could wish AviSynth
to have :

1. PROPER handling of static images. (damn!)
2. a kind of 'upward' api, an object that can call
AVS filters using predefined frames and get back a
result - for things like adjusting color using window
controls. Including those built-in filters too !
3. If I only had time...

Bidoche
3rd December 2004, 12:11
Originally posted by Shubin
2. a kind of 'upward' api, an object that can call
AVS filters using predefined frames and get back a
result - for things like adjusting color using window
controls. Including those built-in filters too ! Could you develop on that ?
I don't get what you mean.

Backwoods
4th December 2004, 06:45
AVSMonitor.dll does this, no?

(I forget the exact filter's name)

llamatronique
5th December 2004, 23:40
In fact I can't understand advantages of timeslines if you want to do non linear editing

.. for the record.

The real difference between editors is that some are "Destructive" and some are "Non Destructive". The term "Non Linear" differentiates it from tape based edit suites (i.e. AB Roll).

The term "Non Linear" refers to the way the media is stored on the disk... in a linear suite, the media is placed in a linear fashion on the tape; in a non-linear suite, the media is placed anywhere and referenced.

The result of any non-linear operation is a linear file, and that's what the timeline represents.... in fact the result of an avisynth script is "linear".

I can understand the desire for an avisynth gui, but personally I don't see the need... avisynth is avisyth because it DOESN'T have a gui, and so is something I can interact with programatically in batch jobs for example without having to point and click. I'd be more inclined to want language bindings of various flavours (C#/python/perl etc.) .. and of course the linux port, than a gui. I have Final Cut Pro though, so my needs are different.

If you want ideas though... Kdenlive<->Piave for linux is probably the kind of thing you're talking about. Cinelerra sux imho. And the best open source codebase for any professional level NLE is http://ardour.sourceforge.net

Zarxrax
6th December 2004, 02:22
Originally posted by llamatronique
I can understand the desire for an avisynth gui, but personally I don't see the need...

1. There don't exist any decent free video editors for Windows.
2. To my knowledge, there is no NLE which can edit without converting your video out of yv12.
3. Most software doesn't support codecs such as divx or xvid. While these certainly aren't designed to be edited in the first place, avisynth at least doesnt crash or display a black screen when you load one in!

I've gotten some good feedback on this off-forum. I think it might really happen one day, but after Avisynth 3.

Shubin
9th December 2004, 10:25
Originally posted by Bidoche
Could you develop on that ?
I don't get what you mean.

Sure. Imagine we have a Levels
(clip, int input_low, float gamma, int input_high, int output_low, int output_high)

as a PLUGIN. This means I can (somehow) extract a part of AviSynth
responsible for calling plugins and call this DLL myself with
int input_low, float gamma, int input_high etc. values, obtained
from sliders or other GUI inputs. Theoretically this looks good,
but I can not do this with the INTERNAL function.
Yes, it is possible to write .avs file EACH time user moves a
slider, reopen it and show the result, but I doubt that it will
be a fast and stable solution.

I see a GUI as a number of timelines that are always evaluated
from (to say) bottom to top. Each line produces the AVS statement
of the kind :

p1 = avisource([whatever]).levels([whatever]).converttowhatever
p2 = somefilter(p1).trim([etc etc etc])
p3 = ...

Maybe not the best way to write avs stmts, but should work.

vcmohan
15th December 2004, 04:03
In the Sourceforge I have come across OpenVIP project which has a GUI for NLE. It generates a XML file for processing the video clips with the openVIP core and plugins. It should be a simpler excercise to make the GUI generate the avisynth code I assume. In case both the teams come together it can be done. The GUI and code generation is done using Python, wxWindows and wxGlade.