zoukankan      html  css  js  c++  java
  • 安卓音频处理相关资料集合贴

    ## 1 音频处理基础知识

    ### 1.1 文件格式和编码之间的关系

    首先需要说明的是,文件格式和编码之间的关系如同碗与烹饪手法之间的关系。
    文件格式只代表一个容器,这个容器可以包含视频或者音频,以及头文件信息,脚本等之类的数据。
    一般来说一个特定容器容纳的数据都是有一定范围的。
    比如MP4,其文件中存储的通常是MPEG-4编码的数据。
    又比如WAV,其文件中存储的是原始的PCM数据文件,同时附加了一个44字节的媒体信息描述。但是除此之外,WAV文件中也可以包含MP3编码的数据。

    ### 1.2 声音是什么

    声音是物体震动所产生的“波”。它是能量的传播方式。
    声音包括三个特征:响度、音调、音色。而录音,则是通过将空气中的声音,还原为震动,然后将震动的幅度,频率,记录下来。

    [脉冲编码调制PCM原理看这里](http://blog.chinaunix.net/uid-11572501-id-3309833.html)

    ### 1.3 为什么要压缩

    为啥要压缩呢?很简单,录制的原始文件太大。
    PCM的大小可以按照以下公式计算:采样率 * 比特率 * 声道数 * 录制时间
    一般来说,我们是按照44100的采样率录制音频的(为什么是44100,我们暂且认为这是一个经验数值,超过这个数值,人耳已经无法区分好坏)。比特率则指的是存储每一帧数据所需要的数据量一般是16bit。
    按照上面的公式一个1min的视频占用空间是: 44100 * 16 * 2 * 60 = 84672000 bit
    换算出来就是超过10M,这个尺寸显然过于庞大。于是为了减少存储空间,人们开始想出了各种压缩办法。

    ### 1.4 压缩原理简述

    因为声音是由各种音波叠加形成的。而单个音波本身是可以函数化的。也就是类似于咱们在坐标图上画正弦函数一样。要记录这个图像,可以把每个点都描记下来,当需要重现图形时,一个点一个点的对照描出来;而另一张方法则是直接记住正弦函数,当需要重现图形时,只需要按照函数重新绘制即可。很显然记录函数远比记录每一个数据点要来的省时省力的多。
    音频压缩的原理也是这样。通过一系列的编码操作,把录制的声音信号转换为一个一个的波形函数的叠加。这样使得文件占用空间大大减少。但是同样的,由于重建函数的过程,很难百分之百完全重建成原始波形函数,一般都只是相似而已,所以压缩算法压缩出来的音频和真实的音频会存在一定的差异。也就是说,不存在真正的无损压缩,现在标榜的无损压缩算法,也仅可以说是无限接近真实意义上的“无损”而已。

    参考:
    [音频格式,编码,解码 相关知识](http://www.cnblogs.com/doit8791/archive/2012/06/02/2532382.html)

    [音频基础知识](http://bbs.poptp.net/network-t-18209)

    [音频基础知识2](http://ce.sysu.edu.cn/hope2008/beautydesign/ShowArticle.asp?ArticleID=2232)

    [脉冲编码调制PCM原理](http://blog.chinaunix.net/uid-11572501-id-3309833.html)


    ## 2 lame库相关资料

    LAME是LAME Ain't an MP3 Encoder的缩写,开源并且免费的,公认最强大也是当今最流行的MP3压缩引擎

    [lame主页](http://lame.sourceforge.net/links.php)

    [ios下使用lame压缩](http://ikinglai.blog.51cto.com/6220785/1228309)

    [lame 解码](http://blog.sina.com.cn/s/blog_648d306d0100sl2o.html)

    [*lame JNI引用及demo](http://developer.samsung.com/technical-doc/view.do;jsessionid=f9yXJh2M1VCCTpN2dHHVYq8ShXPBBSJ15YXQyv2HDs3LGvjyTKzv!1229459487?v=T000000090)

    [*lame 编解码示例](http://www.codeproject.com/Articles/656543/The-LAME-wrapper-An-audio-converter)

    [libmp3lame >= 3.98.3 not found](https://forum.videolan.org/viewtopic.php?f=32&t=82771)

    [lame 移植到安卓](http://blog.sina.com.cn/s/blog_936739790101b1ag.html)

    标*的为比较重要的资料

    ## 3 AAC编码解码

    http://blog.csdn.net/sunnylgz/article/details/7676340

    http://blog.csdn.net/axdc_qa_team/article/details/4271043

    如何创建AAC头部信息
    http://stackoverflow.com/questions/18862715/how-to-generate-the-aac-adts-elementary-stream-with-android-mediacodec

    AAC解码:
    faad解码器
    http://www.audiocoding.com/faad2.html
    FAAC中文
    http://blog.csdn.net/poechant/article/details/7435054
    一个FAAC JNI库
    http://bashell.sinaapp.com/voaacencoder
    系统默认解码器
    http://www.itstrike.cn/Question/fb391992-0a92-46c3-959e-fb18a3133c84.html
    基于OpenCore的解码库
    https://code.google.com/p/aacdecoder-android/downloads/detail?name=aacdecoder-android-libs-0.8.zip&can=2&q=
    https://github.com/vbartacek/aacdecoder-android

    https://github.com/timsu/android-aac-enc

    http://www.iis.fraunhofer.de/en/ff/amm/impl/fdkaaccodec.html


    ## 4 SOX资料

    sox for android
    http://stackoverflow.com/questions/18851214/how-to-use-sox-in-android
    sox android lib
    http://www.bytebucket.org/LukeLu1263/sox-android-lib/src/79764fdb30e8/sox-linux-armeabi-simple-dynamic/?at=master
    一个基于sox的播放器
    https://github.com/Kyborg2011/SoxPlayer


    ## 5 混音算法


    混音算法介绍
    http://dsp.stackexchange.com/questions/3581/algorithms-to-mix-audio-signals-without-clipping

    噪音处理:http://stackoverflow.com/questions/15450448/noise-removal-from-a-recorded-audio-file-in-android?rq=1


    http://stackoverflow.com/questions/19021484/how-to-remove-noise-mix-audio-in-android

    http://blog.csdn.net/wocao1226/article/details/17580849

    改进的混音算法
    http://wenku.baidu.com/view/46cd4b0ef12d2af90242e631.html
    http://blog.csdn.net/messagebox/article/details/3482244

    http://blog.csdn.net/wocao1226/article/details/17549621视频会议混音算法

    http://www.oschina.net/p/audiokit

    混音处理关键文章
    http://stackoverflow.com/questions/18750892/merging-two-wave-files-on-android-concatenate

    http://mobilengineering.blogspot.com/2012_06_01_archive.html

    https://github.com/jitsi/libjitsi/tree/master/lib

    混音,+打分
    http://blog.csdn.net/h3c4lenovo/article/details/8099550

    混音
    http://stackoverflow.com/questions/16766248/mix-audio-in-android
    http://stackoverflow.com/questions/13228196/audio-song-mixer-in-android-programatically

    https://code.google.com/p/mobikar/source/browse/mobiKAR/archive/tmp/src/MixingAudioInputStream.java?r=13

    http://stackoverflow.com/questions/18750892/merging-two-wave-files-on-android-concatenate

    ## 6 SoundTouch相关资料

    soundTouch 音频处理库
    http://www.surina.net/soundtouch/download.html

    android端
    https://github.com/nonameentername/soundtouch-android
    https://github.com/svenoaks/SoundTouch-Android

    ## 7 Speex

    speex音频处理
    http://blog.csdn.net/xyz_lmn/article/details/8013490

    speex算法在android上的移植
    http://blog.csdn.net/zkw12358/article/details/25339003

    ## 8 Libmad

    libmad 音频处理
    http://blog.csdn.net/lishaoqi_scau/article/details/8568967


    mad解码
    http://blog.csdn.net/ahyswang/article/details/7748344

    ## 9 采样率转换Resample

    邮件列表libsamplerate vs. libresample
    http://sourceforge.net/p/audacity/mailman/message/24262084/
    libresample 移植
    https://github.com/intervigilium/libresample

    pcm降低采样率
    http://stackoverflow.com/questions/11257447/pcm-downsampling-input-frames-output-frames-vs-buffer-size?rq=1

    http://www.mega-nerd.com/SRC/api_full.html#Process

    http://www.mega-nerd.com/SRC/
    音频处理resample

    https://ccrma.stanford.edu/~jos/resample/Free_Resampling_Software.html

    https://github.com/lsjwzh/JSSRC

    http://shibatch.sourceforge.net/

    http://stackoverflow.com/questions/4009737/library-for-audio-resampling

    http://tdistler.com/2010/07/22/audio-resampling-using-ffmpeg-avcodec

    http://www.mega-nerd.com/SRC/
    https://github.com/xxDroid/libsamplerate-android
    http://stackoverflow.com/questions/17785499/how-to-convert-44100-stereo-to-11025-mono-programmatically

    http://sourceforge.net/projects/soxr/

    http://kokkinizita.linuxaudio.org/linuxaudio/zita-resampler/resampler.html
    https://github.com/simingweng/android-pcm-resample


    http://stackoverflow.com/questions/3260424/resample-upsample-sound-frames-from-8khz-to-48khz-java-android


    https://github.com/dnault-laszlo/libresample4j

    ## 10 其他

    音色重现工具:
    http://www.asel.udel.edu/speech/InvTutor/


    安卓 音频处理库
    http://google-opensource.blogspot.com/2013/09/patchfield-for-android.html

    http://libpd.cc/

    音频处理集合
    http://jackaudio.org/applications/

    iOS 转码
    http://www.cnblogs.com/ios8/p/IOS-PCM-MP3.html

    语音识别

    http://cmusphinx.sourceforge.net/

  • 相关阅读:
    22.json&pickle&shelve
    22.BASE_DIR,os,sys
    21.time和random
    21.模块的执行以及__name__
    21.python的模块(Module)和包(Package)
    21. 对文件进行查询修改等操作
    20.装饰器和函数闭包
    19.python基础试题(三)
    19.生产者消费者模型
    19.yield和send的区别
  • 原文地址:https://www.cnblogs.com/lsjwzh/p/4361457.html
Copyright © 2011-2022 走看看