当前位置:网站首页>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 來遞長的。
边栏推荐
- sample_ What is the relationship between rate, sample and duration
- The 2022 China Xinchuang Ecological Market Research and model selection evaluation report released that Huayun data was selected as the mainstream manufacturer of Xinchuang IT infrastructure!
- OpenShift常用管理命令杂记
- Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.
- buuctf-pwn write-ups (9)
- 记录Pytorch中的eval()和no_grad()
- Memory management chapter of Kobayashi coding
- Star ring technology data security management platform defender heavy release
- Generate XML schema from class
- Einstein sum einsum
猜你喜欢
吴恩达团队2022机器学习课程,来啦
隐私计算助力数据的安全流通与共享
第十届全球云计算大会 | 华云数据荣获“2013-2022十周年特别贡献奖”
Find the first k small element select_ k
Sophon AutoCV:助力AI工业化生产,实现视觉智能感知
最大人工岛[如何让一个连通分量的所有节点都记录总节点数?+给连通分量编号]
Copy the linked list with random pointer in the "Li Kou brush question plan"
让更多港澳青年了解南沙特色文创产品!“南沙麒麟”正式亮相
图扑软件数字孪生 | 基于 BIM 技术的可视化管理系统
Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]
随机推荐
GIMP 2.10教程「建议收藏」
Record eval() and no in pytoch_ grad()
Let more young people from Hong Kong and Macao know about Nansha's characteristic cultural and creative products! "Nansha kylin" officially appeared
LeetCode 6109. 知道秘密的人数
Penetrate the whole intranet through socks agent
Writing writing writing
[use electron to develop desktop on youqilin]
Nacos distributed transactions Seata * * install JDK on Linux, mysql5.7 start Nacos configure ideal call interface coordination (nanny level detail tutorial)
瀚升优品app翰林优商系统开发功能介绍
Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.
使用Jmeter虚拟化table失败
【HCIA-cloud】【1】云计算的定义、什么是云计算、云计算的架构与技术说明、华为云计算产品、华为内存DDR配置工具说明
OpenShift常用管理命令杂记
Electron安装问题
[utiliser Electron pour développer le Bureau sur youkirin devrait]
The 2022 China Xinchuang Ecological Market Research and model selection evaluation report released that Huayun data was selected as the mainstream manufacturer of Xinchuang IT infrastructure!
金太阳开户安全吗?万一免5开户能办理吗?
访问数据库使用redis作为mysql的缓存(redis和mysql结合)
Sibling components carry out value transfer (there is a sequence displayed)
nacos -分布式事务-Seata** linux安装jdk ,mysql5.7启动nacos配置ideal 调用接口配合 (保姆级细节教程)