Summary
Encoding long videos can fail before upload begins because the encoded output is assembled into one contiguous in-memory buffer.
This results in allocation or byte-size errors for sufficiently large videos.
Steps to reproduce
- Upload a video longer than approximately 16 minutes (remaining under the current 1 GB upload limit).
- Start encoding.
Current behavior
Encoding fails with a memory allocation or byte-size error before upload starts.
Expected behavior
Encoded output should be streamed instead of buffered into a single large allocation so that longer videos can be processed successfully.
Technical notes
- The encoder currently assembles the final output using a single BufferTarget, resulting in one contiguous allocation.
- A streaming output implementation would significantly reduce peak memory usage.