Unable to store pcm audio in .mp4 container file

mrsatish picture mrsatish · Jul 15, 2013 · Viewed 9.9k times · Source

Is it possible to store a pcm audio file into .mp4 file?

I used ffmpeg command "ffmpeg -i tempA.wav -acodec copy temp.mp4" but unable to store it in mp4 container file.

Input #0, wav, from 'tempA.wav':

Duration: 00:01:36.51, bitrate: 128 kb/s

Stream #0.0: Audio: pcm_s16le, 8000 Hz, 1 channels, s16, 128 kb/s

[mp4 @ 0x7d70e0] Tag [1][0][0][0]/0x00000001 incompatible with output codec id '65536'

Output #0, mp4, to 'temp.mp4':

Stream #0.0: Audio: pcm_s16le, 8000 Hz, 1 channels, 128 kb/s

Stream mapping:

Stream #0.0 -> #0.0

Could not write header for output file #0 (incorrect codec parameters ?)

Where in converting to .AVI (ffmpeg -i tempA.wav -acodec copy temp.avi) & .MOV (ffmpeg -i tempA.wav -acodec copy temp.mov) file formats works perfectly fine.

Answer

praks411 picture praks411 · Jul 15, 2013

I don't think mp4 container format support raw pcm audio. You will have to use either avi or mov. See wikipedia link for supported audio format for mp4 container

http://en.wikipedia.org/wiki/Comparison_of_container_formats

Also follow doom9 forum link.

http://forum.doom9.org/archive/index.php/t-140877.html

Official page

http://mpeg.chiariglione.org/standards/mpeg-4/audio