当前位置:网站首页>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 來遞長的。
边栏推荐
- vulnhub之darkhole_2
- 第十届全球云计算大会 | 华云数据荣获“2013-2022十周年特别贡献奖”
- How to improve the thermal management in PCB design with the effective placement of thermal through holes?
- 项目中遇到的问题 u-parse 组件渲染问题
- 让更多港澳青年了解南沙特色文创产品!“南沙麒麟”正式亮相
- [QNX Hypervisor 2.2用户手册]6.3.2 配置VM
- 写作写作写作写作
- jdbc读大量数据导致内存溢出
- U-Net: Convolutional Networks for Biomedical Images Segmentation
- GIMP 2.10教程「建议收藏」
猜你喜欢

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

Wu Enda team 2022 machine learning course, coming

寻找第k小元素 前k小元素 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!

ISPRS2022/雲檢測:Cloud detection with boundary nets基於邊界網的雲檢測

vulnhub之darkhole_2

JVM third talk -- JVM performance tuning practice and high-frequency interview question record

Nanjing University: Discussion on the training program of digital talents in the new era

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

LeetCode 6109. 知道秘密的人数
随机推荐
第十一届中国云计算标准和应用大会 | 云计算国家标准及白皮书系列发布 华云数据全面参与编制
关于服装ERP,你想知道的都在这里了
小白入门NAS—快速搭建私有云教程系列(一)[通俗易懂]
Is it safe to open an account, register and dig money? Is there any risk? Is it reliable?
Vulnhub's darkhole_ two
彻底理解为什么网络 I/O 会被阻塞?
[paddleclas] common commands
让更多港澳青年了解南沙特色文创产品!“南沙麒麟”正式亮相
What is the reason why the video cannot be played normally after the easycvr access device turns on the audio?
[PM2 details]
FCN: Fully Convolutional Networks for Semantic Segmentation
通过SOCKS代理渗透整个内网
苹果手机炒股安全吗?打新债是骗局吗?
如何获取飞机穿过雷达两端的坐标
ConvMAE(2022-05)
开户注册挖财安全吗?有没有风险的?靠谱吗?
Introduction to the development function of Hanlin Youshang system of Hansheng Youpin app
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!
【在优麒麟上使用Electron开发桌面应】
《2022中国信创生态市场研究及选型评估报告》发布 华云数据入选信创IT基础设施主流厂商!