Skip to content

WebTransport/WebCodecs interaction (copies) #231

@aboba

Description

@aboba

There are a number of use cases where it is envisaged that WebTransport + WebCodecs will be used together:

  1. Video upload, where a captured MediaStreamTrack is converted to raw video frames, encoded by WebCodecs, and then sent to a server using WebTransport.
  2. Video streaming, where a video stream is sent to a WebTransport client, encodedVideoChunks are decoded using WebCodecs into videoFrames, converted to a MediaStreamTrack and rendered by a video tag.

In use case #1, it is desirable for the encodedVideoChunk produced by WebCodecs to be passed to WebTransport and sent with as few copies as possible (e.g. just one copy for process separation). Is this possible?

In use case #2, it is desirable for WebTransport datagram or reliable stream reader to transfer datagrams/segments of the encodedVideoChunks into a GPU buffer rather than main memory, so as to allow most efficient ingestion by WebCodecs and avoid a copy. Is this possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions