[FFmpeg-user] astreamsync freezes?

Roger Pack rogerdpack2 at gmail.com
Thu Aug 30 19:56:23 CEST 2012

> astreamsync does not handle EOF at all, that result is not entirely
> surprising. I will look into it sometime.

Judging from this output line:
> size=       0kB time=00:00:00.00 bitrate=   0.0kbits/s

(also I looked and it appears to use 100% of one core while pausing),
my guess is some infinite loop early on.

> Still, astreamsync is a tool to test that other filters behave correctly
> when frames arrive on the wrong input: do you have a practical case where it
> would be useful for a normal user?

I believe I do.
It may be useful for a filter I'm trying to implement that does audio
cancelling (speex).

Basically if the input could be guaranteed to receive the "send"
timestamped audio before "receive" timestamped audio then it I could
simplify its internal logic.

My original goal was to do something like

$ ffmpeg -i stream1 -i stream2 -filter_complex "[0] asetnsamples=n=100
[a]; [1] asetnsamples=n=100 [b]; [a] [b] astreamsync [a2] [b2]; [a2]
[b2] aechocancel"

So that I could have lots of small'ish audio packets sent into the
audio cancel filters, but in approximately the right order (small
packet from a, then small packet from b, interleaved).  This might
allow the echo cancel filter to more simply be able to operate on
"small packets" instead of having to do its own internal buffering,
etc. which may allow it to use a smaller "internal buffer" which,
according to the speex docu, is supposedly more effective (and save
cpu, etc.)

If that makes any sense at all.
Thanks much.

More information about the ffmpeg-user mailing list