Log in

View Full Version : Feature request: enable use of ScriptClip() audio output


fvisagie
8th September 2015, 08:42
Video can be accessed and manipulated fairly extensively in the current runtime system, but it lacks support for processing audio. There is no easy way of replacing or adding audio from another source, or performing any kind of audio processing at runtime.

Put differently, any audio processing that is attempted is ignored, because audio outputs from ScriptClip() and ConditionalSelect() are ignored (effectively, audio from last is used instead). ConditionalFilter() can take audio from a clip other than last, but because it cannot access variables defined and/or modified at runtime it is a less than ideal solution. In addition, care needs to be taken because unlike with ScriptClip(), with ConditionalFilter() output clip length is not invariant - ConditionalFilter() can inadvertently modify output clip length.

Therefore, for its existing video processing support, read/write access to runtime variables and output length invariance, ScriptClip() appears the most suitable solution for adding runtime audio processing support.

Thanks!:)

Wilbert
8th September 2015, 15:04
You might want to read http://forum.doom9.org/showthread.php?t=127530 (see post 18 for a link) and http://forum.doom9.org/showthread.php?t=167011 . Could you be more exact as to what you want to do? What should the selection criteria be for replacing/adding audio?

fvisagie
8th September 2015, 17:43
Thanks for the links.

The need that gave rise to this request was to be able to swap output video and associated audio at runtime. An example would be playing out an edit decision list that was created dynamically. ScriptClip() can easily replace individual frames or whole clips at a time (no difference as far as Avisynth is concerned, I realise), but new audio is not copied over along with new video; original audio is retained always.

To make copying of associated audio possible, Avisynth must be able to take its audio output from ScriptClip() at runtime, similarly to how it takes ScriptClip() video output.

Once that is possible, there may be wider use to being able to manipulate output audio at runtime.

fvisagie
15th September 2015, 13:22
Could you be more exact as to what you want to do?

In case it escaped your attention, here's a real-life use-case for clip replacement at frame-serving time (http://forum.doom9.org/showthread.php?t=172585), which falls short for lack of audio support.