mpv icon indicating copy to clipboard operation
mpv copied to clipboard

various: sync track information output

Open guidocella opened this issue 1 year ago • 4 comments

Print "Image" instead of "Video" for video tracks. This fixes #8561.

Print the hls-bitrate in select.lua.

Show the same flags in loadfile.c, select.lua and stats.lua. The only differences are that only stats.lua prints albumart because it's supposed to show detailed track information, and select.lua prints the image flag because pressing g-v doesn't show Video or Image like in loadfile.c and stats.lua.

guidocella avatar Jun 27 '24 13:06 guidocella

Print "Image" instead of "Video" for video tracks. This fixes #8561.

This isn't an accurate description of images:

yes/true if this is a video track that consists of a single 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.

The behavior is also different for different demuxers. For example, for gif animations, demux_lavf considers it a video, while demux_mf considers it an image. demux_lavf also considers a single frame AV1 video as an image even though it's a video in all other aspects.

na-na-hi avatar Jun 27 '24 16:06 na-na-hi

single frame AV1 video as an image

single frame AV1 is basically an AVIF image. It is correct to call it image.

kasper93 avatar Jun 27 '24 16:06 kasper93

This isn't an accurate description of images:

yes/true if this is a video track that consists of a single 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.

The behavior is also different for different demuxers. For example, for gif animations, demux_lavf considers it a video, while demux_mf considers it an image. demux_lavf also considers a single frame AV1 video as an image even though it's a video in all other aspects.

I know, I wrote that paragraph. ;) I indeed explicitly programmed demux_lavf to consider 1-frame gifs as images as I have several actual old images with gif codec for some reason. Gif videos are detected as videos by demux_lavf and do not normally go through demux_mf since ffmpeg can detect them. And I made demux_lavf detect 1-frame AV1 videos as images because avif are indeed real images. Anyway, the image detection is reliable outside of FATE. I wouldn't use it to prevent video playback like in the previous gainmap PR but it's fine for nicer textual description.

guidocella avatar Jun 27 '24 16:06 guidocella