diff options
author | Guido Cella <guido@guidocella.xyz> | 2021-10-14 16:36:57 +0200 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2021-10-14 15:39:07 +0000 |
commit | 9954fe01a91494b7b631d50a35e7c1d43b729529 (patch) | |
tree | 9ee5492c1d4724fbb9323f0f9d36376fbf3836ec /DOCS | |
parent | 00669dabd3f57c4791e463120f73a1566cac2426 (diff) | |
download | mpv-9954fe01a91494b7b631d50a35e7c1d43b729529.tar.bz2 mpv-9954fe01a91494b7b631d50a35e7c1d43b729529.tar.xz |
player: add track-list/N/image sub-property
This exposes whether a video track is detected as an image, which is
useful for profile conditions, property expansion and lavfi-complex.
The lavf demuxer sets image to true when the existing check detects an
image.
When the lavf demuxer fails, the mf one guesses if the file is an image
by its extension, so sh->image is set to true when the mf demuxer
succeds and there's only one file.
The mkv demuxer just sets image to true for any attached picture.
The timeline demuxer just copies the value of image from source to
destination. This sets image to true for attached pictures, standalone
images and images added with !new_stream in EDL playlists, but it is
imperfect since you could concatenate multiple images in an EDL playlist
(which should be done with the mf demuxer anyway). This is good enough
anyway since the comment of the modified function already says it is
"Imperfect and arbitrary".
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/interface-changes.rst | 1 | ||||
-rw-r--r-- | DOCS/man/input.rst | 13 |
2 files changed, 10 insertions, 4 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 759d5fa9ea..d4b96f80df 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -45,6 +45,7 @@ Interface changes - make `current-window-scale` writeable and use it in the default input.conf - add `--input-builtin-bindings` flag to control loading of built-in key bindings during start-up (default: yes). + - add ``track-list/N/image`` sub-property --- mpv 0.33.0 --- - add `--d3d11-exclusive-fs` flag to enable D3D11 exclusive fullscreen mode diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index cd360d600b..1a148589dd 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -2838,11 +2838,15 @@ Property list ``track-list/N/lang`` Track language as identified by the file. Not always available. - ``track-list/N/albumart`` + ``track-list/N/image`` ``yes``/true if this is a video track that consists of a single - picture, ``no``/false or unavailable otherwise. This is used for video - tracks that are really images embedded in audio files and for external - cover art. + picture, ``no``/false or unavailable otherwise. The heuristic used to + determine if a stream is an image doesn't attempt to detect images in + codecs normally used for videos. Otherwise, it is reliable. + + ``track-list/N/albumart`` + ``yes``/true if this is an image embedded in an audio file or external + cover art, ``no``/false or unavailable otherwise. ``track-list/N/default`` ``yes``/true if the track has the default flag set in the file, @@ -2936,6 +2940,7 @@ Property list "src-id" MPV_FORMAT_INT64 "title" MPV_FORMAT_STRING "lang" MPV_FORMAT_STRING + "image" MPV_FORMAT_FLAG "albumart" MPV_FORMAT_FLAG "default" MPV_FORMAT_FLAG "forced" MPV_FORMAT_FLAG |