[ogg-dev] oggz-merge / oggJoin with files created with oggCat

yorn at gmx.net yorn at gmx.net
Tue May 5 10:10:21 PDT 2009

> > 
> > I think, I got the problem:
> > 
> > When I re-encode both audio files with the same quality/bitrate,
> oggCat/oggJoin works as expected.
> > 
> > The reason, that it does not work, is as follows: I had a lot of trouble
> concatenate the audio-files (as I was starting with video only). In many
> cases, the concatenation works even if the bitrate does not correspond
> (correct me if I am wrong). In some cases (ffmepg) the bitrate is not given in
> the ogg-header. Therefor I ignore the failing bitrate-test. The test is
> actually only done for channels and sample rate. 
> > 
> > In your case this does not work. So what you need to do is: re-encode
> the ogg/vorbis files to the same bitrate.
> > 
> > oggz-validate does not complain about the problem as it is the layer
> above (vorbis), that fails.  
> encoding each audio part, i.e with
> oggdec audo_*.ogg
> oggenc audio_*.wav

what I did was something like this (I am not at home, so this may not be completely correct):

ffmpeg -i audio_01.ogg -acodec vorbis -ab 80 audio_01a.ogg
ffmpeg -i audio_02.ogg -acodec vorbis -ab 80 audio_02a.ogg
oggCat audio.ogg audio_01.ogg audio_02.ogg
oggJoin newFile.ogg video.ogg audio.ogg

Then it works for me.

BTW: the next version of oggResize will be able to change datarate of vorbis files as well, so you may not need oggdec/oggenc combination any more.

> oggJoin produces a file that sounds ok;
> it still does not work with oggJoin though.
> if i run oggdec/oggenc on audio.ogg oggJoin works.

So It works for you? 
If you have any suggestions for enhancing the tools, let me know.

For the datarate problem, I think, in future versions of oggCat, it will throw a warning about the datarate mismatch.


More information about the ogg-dev mailing list