1
0
mirror of https://github.com/danog/plotframes.git synced 2024-11-26 20:04:39 +01:00

Windows, Linux and Macintosh ready

This commit is contained in:
Rodrigo Polo MPW 2015-10-13 10:34:58 -06:00
parent f1f5ef3ee8
commit 9f64795f38
3 changed files with 51 additions and 6 deletions

View File

@ -41,17 +41,61 @@ options:
>**WARNING:** This is **NOT** a node.js module for inclusion in other Node.js scripts, it is just a CLI for use in the terminal/console, maybe in the future I'll see to integrate it somehow.
### Installing dependencies
#### Windows
1. [Download](https://nodejs.org) and install Node.js
2. [Download](http://ffmpeg.zeranoe.com/builds/) a FFmpeg build, uncompress it into a directory that is included in the system `%path%`.
3. [Download](http://sourceforge.net/projects/gnuplot/) and install `gnpuplot`:
There are [other downloads](http://sourceforge.net/projects/gnuplot/files/gnuplot/) in case you want to download a different version.
4. Open your `Command Promt` and run `npm install plotframes`.
#####OS X requirements installation
* Install Xcode
#### OS X
* Install Xcode from the App Store
* Install [Homebrew](http://brew.sh)
Then, using Hombrew intall FFmpeg, XQuartz (needed to render to x11) and gnuplot.
```
brew install ffmpeg
brew install Caskroom/cask/xquartz
brew install gnuplot --with-x11
```
> More setup for other OSes coming soon
#### Ubuntu
Install Node.js
```
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs
```
Install FFmpeg
```
sudo ppa-purge ppa:mc3man/trusty-media
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg
```
Install gnuplot
```
sudo apt-get install gnuplot-x11
```
Or do all at once
```
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo ppa-purge ppa:mc3man/trusty-media
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg gnuplot-x11 nodejs
```
After that you can install `plotframes`, if it gives you a permision error, run `sudo` command before:
```
sudo npm install plotframes
```
## License

1
cli.js
View File

@ -250,3 +250,4 @@ getDuration(opts.input, function(time){
});
});

View File

@ -1,6 +1,6 @@
{
"name": "plotframes",
"version": "1.0.0",
"version": "1.0.1",
"description": "A Node.js frame plotter inspired by FFmpeg plotframes",
"main": "cli.js",
"preferGlobal": true,
@ -27,9 +27,9 @@
"homepage": "https://github.com/rodrigopolo/plotframes#readme",
"dependencies": {
"dashdash": "1.10.x",
"single-line-log": "^1.0.0",
"single-line-log": "^1.0.1",
"split": "1.0.x",
"temp": "0.8.x"
},
"readme": "plotframes\n===========\nA Node.js CLI frame plotter inspired on [FFmpeg plotframes](https://github.com/FFmpeg/FFmpeg/blob/master/tools/plotframes) but 350x faster!\n\n![plot](http://i.imgur.com/i0iIg8D.png \"plot\")\n\n\nRequirements:\n* [gnuplot](http://www.gnuplot.info/) \n* [FFmpeg >= 1.2 with the ffprobe command](https://www.ffmpeg.org/)\n\n\nInstallation and running\n```\nnpm install plotframes -g\nplotframes input.mkv\n```\n\nUsage\n```\nUsage: plotframes [OPTIONS]\noptions:\n -h, --help Print this help and exit.\n -i FILE, --input=FILE Specify multimedia file to read. This is the\n file passed to the ffprobe command. If not\n specified it is the first argument passed to\n the script.\n -s v, --stream=v Specify stream. The value must be a string\n containing a stream specifier. Default value\n is \"v\".\n -o FILE.png, --output=FILE.png Set the name of the output used by gnuplot.\n If not specified no output is created. Must\n be used in conjunction with the terminal\n option.\n -t png, --terminal=png Set the name of the terminal used by\n gnuplot. By default it is \"x11\". Must be\n used in conjunction with the output option.\n Check the gnuplot manual for the valid\n values.\n```\n\n>**WARNING:** This is **NOT** a node.js module for inclusion in other Node.js scripts, it is just a CLI for use in the terminal/console, maybe in the future I'll see to integrate it somehow.\n\n\n\n#####OS X requirements installation\n* Install Xcode\n* Install [Homebrew](http://brew.sh)\n\n```\nbrew install Caskroom/cask/xquartz\nbrew install gnuplot --with-x11\n```\n> More setup for other OSes coming soon\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) by Rodrigo Polo http://RodrigoPolo.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE."
"readme": "plotframes\n===========\nA Node.js CLI frame plotter inspired on [FFmpeg plotframes](https://github.com/FFmpeg/FFmpeg/blob/master/tools/plotframes) but 350x faster!\n\n![plot](http://i.imgur.com/i0iIg8D.png \"plot\")\n\n\nRequirements:\n* [gnuplot](http://www.gnuplot.info/) \n* [FFmpeg >= 1.2 with the ffprobe command](https://www.ffmpeg.org/)\n\n\nInstallation and running\n```\nnpm install plotframes -g\nplotframes input.mkv\n```\n\nUsage\n```\nUsage: plotframes [OPTIONS]\noptions:\n -h, --help Print this help and exit.\n -i FILE, --input=FILE Specify multimedia file to read. This is the\n file passed to the ffprobe command. If not\n specified it is the first argument passed to\n the script.\n -s v, --stream=v Specify stream. The value must be a string\n containing a stream specifier. Default value\n is \"v\".\n -o FILE.png, --output=FILE.png Set the name of the output used by gnuplot.\n If not specified no output is created. Must\n be used in conjunction with the terminal\n option.\n -t png, --terminal=png Set the name of the terminal used by\n gnuplot. By default it is \"x11\". Must be\n used in conjunction with the output option.\n Check the gnuplot manual for the valid\n values.\n```\n\n>**WARNING:** This is **NOT** a node.js module for inclusion in other Node.js scripts, it is just a CLI for use in the terminal/console, maybe in the future I'll see to integrate it somehow.\n\n### Installing dependencies\n\n#### Windows\n1. [Download](https://nodejs.org) and install Node.js \n2. [Download](http://ffmpeg.zeranoe.com/builds/) a FFmpeg build, uncompress it into a directory that is included in the system `%path%`.\n3. [Download](http://sourceforge.net/projects/gnuplot/) and install `gnpuplot`: \n There are [other downloads](http://sourceforge.net/projects/gnuplot/files/gnuplot/) in case you want to download a different version. \n4. Open your `Command Promt` and run `npm install plotframes`.\n\n\n#### OS X\n* Install Xcode from the App Store\n* Install [Homebrew](http://brew.sh)\n\nThen, using Hombrew intall FFmpeg, XQuartz (needed to render to x11) and gnuplot.\n```\nbrew install ffmpeg\nbrew install Caskroom/cask/xquartz\nbrew install gnuplot --with-x11\n```\n\n#### Ubuntu\n\nInstall Node.js\n```\ncurl -sL https://deb.nodesource.com/setup | sudo bash -\nsudo apt-get install nodejs\n```\n\nInstall FFmpeg\n```\nsudo ppa-purge ppa:mc3man/trusty-media\nsudo add-apt-repository ppa:mc3man/trusty-media\nsudo apt-get update\nsudo apt-get install ffmpeg\n```\n\nInstall gnuplot\n```\nsudo apt-get install gnuplot-x11\n```\n\nOr do all at once\n```\ncurl -sL https://deb.nodesource.com/setup | sudo bash -\nsudo ppa-purge ppa:mc3man/trusty-media\nsudo add-apt-repository ppa:mc3man/trusty-media\nsudo apt-get update\nsudo apt-get install ffmpeg gnuplot-x11 nodejs\n```\n\nAfter that you can install `plotframes`, if it gives you a permision error, run `sudo` command before:\n```\nsudo npm install plotframes\n```\n\n\n## License\n\n(The MIT License)\n\nCopyright (c) by Rodrigo Polo http://RodrigoPolo.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE."
}