[FFmpeg-user] ffmpeg and webm format and mkv format

Moritz Barsnick barsnick at gmx.net
Fri Sep 16 00:54:39 EEST 2016


On Thu, Sep 15, 2016 at 21:33:44 +0200, Carl Eugen Hoyos wrote:
> Does git allow this?

Apparently. ffmpeg's version.sh even uses it for shallow git clones.

> The current version string is produced by git.

Via concatenation of the output of calls to git and other stuff. One
*could* add the date.

How about it working like this:
$ ./version.sh 
N-81670-g140da8e-2016-09-15

I don't like the format much, but it can be tuned. Point is, it *does*
work, technically.

version.sh path (possibly overly complicated):
 # Append the Git hash if we have one
 test "$revision" && test "$git_hash" && revision="$revision-$git_hash"
+# Append the Git date
+git_date=$(cd "$1" &&
+  git log -1 --pretty=format:"%cd" --date=short 2> /dev/null)
+test "$git_date" && revision="$revision-$git_date"

I'm not raising my voice on whether this is desired. I'm just saying it
could be done.

Moritz


More information about the ffmpeg-user mailing list