WebVideoCreator icon indicating copy to clipboard operation
WebVideoCreator copied to clipboard

`outputStream` instead of writing to file?

Open WofWca opened this issue 1 year ago • 1 comments

timecut has the outputStream option. I believe it is nice for when you want the users of your web service to start downloading the file immediately, as it is being rendered.


Or perhaps are there workarounds? I discovered that files are being written in the temp directory ./tmp/synthesizer/:

https://github.com/Vinlic/WebVideoCreator/blob/fb62279513ca0ac01f6b8864a1e43101cbc9532e/core/Synthesizer.js#L93

after which the file is simply moved

https://github.com/Vinlic/WebVideoCreator/blob/fb62279513ca0ac01f6b8864a1e43101cbc9532e/core/Synthesizer.js#L251

WofWca avatar Jun 18 '24 12:06 WofWca

I suppose the place to modify when adding this feature is

https://github.com/Vinlic/WebVideoCreator/blob/fb62279513ca0ac01f6b8864a1e43101cbc9532e/core/Synthesizer.js#L473

According to the docs, a stream can be passed instead of a file name

WofWca avatar Jun 18 '24 12:06 WofWca