1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
# On a terminal "mpg321 -K" for keys and "-v" to print elapsed time.
# Reprinting the progress every frame hammers the tty, so
# --skip-printing-frames to limit a bit (aiming for perhaps just over
# once a second).
#
# If no terminal then "-q" for no output.
#
# ENHANCE-ME: Should have a test="..." in these entries so they're
# only used if audio output is possible by mpg321's configured or
# various methods. That might mean user in the "audio" group, or esd
# server reachable, etc. Would playing an empty mp3 be good enough?
# Otherwise perhaps mpg321 could help by some "mpg321 --test-output".
#
# ENHANCE-ME: mpg321 seems almost able to take mp3 input on stdin (by
# filename "-") when non-interactive, but it prints a warning message
# "tcgetattr(): Invalid argument". Is that supposed to work? If yes
# then the non-interactive form here could be "-" stdin which may let
# run-mailcap or similar pipe straight in instead of making a temp
# file.
#
audio/mpeg; /usr/bin/mpg321 -K -v --skip-printing-frames=50 %s; needsterminal; description="MPEG Audio"; priority=5
audio/mpeg; /usr/bin/mpg321 -q %s; description="MPEG Audio"; priority=5
|