Skip to content

🎥 Make videos programmatically with React

works kindaa

Jonny Burgera2d8e4b64b0d
diff --git a/packages/media-parser/src/create/iso-base-media/serialize-track.ts b/packages/media-parser/src/create/iso-base-media/serialize-track.ts
index 7618217eb7..88b4023fd6 100644
--- a/packages/media-parser/src/create/iso-base-media/serialize-track.ts
+++ b/packages/media-parser/src/create/iso-base-media/serialize-track.ts
@@ -89,12 +89,10 @@ export const serializeTrack = ({
// TODO: Validate the default is right and aligns with
track.codecPrivate ??
new Uint8Array([
- 0x01, 0x64, 0x00, 0x1e, 0xff, 0xe1, 0x00, 0x1e, 0x67,
- 0x64, 0x00, 0x1e, 0xac, 0xd9, 0x40, 0xa0, 0x2f, 0xf9,
- 0x70, 0x16, 0xe0, 0x40, 0x40, 0xb4, 0xa0, 0x00, 0x00,
- 0x03, 0x00, 0x20, 0x00, 0x00, 0x07, 0x81, 0xe2, 0xc5,
- 0xb2, 0xc0, 0x01, 0x00, 0x06, 0x68, 0xeb, 0xe0, 0x8c,
- 0xb2, 0x2c, 0xfd, 0xf8, 0xf8, 0x00,
+ 0x01, 0x42, 0x00, 0x1e, 0xff, 0xe1, 0x00, 0x0e, 0x27,
+ 0x42, 0x00, 0x1e, 0xab, 0x40, 0x50, 0x1e, 0xd3, 0x50,
+ 0x10, 0x10, 0x10, 0x20, 0x01, 0x00, 0x04, 0x28, 0xce,
+ 0x3c, 0x80,
]),
),
// TODO: Investigate which values to put in
diff --git a/packages/webcodecs/src/video-encoder-config.ts b/packages/webcodecs/src/video-encoder-config.ts
index 7a5ab294d1..779dc2b382 100644
--- a/packages/webcodecs/src/video-encoder-config.ts
+++ b/packages/webcodecs/src/video-encoder-config.ts
@@ -16,8 +16,8 @@ export const getVideoEncoderConfig = async ({
const config: VideoEncoderConfig = {
codec:
codec === 'h264'
- ? // avc1.64001e must correspond with the CodecPrivate data string
- 'avc1.64001e'
+ ? // avc1.42001f must correspond with the CodecPrivate data string
+ 'avc1.42001f'
: codec === 'vp9'
? 'vp09.00.10.08'
: codec,