Page MenuHomePhabricator

Long videos fail during encoding because output is buffered in memory
Open, Needs TriagePublicBUG REPORT

Description

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

  1. Upload a video longer than approximately 16 minutes (remaining under the current 1 GB upload limit).
  2. 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.