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

RE: can we generate a stream from local file

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Wed, 1 Aug 2012 21:25:29 +0000
To: Randell Jesup <randell-ietf@jesup.org>, "public-media-capture@w3.org" <public-media-capture@w3.org>
Message-ID: <9768D477C67135458BF978A45BCF9B38383F341C@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
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 that.
>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: https://dvcs.w3.org/hg/audio/raw-file/tip/streams/StreamProcessing.html

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 peer-to-peer.

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 21:26:27 UTC

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