Giter Site home page Giter Site logo

node-gify's Introduction

node-gify's People

Contributors

grant avatar overra avatar tj 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  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  avatar  avatar  avatar

node-gify's Issues

gm: command not found

$ gify Untitled.mov expansions.gif

/Users/z/.nvm/v0.10.31/lib/node_modules/gify/bin/gify:42
  if (err) { throw err; }
                   ^
Error: Command failed: /bin/sh: gm: command not found

    at ChildProcess.exithandler (child_process.js:648:15)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Socket.<anonymous> (child_process.js:969:11)
    at Socket.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)

$ gify -v

  error: unknown option `-v'


$ gify -V
0.2.0

$ npm i gm -g
[email protected] /Users/z/.nvm/v0.10.31/lib/node_modules/gm
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

$ gify Untitled.mov expansions.gif

/Users/z/.nvm/v0.10.31/lib/node_modules/gify/bin/gify:42
  if (err) { throw err; }
                   ^
Error: Command failed: /bin/sh: gm: command not found

    at ChildProcess.exithandler (child_process.js:648:15)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Socket.<anonymous> (child_process.js:969:11)
    at Socket.emit (events.js:95:17)
    at Pipe.close (net.js:465:12)

Use graphicsmagick as node module instead of command

Use gm as node module dependency and not command line local install, This will let users use imagemagick instead for convert.

  • Side question, whats the idea behind the .png convert? why isnt ffmpeg being used to convert from movie to gif all together?

Command failed on Windows

I've got "Command failed" error when running this on Windows.
Looks like the reason that you try to create temp images in /tmp/[uid]/ folder.
But on windows "tmp" refers to C:\Users\name\AppData\Local\Temp
Tried to remove tmp from environment variables user/system, but it doesn't help.
Is it possible to add functionality to to pass tmp folder in config?
10x in advance!

After some review looks like this happens only in git bash on windows.
But in cmd the problem is that file path surrounded by single quotes and this not working in cmd

Encoder (codec png) not found for output stream #0:0

So running the example.js gives the following error:

> [email protected] start /home/daffodil/repos/node-gify-master
> node example.js

/home/daffodil/repos/node-gify-master/example.js:24
  if (err) throw err;
           ^

Error: Command failed: /bin/sh -c ffmpeg -i out.mp4 -filter:v scale=-1:300 -r 10 /tmp/IP5OXJZELd/%04d.png
ffmpeg version 3.0.2 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04)
  configuration: --disable-yasm
  libavutil      55. 17.103 / 55. 17.103
  libavcodec     57. 24.102 / 57. 24.102
  libavformat    57. 25.100 / 57. 25.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 31.100 /  6. 31.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'out.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42mp41
    creation_time   : 2005-02-25 02:35:57
  Duration: 00:01:10.00, start: 0.000000, bitrate: 106 kb/s
    Stream #0:0(eng): Audio: aac (LC) (mp4a / 0x6134706D), 8000 Hz, stereo, fltp, 19 kb/s (default)
    Metadata:
      creation_time   : 2005-02-25 02:35:57
      handler_name    : Apple Sound Media Handler
    Stream #0:1(eng): Video: mpeg4 (Advanced Simple Profile) (mp4v / 0x7634706D), yuv420p, 192x242 [SAR 1:1 DAR 96:121], 76 kb/s, 15 fps, 15 tbr, 600 tbn, 1k tbc (default)
    Metadata:
      creation_time   : 2005-02-25 02:35:57
      handler_name    : Apple Video Media Handler
    Stream #0:2(eng): Data: none (rtp  / 0x20707472), 4 kb/s (default)
    Metadata:
      creation_time   : 2005-02-25 02:35:57
      handler_name    : hint media handler
    Stream #0:3(eng): Data: none (rtp  / 0x20707472), 3 kb/s (default)
    Metadata:
      creation_time   : 2005-02-25 02:35:57
      handler_name    : hint media handler
Output #0, image2, to '/tmp/IP5OXJZELd/%04d.png':
  Metadata:
    major_brand     : mp42
    minor_version   : 1
    compatible_brands: mp42mp41
    Stream #0:0(eng): Video: png, none, q=2-31, 128 kb/s (default)
    Metadata:
      creation_time   : 2005-02-25 02:35:57
      handler_name    : Apple Video Media Handler
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg4 (native) -> ? (?))
Encoder (codec png) not found for output stream #0:0

    at ChildProcess.exithandler (child_process.js:213:12)
    at emitTwo (events.js:100:13)
    at ChildProcess.emit (events.js:185:7)
    at maybeClose (internal/child_process.js:827:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:90:13)
    at Socket.emit (events.js:182:7)
    at Pipe._onclose (net.js:471:12)

PS: I had a couple of problems installing FFmpeg on my Ubuntu 14.04.

  • First, FFmpeg is removed from Ubuntu 14.04 (legal issues AFAIK). But I managed to apt-get it through this.
  • Second, when I tried to ./configure (as mentioned in its README.md), I got this error - yasm/nasm not found or too old. Use --disable-yasm for a crippled build.. So I used ./configure --disable-yasm instead, and it (somehow) worked.

Update

After read this log a couple of times, I managed to produce a sample GIF from my mp4 file, by changing the command, which example.js tries to run:

From

ffmpeg -i out.mp4 -filter:v scale=-1:300 -r 10 /tmp/Lz43nx6wv1/%04d.png

To

ffmpeg -i out.mp4 -filter:v scale=-1:300 -r 10 out.gif

But it's still using command line, I need to do this by code.

So I dived into the code and found that this wrong url is coming from this line in index.js

...

// tmpfile(s)
  var id = uid(10);
  var dir = path.resolve('/tmp/' + id);
  var tmp  = path.join(dir, '/%04d.png');

...

Is this an issue with the plugin, or am I doing something wrong here?
In any case, please put the correct stub here, because I don't want to touch this part unless I know what I'm doing?

Thanks in advance :)

Error: Command failed: /bin/sh: gm: command not found

I'm getting an error when I try to run gify file.mov f.gif. I think it's probably an issue with my installation process, and not anything wrong with gify.

/usr/local/lib/node_modules/gify/bin/gify:42
  if (err) { throw err; }
                   ^
Error: Command failed: /bin/sh: gm: command not found

    at ChildProcess.exithandler (child_process.js:637:15)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)

I've installed ffmpeg and GraphicsMagick from the websites and it seemed to work okay.

Would love your advice on how to fix this :)
Thanks!

GHSL-2020-117

Hello,

I am a member of the GitHub Security Lab (https://securitylab.github.com).

I've attempted to reach a maintainer for this project to report a potential security issue but have been unable to verify the report was received. Please could a project maintainer could contact us at [email protected], using reference GHSL-2020-117?

Thank you,
Kevin Backhouse
GitHub Security Lab

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.