当前位置:网站首页>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 來遞長的。
边栏推荐
- Wu Enda team 2022 machine learning course, coming
- Gimp 2.10 tutorial "suggestions collection"
- New words new words new words new words [2]
- LeetCode 6111. 螺旋矩阵 IV
- [BeanShell] there are many ways to write data locally
- Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]
- 南京大学:新时代数字化人才培养方案探讨
- 小林coding的内存管理章节
- About Statistical Power(统计功效)
- Find the first k small element select_ k
猜你喜欢

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!

Thoroughly understand why network i/o is blocked?

Memory management chapter of Kobayashi coding

Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity

Sophon Base 3.1 推出MLOps功能,为企业AI能力运营插上翅膀

Vulnhub's darkhole_ two

Use JMeter to record scripts and debug

模拟百囚徒问题

第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制

ISPRS2022/雲檢測:Cloud detection with boundary nets基於邊界網的雲檢測
随机推荐
node_ Exporter memory usage is not displayed
Image classification, just look at me!
如何获取飞机穿过雷达两端的坐标
Matlab built-in function how different colors, matlab subsection function different colors drawing
记一次使用Windbg分析内存“泄漏”的案例
Xiaobai getting started with NAS - quick building private cloud tutorial series (I) [easy to understand]
Simulate the hundred prisoner problem
多线程(一) 进程与线程
Sophon base 3.1 launched mlops function to provide wings for the operation of enterprise AI capabilities
星环科技重磅推出数据要素流通平台Transwarp Navier,助力企业实现隐私保护下的数据安全流通与协作
[use electron to develop desktop on youqilin]
第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制
检查命名空间和类
从XML架构生成类
Copy the linked list with random pointer in the "Li Kou brush question plan"
【pm2详解】
【HCIA-cloud】【1】云计算的定义、什么是云计算、云计算的架构与技术说明、华为云计算产品、华为内存DDR配置工具说明
Maximum artificial island [how to make all nodes of a connected component record the total number of nodes? + number the connected component]
Einstein sum einsum
个人对卷积神经网络的理解