This error is (almost) normal. ffmpeg is sending the wave header with a very high number of samples, as if it didn't know the real file length. It is probably doing the same thing with a file output, but it rewrite the file header when closing it with the real number of samples written. But it is not possible to rewrite the header with a pipe.
|