Re: ogg123 in mc.ext
- From: Marcel Pol <mpol gmx net>
- To: mc-devel <mc-devel gnome org>
- Subject: Re: ogg123 in mc.ext
- Date: Fri, 5 Oct 2001 19:18:59 +0200
On Fri, 5 Oct 2001 02:28:51 -0400 (EDT)
Pavel Roskin <proski gnu org> wrote:
> > > > +regex/\.(ogg|OGG|Ogg)$
> > > > + Open=ogg123 %f
> > > > + View=%view{ascii} ogg123 -tn1 %f 2>&1|grep -E
> > > > "^(Title|Album|Comment|$)"+
> > >
> > > What version of ogg123 are you using? Mine is "Ogg123 from
> > vorbis-tools
> > > 1.0beta4" and it doesn't support the "-tn1" option.
> Of course playing is not affected. You put this option to the
"View"
> rule. I think that the syntax of mc.ext is explained clearly in the
> beginning of the file, but you somehow missed this explanation. I'm
open
> to suggestions how to make this description more visible or more
> understandable.
Well, I just didn't take the time to read it.
Never knew you could use F3 to "view" an mp3 or ogg.
Mc just has too many features :)
> It seems that both mpg123 and ogg123 lack a straightforward way to
request
> metadata without playing the sound. "-tn1" for mpg123 means that
only one
> frame should be decoded and it should not be played. I changed it
to
> "-vtn1" so that the output is more verbose.
>
> I found similar options for ogg123 - it's a hack, but hopefully an
option
> for requesting metadata will appear before this hack stops working.
Here
> it is:
>
> View=%view{ascii} ogg123 -v -d null -k -1 %f 2>&1 | sed -n
'/^Bitstream/,/^$/p'
>
> Works fine for me. "-v" is verbose, "-d null" means "don't play",
"-k -1"
> means "play -1 seconds", which eliminates any delays. "sed" cuts
the
> insteresting strings starting with "Bitstream" and ending with an
empty
> line.
Here it gives me this output on an ogg file:
Bitstream is 2 channel, 44100Hz
Time: 05:17.85 [00:-0.01] of 05:17.84, Bitrate: 220.2
Done.
ao_null: 3656 bytes sent to null device.
I can't say that's too interesting.
I'd rather see the title, album, artist and bitrate.
Maybe ogginfo is better for this. It doesn't accept any options
though, so maybe grepping the interesting lines might be appropriate?
What I'd prefer would look like this:
ogginfo %f 2>&1|grep -E
"^(title|artist|album|bitrate_nominal|playtime|$)"
> I also added support for *.mid (without viewer) and changed the
"Open"
> rules to play *.mp3 and *.ogg in xmms if $DISPLAY is set.
Well, I don't really know what to say to that.
The reason why i use mc is because it's lightweight, flexible and
featurefull.
I can't agree on the lightweight part of xmms.
For midi, I don't use midi, but if it wasn't in mc.ext yet, it is a
good idea to put it in as well.
> Here's the complete patch.
>
> --------------------------------------------
> --- ChangeLog
> +++ ChangeLog
> @@ -1 +1,7 @@
> +2001-10-05 Pavel Roskin <proski gnu org>
> +
> + * lib/mc.ext.in: Use xmms to play *.mp3 under X. When viewing
> + *.mp3, use "verbose" option to mpg123. Add support for *.ogg
> + and *.mid files.
> +
> 2001-09-30 Pavel Roskin <proski gnu org>
> --- lib/mc.ext.in
> +++ lib/mc.ext.in
> @@ -257,9 +257,15 @@
> Open=vplay -s 22 %f
>
> regex/\.(mp3|MP3|Mp3)$
> - Open=mpg123 %f
> - View=%view{ascii} mpg123 -tn1 %f 2>&1|grep -E
"^(Title|Album|Comment|MPEG|$)"
> + Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f &); fi
> + View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n
'/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
>
> +regex/\.(ogg|OGG|Ogg)$
> + Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f &); fi
> + View=%view{ascii} ogg123 -v -d null -k -1 %f 2>&1 | sed -n
'/^Bitstream/,/^$/p'
> +
> +regex/\.(midi?|MIDI?|Midi?)$
> + Open=timidity %f
>
> ### Multimedia ###
---
Marcel Pol
mpol gmx net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]