当前位置:网站首页>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 來遞長的。
边栏推荐
- Failed to virtualize table with JMeter
- [QNX hypervisor 2.2 user manual]6.3.2 configuring VM
- buuctf-pwn write-ups (9)
- About Estimation with Cross-Validation
- 修复漏洞 - mysql 、es
- [use electron to develop desktop on youqilin]
- Record a case of using WinDbg to analyze memory "leakage"
- 第十届全球云计算大会 | 华云数据荣获“2013-2022十周年特别贡献奖”
- Introduction to VC programming on "suggestions collection"
- About Statistical Power(统计功效)
猜你喜欢
Use JMeter to record scripts and debug
Privacy computing helps secure data circulation and sharing
华夏基金:基金行业数字化转型实践成果分享
Simulate the hundred prisoner problem
吴恩达团队2022机器学习课程,来啦
使用JMeter录制脚本并调试
Sophon autocv: help AI industrial production and realize visual intelligent perception
星环科技重磅推出数据要素流通平台Transwarp Navier,助力企业实现隐私保护下的数据安全流通与协作
buuctf-pwn write-ups (9)
Isprs2022 / Cloud Detection: Cloud Detection with Boundary nets Boundary Networks Based Cloud Detection
随机推荐
Generate classes from XML schema
ConvMAE(2022-05)
LeetCode 6111. 螺旋矩阵 IV
从类生成XML架构
第十届全球云计算大会 | 华云数据荣获“2013-2022十周年特别贡献奖”
nano的CAN通信
开户注册股票炒股安全吗?有没有风险的?靠谱吗?
Sophon CE社区版上线,免费Get轻量易用、高效智能的数据分析工具
matlab内建函数怎么不同颜色,matlab分段函数不同颜色绘图
Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
Sophon CE Community Edition is online, and free get is a lightweight, easy-to-use, efficient and intelligent data analysis tool
sample_ What is the relationship between rate, sample and duration
文章中的逻辑词
分享:中兴 远航 30 pro root 解锁BL magisk ZTE 7532N 8040N 9041N 刷机 刷面具原厂刷机包 root方法下载
【pm2详解】
《2022中国信创生态市场研究及选型评估报告》发布 华云数据入选信创IT基础设施主流厂商!
Sophon autocv: help AI industrial production and realize visual intelligent perception
How to solve the error "press any to exit" when deploying multiple easycvr on one server?
图像分类,看我就够啦!
第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制