Detailed info (tag) of playing/selected song

How do I view detailed info (meta tags) of a music file that is playing or selected? thanks

At the moment it is not possible directly. But you might try to attach an external command to a key via ExecCommandX command in .moc/config.

Something like (give or take some quotes) might work for mp3 (command borrowed from mc extension file):
mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'

thanks, this works but printing with sed (may be it works on GNU but I'm on BSD) didn't work (I just use mpg123 -vtn1 %f). I'm on mac, so not aware of any other command line program to retrieve tags (I think mpg123 doesn't work for flac!), if you know any other script/program to grab meta tags then plz let me know.

For flac there is metaflac, but I don't have complete set of options to make it look nicely. There is also quite general tool like ffprobe/avprobe from ffmpeg/libav. Probably even exiftool would do the trick. I don't know if any of those are available on MAC.

Easier though it pulled tons of info
exiftool -sort %f

How to include consecutive commands? (earlier you showed with sed, but when I run the below command, it just does the clear but no meta info seen)

ExecCommand6 = "clear | exiftool -sort %f"

MOC doesn't run external commands under a shell, so things like pipe ("|") don't work. That and MOC gets a little lost in the quoting.

I usually find it best to put it in a script file then just run that (but beware you'll have to give the full path name).

how to get the file path of currently playing or selected song? my external base script

-----------
clear
exiftool -sort %f
-----------

this ends on "File not found: %f"

You probably need to add quotes around %f.

No, you'll have to pass it to the script as a parameter. So in your configuration file it will be:

ExecCommand6 = "/path/to/script %f"

and in your script it'll be:

exiftool -sort $1

(Of course, that assumes you don't have spaces in your filenames; if so, quote.)

@ config
---------------------
ExecCommand6 = "/Users/name/.moc/tags.sh %f"

base script
---------------------
clear
exiftool -sort "$1"

make it executable
---------------------
chmod u+x tags.sh
ls -l tags.sh

done

it may helpful if moc can retrieve the tags in the same shell.

how to differentiate between now playing and selected song

"%f" picks the selected song but sometime is annoying to scroll through and select the new playing song.

Can we pick "now playing" file?

It think that only the following options are possible:

# Some arguments are substituted before executing:
#
# %f - file path
# %i - title made from tags
# %S - start block mark (in seconds)
# %E - end block mark (in seconds)
#
# Data from tags can also be substituted:
#
# %t - title
# %a - album
# %r - artist
# %n - track
# %m - time of the file (in seconds)
#

(copied from config.example)

However you can fast-jump to currently playing song by pressing "G".

And the very next paragraph says:


# The parameters above apply to the currently selected file. If you change
# them to capital letters, they are taken from the file currently playing.

I really should refrain from posting anything today ;-) Everything turns out stupid...

I setup the same command but i can't see the output, since it just flashes for a second on the screen. I wonder if it is possible to show the output in the status bar?

Yes, I know the handling of external commands output needs some work. There is little space on the screen to display the arbitrary output of an external command, but I do have in mind to display it in a scrollable pop-up panel.

In the meanwhile, and it will be a long meanwhile, you can include a read command (or your shell's equivalent) at the end of the script which should stop it returning to MOC until you press ENTER so you have time to read the output.