How to use @ffprobe-installer/ffprobe - 3 common examples

To help you get started, we’ve selected a few @ffprobe-installer/ffprobe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github woodsyang / rockplayer / src / main / VideoServer.js View on Github external
'use strict';
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffprobePath = require('@ffprobe-installer/ffprobe').path;
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegPath);
ffmpeg.setFfprobePath(ffprobePath);
const http = require('http');

function getParam(url, key) {
    var param = new Object();
    var item = new Array();
    var urlList = url.split("?");
    var req;
    if (urlList.length == 1) {
        req = urlList[0];
    } else {
        req = urlList[1];
    }
    var list = req.split('&');
github woodsyang / rockplayer / src / main / ffmpeg-helper.js View on Github external
'use strict';
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
const ffprobePath = require('@ffprobe-installer/ffprobe').path;
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegPath);
ffmpeg.setFfprobePath(ffprobePath);

var videoSupport = function (videoPath) {
    let p = new Promise(function (resolve, reject) {
        let command = ffmpeg()
            .input(videoPath)
            .ffprobe(function (err, data) {
                if (err) {
                    reject(err);
                    return;
                }
                var streams = data.streams;
                var checkResult = {
                    videoCodecSupport: false,
github bpatrik / pigallery2 / src / backend / model / FFmpegFactory.ts View on Github external
public static get() {
    const ffmpeg = require('fluent-ffmpeg');
    try {
      const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path;
      ffmpeg.setFfmpegPath(ffmpegPath);
      const ffprobePath = require('@ffprobe-installer/ffprobe').path;
      ffmpeg.setFfprobePath(ffprobePath);
    } catch (e) {
    }
    return ffmpeg;
  }
}

@ffprobe-installer/ffprobe

Platform independent binary installer of FFprobe for node projects

LGPL-2.1
Latest version published 1 year ago

Package Health Score

70 / 100
Full package analysis

Popular @ffprobe-installer/ffprobe functions