ffmpeg audio pts / dts C ++ [英] ffmpeg audio pts/dts C++

查看:221
本文介绍了ffmpeg audio pts / dts C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我试图理解ffmpeg中音频编码包中的pts值。



我检查了我的时基是1/44100



和一些pts值:70754080000,70759090000,背对背包数据值。



我不知道如何将其转换为实时。我会想象它与时间基础有关。



我认为数据包似乎每半秒进入一次,但不知道是怎么回事等于提供的数字。



任何帮助都将不胜感激。

Hi There

I am trying to understand the pts value in an audio encoded packet in ffmpeg.

I checked my timebase to be 1/44100

and some pts values : 70754080000, 70759090000, back to back packet pts values.

I dont know how to convert that to real time. I would imagine it having something to do with the time base.

I an se that the packets seem to be coming in every half a second, but not sure how that equates to the numbers provided.

Any help would be greatly appreciated.

推荐答案

阅读avformat。 h有:



read the avformat.h there stands:

/* AVPacket.pts, AVPacket.dts and AVPacket.duration timing information will be
 * set if known. They may also be unset (i.e. AV_NOPTS_VALUE for
 * pts/dts, 0 for duration) if the stream does not provide them. The timing
 * information will be in AVStream.time_base units, i.e. it has to be
 * multiplied by the timebase to convert them to seconds.*/





它是来自流的时间戳。



it are timestamps from the stream.


这篇关于ffmpeg audio pts / dts C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆