ennuicastr / libavjs-webcodecs-polyfill

A polyfill for the WebCodecs API. No, really.
82 stars 8 forks source link

aac unsupported ? #23

Closed RavikumarTulugu closed 8 months ago

RavikumarTulugu commented 8 months ago

was trying to create a AAC encoder with mp4a.x.y.z codec strings. every codec string was failing to create encoder. while going through the code i found this. Please advise.

function encoder(codec, config) { ... }
break; // Unsupported case "mp3": case "mp4a": case "ulaw": case "alaw": case "avc1": return null; // Unrecognized default: throw new TypeError("Unrecognized codec"); }

RavikumarTulugu commented 8 months ago

I am not familiar with libav or ffmpeg , looking more into code hints like the string for mp4a.* be libfdk-aacenc.c ?? this is an educated guess.

Yahweasel commented 8 months ago

My advice to you is twofold: (1) Use Opus. (2) If you're working in this space, it is mandatory for your own security for you to become at least literate enough about patents to know a minefield when you see one; the probability of being sued is low, but the consequences if you are are dire. Do not naïvely use Misanthropic Patent Extortion Gang (MPEG) codecs. Do not invite their wrath, and do not support them in general. MPEG is a cancer on multimedia technology.

If you are sufficiently misguided to want AAC support, you will need to add it yourself. I will not help you. I am willing to accept a PR, but that is the extent of the participation I am willing to offer.