当前位置:网站首页>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 來遞長的。
边栏推荐
- LeetCode 6111. 螺旋矩阵 IV
- Sibling components carry out value transfer (there is a sequence displayed)
- Introduction to Resampling
- [PM2 details]
- buuctf-pwn write-ups (9)
- Introduction to VC programming on "suggestions collection"
- 星环科技重磅推出数据要素流通平台Transwarp Navier,助力企业实现隐私保护下的数据安全流通与协作
- English sentence pattern reference
- EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
- Failed to virtualize table with JMeter
猜你喜欢

Vulnhub's darkhole_ two

让更多港澳青年了解南沙特色文创产品!“南沙麒麟”正式亮相

How to obtain the coordinates of the aircraft passing through both ends of the radar

Thoroughly understand why network i/o is blocked?

Image classification, just look at me!

Record a case of using WinDbg to analyze memory "leakage"

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

Fix vulnerability - mysql, ES

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

Star Ring Technology launched transwarp Navier, a data element circulation platform, to help enterprises achieve secure data circulation and collaboration under privacy protection
随机推荐
Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]
Sophon base 3.1 launched mlops function to provide wings for the operation of enterprise AI capabilities
彻底理解为什么网络 I/O 会被阻塞?
Easynmon Usage Summary
New words new words new words new words [2]
Record a case of using WinDbg to analyze memory "leakage"
【在優麒麟上使用Electron開發桌面應】
Is it safe to open an account and register stocks for stock speculation? Is there any risk? Is it reliable?
Sophon autocv: help AI industrial production and realize visual intelligent perception
分享:中兴 远航 30 pro root 解锁BL magisk ZTE 7532N 8040N 9041N 刷机 刷面具原厂刷机包 root方法下载
模拟百囚徒问题
集群部署如何解决海量视频接入与大并发需求?
MATLAB中print函数使用
Crontab 日志:如何记录我的 Cron 脚本的输出
ISPRS2022/雲檢測:Cloud detection with boundary nets基於邊界網的雲檢測
About Statistical Power(统计功效)
OpenShift常用管理命令杂记
The easycvr platform reports an error "ID cannot be empty" through the interface editing channel. What is the reason?
Logical words in Articles
How to solve the error "press any to exit" when deploying multiple easycvr on one server?