Jan Stary
2023-Aug-25 12:41 UTC
[Vorbis] [EXT] Re: oggenc argument to make the stream not cut in the middle
First of all, keep the replies on the mailing list. Are you subscribed to the mailing list? On Aug 24 09:44:56, nguyenquocthao00 at gmail.com wrote:> The file ogg is the same, I know that.So oggenc must have produced exactly the same audio. So it must be specific to the "live" playing.> And the problem is not from curl, > curl is only an example to replicate my problem. > If I download the file and > use cat instead of curl, it's the sameAaaargh, so why even bring curl into that? I'm working wth a local copy of dataproc.wav now, OK? ( cat dataproc.wav && sleep 0 ) | oggenc - | play - ( cat dataproc.wav && sleep 4 ) | oggenc - | play - ( cat dataproc.wav && sleep 8 ) | oggenc - | play -> All this has the same audio,Exactly, it just waits 4 resp. 8 seconds before encoding and playing. No surprise there.> the difference is that there is silence when speaking the sentence, > making the sentence not spoken smoothlyI cannot hear any such silence. The sentence sounds the same.> Using another example: > In my computer, using this command > ( curl https://storage.googleapis.com/maika-ai-ext/test/test.wav && sleep > 8) | oggenc - | play -This test.wav is not a valid wav file: play FAIL formats: can't open input file `test.wav': invalid chunk ID found ffmpeg can read it, for instance, but can you please give use a valid file?> When speaking `for content marketing`, the word `content` is split in the > middle, only speak `con` then delay, then speak `tent marketing`OK, now I see what you mean. Testing with vorbis-tools-1.4.2 and sox-14.4.2pl20210509p1 on OpenBSD 7.3: ( cat test.wav && sleep 0 ) | oggenc - | play - ( cat test.wav && sleep 4 ) | oggenc - | play - ( cat test.wav && sleep 8 ) | oggenc - | play - For me, the "delay" happens between "specificaly" and "designed". Note that this does _not_ happen with the previous dataproc.wav file.> If the is no sleep, sleep 0, or play directly without using oggenc -, the > sentence is spoken smoothly > ( curl https://storage.googleapis.com/maika-ai-ext/test/test.wav && sleep > 8) | oggenc - | play - > ( curl https://storage.googleapis.com/maika-ai-ext/test/test.wav && sleep > 8) | ffplay - > > The problem is that oggenc need the full data before writing to stdout, so > if the stdin needs to wait for sometime before closing, some data will be > held in buffer. The problem is the delay between sending data / receiving > data.OK, so you know the sleep makes the buffers wait. And it only occurs with "live" playback of the encoded ogg, not when writing with oggenc -o, where it produces the same output in all three cases. Yes, live playback is sensitive to timing and buffering. So what is your question?> https://lists.xiph.org/pipermail/vorbis/2002-August/021175.html > https://lists.xiph.org/pipermail/vorbis/2005-July/025835.html > If you still cannot replicate the problem, please let me knowI can now; it also happens with ogg123 in place of play, although at a different point. I don't know what you want to do about it; oggenc buffers its input and output, and that's what you are messing with. Jan> > On Aug 23 08:51:15, hans at stare.cz wrote: > > > For reference, I attach the two outputs: > > > > > > ( curl https://storage.googleapis.com/maika-ai-ext/test/dataproc.wav \ > > > && sleep 0 | oggenc -o sleep-0-oggenc.ogg > > > > > > ( curl https://storage.googleapis.com/maika-ai-ext/test/dataproc.wav \ > > > && sleep 4 | oggenc -o sleep-4-oggenc.ogg > > > > > > Listening to both, I hear exactly the same. > > > > > > Jan
Apparently Analagous Threads
- [EXT] Re: oggenc argument to make the stream not cut in the middle
- [PATCH] oggenc: do not use stack variable out of its scope of validity
- OggEnc manpage
- [LLVMdev] Analysis of polly-detect overhead in oggenc
- oggenc of wav file loses one second at end of track.. why?