Skip to content

Commit

Permalink
Version bump to v1.0.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwronski committed Nov 8, 2015
1 parent 8bee1e7 commit 2937542
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 9 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]

## [v1.0.0] - 2015-11-08
### Added
- Added back `--quiet` and `--debug` flags to new ES2015 version of CLI.
- `--debug` mode disables progress indicator and then streams child process to master stdout.
- `--quiet` mode now prevents **any** logging to stdout and will only exit `0` on success or `1` on error

### Fixed
- Lots of cleanup for Progress class.
- Get `VideoFile` class working with Windows again.
- Fixed broken help flag in CLI mode.
- Move Windows-specific functions to `util.js`.
- Fixed false positive errors in Windows environment.
- Fixed glob error message details.

## [v1.0.0-beta] - 2015-11-07
### Added
- You can now use the module:
Expand Down Expand Up @@ -76,7 +90,8 @@ All notable changes to this project will be documented in this file.
- `--quiet` flag
Log only file writes, errors, and finish (e.g.: success, failure) messages.

[unreleased]: https://github.com/nwronski/batch-transcode-video/compare/v1.0.0-beta...HEAD
[unreleased]: https://github.com/nwronski/batch-transcode-video/compare/v1.0.0...HEAD
[v1.0.0]: https://github.com/nwronski/batch-transcode-video/compare/v1.0.0-beta...v1.0.0
[v1.0.0-beta]: https://github.com/nwronski/batch-transcode-video/compare/v0.3.1...v1.0.0-beta
[v0.3.1]: https://github.com/nwronski/batch-transcode-video/compare/v0.3.0...v0.3.1
[v0.3.0]: https://github.com/nwronski/batch-transcode-video/compare/v0.2.1...v0.3.0
Expand Down
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ npm i batch-transcode-video -g

## Usage

For all the videos found in the `input` directory, this utility will determine if the source should be cropped (e.g.: it has black bars on the top and bottom of the source video) using `detect-crop` and then it will be transcoded using `transcode-video`. After the operation is completed for the current video, the encoding time will be displayed.
For all the videos found in the `input` directory, this utility will determine if the source should be cropped (e.g.: it has black bars on the top and bottom of the source video) using `detect-crop` and then it will be transcoded using `transcode-video`. When in CLI mode, the progress and remaining time for the current file and the entire batch are displayed.

This utility can recover from most errors, and as such, it will continue to **sequentially** process source files even if a previous transcoding operation has failed.

Expand All @@ -36,6 +36,37 @@ Transcoded files will be placed in the same directory as the source unless you s

If you want to modify the search pattern that will be used to locate video in the `input` directory, you can specify a [glob](https://github.com/isaacs/node-glob) pattern using the `mask` option.

### Non-binary Usage

You can also directly require the underlying BatchTranscodeVideo video class. By default, the ES5-compatible files will be loaded when requiring this module. But, you can also require the raw ES2015 source files if you are running in an ES2015 capable environment.

``` javascript
// ES5 (default)
var BatchTranscodeVideo = require('batch-transcode-video');
var batch = new BatchTranscodeVideo({
input: './my/rawVideos/',
output: './my/transcodedVideos/'
}, ['--dry-run']);
```

``` javascript
// ES2015
import BatchTranscodeVideo from './node_modules/batch-transcode-video/index.js';
let batch = new BatchTranscodeVideo({
input: './my/rawVideos/',
output: './my/transcodedVideos/'
}, ['--dry-run']);
```

Note: If you require the non-cli files, you will not see any formatted progress bars and summary output in the console. To require the CLI version of the library from your application, then simply `import` the `./index-cli.js` file instead of `index.js`.

``` javascript
import CliBatchTranscodeVideo from './node_modules/batch-transcode-video/index-cli.js';
let batch = new CliBatchTranscodeVideo(options, transcodeOptions);
// Start CLI mode
batch.cli();
```

## Options

- `--help` _Flag: does not accept a value_ (Alias: `-h`)
Expand All @@ -49,16 +80,16 @@ If you want to modify the search pattern that will be used to locate video in th
- `--diff` _Flag: does not accept a value_ (Default: `false`)
Enable this option if you only want to transcode source files that do not exist already in the `output` folder.
- If a destination file already exists in the `output` directory:
- And `diff` is **enabled**, a message will be generated letting you know that the file was skipped (unless `quiet` is enabled).
- And `diff` is **enabled**, a notice will be generated letting you know that the file was skipped (unless `quiet` is enabled).
- And `diff` is **not enabled**, an error will be generated letting you know that the file already exists.
- If you want to transcode a batch of videos in-place (i.e.: without specifying an `output` directory) then you should enabled this option to prevent errors from being generated when the source and destination file names have the same extension.
- For example: trying to transcode a `.mkv` video into a `.mkv` video without supplying an external `output` directory will generate an error unless you specify the `diff` flag.
- `--debug` _Flag: does not accept a value_ (Default: `false`)
Enable verbose logging mode. Will allow you to see the output from the child processes spawned for `detect-crop` and `transcode-video`.
Enable verbose logging mode. Disables progress indicator and then streams child process to master `stdout` for `detect-crop` and `transcode-video`.
- `--flatten` _Flag: does not accept a value_ (Default: `false`)
Do not preserve relative directory structure in output directory. If this is enabled, the base output folder will contain all transcoded videos. Note: this option has no effect unless you specify an `output` directory.
- `--quiet` _Flag: does not accept a value_ (Default: `false`)
Log only file writes, errors, and finish (e.g.: success, failure) messages.
Prevents **any** logging to stdout and will only exit `0` on success or `1` on error

### Providing options to transcode-video

Expand Down
2 changes: 1 addition & 1 deletion dist/lib/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ var Progress = (function () {
this.firstPad = ' '.repeat(this.firstTab);
this.quiet = quiet;
this.color = {
skipped: 'cyan',
skipped: 'blue',
written: 'green',
errored: 'red',
queued: 'yellow'
Expand Down
2 changes: 1 addition & 1 deletion lib/progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default class Progress {
this.firstPad = ' '.repeat(this.firstTab);
this.quiet = quiet;
this.color = {
skipped: 'cyan',
skipped: 'blue',
written: 'green',
errored: 'red',
queued: 'yellow'
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "batch-transcode-video",
"version": "1.0.0-beta",
"description": "Batch transcode videos using the video_transcoding gem",
"version": "1.0.0",
"description": "Batch transcode videos using the video_transcoding gem.",
"contributors": [
"Nick Wronski (https://github.com/nwronski)"
],
Expand Down

0 comments on commit 2937542

Please sign in to comment.