ntscqt icon indicating copy to clipboard operation
ntscqt copied to clipboard

Feature suggestion: Batch encoding multiple frames in threads

Open kode54 opened this issue 2 years ago • 2 comments

Decoding frames as fast as the input video will offer them, should offer the ability to batch encode frames in multiple threads, increasing throughput significantly. Assuming that the random parameters can be calculated for N frames at a time for a job queue, and all those frames can be encoded independent of each other, and then serialized again into the output encoder.

Probably a nightmare to implement, but it could improve speed without sacrificing the accuracy of the simulation. Assuming, again, that there are no inter-frame products dependent on the output of a previous frame's encode.

kode54 avatar Jan 10 '22 03:01 kode54

Yes that's right. I thought about a similar optimization. This is more likely possible than not 👍 There is no interframe data, but there is a variable component of the motion of the emulated cassette tape. My plan was to create N number of threads for rendering and start their state with N dropped frames and process every N frame in this stream, then parallel rendering should be the same visual, but faster.

I will try to implement this in future versions. Perhaps, at the same time with the addition of interlaced render for greater realism.

JargeZ avatar Jan 10 '22 14:01 JargeZ

Yes that's right. I thought about a similar optimization. This is more likely possible than not +1 There is no interframe data, but there is a variable component of the motion of the emulated cassette tape. My plan was to create N number of threads for rendering and start their state with N dropped frames and process every N frame in this stream, then parallel rendering should be the same visual, but faster.

I will try to implement this in future versions. Perhaps, at the same time with the addition of interlaced render for greater realism.

add option to choose thread count for rendering

SergeyMC9730 avatar Jan 12 '22 07:01 SergeyMC9730