h264-mp4-encoder
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -155,34 +155,65 @@ import Module from "./embuild/h264_mp4_encoder.js"; | ||
* After `encoder.finalize()` use `encoder.FS.readFile(encoder.outputFilename)` after `finalize`. | ||
* @default "output.mp4" | ||
*/ | ||
outputFilename: number; | ||
outputFilename: string; | ||
/** Width of the input frames and output video. Must be a multiple of 2. */ | ||
/** | ||
* Width of the input frames and output video. Must be a multiple of 2. Required. | ||
* @default 0 | ||
*/ | ||
width: number; | ||
/** Height of the input frames and output video. Must be a multiple of 2. */ | ||
/** | ||
* Height of the input frames and output video. Must be a multiple of 2. Required. | ||
* @default 0 | ||
*/ | ||
height: number; | ||
/** Frame rate of the output video. */ | ||
/** | ||
* Frame rate of the output video. | ||
* @default 30 | ||
*/ | ||
frameRate: number; | ||
/** The bitrate in kbps relative to the frame_rate. Overwrites quantization_parameter. */ | ||
/** | ||
* The bitrate in kbps relative to the frame_rate. Overwrites quantization_parameter if not 0. | ||
* @default 0 | ||
*/ | ||
kbps: number; | ||
/** Speed where 0 means best quality and 10 means fastest speed [0..10]. */ | ||
/** | ||
* Speed where 0 means best quality and 10 means fastest speed [0..10]. | ||
* @default 0 | ||
*/ | ||
speed: number; | ||
/** Higher means better compression, and lower means better quality [10..51]. */ | ||
/** | ||
* Higher means better compression, and lower means better quality [10..51]. | ||
* @default 33 | ||
*/ | ||
quantizationParameter: number; | ||
/** Key frame period. */ | ||
/** | ||
* How often a keyframe occurs (key frame period, also known as GOP). | ||
* @default 20 | ||
*/ | ||
groupOfPictures: number; | ||
/** Use temporal noise supression. */ | ||
temporalDenoise: number; | ||
/** | ||
* Use temporal noise supression. | ||
* @default false | ||
*/ | ||
temporalDenoise: boolean; | ||
/** Each NAL unit will be approximately capped at this size (0 means unlimited). */ | ||
/** | ||
* Each NAL unit will be approximately capped at this size (0 means unlimited). | ||
* @default 0 | ||
*/ | ||
desiredNaluBytes: number; | ||
/** Prints extra debug information. */ | ||
debug: number; | ||
/** | ||
* Prints extra debug information. | ||
* @default false | ||
*/ | ||
debug: boolean; | ||
@@ -189,0 +220,0 @@ /** Initialize the encoder. After calling this, all parameters above will be readonly. */ |
{ | ||
"name": "h264-mp4-encoder", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./embuild/dist/h264_mp4_encoder.node.js", |
@@ -26,2 +26,3 @@ # Introducing h264-mp4-encoder | ||
HME.createH264MP4Encoder().then(encoder => { | ||
// Must be a multiple of 2. | ||
encoder.width = 100; | ||
@@ -33,3 +34,3 @@ encoder.height = 100; | ||
encoder.finalize(); | ||
const uint8Array = encoder.FS.readFile("output.mp4"); | ||
const uint8Array = encoder.FS.readFile(encoder.outputFilename); | ||
console.log(uint8Array); | ||
@@ -36,0 +37,0 @@ encoder.delete(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
7482571
10806
134