legokichi / ts-ebml

EBML encoder and decoder
177 stars 52 forks source link

performance of making a MediaRecorder webm seekable #27

Open rhwu opened 5 years ago

rhwu commented 5 years ago

Hi there,

This is more of a question / feature request.

Your example_seekable.ts works very well. However when the recording is big it will take a long time to process. E.g. I have a 2 and half hours recording of 2.5GB, the tools.makeMetadataSeekable function alone takes around 1 minute to complete.

I'm wondering can this be improved? Specifically, as we know the duration is roughly just the time between recording start and stop. With that, is it possible to just fill that duration information to the metadata of the original file to make it seeable?

Thanks!

cristiantx commented 4 years ago

@rhwu how are you fixing big files? I'm getting an error due to the buffer size RangeError [ERR_FS_FILE_TOO_LARGE]: File size (2276629181) is greater than possible Buffer: 2147483647 bytes

Is it possible to make the fix not loading all the file in memory?

rhwu commented 4 years ago

Unfortunately we still don't have a solution.

Hopefully someone who is familiar with the format can make some comment on this one.

guest271314 commented 4 years ago

How long does mvkmerge -o output.webm --enable-durations input.webm take to output result?

StaZhu commented 3 years ago

@rhwu how are you fixing big files? I'm getting an error due to the buffer size RangeError [ERR_FS_FILE_TOO_LARGE]: File size (2276629181) is greater than possible Buffer: 2147483647 bytes

Is it possible to make the fix not loading all the file in memory?

I have made some modification, instead of create one Buffer, I choose to create a Buffer Slice Array to solve this issue, and published a new npm package named 'fix-webm-metainfo' to support >2GB file. you can have a try