[Vorbis] [EXT] Re: oggenc argument to make the stream not cut in the middle

Jan Stary hans at stare.cz
Wed Aug 23 06:45:37 UTC 2023


On Aug 22 09:38:17, u.windl at ukr.de wrote:
> I wonder: What happens if you disable cURL's (default) buffering?

With curl -N, I see the same behaviour.
That's curl 8.1.2. What about you?

I still can't see the original problem.

	Jan


> -----Original Message-----
> From: Vorbis <vorbis-bounces at xiph.org> On Behalf Of Jan Stary
> Sent: Tuesday, August 22, 2023 11:13 AM
> To: vorbis at xiph.org
> Subject: [EXT] Re: [Vorbis] oggenc argument to make the stream not cut in the middle
> 
> Keep the replies on the mailing list.
> 
> Also, I will send subsequent emails
> only to the mailing list, be subscribed.
> 
> On Aug 22 14:49:03, nguyenquocthao00 at gmail.com wrote:
> > Please check these commands:
> > ( curl https://storage.googleapis.com/maika-ai-ext/test/dataproc.wav &&
> > sleep 4) | oggenc - | play -
> > ( curl https://storage.googleapis.com/maika-ai-ext/test/dataproc.wav &&
> > sleep 0) | oggenc - | play -
> > ( curl https://storage.googleapis.com/maika-ai-ext/test/dataproc.wav &&
> > sleep 4) | play -
> > ( curl https://storage.googleapis.com/maika-ai-ext/test/dataproc.wav &&
> > sleep 0) | play -
> 
> I just played all of them: the speaker's actual voice
> seems to be exactly the same to me - they differ in
> how much silence there is at the beginning or end.
> 
> The first is preceded by about 4 seconds of silence;
> the second just plays the voice, as in a local 'play dataproc.wav';
> the third has a trailing silence at the end.
> the fourth plays just like a local file.
> 
> > For the first command, there is delay in the middle of the sentence;
> 
> Regretably, I don't speak the language, but after listening
> carefuly many times, I don't hear any delay in the middle
> of the sentence. To be clear: there is silence at the start
> and the end of the signal, respectively, but not in the
> middle of the sentence.
> 
> > for other commands the audio is played the same.
> 
> What do you mean? Aren't these examples supposed to show
> precisely how it is _not_ the same?
> 
> > (curl ... && sleep 4) means that after reading file and pipe,
> > wait for 4 seconds before closing stdin.
> 
> Not exactly: the curl writes the file to stdout and exits,
> then sleep 4 sleeps for 4 seconds (without reading stdin
> or writing to stdout). And it all happens in a subshell,
> so the concatenated stdout of both is what the subsequent
> "| oggenc -" sees as its stdin. No process is "waiting
> four seconds before closing stdin".
> 
> But I don't think that is relevant to your problem.
> 
> To sumarize: I cannot replicate your problem.
> Can you please save the output of the whole pipe into a file
> and show me how it has "cut the stream in the middle"?
> I still don't know what exactly you mean by that.
> 
> 	Jan
> 
> 
> > On Tue, Aug 22, 2023 at 2:29 PM Jan Stary <hans at stare.cz> wrote:
> > 
> > > On Aug 22 11:38:33, nguyenquocthao00 at gmail.com wrote:
> > > > Is there any argument to make this example working?
> > > > (curl https://storage.googleapis.com/maika-ai-ext/test/dataproc.wav &&
> > > > sleep 4) | oggenc - | ogg123 -
> > >
> > > It is working just fine for me
> > > with oggenc of vorbis tool 1.4.2
> > > and play of sox 14.4.2:
> > >
> > > ( curl https://storage.googleapis.com/maika-ai-ext/test/dataproc.wav \
> > > && sleep 4) | oggenc - | play -
> > >
> > > What exactly do you mean by "cutting the stream in the middle"?
> > > Creating an ogg output with two vorbis streams?
> > > What makes you think the above make such a cut?
> > > And if so, why is that a problem for ogg123
> > > that plays is subsequently?
> > >
> > > > Email: nguyenquocthao00 at gmail.com
> > >
> > > Subscribe to the mailing list
> > >
> _______________________________________________
> Vorbis mailing list
> Vorbis at xiph.org
> http://lists.xiph.org/mailman/listinfo/vorbis


More information about the Vorbis mailing list