#905050 mpv: why does mpv tell it's built on unknown

Package:
mpv
Source:
mpv
Description:
video player based on MPlayer/mplayer2
Submitter:
shirish शिरीष
Date:
2020-12-24 15:27:04 UTC
Severity:
normal
Tags:
#905050#5
Date:
2018-07-30 23:07:12 UTC
From:
To:
Dear Maintainer,

I was running -

$ mpv -v
[cplayer] Command line options: '-v'
[cplayer] mpv 0.29.0 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
[cplayer]  built on UNKNOWN
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.14.100
[cplayer]    libavcodec      58.18.100
[cplayer]    libavformat     58.12.100
[cplayer]    libswscale      5.1.100
[cplayer]    libavfilter     7.16.100
[cplayer]    libswresample   3.1.100
[cplayer] ffmpeg version: 4.0.2-1
[cplayer]
[cplayer] Configuration: ./waf configure --prefix=/usr
--libdir=/usr/lib/x86_64-linux-gnu --confdir=/etc/mpv
--zshdir=/usr/share/zsh/vendor-completions --enable-cdda
--enable-dvdnav --enable-dvdread --enable-libmpv-shared
--enable-libsmbclient --enable-sdl2 --enable-sndio --enable-zsh-comp
--disable-build-date --enable-dvbin
[cplayer] List of enabled features: 52arch alsa asm atomics caca cdda
cplayer cplugins debug-build drm drmprime dvbin dvdnav dvdread
dvdread-common egl-drm egl-helpers egl-x11 fchmod ffmpeg gbm gbm.h gl
gl-wayland gl-x11 glibc-thread-name glob glob-posix gnuc gpl iconv
jack jpeg lcms2 libaf libarchive libass libass-osd libav-any
libavcodec libavdevice libbluray libdl libm libmpv-shared librt
libsmbclient linux-fstatfs lua optimize oss-audio plain-gl posix
posix-or-mingw posix-spawn posix-spawn-native pthreads pulse
rubberband sdl2 sndio stdatomic uchardet vaapi vaapi-drm vaapi-egl
vaapi-glx vaapi-wayland vaapi-x-egl vaapi-x11 vdpau vdpau-gl-x11 vt.h
vulkan wayland wayland-protocols x11 xv zlib zsh-comp
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Reading config file /home/shirish/.config/mpv/mpv.conf
[cplayer] mpv 0.29.0 Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects
[cplayer]  built on UNKNOWN
[cplayer] ffmpeg library versions:
[cplayer]    libavutil       56.14.100
[cplayer]    libavcodec      58.18.100
[cplayer]    libavformat     58.12.100
[cplayer]    libswscale      5.1.100
[cplayer]    libavfilter     7.16.100
[cplayer]    libswresample   3.1.100
[cplayer] ffmpeg version: 4.0.2-1
[cplayer]

what kinda stuck me mpv saying -

[cplayer]  built on UNKNOWN and that info. seems to indicate something
is wrong.

At times when I'm running a video, I get this ffmpeg warning -

[ffmpeg] NULL: Failed to parse extradata

and have no idea why that error triggrs.

While the video works and everything, I am put off by that message and
dunno who is to blame, either mpv, ffmeg or something else ?

FWIW, the video and the sub. play right.

#905050#10
Date:
2018-07-31 02:51:54 UTC
From:
To:
Hi,
[...]

This is because we build mpv with --disable-build-date for reproducible
builds so the build date is "UNKNOWN". Probably it would be nicer if
that line was completely omitted.

Probably a broken input file. Does this only happen for some files?

James

#905050#15
Date:
2018-07-31 19:16:55 UTC
From:
To:
at bottom :-

<snipped>

With quite a few more media files than I care to admit. It could be
something that a newer encoder could fix when encoding a media file,
dunno what. I'll try to see if somebody knows  a better de-bugging way
so I know what's missing or broken and try to see if there is
something that needs fixing.

Please share if anybody from the debian-multimedia can help in
identifying what could be done or info. found out .

#905050#20
Date:
2018-08-02 02:43:21 UTC
From:
To:
Hi,
then at least it's nothing to do with mpv.

=====

Incidentally I notice this upstream PR which would remove the "built on
UNKNOWN" line and therefore fix the first part of the bug report:
https://github.com/mpv-player/mpv/pull/6046

Maybe they saw this bug :P

James

#905050#25
Date:
2020-12-24 15:24:12 UTC
From:
To:
[resending as debbugs seems to have ignored my first attempt]

One way of fixing this bug is to set the BUILDDATE variable
based on the timestamp of the most recent debian changelog entry.

That way BUILDDATE contains a sane date instead of "UNKNOWN",
but the build is reproducible (all builds from the same source
package version will have the same date).

Patch attached below. In order for it to take effect, it is
necessary to remove --disable-build-date option in debian/rules,
i.e. revert the patch from https://bugs.debian.org/784267
--- a/version.sh
+++ b/version.sh
@@ -53,7 +53,7 @@

 NEW_REVISION="#define VERSION \"${VERSION}\""
 OLD_REVISION=$(head -n 1 "$version_h" 2> /dev/null)
-BUILDDATE="#define BUILDDATE \"$(date)\""
+BUILDDATE="#define BUILDDATE \"$(date -u --date=@$(dpkg-parsechangelog -S Timestamp))\""
 MPVCOPYRIGHT="#define MPVCOPYRIGHT \"Copyright © 2000-2018 mpv/MPlayer/mplayer2 projects\""

 # Update version.h only on revision changes to avoid spurious rebuilds