Kun Ling
Kun Ling

Reputation: 2219

How to record PCM streams and write to a AVI format file?

Currentl, I have a PCM stream, and want to record a segment of the stream to an avi file, which can be played using an avi-supportted media player.

I am wondering:

  1. Any conversion is needed to record PCM streams to AVI file?
  2. How to write the file header to avi file correctly, so that the media player can read it.
  3. Is there open source library or tools which have avi file creation and writing?

Thanks

Upvotes: 1

Views: 428

Answers (1)

twid
twid

Reputation: 6686

you can use ffmpeg for this porpose.

For example :
    ffmpeg -i in_file -f s16le -acodec pcm_s16le out.avi

Upvotes: 1

Related Questions