You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #405. The time-stretch no longer buffers the decoded timeline (stream-stretch.js), but the export baseline still holds the whole source and the whole encoded output in memory regardless of rate:
makeInput fetches the entire source into a Blob before mediabunny reads it (~4–5 GB for a 2 h 1080p file).
BufferTarget accumulates the full encoded output in one ArrayBuffer, and new Blob([output.target.buffer]) then duplicates it (~2.3 GB + ~2.3 GB transient for the same export).
Input: for http(s) sources, hand mediabunny a UrlSource/streaming source instead of pre-fetching a Blob; blob:/data: URLs (local files restored from IndexedDB) can stay as they are, since the bytes already live in memory.
Together these drop peak memory for a long 1× export from ~3× file size to roughly the demuxer/encoder working set.
Follow-up to #405. The time-stretch no longer buffers the decoded timeline (stream-stretch.js), but the export baseline still holds the whole source and the whole encoded output in memory regardless of rate:
makeInputfetches the entire source into a Blob before mediabunny reads it (~4–5 GB for a 2 h 1080p file).BufferTargetaccumulates the full encoded output in one ArrayBuffer, andnew Blob([output.target.buffer])then duplicates it (~2.3 GB + ~2.3 GB transient for the same export).Proposed direction
StreamTargetbacked by the File System Access API (showSaveFilePicker) when available, falling back toBufferTarget+ download elsewhere (Safari/Firefox). This is a UX change — the save location is chosen at export start rather than on download — which is why it was split out of media-export: time-stretch path buffers the entire decoded PCM timeline in RAM — multi-GB, OOM on long media #405 rather than bundled.UrlSource/streaming source instead of pre-fetching a Blob; blob:/data: URLs (local files restored from IndexedDB) can stay as they are, since the bytes already live in memory.Together these drop peak memory for a long 1× export from ~3× file size to roughly the demuxer/encoder working set.