Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samples restrictive #406

Open
Yahweasel opened this issue Nov 18, 2021 · 5 comments
Open

Samples restrictive #406

Yahweasel opened this issue Nov 18, 2021 · 5 comments
Labels

Comments

@Yahweasel
Copy link
Contributor

The video/audio samples provided in samples/ all have issues that make them difficult to use to demonstrate WebCodecs in isolation (which, for me, makes it difficult to use them with a polyfill or, thus, to demonstrate or test said polyfill):

  • MP4 Decoding uses a codec controlled by the Misanthropic Patent Extortion Gang, so it's unlikely to be supported by any fully F/OSS implementations.
  • Webcam in Worker uses the MediaStreamTrackProcessor API, which is a separate API entirely (and also experimental, and somewhere between difficult and impossible to polyfill).
  • Capture to File uses MediaStreamTrackProcessor and the FileSystem API, which is also a separate, experimental API.

Admittedly, this is of particular nuisance only to me, because it means I can't say "supports the WebCodecs samples", but regardless it's a breadth issue.

It'd be nice to see simple transcoding (VP9/FLAC to VP8/Opus, for instance), or even just a trivial decoder or encoder with no surrounding bells and whistles. I have some in-progress samples (using my polyfill) at https://github.com/ennuicastr/libavjs-webcodecs-polyfill/tree/master/samples/ .

@Yahweasel
Copy link
Contributor Author

I'm going to necro this thread: I have tons of samples from both the polyfill and a new bridge I wrote that links between any file format supported by ffmpeg/libav and WebCodecs. I don't know how all the policies work, but would it be possible/reasonable for me to PR samples?

@padenot
Copy link
Collaborator

padenot commented Mar 8, 2024

Yeah, the idea being that it more or less demonstrates something you'd do, e.g. encoding the webcam, or transcoding a media file, etc., simple but real uses.

We should also add opus in the mp4 example, and it'll be fine on that front, av1/vp8/vp9/opus.

@tidoust, how would that work in terms of IPR?

@Yahweasel
Copy link
Contributor Author

Just for reference, my samples in the polyfill (https://github.com/ennuicastr/libavjs-webcodecs-polyfill/tree/master/samples) are:

  • Decoding an audio file (FLAC, Opus)
  • Encoding an audio file (FLAC, Opus)
  • Decoding an AV file (VP8, Opus)
  • Encoding a video file (VP8)
  • Encoding the webcam to a video file (VP8)
  • Encoding and decoding the webcam "on the fly" (just to demonstrate both sides)

Of course, all of the codec-specific formats are easily funged into any other codec. I use Matroska/WebM in all cases, but libav supports Misanthropic Patent Extortion Gang 4 just fine.

My main sample in the bridge (https://github.com/Yahweasel/libavjs-webcodecs-bridge/tree/main/samples/transcoder) is an any-to-any transcoder.

@tidoust
Copy link
Member

tidoust commented Mar 8, 2024

@tidoust, how would that work in terms of IPR?

Anything you worry about in particular?

Samples are not published with the spec, the Patent Policy does not apply to them. Even if they were, content would be informative. Contributing samples to the repository is like contributing to any regular open source project, noting the license used is the W3C Software and Document License (which is close to an MIT license).

We may still have to tell the IPR bot that a PR that touches samples is non-substantive on a PR-by-PR basis, but that should remain manageable.

(This makes me realize that the CONTRIBUTING.md file in this repo (and probably other repos as well), is likely the result of a copy-and-paste of an older version of the file. The latest template is more explicit that the instructions apply to substantive contributions. I'll look into refreshing these files.)

@padenot
Copy link
Collaborator

padenot commented Mar 11, 2024

Yeah, all good then, I wasn't sure, so I figured I'd ask.

@yeahweasel, transcoding, encoding a canvas to video, encoding PCM to audio (possible both at the same time), encoding the webcam seem like good candidates, in the sense that I'm pretty sure I've wrote samples for people in the past about those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants