IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Vorbis Comment Header, and how to change after encoding
Till
post Apr 1 2004, 09:45
Post #1





Group: Members
Posts: 3
Joined: 30-March 04
Member No.: 13128



hi

Just like I said in the topic... How can I change a comment header in
a given ogg file. I'm not quite sure how to do that (im programming in c++) . Can I just cut the file after the beginning headers (including the comment header) and reattach it to a new generated header? Are there any CRC checks?
Or is there a better solution (like a special funktion for editing comments) ?

thanks
Till

This post has been edited by Till: Apr 1 2004, 09:47
Go to the top of the page
+Quote Post
ErikS
post Apr 1 2004, 16:15
Post #2





Group: Members
Posts: 757
Joined: 8-October 01
Member No.: 247



Sure. It works. But remember two things:

1. generate correct CRC values for the header "pages" you regenerate
2. you must make exactly the same number of "pages" in the new header

Considering the space limitation for an ogg page is a bit less than 64 kb, it's possible for all but very bit comments. But also since pages larger than 4 kb is discouraged by the spec, it might be better to just regenerate all pages in the whole file in those cases where you have to rewrite it anyway.

Better solution will be to use vcedit code - i think from the tools package found in the vorbis sdk / tarball / cvs (if you're working in C/C++ that is).

This post has been edited by ErikS: Apr 1 2004, 16:16
Go to the top of the page
+Quote Post
Till
post Apr 1 2004, 16:54
Post #3





Group: Members
Posts: 3
Joined: 30-March 04
Member No.: 13128



QUOTE (ErikS @ Apr 1 2004, 07:15 AM)
1. generate correct CRC values for the header "pages" you regenerate
2. you must make exactly the same number of "pages" in the new header

1. Sure... i planed to generate the new header with the normal functions provided by the standard library. The CRC should be correct.
2. hm.. I'm using vorbis_comment_add_tag(vc,"..","..") several times. Does it write a new page into vc every time I call it?

The Comment will be some kind of time-index for the file to address "events" in the file. The whole thing is running on a win2000 server and is recording meetings for my company. It has to encode in realtime (a little latency is ok) because it is sending this data via network and Internet to several clients.

It's not possible to regenerate all page because the file may contain up to some hours of audiodata and re-encoding would take to much time.

This post has been edited by Till: Apr 2 2004, 09:47
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 30th July 2014 - 16:44