[Vorbis] Edting or Adding New Comments
ibm21 at cam.ac.uk
Fri Dec 2 03:41:05 PST 2005
pavan kumar wrote:
> Hi All,
> Can I update the header of the already existing Ogg-Vorbis file with
> the new comments? When we add new entries in the header, will it not
> overwrite the data? does the vorbis library takes care of this? can
> someone also please give me the call sequence on how i can do that?
> Thanks in advance.
> regards, Pavan.
It depends what you mean. If you are talking about the vorbiscomment
utility then there is a (over-)write (-w) and an append(-a) option.
If you look at the vorbiscomment source it is built around vcedit.c
which you can use to load and edit the comment header as you like.
At the moment when writing comments using vcedit you must rewrite
the entire file through if the pages containing the headers have
changed size (because they come at the start).
There is provision to add padding so that you can maintain the page
size and so only need to rewrite the start of files which are padded,
but it's not currently done. Also, for reasons I don't quite
understand, vcedit does a packet copy on the remainder of the stream
rather than the simpler page copy.
More information about the Vorbis