jdzyzh / mp4v2

Automatically exported from code.google.com/p/mp4v2
Other
0 stars 0 forks source link

I add a alaw audio to mp4 but it can't be recognized by any other player except vlc #134

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use a alaw pcm audio with 1 channel 8000 sample frequency,8 bits per sample
2. use MP4AddALawAudioTrack(mp4file,8000) API
3. use MP4SetTrackIntegerProperty( file,  audio, 
"mdia.minf.stbl.stsd.alaw.channels", 1) //to set a single audio channel 
4. use MP4SetTrackIntegerProperty( file,  audio, 
"mdia.minf.stbl.stsd.alaw.sampleSize", 8);  //to set sample size to 8bits.
 //It seems work,but not very well
5. MP4SetTrackIntegerProperty( file,  audio, "mdia.minf.stbl.stsz.sampleSize", 
1); //to set the sample size to 1 Byte. i'm not sure if it is needed

What is the expected output? What do you see instead?
I want the mp4 file to be played by mplayer or ffmpeg.
The bitrate I see in ffmpeg should be 64 kb/s and 8bits per sample.
However the bitrate ffmpeg shows is 102kb/s and is s16. the mp4 file only can 
be played by vlc and when I use vlc -vvv to play,some sample is dropped.

What version of the product are you using? On what operating system?
2.0.0 on windows 7,visual studio 2010

Please provide any additional information below.
I provide the src code,the pcm file and ffmpeg log.

Is there any body can help me to solve this problem?
Your help is very appreciated!

Original issue reported on code.google.com by zhihongb...@gmail.com on 5 Jun 2012 at 3:31

Attachments:

GoogleCodeExporter commented 8 years ago
It seems that the audio mp4 file is treated ad 16 bits per sample.which is 
8bits per sample actually

Original comment by zhihongb...@gmail.com on 5 Jun 2012 at 3:33