W3C home > Mailing lists > Public > public-media-capture@w3.org > December 2011

RE: Generic media recording proposal

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 13 Dec 2011 11:37:51 +1300
Message-ID: <CAOp6jLYR8D2+qGkqD0jqMgnNfaKR9oce6ne4rw0VY9s9vpJe-w@mail.gmail.com>
To: public-media-capture@w3.org
Cc: Travis Leithead <travis.leithead@microsoft.com>, Harald Alvestrand <harald@alvestrand.no>
Travis Leithead

> >-----Original Message-----
> >From: Harald Alvestrand [mailto:harald@alvestrand.no <harald@alvestrand.no>]
> >On 12/08/2011 06:50 PM, Travis Leithead wrote:
> >> What is the group's thoughts on creating a recorder interface that could
> >>be used for more than just MediaStreams? For example, it seems like it
> >>might be neat to be able to record a<video>  or<audio>  tag, or record
> >>video from an animating<canvas>?
> >>
> >> If this sounds like an interesting scenario for future extension, I would
> >>suggest that the "recording" capability be logically separated from the
> >>MediaStream.
> >
> >I am in favour of the separation, but that's because I think the
> >functionality is not needed for the main purposes of MediaStream, which
> >makes it strange to require implementations to have it.
> >
> >I would prefer to think of those different recording sources as
> >producing a MediaStream that can be consumed by a Recorder, though. It
> >decreases the amount of required linkage.
> In other words, should those different sources wish to support recordings, they would need to add an API to "extract" a MediaStream object that could then be presented to a Recorder, correct? This does appear to decrease the potential for linkage or extension required to a Recorder interface such as the one previously described.
In my StreamProcessing proposal I've already proposed APIs to enable
capturing of media elements and canvases to MediaStreams.

It seemed useful to me to create a single Recorder instance based on a
MIME type/quality inputs, and then to be able to use that instance to
record a variety of things. That would imply that the Recorder
instance could be re-used (support setSource() multiple times);
otherwise, the Recorder is one-time use, and you may as well specify
the source in the Constructor as a required parameter.
With ProcessedMediaStream you could support just a single stream input, and
authors could multiplex different inputs into that single recorded stream,
with sample-accurate scheduling of the changes in inputs. With a
main-thread setSource() API, you can't get accurate transitions from one
input to another.

The scenario that is not possible with a one-time-use Recorder is
recording segments of a MediaStream into one contiguous file (not
recording the gaps between the time that stop() is called and start()
is called). For example, if your capture device reports periods of
silence on an audio track, you could stop and start the audio
recording to trim out the silence gaps in a conversation (or
commercials in a video stream as another example).
Right. ProcessedMediaStream combined with a StreamRecorder would solve that.

"If we claim to be without sin, we deceive ourselves and the truth is not
in us. If we confess our sins, he is faithful and just and will forgive us
our sins and purify us from all unrighteousness. If we claim we have not
sinned, we make him out to be a liar and his word is not in us." [1 John
Received on Monday, 12 December 2011 22:38:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:08 UTC