View Single Post
Old 6th August 2012, 21:12   #25  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Originally Posted by TheFluff View Post
I don't really understand what you want to accomplish with your script
Quote:
Originally Posted by gyth View Post
Tar with built-in lossy compression???
I think TheFluff was replying to Turbine, and you were referring to your post:

Code:
a=ImageSource("sm444.png")

a.subtitle("not rendered").ImageWriter("not_rendered", type="png")

a.subtitle("rendered").ImageWriter("rendered", type="png")
In the 1st ImageWriter line the result is thrown away (temp assigned to Last and then overwritten
by following line), so the result is never used (neither is the source of the result, ie 1st ImageWriter,
nor the source of that ie the 'not rendered' Subtitle
) as it plays no part in the output.

a simple
Code:
a=a.subtitle("not rendered").ImageWriter("not_rendered", type="png")
would solve the problem but for the two different outputs required by your script, one with
"not_rendered" on it and the other with "rendered", assuming that you actually want two different
outputs with two different subtitles, then you would need to somehow use the result of the 1st
ImageWriter line in the second.
(The problem here is there is only one output, but you want
to have a clip with two different subtitles, and not one overwriting
the other nor one without and one with a subtitle.
[in the words of a famous movie script, 'There Can Be Only One'])

There are any number of ways this could be done, eg

Code:
a=ImageSource("sm444.png")

Tmp = a.subtitle("not rendered").ImageWriter("not_rendered", type="png")

dummy = Tmp.FrameCount()
dummy = dummy - dummy

a.subtitle("rendered").ImageWriter("rendered",start=0+dummy, type="png")
Not tested but should I think work. (There are probably better ways)

EDIT: The dummy arg forces the 1st Imagewrite chain to be processed
as the output is reliant on both subtitled paths through the
graph, the advantages are that it is a highly efficient way
of selecting what is and is not necessary due to various conditions,
but results in seemingly silly kludges to force 'side effects' to occur.
Avisynth could well do some things better, but is quite remarkable in what
is does and the filter graph model itself is in no need of change.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 6th August 2012 at 22:56.
StainlessS is offline   Reply With Quote