Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Progress of the encoding progress. #570

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

qanuj
Copy link

@qanuj qanuj commented Apr 27, 2021

No description provided.

@thijstriemstra
Copy link
Member

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

@qanuj
Copy link
Author

qanuj commented May 3, 2021

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. Video has no duration muaz-khan/RecordRTC#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.

@thijstriemstra
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants