Opened 3 years ago

Closed 9 months ago

Last modified 8 months ago

#9541 closed enhancement (wontfix)

WebCodecs API integration

Reported by: Jozef Chutka Owned by:
Priority: wish Component: avcodec
Version: unspecified Keywords:
Cc: Jozef Chutka, quinkblack Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hi FFmpeg team,

I am using ffmpeg with WebAssembly and it works nicely in a web browser.

I would like to request an enhancement, if this is the right place, to integrate ffmpeg and https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API via -vcodec -acodec parameters. I can imagine this could improve encoding performance significantly.

Change History (7)

comment:1 by Carl Eugen Hoyos, 2 years ago

Keywords: vcodec acodec removed
Priority: normalwish
Resolution: wontfix
Status: newclosed

This seems very unlikely to me.

comment:2 by Benjamín de la Fuente Ranea, 11 months ago

This feature could benefit all the software currently using ffmpeg to decode videos with the hwaccel features. Similarly to what ffmpeg does with MediaCodec for Android, VAAPI, VDPAU, or DXVA2, ffmpeg could add support for WebCodecs making it very easy to port those applications to WebAssembly.

comment:3 by quinkblack, 11 months ago

Cc: quinkblack added
Resolution: wontfix
Status: closedreopened

I want to look at this feature, but I don't have a clear plan yet.

comment:4 by quinkblack, 9 months ago

Resolution: wontfix
Status: reopenedclosed

I consulted with some web developers, and they expressed skepticism about the practicality of adding webcodecs in FFmpeg. They suggested directly invoking webcodecs without going through FFmpeg's encapsulation. Therefore, I'm closing the issue.

in reply to:  4 comment:5 by daniel.barta, 9 months ago

Replying to quinkblack:

I consulted with some web developers, and they expressed skepticism about the practicality of adding webcodecs in FFmpeg. They suggested directly invoking webcodecs without going through FFmpeg's encapsulation. Therefore, I'm closing the issue.

Could you elaborate on the potential pitfalls you have found with this? I have been doing some video manipulation in the browser and the more I dig deeper the more I wish I could utilise FFmpeg more, so I have been considering exploring this approach. Your input here could save me a ton of time.

comment:6 by Benjamín de la Fuente Ranea, 8 months ago

I think this is very similar to the MediaCodec support for Android, you could for sure do it by yourself using JNI, but the ffmpeg layer make this much easier and portable. I hope WebCodecs supoort could be included in ffmpeg some day.

in reply to:  6 comment:7 by quinkblack, 8 months ago

Replying to Benjamín de la Fuente Ranea:

I think this is very similar to the MediaCodec support for Android, you could for sure do it by yourself using JNI, but the ffmpeg layer make this much easier and portable. I hope WebCodecs supoort could be included in ffmpeg some day.

It's not the same compared to MediaCodec. MediaCodec has C API, and supported by FFmpeg, and JNI is well defined too.

Note: See TracTickets for help on using tickets.