streamproc / MediaStreamRecorder

Cross browser audio/video/screen recording. It supports Chrome, Firefox, Opera and Microsoft Edge. It even works on Android browsers. It follows latest MediaRecorder API standards and provides similar APIs.
https://www.webrtc-experiment.com/msr/
MIT License
2.63k stars 562 forks source link

Blob limit on chrome? #86

Open noahjerreel opened 8 years ago

noahjerreel commented 8 years ago

Hello anyone,

Does anyone encounter issue regarding the total blob size cannot exceeds 500mb on chrome?

What I am doing is I'm doing a long recording using Multi stream recorder and stream it to the node server. On the middle of stream, File reader throws File not found.

Hope anyone can help me with this!

Source: https://bugs.chromium.org/p/chromium/issues/detail?id=375297

muaz-khan commented 8 years ago

Chrome seems NOW-supporting up to 954 MB byteLength (for ArrayBuffers+Blobs).

var byteLength = 999999999;
var buffer = new ArrayBuffer(byteLength);
var blob = new Blob([buffer]);

function bytesToSize(bytes) {
   var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
   if (bytes == 0) return '0 Byte';
   var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
   return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i];
};

var blobSizeInMB = bytesToSize(blob.size);
console.log( blobSizeInMB );
noahjerreel commented 8 years ago

Got it @muaz-khan

Do you think there's another work around to avoid this limit?

Thanks for your help!

RyanDavis commented 8 years ago

Can we release/revoke blobs which have been uploaded to a node server, in order to free up some of this 500MB pool?

I'm attempting this in a fiddle, but am unable to free the blob. It continues to be shown in chrome://blob-internals

noahjerreel commented 8 years ago

I'm not sure if there's a way to revoke created blobs. What do you think @muaz-khan ?

RyanDavis commented 8 years ago

The thread on chromiums 500MB blob issue hints that it is possible.

noahjerreel commented 8 years ago

Thanks @RyanDavis

But the comment on the same thread you gave me says otherwise? I'm not sure.

image

noahjerreel commented 8 years ago

@muaz-khan any comment on this?

NguyenTungs commented 8 years ago

@muaz-khan any comment on this?

dotnwat commented 8 years ago

@muaz-khan would like an update on this as well

muaz-khan commented 8 years ago

Page reload seems (currently) the only method to clear (old) blobs from the system memory.

If we can clear older blob-intervals then we can record as longer stream as possible; and instantly upload to server as well.

Currently 500/600 (or sometimes 954) seems max-blob-limit in MB, though.

Skylion007 commented 7 years ago

The reason the fiddle doesn't work is that the blobs look like they are still in an internal array representation. https://github.com/streamproc/MediaStreamRecorder/blob/master/common/MediaStreamRecorder.js#L45gf We need a way of clearing those blobs through the API.