New terminal text for track descriptors is too wide and wastes space, additionally includes non-ascii characters
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
mpv Information
mpv v0.38.0-582-ge8e6e91c49-dirty Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
built on Jul 8 2024 14:19:51
libplacebo version: v7.349.0
FFmpeg version: n7.0.1
FFmpeg library versions:
libavcodec 61.3.100
libavdevice 61.1.100
libavfilter 10.1.100
libavformat 61.1.100
libavutil 59.8.100
libswresample 5.1.100
libswscale 8.1.100
Other Information
Linux version: Arch Linux
Kernel Version: Linux archHTPC 6.9.8-arch1-1
https://github.com/mpv-player/mpv/pull/1 SMP PREEMPT_DYNAMIC Fri, 05 Jul 2024 22:11:24 +0000 x86_64 GNU/Linux
GPU Model: 1f:00.0 VGA compatible controller [0300]: NVIDIA Corporation GA106 [Geforce RTX 3050] [10de:2507] (rev a1)
Mesa/GPU Driver Version:
Window Manager and Version:
Source mpv: self-built
Introduced in version: d49879f
Reproduction Steps
Play any file and observe that the terminal track info listing has gotten significantly larger with wasted space. The text used to be relatively succinct with narrow text that was easy to read at a glance. Now it's gotten significantly larger with information that isn't useful. It additionally includes non-ascii characters that don't render the same in all fonts, especially in cjk fonts.
For example we do not need a massive [default] at the end of every single track. Which track is default is self evident the moment the file is loaded because the defaults are what are selected.
Nor do we need a whole ton of white space padding. around each track line. There was already padding out to the width of the words Audio Video and Subs to 6 characters, now it has been expanded to 7 for inexplicable reasons. There does not need to be two characters between --aid=1 and --alang=jpn, nor does a bunch of white space need to be added between --vid=1 and the track descriptor.
Depending on the font the ● character can be very wide and blobby. It looks significantly different from my Mac OS system to my Linux system depending on the text it is in (for example in this web form it is a very huge white circle, not a radio button-looking character).
Expected Behavior
Succinct text like used to be:
(+) Video --vid=1 (*) (h264 1280x714 23.976fps)
(+) Audio --aid=1 --alang=jpn (*) (flac 2ch 48000Hz)
(+) Subs --sid=1 (*) (ass)
Actual Behavior
Very wide text like including non-ascii characters:
● Video --vid=1 (h264 1280x714 23.976 fps) [default]
● Audio --aid=1 --alang=jpn (flac 2ch 48000 Hz) [default]
● Subs --sid=1 (ass) [default]
Log File
Log file not needed for this.
Changes were made in:
https://github.com/mpv-player/mpv/pull/14405
https://github.com/mpv-player/mpv/pull/14192
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
- I tested with the latest mpv version to validate that the issue is not already fixed.
- I provided all required information including system and mpv version.
- I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- I attached the full, untruncated log file.
- I attached the backtrace in the case of a crash.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review pull requests #14405 and #14192 first to understand the terminal track-info changes, then locate the mpv code that formats the track listing. Compare its output with the expected examples; done means the listing is succinct, uses ASCII characters, and avoids unnecessary padding and default labels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100