当前位置:网站首页>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 來遞長的。
边栏推荐
- 隐私计算助力数据的安全流通与共享
- ConvMAE(2022-05)
- pytorch yolov5 训练自定义数据
- Is it safe for golden sun to open an account? Can I open an account free of 5 in case?
- Nanjing University: Discussion on the training program of digital talents in the new era
- LeetCode笔记:Weekly Contest 300
- [use electron to develop desktop on youqilin]
- Penetrate the whole intranet through socks agent
- ClickHouse(03)ClickHouse怎么安装和部署
- Wu Enda team 2022 machine learning course, coming
猜你喜欢

破解湖+仓混合架构顽疾,星环科技推出自主可控云原生湖仓一体平台

Isprs2022 / Cloud Detection: Cloud Detection with Boundary nets Boundary Networks Based Cloud Detection

JVM第三话 -- JVM性能调优实战和高频面试题记录

南京大学:新时代数字化人才培养方案探讨

rust统计文件中单词出现的次数

Privacy computing helps secure data circulation and sharing

About statistical power

华夏基金:基金行业数字化转型实践成果分享

小林coding的内存管理章节

The 11th China cloud computing standards and Applications Conference | cloud computing national standards and white paper series release, and Huayun data fully participated in the preparation
随机推荐
JVM第三话 -- JVM性能调优实战和高频面试题记录
【在優麒麟上使用Electron開發桌面應】
第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制
英语句式参考
sample_rate(采样率),sample(采样),duration(时长)是什么关系
LeetCode 6109. 知道秘密的人数
爱因斯坦求和einsum
LeetCode 6111. 螺旋矩阵 IV
sample_ What is the relationship between rate, sample and duration
【HCIA-cloud】【1】云计算的定义、什么是云计算、云计算的架构与技术说明、华为云计算产品、华为内存DDR配置工具说明
第十一届中国云计算标准和应用大会 | 华云数据成为全国信标委云计算标准工作组云迁移专题组副组长单位副组长单位
Electron installation problems
nacos -分布式事务-Seata** linux安装jdk ,mysql5.7启动nacos配置ideal 调用接口配合 (保姆级细节教程)
Introduction to Resampling
Isprs2022 / Cloud Detection: Cloud Detection with Boundary nets Boundary Networks Based Cloud Detection
U-Net: Convolutional Networks for Biomedical Images Segmentation
EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
[use electron to develop desktop on youqilin]
Copy the linked list with random pointer in the "Li Kou brush question plan"
Tupu software digital twin | visual management system based on BIM Technology