mbunkus/mkvtoolnix — pull request #31 by acdvorak (2014-05-03 06:00:47+00:00)
Title: Floating point progress values in mkvmerge with --precise-progress option

#### Overview

To enable floating point progress values on the command line, simply pass a new `--precise-progress` option to `mkvmerge`.

Omitting the option retains the original integer-based progress output to avoid breaking scripts and third party tools.

The new option is listed in `set_usage()` in `mkvmerge.cpp`, but has not yet been added to the man page.

#### Rationale

Third party GUIs that run `mkvmerge` in the background typically display a progress bar with an "X% complete" label and often attempt to estimate the time remaining based on change in progress over time.

For large media files, integer progress values induce a significant delay between progress updates (anywhere from 2-10 seconds in my experience).

Allowing the user to explicitly enable floating point progress values gives them the ability to receive more frequent and precise progress updates, which in turn improves the user experience.

Requiring users to explicitly opt-in to the new behavior ensures backward compatibility with existing scripts and third party tools that rely on the integer-based output format.

#### Example

Without `--precise-progress`:

```bash
$ mkvmerge -o out.mkv in.m2ts
Progress: 62%
```

With `--precise-progress`:

```bash
$ mkvmerge --precise-progress -o out.mkv in.m2ts
Progress: 62.24601%
```