Closed magnet-clip closed 1 year ago
this is definitely a webcodec error. you can try to keep your profile (1st two digits) and change level to for example 33 instead of 34.
many profiles aren't supported yet, and the list depends on the device. some will be accepted but will crash later. the chromium guys don't want to maintain a list of implemented codecs in webcodecs, so you have to guess and try
I use this bit of code to check what I can do with a device. let me know if you find working codec strings that aren't in my list
static videoCodecs:any = ['avc1.420033','avc1.42001E','avc1.4D401E','hvc1.2.4.L153','vp8','vp9','vp09.00.10.08','avc1.640033','hvc1.1.6.H150.90','hev1.1.6.L120.90','av01.0.01M.08','av01.0.15M.10','hev1.1.6.L93.B0','hev1.2.4.L93.B0','hvc1.3.E.L93.B0','hvc1.4.10.L93.B0'];
// crash ,'hvc1.1.6.H150.90','hev1.1.6.L120.90'
// untested ,'hev1.1.6.L93.B0','hev1.2.4.L93.B0','hvc1.3.E.L93.B0','hvc1.4.10.L93.B0'
// supported but nok : ,'av01.0.01M.08','av01.0.15M.10'
static goodCodecs:Array<any>=new Array<any>();
static checkVideoCodecs() {
Util.videoCodecs.forEach(codec => {
(async () => {
try {
let config:VideoEncoderConfig = {
codec: codec,
width: 640,
height: 360,
framerate: 30,
};
Util.testVideoEncoder(config);
} catch (e:any) {
console.log("CODEC "+codec+" UNKNOWN");
}
})();
});
}
static testVideoEncoder(config:VideoEncoderConfig) {
let videoEncoder:any = new window.VideoEncoder({
output: (encodedChunk, config) => {},
error: (err) => {
console.log("err:",err);
},
});
videoEncoder.configure(config);
if (!Data.videoCodec) Data.videoCodec = config.codec;
Util.goodCodecs.push(config.codec);
console.log("CODEC IS SUPPORTED:",config.codec);
videoEncoder.close();
}
Thank you for your suggestions, I believe I should close this one then
Hi,
I am not sure whether this is related to mp4muxer or this is a generic browser constraint, but in Chrome I am getting an error when trying to record a video using avc1.7a1034 codec. Ultimately my goal is to record a video in yuv422 format, so I am trying this configuration.
I configure muxer as follows:
and VideoEncoder in the following way:
Are you aware of such issue, and whether there could be any fix for that?