anthwlock / untrunc

Restore a truncated mp4/mov. Improved version of ponchio/untrunc
GNU General Public License v2.0
2k stars 191 forks source link

Have --version and --help arguments #14

Closed shirishag75 closed 5 years ago

shirishag75 commented 5 years ago

untruc doesn't have a version string or --help arguments. It would be nice to have these. The version string could be the git commit short id for now d6828ed2 as an identifier for now. Something on the lines of -

$ git rev-parse --short HEAD
d6828ed
anthwlock commented 5 years ago

It is true that there is no explicit --help flag, but untrunc handles unknown flags by printing the help message, see below. Implementing a --version flag would require qmake and git being installed. If you want you can implement this and I will merge it. If we make it so that untrunc -v also outputs its version, this could potentially be useful when reading issues. But on the other side it adds complexity to the building process, and not everyone has qmake installed. The current build instructions would also need to be updated.

$ untrunc --help
Usage: untrunc [options] <ok.mp4> [corrupt.mp4]

options:
-a  - analyze
-i  - info
-v  - verbose
-vv - more verbose
-q  - only errors
-n  - no interactive
anthwlock commented 5 years ago

Recently I needed to switch between different versions of ffmpeg easily, thus I made a Makefile. So now --version is implemented!