[vorbis-dev] Re: ogg123 -k 1:59 patch.ogg # minutes and seconds

Stefan Bender oraqhf at gmx.net
Sat Mar 1 14:39:01 PST 2003



Hello,

Hans Schou wrote on 2003-02-28 12:02:19:

> I have helped a user with a little patch for ogg123. He uses ogg123 
> for very big files, often more than an hour (blind books). When he 
> breaks the book and later on want to go back to the same chapter, it 
> is a little troublesome to calculate the seconds. Minutes is much more 
> convenient as it is what is written on the screen.
[snip patch]

I personally think that you can make such things easier,
i.e. without patching ogg123. I see at least three obvious ways
to do this, the first and most simple is to use your brain.
(if you practice often, you will increase your neuron pool ;)
More seriously, you can use bash's $(()) like

    ogg123 -k $((<min>*60+<sec>)) ...

or you can feed an appropriate sequence to bc

    ogg123 -k `echo '<min>*60+<sec>' | bc` ...

But, if you (and maybe more people) think, that support for this
is useful to have in ogg123, I would suggest to do it in a
more flexible way by appending a single letter to indicate minutes,
seconds, hours, or even samples like

    ogg123 -k 1:23m ...         for minutes
    ogg123 -k 2:34h ...         for hours and
    ogg123 -k 23456s ...        for samples (or maybe make that a
                                capital S and use s for seconds?)

/Stefan.
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list