cropsly / ffmpeg-android

FFmpeg for Android compiled with x264, libass, fontconfig, freetype, fribidi and lame (Supports Android 4.1+)
http://writingminds.github.io/ffmpeg-android/
Other
1.63k stars 415 forks source link

pcm to mp3 with sampling rates of 16000 #54

Open maoai-xianyu opened 7 years ago

maoai-xianyu commented 7 years ago

“-y -ac 1 -ar 8000 -f s16le -i xxx.pcm -acodec libmp3lame -ab 128K yyyy.mp3 ” I use sampling rates of 8000, PCM covert mp3 is right. When I use sampling rates of 16000, PCM covert mp3 is wrong. How can I fix it. Please help me. How can I change the code.

maoai-xianyu commented 7 years ago

"-y -ac 1 -ar 16000 -f s16le -i xxx.pcm -c:a libmp3lame -q:a 2 yyy.mp3"

lessismore100 commented 7 years ago

ffmpeg -f s16be -ar 44.1k -ac 1 -i input.pcm -ar 16k output.mp3

hope help you