MediaStreamRecorder icon indicating copy to clipboard operation
MediaStreamRecorder copied to clipboard

Blob limit on chrome?

Open noahjerreel opened this issue 8 years ago • 11 comments

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

noahjerreel avatar Jun 02 '16 03:06 noahjerreel

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 );

muaz-khan avatar Jun 04 '16 14:06 muaz-khan

Got it @muaz-khan

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

Thanks for your help!

noahjerreel avatar Jun 05 '16 16:06 noahjerreel

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

RyanDavis avatar Jun 07 '16 03:06 RyanDavis

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

noahjerreel avatar Jun 07 '16 03:06 noahjerreel

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

RyanDavis avatar Jun 07 '16 03:06 RyanDavis

Thanks @RyanDavis

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

image

noahjerreel avatar Jun 07 '16 03:06 noahjerreel

@muaz-khan any comment on this?

noahjerreel avatar Jun 15 '16 08:06 noahjerreel

@muaz-khan any comment on this?

NguyenTungs avatar Jul 27 '16 07:07 NguyenTungs

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

dotnwat avatar Oct 11 '16 22:10 dotnwat

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.

muaz-khan avatar Oct 13 '16 15:10 muaz-khan

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.

Skylion007 avatar Apr 06 '17 17:04 Skylion007