[Libav-user] Audio good when writing to file, bad when streaming
brado at bighillsoftware.com
Fri Apr 5 20:59:04 CEST 2013
Ok....so with the code I have developed with the help to questions asked over the past several weeks on this list, I can successfully process captured audio and video, encode them to an FLV file, and write the file out locally. All is well there. But when I change the output format to attempt to stream this, while all succeeds (meaning no errors), the video comes through fine, but the audio is complete junk.
The only difference between the code executed in the two scenarios is:
1. Output name (which is a file name when writing locally, and a URL when streaming across the network).
2. I am setting a particular flag to indicate that output is not going to a file when streaming across the network, as in the following line of code:
_avOutputFormat->flags = AVFMT_NOFILE
As mentioned, the video stream is fine. The audio stream is fine when written locally, but when streamed, the audio played on the other end is junk. I have tried both av_write_frame and av_interleaved_write_frame, and netiher call solves the problem.
Any ideas on how to rectify this problem would be greatly appreciated.
More information about the Libav-user