Good day. I have some questions dealing with merging Ogg Vorbis files. Suppose I want merge two Ogg Vorbis files encoded with the same parameters into one file that composed of one logical bitstream. In this connection some questions: A) Are codebooks in file headers depend only on Vorbis version and encoding parameters and don't depend on the particular source file? B) Are the following steps enough to do merging?: - unset e_o_s flags in the last packet of the first file; - unset b_o_s flags in the first packet of the second file; - write additionally to the first file data data from the second file, which located after headers of the second file, at the same time changing granuleposes and packetnos for packets from the second file; Thanks. Vitaly. --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
At 03:05 PM 9/19/02 +0300, you wrote:>Good day. > >I have some questions dealing with merging Ogg Vorbis files. >Suppose I want merge two Ogg Vorbis files encoded with the same parameters >into one file that composed of one logical bitstream. In this connection >some >questions: >A) Are codebooks in file headers depend only on Vorbis version and > encoding parameters and don't depend on the particular source file?Yes (i.e. they aren't dependent on the input file)>B) Are the following steps enough to do merging?: > - unset e_o_s flags in the last packet of the first file; > - unset b_o_s flags in the first packet of the second file; > - write additionally to the first file data data from the second file, >which > located after headers of the second file, at the same time changing >granuleposes > and packetnos for packets from the second file;No. See vorbis-clip.txt in the documentation directory for some details, and also consider the fact that vorbis packets are NOT independent (because of overlap). Mike --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Thursday, Sep 19, 2002, at 13:05 Europe/London, Vitaly Nechyos wrote:> I have some questions dealing with merging Ogg Vorbis files. > Suppose I want merge two Ogg Vorbis files encoded with the same > parameters > into one file that composed of one logical bitstream. In this > connection > some questions:I suppose you know you can simply concatenate the files? The decoder will just parse the new header as it comes along.> A) Are codebooks in file headers depend only on Vorbis version and > encoding parameters and don't depend on the particular source file?If you're going to do this you should explicitly compare the header data.> B) Are the following steps enough to do merging?: > - unset e_o_s flags in the last packet of the first file; > - unset b_o_s flags in the first packet of the second file; > - write additionally to the first file data data from the second > file, > which > located after headers of the second file, at the same time > changing > granuleposes > and packetnos for packets from the second file;You've also have to rewrite the logical stream id. Otherwise this should work if the headers are indeed equivalent. HTH, -r --- >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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.