当前位置:网站首页>sample_rate(采樣率),sample(采樣),duration(時長)是什麼關系
sample_rate(采樣率),sample(采樣),duration(時長)是什麼關系
2022-07-05 18:22:00 【hjjdebug】
sample_rate(采樣率),sample(采樣),duration(時長)是什麼關系
發現一個音頻包解開成一個frame 後,有如下數據
nb_samples = 1024
sample_rate = 48000
pkt_duration = 1920
pkt_size = 427
這些數值到底是什麼關系?
pkt_size = 427 錶示音頻壓縮包的大小為427 bytes
nb_samples = 1024 錶示解碼後得到了1024個采樣數據
sample_rate = 48000 錶示每秒鐘需要播出48K 數據
pkt_duration = 1920
sample_rate:采樣率, 每秒采樣次數 48000HZ,每個sample的時間是1/48000秒
nb_samples: 采樣次數
音頻播放時間, nb_samples 采樣點所能播放的時間
duration_s=nb_samples*(1/48000)秒,
duration 的單比特即不是秒,也不是毫秒,而是AVStream 時基的個數.
duration=duration_s / av_q2d(st->time_base)
st->time_base 是 (1,90k), 則av_q2d=1/90k
所以duration 實際是秒數乘以90K
則:
duration = 1024 * 1/48K *90K = 1920
特例: 如果令st->time_base == sample_rate,
則duration=nb_samples.
另外, pts 是按 duration 來遞長的。
边栏推荐
- Record a case of using WinDbg to analyze memory "leakage"
- 让更多港澳青年了解南沙特色文创产品!“南沙麒麟”正式亮相
- Privacy computing helps secure data circulation and sharing
- 吳恩達團隊2022機器學習課程,來啦
- 文章中的逻辑词
- 数值计算方法 Chapter8. 常微分方程的数值解
- 星环科技数据安全管理平台 Defensor重磅发布
- Vulnhub's darkhole_ two
- GIMP 2.10教程「建议收藏」
- How to obtain the coordinates of the aircraft passing through both ends of the radar
猜你喜欢

buuctf-pwn write-ups (9)

【HCIA-cloud】【1】云计算的定义、什么是云计算、云计算的架构与技术说明、华为云计算产品、华为内存DDR配置工具说明

《2022中国信创生态市场研究及选型评估报告》发布 华云数据入选信创IT基础设施主流厂商!

Find the first k small element select_ k

node_ Exporter memory usage is not displayed

Vulnhub's darkhole_ two

Nacos distributed transactions Seata * * install JDK on Linux, mysql5.7 start Nacos configure ideal call interface coordination (nanny level detail tutorial)

吴恩达团队2022机器学习课程,来啦

buuctf-pwn write-ups (9)

Star ring technology data security management platform defender heavy release
随机推荐
Einstein sum einsum
Introduction to Resampling
LeetCode 6109. 知道秘密的人数
小林coding的内存管理章节
About statistical power
Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
苹果手机炒股安全吗?打新债是骗局吗?
模拟百囚徒问题
GIMP 2.10教程「建议收藏」
New words new words new words new words [2]
matlab内建函数怎么不同颜色,matlab分段函数不同颜色绘图
最大人工岛[如何让一个连通分量的所有节点都记录总节点数?+给连通分量编号]
node_exporter内存使用率不显示
访问数据库使用redis作为mysql的缓存(redis和mysql结合)
Vulnhub's darkhole_ two
rust统计文件中单词出现的次数
Copy the linked list with random pointer in the "Li Kou brush question plan"
EasyCVR接入设备开启音频后,视频无法正常播放是什么原因?
sample_ What is the relationship between rate, sample and duration
小白入门NAS—快速搭建私有云教程系列(一)[通俗易懂]