New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 916215 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Either MediaRecorder or CanvasCaptureMediaStreamTrack requires rAF inbetween frames

Project Member Reported by surma@chromium.org, Dec 18

Issue description

Chrome Version       : 73.0.3644.0
OS Version: OS X 10.14.1
URLs (if applicable) : https://gist.github.com/surma/171a383df351c7bfa4d890394b7e6e96

What steps will reproduce the problem?
1. Open the HTML file from the gist above
2. Wait ~5 seconds
3. See the video play
4. comment out the line with `await raf();`
5. demo breaks 

What is the expected result?
The results of step 3 and 5 should be equivalent.

What happens instead of that?
The MediaRecorder emits a single Blob of size 0.


Please provide any additional information below. Attach a screenshot if
possible.

UserAgentString: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36



 
Components: -Blink>MediaStream Blink>MediaStream>CaptureFromElement Blink>MediaRecording
Labels: Needs-Triage-M71
Cc: phanindra.mandapaka@chromium.org
Labels: Needs-Feedback Triaged-ET
Thanks for filing the issue...

Tried to reproduce the issue on reported chrome version 73.0.3644.0 using Mac 10.14.0 and 10.14.1. Attaching screen-cast for reference.
Steps: 
------
1. Launched reported chrome 
2. Navigated the URL "https://gist.github.com/surma/171a383df351c7bfa4d890394b7e6e96" and downloaded the file 
3. Opened the html file and Waited ~5 seconds 
As we have not observed playing the video file and also the comment line

@Reporter: Could you please check the attached screen-cast and let us know if we missed anything form our end and if possible provide and screen-cast for better triaging it.

Thanks.!
916215.mp4
1.2 MB View Download
Not sure why autoplay is not working for you, but that’s important for this issue. 

The file from the gist creates a video that is playable, that’s the essential observation here. After commenting out the line like described in step 4, the video will NOT be playable anymore.

For more clarity, and as requested, here is a screencast: https://youtu.be/tHa5aFkqWIo 
Project Member

Comment 5 by sheriffbot@chromium.org, Dec 19

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: emir...@chromium.org
Owner: mcasas@chromium.org
Status: Assigned (was: Unconfirmed)
MediaRecorder will transparently record whatever is provided to it;
so I think the issue here is that the <canvas>.captureStream() is

Made a codepen to study exactly what's happening:
https://codepen.io/miguelao/pen/MZVoJd?editors=1010

Just to be sure, you'd like to draw the animation to the canvas
"offline", as fast as possible, and then play it back at a reduced
speed, so the animation looks smooth, correct?  That would never
work anyway, because the playback would be at exactly the same
speed of the recording, because there's no way to retimestamp
the encoded data before putting it in the container.  We discussed
this in the context of using a MediaRecorder for offline web 
transcoding (<video> plays a given format, MediaRecorder records
another, and you'd like that to be as fast as possible, not at
the speed of the playback) -- but it didn't reach any conclusion,
see https://discourse.wicg.io/t/allow-non-realtime-use-of-mediarecorder/2308/4
I confirmed that if we don't `await raf();`, then the video 
track receives no VideoFrames, so nothing gets encoded (I 
also tried creating the captureStream();  with no parameter 
and also commenting out the line videoTrack.requestFrame(), 
which shouldn't make a difference, and indeed it doesn't).
So MR is not broken in this case, but still this demo would
not work as expected, see #6

Sign in to add a comment