Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何按照固定帧率播放视频? #1

Open
wujilingfeng opened this issue May 11, 2021 · 2 comments
Open

如何按照固定帧率播放视频? #1

wujilingfeng opened this issue May 11, 2021 · 2 comments

Comments

@wujilingfeng
Copy link

wujilingfeng commented May 11, 2021

我按照这个教程知道了怎么解析一个个图片。
我现在想知道怎么按照视频规定的帧率播放视频。

我是要读取AVPacket结构体的pts变量,然后根据这个变量自己控制解析和渲染图片的间隔?

@douzhongqiang
Copy link
Owner

我是这么做的,缓存一部分音频和视频的Frame。然后根据音频播放去同步视频的显示。
或者你内部有一个自己的时间,音视频都去同步它。

@wujilingfeng
Copy link
Author

谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants