Giter VIP home page Giter VIP logo

ffprobe-static's Introduction

ffprobe-static

Static binaries for ffprobe.

Based on https://github.com/eugeneware/ffmpeg-static.

Binaries are from http://ffmpeg.zeranoe.com/builds/

Usage

var ffprobe = require('ffprobe-static');
console.log(ffprobe.path);

Version Notes

Currently supports Mac OS X (64-bit), Linux (32 and 64-bit) and Windows (32 and 64-bit).

Currently version 4.0.2 is installed for Mac, Windows and Linux.

I pulled the versions from the ffmpeg static build pages linked from the official ffmpeg site. Namely:

Acknowledgements

Special thanks to eugeneware for https://github.com/eugeneware/ffmpeg-static, which this is based upon.

ffprobe-static's People

Contributors

eugeneware avatar joshwnj avatar samirl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ffprobe-static's Issues

Spawn error after packaging

Hi,

Just after compilation with electron-builder,
I get this error in my app from ffprobe-static

Uncaught Error: spawn C:\Users\Anymord\AppData\Local\Temp\nsuFBDD.tmp\app\resources\app.asar\node_modules\ffprobe-static\bin\win32\x64\ffprobe.exe ENOENT
    at exports._errnoException (util.js:1022)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193)
    at onErrorNT (internal/child_process.js:359)
    at _combinedTickCallback (internal/process/next_tick.js:74)
    at process._tickCallback (internal/process/next_tick.js:98)

Here is my setup :
From my package.json

  "dependencies": {
   ...
    "ffprobe": "^1.1.0",
    "ffprobe-static": "^2.0.0",
...
}

In a script called by index.html

const ffprobe = require('ffprobe')
const ffprobeStatic = require('ffprobe-static')

and the call

    ffprobe(item.filePath, {
      path: ffprobeStatic.path
    }, function (err, info) { 

What did I missed ?

Thanks for your support !

Upgrade to ffprobe 4.0?

I get a segmentation fault when I try to pass a URL to ffprobe version 3.1 (the binary installed by ffprobe-static). Everything seems to work fine with my local binary, which is version 4.0.

If you're fine with bumping the version, I'll make a PR ๐Ÿ˜„

Command from ffprobe-static Error

Hello, everyone! I really hope you can help me with this issue:

I have an app that was built with microservices. One of them use ffprobe and ffprobe-static, just as follows:

 const getMediaS3 = async (event) => {
  const s3 = new S3();
  const params = {
    Bucket: event.Records[0].s3.bucket.name,
    Key: event.Records[0].s3.object.key
  };
  logger(`# getVideoInfo() - Getting video information`)
  await ffprobe(`https://${getEnv('CLOUDFRONT')}.cloudfront.net/${params.Key}`, { path: ffprobeStatic.path }, function (err, info) {
  if (err) {
    throw err;
  };
  const video = info.streams.find(s => s.codec_type === "video");
    const rotate = video.tags.rotate;
    if (rotate && (rotate === "90" || rotate === "270")) {
      width = video.height; 
      height = video.width;
    } else {
      width = video.width; 
      height = video.height;
    };
  }).catch(logger('It wasn't possible to catch video dimensions!'))

Locally it works just fine but when I deploy it I'm having this issue when the lambda function is called:

2022-09-27T20:21:03.463Z c4a0c5f5-ff06-4d00-861d-f61769b3f43b INFO # getVideoInfo() - Getting video information

2022-09-27T20:21:04.104Z c4a0c5f5-ff06-4d00-861d-f61769b3f43b ERROR Invoke Error
{
"errorType": "Error",
"errorMessage": "Command failed: /var/task/node_modules/ffprobe-static/bin/linux/x64/ffprobe -v quiet -print_format json -show_format -show_streams https://########.cloudfront.net/media/videos/temp/1664310055808.mp4\n",
"code": 1,
"killed": false,
"signal": null,
"cmd": "/var/task/node_modules/ffprobe-static/bin/linux/x64/ffprobe -v quiet -print_format json -show_format -show_streams https://########.cloudfront.net/media/videos/temp/1664310055808.mp4",
"stack": [
"Error: Command failed: /var/task/node_modules/ffprobe-static/bin/linux/x64/ffprobe -v quiet -print_format json -show_format -show_streams https://########.cloudfront.net/media/videos/temp/1664310055808.mp4",
"",
" at ChildProcess.exithandler (child_process.js:308:12)",
" at ChildProcess.emit (events.js:314:20)",
" at ChildProcess.EventEmitter.emit (domain.js:483:12)",
" at maybeClose (internal/child_process.js:1022:16)",
" at Socket. (internal/child_process.js:444:11)",
" at Socket.emit (events.js:314:20)",
" at Socket.EventEmitter.emit (domain.js:483:12)",
" at Pipe. (net.js:675:12)"
]
}
PS. I've omitted my cloudfront distribution id;
Node version of the Lamda is 12.x.
ffprobe-static: 3.1.0
Do you need any further informations?

Project ownership

Hi all! I'm looking for anyone interested in being responsible for this project, as I'm personally not using it anymore, and I would like it to be managed by someone who is :)

If anyone is interested, please reply to this thread and let me know how you're using it (whether for hobby stuff, work, etc).

It downloads binaries for all platforms and architectures instead of downloading according to current system.

Right now my electron app's size increases by 200 to 300MBs just because of ffprobe, you should have a look at ffmpeg-static because that one uses a smart approach it downloads the files according to system - which it does by this line in its package.json

"scripts": {
    "install": "node install.js",
     ...
  }

idk if I'm missing something but yeah this would decrease download time and package size.

Alpine Linux not solving Hostname from Url

ffprobe-static worked in Windows, but when I installed in Linux has a problem solving a url. In Alpine Linux under docker, solving DNS does not work as expected. It looks that the problem happend with the statically link of glibc.

In SavageCore/node-ffprobe-installer#66 they a have the same problem and say that -> "with a limitation of statically linking glibc is the loss of DNS resolution" So it looks that this ffprobe-static module is affected also.

Unknown Error Occurring

So I am running git-video-duration which depends on this library, and my previous issue is here
caffco/get-video-duration#25
, but I am getting an Unknown Error, and was wondering if here was the correct place to search for more answers.

The default error looks like this

{
"code": 1,
"stdout": "",
"stderr": "MY_FILE.mp4: Unknown error\r\n",
"failed": true,
"signal": null,
"cmd": "path\\to\\project\\node_modules\\ffprobe-static\\bin\\win32\\x64\\ffprobe.exe -v error -show_format -show_streams 
 MY_FILE.mp4",
"timedOut": false,
"killed": false
}  

and the verbose error looks like this

{                                                                                                                                                                                              "shortMessage": "Command failed with exit code 1: C:\\Users\\ryan\\infinid\\mission-server\\node_modules\\@ffprobe-installer\\win32-x64\\ffprobe.exe -v verbose -show_format -show_streams MY_FILE.mp4",                                                                                     "command": "paths\\to\\my\\project\\node_modules\\@ffprobe-installer\\win32-x64\\ffprobe.exe -v verbose -show_format -show_streams MY_FILE.mp4",
"exitCode": 1,                                                                                                                                                                               "stdout": "",
"stderr": "ffprobe version N-89672-g41e51fbcd9 
Copyright (c) 2007-2018 the FFmpeg developers\r\n  
built with gcc 7.2.0 (GCC)\r\n  
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-bzlib --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-amf --enable-cuda --enable-cuvid --enable-d3d11va --enable-nvenc --enable-dxva2 --enable-avisynth --enable-libmfx\r\n
libavutil      56.  7.100 / 56.  7.100\r\n  libavcodec     58.  9.100 / 58.  9.100\r\n  libavformat    58.  3.100 / 58.  3.100\r\n  libavdevice    58.  0.100 / 58.  0.100\r\n  libavfilter     7.  8.100 /  7.  8.100\r\n  libswscale      5.  0.101 /  5.  0.101\r\n  libswresample   3.  0.101 /  3.  0.101\r\n  libpostproc    55.  0.100 / 55.  0.100\r\n
MY_FILE.mp4: Unknown error",
"failed": true,
"timedOut": false,
"isCanceled": false,
"killed": false
}  

any help is appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.