[vorbis] Amplify Ogg files without decode/encode

Frank Heckenbach frank at g-n-u.de
Thu May 17 17:59:45 PDT 2001



Michael Smith wrote:

> At 10:31 PM 5/11/01 +0200, you wrote:
> >Michael Smith wrote:
> >
> >> As for your other suggestion of allowing one to ignore n samples at the
> >> start/end of the stream, this exists already (and has for a long time).
> >> vcut is a tool which adjusts these for specific purposes - libvorbis uses
> >> them when decoding, of course.
> >
> >Is this the program you mentioned some time ago in response to q
> >request of mine:
> >Is it ready now, or should I still wait?
> 
> Yes, it is. I never 'announced' it on the list because I never got around
> to the final polishing it really needed (needs).
> You can, however, use it if you're careful (it'll generally crash and burn
> if you give it bad input parameters, though.)
> Basically, vcut takes as input a file, and a sample number. It produces 
> two output files - one up to that number, one from that number on.
> So, if you wanted to get final output being from samples 1 million to 2 
> million, you'd just run it twice and discard the extra files. 
> Obviously, this is a pretty crude interface - feel free to write something
> more complete based on my code, but be warned - it's fairly hairy.

I would like to have it in library form, so I can call it in my
programs. Unfortunately, I don't have the time now to try it myself,
so I think I'll just call it as a subprocess for now.

Anyway, I've compiled and tried the program. (It didn't compile
automatically, and I had to copy some headers from vorbis, but I
suppose that's normal because the code isn't "official" yet.)

It basically works as you described. However, some of the files
generated seem to exhibit another bug in ov_pcm_seek(). With an
argument of 0 or another small value, it seeks to a position
somewhere not quite near the beginning of the file. With a larger
argument, it seems to go into an endless loop trying to read from
the file after EOF (according to strace). I don't know if the
problem is in vcut or ov_pcm_seek().

To reproduce the problem, you can use the same test program I sent
on 13 Mar for the ov_pcm_seek(0) bug. E.g.:

wget http://www.realmusic.de/ogg/tracks/82f45c45f4f80c975feca0.ogg
./vcut 82f45c45f4f80c975feca0.ogg 1.ogg 2.ogg 5000000
./vcut 2.ogg 3.ogg 4.ogg 3000000

Then apply the test program to 3.ogg.

Also, when I try vcut with some Ogg file downloaded from the net (e.g.
http://www.realmusic.de/ogg/tracks/9400aec7627de252ea29e9.ogg), it
aborts with `Bitstream error'. I haven't seen this yet with files I
encoded myself.

Frank


-- 
Frank Heckenbach, frank at g-n-u.de
http://fjf.gnu.de/
PGP and GPG keys: http://fjf.gnu.de/plan

--- >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-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 mailing list