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.
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".
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.
tomaszg
Sat, 2014-01-11 19:07
Permalink
At the moment it is not
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'
chittu
Sun, 2014-01-12 00:27
Permalink
any script?
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.
tomaszg
Sun, 2014-01-12 00:32
Permalink
For flac there is metaflac,
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.
chittu
Sun, 2014-01-12 02:02
Permalink
exiftool does fine
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"
jcf
Sun, 2014-01-12 03:48
Permalink
Use The Shell, Luke
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).
chittu
Sun, 2014-01-12 09:32
Permalink
how to get file path of selected song
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"
tomaszg
Sun, 2014-01-12 09:43
Permalink
You probably need to add
You probably need to add quotes around %f.
jcf
Sun, 2014-01-12 10:32
Permalink
Nope
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.)
chittu
Sun, 2014-01-12 11:55
Permalink
done
@ 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.
chittu
Sun, 2014-01-12 12:54
Permalink
differentiate between now playing and selected song
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?
tomaszg
Sun, 2014-01-12 13:11
Permalink
It think that only the
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".
jcf
Sun, 2014-01-12 19:35
Permalink
Looking Further Ahead
And the very next paragraph says:
tomaszg
Sun, 2014-01-12 21:57
Permalink
I really should refrain from
I really should refrain from posting anything today ;-) Everything turns out stupid...
ruslaniv
Sun, 2021-01-10 19:07
Permalink
I setup the same command but
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?
jcf
Sun, 2021-01-10 19:42
Permalink
External Command Output
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 pressENTER
so you have time to read the output.