Log in

View Full Version : Twriteavi issue with MT


kolak
27th June 2012, 00:48
I'm using this script to write intermediate file:

http://forum.doom9.org/showthread.php?p=1073371#post1073371

works fine, but not with MT. Once setmtmode is used script tries to create output file twice (or more times- same applies to qtoutput), but it can't because file is already open.

Any way to fix it?

update:

Just realized that it does not work the way I want it anyway. Twriteavi has to always be at the end of the script, which means it's always the same as whole output file.
How can I output 2 files as the same time, where one of them is eg rendered in Vdub and another is from the middle of the script, eg.

a=avisource()
b=qtgmc(a)
interframe(b)

How can I write file b during rendering whole script in Vdub. I would prefer some avi, but yuv will be also fine.

Thanks :)

Gavino
27th June 2012, 09:04
works fine, but not with MT. Once setmtmode is used script tries to create output file twice (or more times- same applies to qtoutput), but it can't because file is already open.

Any way to fix it?
Try using SetMTMode(5) for that part of the script.

Just realized that it does not work the way I want it anyway. Twriteavi has to always be at the end of the script, which means it's always the same as whole output file.
Are you sure? I see nothing in the documentation to suggest that.

How can I output 2 files as the same time, where one of them is eg rendered in Vdub and another is from the middle of the script, eg.

a=avisource()
b=qtgmc(a)
interframe(b)

How can I write file b during rendering whole script in Vdub.
Try this:
a=avisource()
b=qtgmc(a)
b = b.twriteavi(...)
interframe(b)

kolak
27th June 2012, 10:32
Thanks- tried all modes- does not help.
If twriteravi is not at the end than it does not work :(

I will check your script- did not try this way.

Gavino
27th June 2012, 11:02
Thanks- tried all modes- does not help.
If twriteravi is not at the end than it does not work :(
twriteavi is just a filter like any other.
If called without a clip, 'last' must be defined for it to work - in your script, 'last' is not defined until the line
interframe(b)

That's why it appears it 'needs' to be at the end of the script in this case.

kolak
27th June 2012, 14:00
Hmmm- I had eg. it this way:

a=avisource()
b=qtgmc(a)
twriteavi(b, ...)
interframe(b,....)

Is this wrong?

I can see that your way may work- will try:)

Gavino
27th June 2012, 14:04
a=avisource()
b=qtgmc(a)
twriteavi(b, ...)
interframe(b,....)
You need
b = twriteavi(b, ...)

Otherwise, interframe will be applied to the original 'b' and the result of twriteavi will be ignored - the filter will not be included in the filter chain and will not produce any output.

kolak
27th June 2012, 14:09
Makes sense- thanks :)

kolak
27th June 2012, 21:56
Can't make it working

a=avisource()
b=qtgmc(a)
b=twriteavi(b, ...)
interframe(b,....)

gives twriteavi error: ICSeqCompressFrameStart failed

No idea :)