videojs-record icon indicating copy to clipboard operation
videojs-record copied to clipboard

Provide Progress of the encoding progress.

Open qanuj opened this issue 3 years ago • 3 comments

qanuj avatar Apr 27 '21 03:04 qanuj

hi @qanuj what are your plans for this pr exactly?

thijstriemstra avatar May 02 '21 15:05 thijstriemstra

When I record a video it has few problems.

  1. The duration is missing and shows N/A
  2. the recorded video from windows has no sound on safari (mac / iOS) which means the video would need to be encoded (converted)
  3. While converting added function to show progress to user (the ffmpeg-wasm has support for progress, but it was not added in the plugin api as options)
  4. This progress show NaN as the duration is missing. Hence added getSeekableBlob to convert the recorded Data to seekable Blob.. ref. https://github.com/muaz-khan/RecordRTC/issues/147

Once the seekable Data is sent to convertEngine, now the encoding has a duration and shows progress.

I am bit torn on If I should have the getSeekableBlob in this or let client implement it.

I did try that and since there is no access to update the capturedData with modified seekableData, I feel its best to keep this process in convertEngine with ability to configure via options plus check if the function (getSeekableData) is available.

I did test this in my project and seems to be working alright.

qanuj avatar May 03 '21 02:05 qanuj

the ffmpeg.wasm plugin was upgraded to use v0.12 and they now provide progress events:

// Listen to progress event instead of log.
ffmpeg.on('progress', ({ progress, time }) => {
    messageRef.current.innerHTML = `${progress * 100} % (transcoded time: ${time / 1000000} s)`;
});

if we add progress events for converters I would suggest to start there.

thijstriemstra avatar Feb 14 '24 16:02 thijstriemstra