Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (idx%6 === 0) {
fout.push([]);
}
fout[fout.length-1].push(font);
});
console.log(columnify(fout, {
showHeaders: false
}));
return deferred.resolve();
});
}
// List of FFMPEG Decodable Formats
if (global.info.formats) {
ffmpeg.getAvailableFormats((err, formats) => {
console.log('Available read formats:');
for (const k in formats) {
if(formats[k].canDemux) {
console.log(` - ${k}`);
}
}
return deferred.resolve();
});
}
// List of FFMPEG Decodable Codecs
if (global.info.codecs) {
ffmpeg.getAvailableCodecs((err, codecs) => {
ffmpeg.getAvailableCodecs((err, codecs) => {
console.log('Available read codecs:');
for (const k in codecs) {
if(codecs[k].canDecode) {
var ffmpeg = require("fluent-ffmpeg");
var Q = require("q");
var common = require("../src/common");
var formatsD = Q.defer();
var InterestingFormats = "m4v matroska webm avi 3gp flv mov mp4".split(" ");
ffmpeg.getAvailableFormats(function(err, all) {
if (err) return formatsD.reject(err);
var formats = {};
for (var i = 0; i < InterestingFormats.length; ++i) {
var k = InterestingFormats[i];
if (k in all) {
formats[k] = all[k];
}
}
formatsD.resolve(formats);
});
var notIdentityExtension = {
matroska: "mkv"
};
function formatToExtension (format) {
if (format in notIdentityExtension) return notIdentityExtension[format];
async (req, res, next) => {
try {
const promisify = (fn) =>
new Promise((resolve, reject) =>
fn((err, data) => err ? reject(err) : resolve(data)));
const [
formats, codecs, encoders, filters, postcount, boardcount, spaceused
] = await Promise.all([
promisify(ffmpeg.getAvailableFormats),
promisify(ffmpeg.getAvailableCodecs),
promisify(ffmpeg.getAvailableEncoders),
promisify(ffmpeg.getAvailableFilters),
Post.estimatedDocumentCount(),
Board.estimatedDocumentCount(),
new Promise((resolve, reject) => {
du(config.html_path, (err, size) => {
if (err) {
reject(err);
return;
}
resolve(size);
});
}),
]);
return (new Promise((resolve, reject) => {
ffmpeg.getAvailableFormats(function(err, formats) {
if(err) {
reject(err);
}
resolve(!!formats[extension]);
});
})) as any;
}