音频的基础知识参数分析

采样率

  • sample_rate: 44100

  • 采样率指一秒钟采集44100次

声道

  • channels: 2
  • 一般有左声道,右声道,声道数量越多采集出来的文件大小越大

样本大小(采样的格式)

  • sample_size/sample_fmt:
    • AV_SAMPLE_FMT_S16
    • AV_SAMPLE_FMT_S16P(planar样本类型,是平面存储的)
    • AV_SAMPLE_FMT_FLTP

一帧的数据量

  • nb_samples:1024 单通道样本数
  • 帧率的计算:44100/1024=43.066帧率
  • 一秒音频的大小:44100x2x2 = 172.26KB
  • 一帧音频的大小:1024x2x2 = 4096B
原文地址:https://www.cnblogs.com/fandx/p/12204048.html