当前位置:网站首页>sample_ What is the relationship between rate, sample and duration
sample_ What is the relationship between rate, sample and duration
2022-07-05 18:19:00 【hjjdebug】
sample_rate( Sampling rate ),sample( sampling ),duration( Duration ) What's the relationship
It is found that an audio packet is broken into a frame after , Here's the data
nb_samples = 1024
sample_rate = 48000
pkt_duration = 1920
pkt_size = 427
What is the relationship between these values ?
pkt_size = 427 Indicates that the size of the audio compression package is 427 bytes
nb_samples = 1024 It means that after decoding 1024 Sample data
sample_rate = 48000 It means that it needs to be broadcast every second 48K data
pkt_duration = 1920
sample_rate: Sampling rate , Samples per second 48000HZ, Every sample The time is 1/48000 second
nb_samples: Number of samples
Audio playback time , nb_samples The time that the sampling point can play
duration_s=nb_samples*(1/48000) second ,
duration The unit of is not seconds , It's not milliseconds , It is AVStream Number of time bases .
duration=duration_s / av_q2d(st->time_base)
st->time_base yes (1,90k), be av_q2d=1/90k
therefore duration It's actually the number of seconds multiplied by 90K
be :
duration = 1024 * 1/48K *90K = 1920
special case : If you make st->time_base == sample_rate,
be duration=nb_samples.
in addition , pts Is in accordance with the duration To deliver long .
边栏推荐
- JDBC reads a large amount of data, resulting in memory overflow
- Generate XML schema from class
- 消除`if()else{ }`写法
- Nanjing University: Discussion on the training program of digital talents in the new era
- Eliminate the writing of 'if () else{}'
- Sibling components carry out value transfer (there is a sequence displayed)
- Le cours d'apprentissage de la machine 2022 de l'équipe Wunda arrive.
- Image classification, just look at me!
- vulnhub之darkhole_2
- 破解湖+仓混合架构顽疾,星环科技推出自主可控云原生湖仓一体平台
猜你喜欢
nacos -分布式事务-Seata** linux安装jdk ,mysql5.7启动nacos配置ideal 调用接口配合 (保姆级细节教程)
Leetcode exercise - 206 Reverse linked list
How to obtain the coordinates of the aircraft passing through both ends of the radar
About Estimation with Cross-Validation
[JMeter] advanced writing method of JMeter script: all variables, parameters (parameters can be configured by Jenkins), functions, etc. in the interface automation script realize the complete business
U-Net: Convolutional Networks for Biomedical Images Segmentation
Tencent music launched its new product "quyimai", which provides music commercial copyright authorization
Isprs2022 / Cloud Detection: Cloud Detection with Boundary nets Boundary Networks Based Cloud Detection
第十一届中国云计算标准和应用大会 | 华云数据成为全国信标委云计算标准工作组云迁移专题组副组长单位副组长单位
vulnhub之darkhole_2
随机推荐
Simulate the hundred prisoner problem
Let more young people from Hong Kong and Macao know about Nansha's characteristic cultural and creative products! "Nansha kylin" officially appeared
ISPRS2020/云检测:Transferring deep learning models for cloud detection between Landsat-8 and Proba-V
Whether to take a duplicate subset with duplicate elements [how to take a subset? How to remove duplicates?]
吳恩達團隊2022機器學習課程,來啦
消除`if()else{ }`写法
项目中遇到的问题 u-parse 组件渲染问题
Matlab built-in function how different colors, matlab subsection function different colors drawing
Notes on common management commands of openshift
[performance test] full link voltage test
模拟百囚徒问题
深拷贝与浅拷贝【面试题3】
buuctf-pwn write-ups (9)
访问数据库使用redis作为mysql的缓存(redis和mysql结合)
EasyCVR平台通过接口编辑通道出现报错“ID不能为空”,是什么原因?
破解湖+仓混合架构顽疾,星环科技推出自主可控云原生湖仓一体平台
Failed to virtualize table with JMeter
【PaddleClas】常用命令
使用Jmeter虚拟化table失败
Huaxia Fund: sharing of practical achievements of digital transformation in the fund industry