3b0cdeaaac
* Reformatted source code automatically. * Possible fix for x264 refusing to build lossless videos. * Allow encoders to add extra options to the command line, such as gpu selection.
45 lines
651 B
JavaScript
45 lines
651 B
JavaScript
class encoder {
|
|
constructor(ffmpeg, config, settings) {
|
|
// FFmpeg
|
|
this.ffmpeg = ffmpeg;
|
|
|
|
// Configuration
|
|
this.config = config;
|
|
|
|
// Encoder Settings
|
|
this.settings = settings; // Settings
|
|
|
|
// Check if this encoder is available.
|
|
if (!this.available()) {
|
|
throw new ReferenceError("Encoder is not available");
|
|
}
|
|
}
|
|
|
|
available() {
|
|
return true;
|
|
}
|
|
|
|
load() {
|
|
this.indexes = {};
|
|
this.combinations = [];
|
|
}
|
|
|
|
pool() {
|
|
return "default";
|
|
}
|
|
|
|
count() {
|
|
return this.combinations.length;
|
|
}
|
|
|
|
get(index, width, height, framerate) {
|
|
throw new Error("Not Implemented");
|
|
}
|
|
|
|
extra() {
|
|
return [];
|
|
}
|
|
}
|
|
|
|
module.exports = encoder;
|