Closed
Bug 956997
Opened 11 years ago
Closed 10 years ago
Media Recording - Pass timeslices value from recorder to encoder writer
Categories
(Core :: Audio/Video: Recording, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: rlin, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
We have fragment mp4 muxer implementation and we can sync the fragment duration as same as timeslices value from start method.
Reporter | ||
Updated•11 years ago
|
Summary: Media Recording - Pass timeslices to muxer → Media Recording - Pass timeslices value from recorder to encoder writer
Reporter | ||
Updated•11 years ago
|
Assignee: nobody → rlin
Reporter | ||
Updated•11 years ago
|
Blocks: 891705, MediaEncoder
Comment 2•11 years ago
|
||
Hi Chris,
From spec [2], 'timeslice' is 'the number of milliseconds of data to return in a single Blob.'
But current implementation in [1] returns the blob for every 'timeslice' milliseconds. If my understanding is correct, it should be muxer, not MediaRecorder to decide 'timeslice' of blob because only muxer knows the time length of blob, is that correct?
[1] http://dxr.mozilla.org/mozilla-central/source/content/media/MediaRecorder.cpp#286
[2] https://dvcs.w3.org/hg/dap/raw-file/tip/media-stream-capture/MediaRecorder.html
Flags: needinfo?(cpearce)
Comment 3•11 years ago
|
||
I don't know the MediaRecorder API very well, so just looking at it now here's my guess:
I think mTimeSlice is being used wrong in MediaRecoder::Session. I think mTimeSlice should be the duration of a blob produced by the muxer, not the time duration in between a dataavailable event being dispatched.
if ((TimeStamp::Now() - mLastBlobTimeStamp).ToMilliseconds() > mTimeSlice) is true, that does not mean that mTimeSlice milliseconds of data has been appended to the encoded buffer cache, right? Data could be late.
It seems to me that mTimeSlice should be being passed to the muxer, and it should be using that as its fragment duration if possible, and once you have a full fragment you should then be dispatching it to JavaScript.
I don't know this code very well, I may be wrong, but that's my interpretation.
Flags: needinfo?(cpearce)
Reporter | ||
Comment 4•11 years ago
|
||
Ya, I also think the time-slice should be duration of the blob, not the blob push out interval.
My implementation just consider the realtime case, so it should be a problem if we allow to record a offline media stream).
Updated•11 years ago
|
Component: Video/Audio → Video/Audio: Recording
Comment 5•11 years ago
|
||
wip for MediaRecorder and ISOMediaWriter.
Comment 6•11 years ago
|
||
Remove the mechanism for counting the timeslice by current time in MediaRecorder::Session so the blob duration is decided by encoder or muxer.
Attachment #8391107 -
Attachment is obsolete: true
Attachment #8392757 -
Flags: feedback?(roc)
Comment 7•11 years ago
|
||
I actually think this doesn't matter much and that the current code is fine. There was never supposed to be a hard guarantee that the data in the blob will have the requested duration. Using the timer should work fine for the use-cases I can think of. Does setting the fragment duration in the ISOMediaWriter actually provide any benefits to the author?
Comment 9•11 years ago
|
||
I can't think any benefit to JS author in this case. I'll keep the original implementation.
Thanks for feedback.
Updated•11 years ago
|
Attachment #8392757 -
Flags: feedback?(roc)
Updated•11 years ago
|
Assignee: ayang → nobody
Reporter | ||
Comment 10•10 years ago
|
||
Refer to comment 8, We don't need to implement this function at this time. Close this bug at this time.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•