diff --git a/dev/convert.html b/dev/convert.html
index 00322c1..3fcaad9 100644
--- a/dev/convert.html
+++ b/dev/convert.html
@@ -21,7 +21,7 @@
chunked: true,
chunkSize: 2**20
});
- const outputFormat = new Mediabunny.MovOutputFormat();
+ const outputFormat = new Mediabunny.Mp4OutputFormat();
const button = document.createElement('button');
button.textContent = 'Cancel';
@@ -38,7 +38,8 @@
target
}),
audio: {
- codec: 'pcm-f64'
+ codec: 'opus',
+ bitrate: 128000,
//numberOfChannels: 1,
//sampleRate: 4000
//discard: true
diff --git a/package-lock.json b/package-lock.json
index becac23..c857052 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "mediabunny",
- "version": "1.0.1",
+ "version": "1.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "mediabunny",
- "version": "1.0.1",
+ "version": "1.0.2",
"license": "MPL-2.0",
"dependencies": {
"@types/dom-mediacapture-transform": "^0.1.11",
diff --git a/package.json b/package.json
index 9a6e1b5..23425fc 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "mediabunny",
"author": "Vanilagy",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "Pure TypeScript media toolkit for reading, writing, and converting media files, directly in the browser.",
"type": "module",
"main": "./dist/mediabunny.js",
diff --git a/src/media-source.ts b/src/media-source.ts
index 7734f5f..d6ad97e 100644
--- a/src/media-source.ts
+++ b/src/media-source.ts
@@ -416,8 +416,9 @@ class VideoEncoderWrapper {
const support = await VideoEncoder.isConfigSupported(encoderConfig);
if (!support.supported) {
throw new Error(
- 'This specific encoder configuration is not supported by this browser. Consider using another'
- + ' codec or changing your video parameters.',
+ `This specific encoder configuration (${encoderConfig.codec}, ${encoderConfig.bitrate} bps,`
+ + ` ${encoderConfig.width}x${encoderConfig.height}) is not supported by this browser. Consider`
+ + ` using another codec or changing your video parameters.`,
);
}
@@ -988,8 +989,9 @@ class AudioEncoderWrapper {
const support = await AudioEncoder.isConfigSupported(encoderConfig);
if (!support.supported) {
throw new Error(
- 'This specific encoder configuration not supported by this browser. Consider using another'
- + ' codec or changing your audio parameters.',
+ `This specific encoder configuration (${encoderConfig.codec}, ${encoderConfig.bitrate} bps,`
+ + ` ${encoderConfig.numberOfChannels} channels, ${encoderConfig.sampleRate} Hz) is not`
+ + ` supported by this browser. Consider using another codec or changing your audio parameters.`,
);
}