You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alright, so on that image, you can see commandline usage of me on Linux with mpv.
I actually use a ruby script that then calls the "mpv" binary. Before this is done, I
typically show the full command in a specific colour. In my case, I use a black background
on KDE konsole, and the colour is about teal. You can see this on top of the image,
aka:
mpv /home/x/songs/FILE_NAME_HERE
After doing so, mpv shows some information about the .mp3 file at hand.
Specifically the mp3 ID (ID3 or so), such as the artist, Date, Comment (I typically
fill in the wikipedia URL for this, so that I can read up on the song, or display
this in a ruby-gtk3 application) and some more entries.
So the feature request relates primarily to the latter output.
I would like to be able to colourize these entries, ideally with R G B colours. These
work on KDE konsole. If this is too difficult to add, I am fine with both X11 colours
("html colours" such as steelblue etc...) or even plain old terminal escape sequences.
For instance, for Artist I would like to use olive() HTML colour, the full line. Alternatively
only for the last part (real artist name), and the "Artist:" String can remain without
colours.
Colours give indicators to the human user. I use colours a lot to indicate useful information.
For instance, for warnings or errors, I tend to use a red colour (or usually these days, the
HTML tomato() colour, as this is a bit reddish, but looks neater on black background, in
my opinion).
(Note for clarification: I only refer here to ID3 entries, in regards to colours, and primarily for
.mp3 files only; perhaps also .mp4 files, but about 98% of my use cases is covered by .mp3
files, sometimes .ogg files, so I am more concerned about songs than video files. While one
could perhaps also add colours for video-files, at the least in regards to the suggestion here
in this issue I focus almost exclusively on e. g. mp3 files aka "songs", and only the more important
ID3 entries, such as title, artist, comment, year, genre - that's it really. The rest may be nice,
but I care primarily only about these ~5 entries.)
Of course this feature is by default not in use, so everyone can retain the default non-colour
output - thus no change is required. So the question then is: how to add such customization?
The first suggestion here would be to add environment variables. For instance:
MPV_COLOR_ARTIST
MPV_COLOR_TITLE
and so forth. So, the artist or title entry, to start with MPV_COLOR_ and then we set it to
a value. This could be a hexvalue such as used in HTML CSS; it could be a HTML colour
name such as steelblue; and it could be e. g. 33,44,55 to indicate RGB colours (aka needs
two mandatory ',').
Using ENV variables may not be super-elegant but it could work. Alternatively, and perhaps
the easier way (or in addition to this), would be to allow for this in the config file. This could
use the very same names here, to simplify this. So in the config:
MPV_COLOR_ARTIST: steelblue
And so forth. If not specified then no colour is used other than the default no-colour output as-is.
Note that strictly speaking I may not need this feature, because I believe I can simply use popen
and kernel backtick `` via ruby and then colourize the output on my own; I do this already in
another project, though it is a bit cumbersome. Nonetheless I would also like to have this
available by default in mpv, as I may not always have ruby enabled on every platform (e. g.
on windows, on the computer system of another person such as an elderly relative, where
I use the mpv.exe download). At any rate this is just a suggestion; if it does not seem to fit
to mpv's feature set please do feel free to close this issue at any moment in time for any
reason. Thanks for reading this suggestion.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Expected behavior of the wanted feature
Hello there mpv devs and users,
This is a feature suggestion. It relates to output on the commandline, in particular
being able to colourize it; and to customize these colours too.
Before I explain this further, let me link in a partial screenshot, to show the current
status quo - I'll explain this in a moment too:
https://i.imgur.com/PZfo6Oj.png
Alright, so on that image, you can see commandline usage of me on Linux with mpv.
I actually use a ruby script that then calls the "mpv" binary. Before this is done, I
typically show the full command in a specific colour. In my case, I use a black background
on KDE konsole, and the colour is about teal. You can see this on top of the image,
aka:
After doing so, mpv shows some information about the .mp3 file at hand.
Specifically the mp3 ID (ID3 or so), such as the artist, Date, Comment (I typically
fill in the wikipedia URL for this, so that I can read up on the song, or display
this in a ruby-gtk3 application) and some more entries.
So the feature request relates primarily to the latter output.
I would like to be able to colourize these entries, ideally with R G B colours. These
work on KDE konsole. If this is too difficult to add, I am fine with both X11 colours
("html colours" such as steelblue etc...) or even plain old terminal escape sequences.
For instance, for Artist I would like to use olive() HTML colour, the full line. Alternatively
only for the last part (real artist name), and the "Artist:" String can remain without
colours.
Colours give indicators to the human user. I use colours a lot to indicate useful information.
For instance, for warnings or errors, I tend to use a red colour (or usually these days, the
HTML tomato() colour, as this is a bit reddish, but looks neater on black background, in
my opinion).
(Note for clarification: I only refer here to ID3 entries, in regards to colours, and primarily for
.mp3 files only; perhaps also .mp4 files, but about 98% of my use cases is covered by .mp3
files, sometimes .ogg files, so I am more concerned about songs than video files. While one
could perhaps also add colours for video-files, at the least in regards to the suggestion here
in this issue I focus almost exclusively on e. g. mp3 files aka "songs", and only the more important
ID3 entries, such as title, artist, comment, year, genre - that's it really. The rest may be nice,
but I care primarily only about these ~5 entries.)
Of course this feature is by default not in use, so everyone can retain the default non-colour
output - thus no change is required. So the question then is: how to add such customization?
The first suggestion here would be to add environment variables. For instance:
and so forth. So, the artist or title entry, to start with MPV_COLOR_ and then we set it to
a value. This could be a hexvalue such as used in HTML CSS; it could be a HTML colour
name such as steelblue; and it could be e. g. 33,44,55 to indicate RGB colours (aka needs
two mandatory ',').
Using ENV variables may not be super-elegant but it could work. Alternatively, and perhaps
the easier way (or in addition to this), would be to allow for this in the config file. This could
use the very same names here, to simplify this. So in the config:
And so forth. If not specified then no colour is used other than the default no-colour output as-is.
Note that strictly speaking I may not need this feature, because I believe I can simply use popen
and kernel backtick `` via ruby and then colourize the output on my own; I do this already in
another project, though it is a bit cumbersome. Nonetheless I would also like to have this
available by default in mpv, as I may not always have ruby enabled on every platform (e. g.
on windows, on the computer system of another person such as an elderly relative, where
I use the mpv.exe download). At any rate this is just a suggestion; if it does not seem to fit
to mpv's feature set please do feel free to close this issue at any moment in time for any
reason. Thanks for reading this suggestion.
The text was updated successfully, but these errors were encountered: