videojs-record
videojs-record copied to clipboard
Provide Progress of the encoding progress.
hi @qanuj what are your plans for this pr exactly?
When I record a video it has few problems.
- The duration is missing and shows N/A
- the recorded video from windows has no sound on safari (mac / iOS) which means the video would need to be encoded (converted)
- 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)
- 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.
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.