W3C home > Mailing lists > Public > public-media-capture@w3.org > August 2012

RE: can we generate a stream from local file

From: Jim Barnett <Jim.Barnett@genesyslab.com>
Date: Wed, 1 Aug 2012 15:30:09 -0700
Message-ID: <E17CAD772E76C742B645BD4DC602CD81068024FB@NAHALD.us.int.genesyslab.com>
To: "Travis Leithead" <travis.leithead@microsoft.com>, "Randell Jesup" <randell-ietf@jesup.org>, <public-media-capture@w3.org>
If the goal is to send a non-media file to a peer, the data channel
should work.  You could send it as a blob or stream it or do just about
anything the two sides agree to.  So I would agree that we don't need to
support streaming arbitrary files via a MediaStream.

- Jim

-----Original Message-----
From: Travis Leithead [mailto:travis.leithead@microsoft.com] 
Sent: Wednesday, August 01, 2012 5:25 PM
To: Randell Jesup; public-media-capture@w3.org
Subject: RE: can we generate a stream from local file

From: Randell Jesup [mailto:randell-ietf@jesup.org] 
>On 7/30/2012 10:06 AM, Travis Leithead wrote:
>>> -----Original Message-----
>>> From: Stefan Hakansson LK [mailto:stefan.lk.hakansson@ericsson.com]
>>> On 07/30/2012 11:08 AM, Sunyang (Eric) wrote:
>>>> Can we generate a stream from a file, and then use addStream() to 
>>>> send it to peer?
>>> That is the intention.
>> We should simply extend MediaStreamTrackList:add for this scenario
(see below). However, I'm skeptical that you'd want to be able to
"stream" arbitrary files as a media stream track. For example, what
would happen if you tried to send a PDF or HTML document as a stream? It
just doesn't make sense. If that's your goal, what you want is simply a
Blob-based file transfer mechanism (peer-to-peer). I doubt that
real-time media transfer is the transfer mechanism you would want for
>The MediaStream Processing document specifies a mechanism of running a 
>file through a video element, and doing
video_elem.captureStreamUntilEnded() to generate a MediaStream from the
decoded audio/video.  Individual tracks could then be used to build
derivative streams if you like.  You get them all, and get them in a
synchronized way (inside one MediaStream).

You are referring to the MediaStream Processing API proposal:

I believe the intent is for streaming (or capturing) content that can be
played in an Audio/Video element. However, I don't think this is the
same scenario as being able to send arbitrary files peer-to-peer. For
example, I wouldn't be able to load an executable binary file into a
video element. To be clear, I'm not advocating for such a feature don't
believe it's a goal of the WebRTC WG to enable sending arbitrary files

So returning to the subject line: can we generate a stream from a local
file? The answer depends on the type of file. If it's a media file, then
something like the mechanism proposed in the MediaStream Processing API
could be used, otherwise, no; support for obtaining a MediaStream from
any arbitrary file is not something we should support.
Received on Wednesday, 1 August 2012 22:31:02 UTC

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