Re: ogg123 in mc.ext



Hi, Marcel!

> > > +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.
>
> Version 1.0rc2 here.
> But you're right.
> When playing it doesn't show any errors so i didn't take notice.
> I guess the -tn option can be removed then.

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.

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.

I also added support for *.mid (without viewer) and changed the "Open"
rules to play *.mp3 and *.ogg in xmms if $DISPLAY is set.

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 ###

--------------------------------------------

-- 
Regards,
Pavel Roskin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]