当前位置:网站首页>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 來遞長的。
边栏推荐
- What is the reason why the video cannot be played normally after the easycvr access device turns on the audio?
- 【HCIA-cloud】【1】云计算的定义、什么是云计算、云计算的架构与技术说明、华为云计算产品、华为内存DDR配置工具说明
- JDBC reads a large amount of data, resulting in memory overflow
- [QNX Hypervisor 2.2用户手册]6.3.2 配置VM
- The easycvr platform reports an error "ID cannot be empty" through the interface editing channel. What is the reason?
- ClickHouse(03)ClickHouse怎么安装和部署
- Let more young people from Hong Kong and Macao know about Nansha's characteristic cultural and creative products! "Nansha kylin" officially appeared
- Check namespaces and classes
- 英语句式参考
- Record a case of using WinDbg to analyze memory "leakage"
猜你喜欢

Simulate the hundred prisoner problem

FCN: Fully Convolutional Networks for Semantic Segmentation

How to obtain the coordinates of the aircraft passing through both ends of the radar
![Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]](/img/b2/d019c3f0b85a6c0d334a092fa6c23c.png)
Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]

Let more young people from Hong Kong and Macao know about Nansha's characteristic cultural and creative products! "Nansha kylin" officially appeared

To solve the stubborn problem of Lake + warehouse hybrid architecture, xinghuan Technology launched an independent and controllable cloud native Lake warehouse integrated platform

Sophon KG升级3.1:打破数据间壁垒,解放企业生产力

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

vulnhub之darkhole_2

修复漏洞 - mysql 、es
随机推荐
[use electron to develop desktop on youqilin]
吳恩達團隊2022機器學習課程,來啦
[QNX Hypervisor 2.2用户手册]6.3.2 配置VM
vulnhub之darkhole_2
Matlab built-in function how different colors, matlab subsection function different colors drawing
《2022中国信创生态市场研究及选型评估报告》发布 华云数据入选信创IT基础设施主流厂商!
小林coding的内存管理章节
Image classification, just look at me!
ISPRS2022/雲檢測:Cloud detection with boundary nets基於邊界網的雲檢測
Introduction to Resampling
Huaxia Fund: sharing of practical achievements of digital transformation in the fund industry
ConvMAE(2022-05)
Sophon kg upgrade 3.1: break down barriers between data and liberate enterprise productivity
[paddleclas] common commands
Sophon autocv: help AI industrial production and realize visual intelligent perception
[utiliser Electron pour développer le Bureau sur youkirin devrait]
使用Jmeter虚拟化table失败
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!
集群部署如何解决海量视频接入与大并发需求?
数值计算方法 Chapter8. 常微分方程的数值解