Re: 答复: Hi, do we have media transcode API?

See for example:
http://badassjs.com/post/17218459521/webm-and-webp-hand-ported-to-javascript-for-all

HTH.
Silvia.

On Wed, Jul 4, 2012 at 11:36 AM, Silvia Pfeiffer
<silviapfeiffer1@gmail.com> wrote:
> On Wed, Jul 4, 2012 at 11:06 AM, Sunyang (Eric) <eric.sun@huawei.com> wrote:
>>
>> -----邮件原件-----
>> 发件人: Silvia Pfeiffer [mailto:silviapfeiffer1@gmail.com]
>> 发送时间: 2012年7月4日 16:39
>> 收件人: Glenn Adams
>> 抄送: Sunyang (Eric); HTML WG
>> 主题: Re: Hi, do we have media transcode API?
>>
>> On Wed, Jul 4, 2012 at 10:24 AM, Glenn Adams <glenn@skynav.com> wrote:
>>>
>>> On Wed, Jul 4, 2012 at 1:28 AM, Silvia Pfeiffer <silviapfeiffer1@gmail.com>
>>> wrote:
>>>>
>>>> On Wed, Jul 4, 2012 at 6:19 AM, Glenn Adams <glenn@skynav.com> wrote:
>>>> >
>>>> > On Tue, Jul 3, 2012 at 9:04 PM, Sunyang (Eric) <eric.sun@huawei.com>
>>>> > wrote:
>>>> >>
>>>> >> We receive a HD mp4 video stream to <video> element, can we have a
>>>> >> media
>>>> >> transcode API to transcode the HD video stream to a different format
>>>> >> video
>>>> >> stream which fit for the Smartphone?
>>>> >
>>>> >
>>>> > There is none defined.
>>>>
>>>> HTTP adaptive streaming is in the process of being standardised with
>>>> the MediaSource API [1]. That will allow delivery of video to all
>>>> devices, because it adapts to bandwidth and device capabilities.
>>>>
>>>> [1] e.g.
>>>> http://updates.html5rocks.com/2011/11/Stream-video-using-the-MediaSource-API
>>>
>>>
>>> True, but MSE does not define a media transcoding API.
>>
>> Indeed. :-)
>> I was not answering the question but trying to address the need, which
>> I understood to be providing the same content to different devices.
>> This assumes you are using a Web browser on all devices and the
>> devices support the same file formats.
>>
>> I now understand that the question is also about transcoding to a
>> different file format (not just a different bitrate) and I don't think
>> that is a problem that browsers should address. Could always be done
>> on a server or in JavaScript, I guess.
>>
>> [yang] can we do it in javascript, how?
>
> You have to implement the whole transcoding logic in JavaScript using
> the MediaStream API to get the byte ranges from the original file (I
> believe this is possible). It would, however, not be realistic to do
> this for a mobile device. You're much better off doing this
> servr-side.
>
> Regards,
> Silvia.

Received on Wednesday, 4 July 2012 09:38:32 UTC