[rtmpdump] [Solved] Re: On audio-only RTMP streams...

Howard Chu hyc at highlandsun.com
Tue Mar 9 02:24:36 CET 2010

PLTK wrote:
> Just one last question on this matter.
>> when they're being output to a seekable file (as opposed to stdout). It seeks
>> back to rewrite the FLV header before it closes the file.
> Why stdout is such a problem with audio-only files?

Because. Go learn what "seek" means.

The obvious solution is to buffer the data before writing anything out, and 
only start the actual writing when you've seen enough data to know 
conclusively whether it's an A/V stream or just pure audio (or pure video). 
The obvious problem with this approach is that we have no idea how much to 
buffer is "enough", and doing this will impose some (possibly noticeable) 
delay on the start of playback.

More information about the rtmpdump mailing list