带时间戳的音频和视频同步
我从网络接收音频数据包(每秒 4 个数据包,每个数据包 250 毫秒)和视频 - 15fps。一切都按照我自己的时间戳进行。我应该如何同步它们?我看过我们一位开发人员的源代码,但他确实根据音频同步视频。即,音频总是立即播放,视频可以被丢弃或缓冲。我认为这是不正确的,因为音频可能会超出视频一两秒 - 在这种情况下,我们根本不会有实际的视频帧。
我想了解一些同步方面的基础知识。应该缓冲什么?同步模式下的音频和视频是否应该在单独的线程中播放?任何线索都会受到重视!
多谢!
I receive audio packets from net (4 packets per second, 250ms each) and video - 15fps. Everything goes with my own timestamps. How should I sync them? I've seen the source code of one of our developers but he did syncing VIDEO according to audio. I.e. audio is always played immediately and video can be dropped or buffered. I don't think it is correct because audio can overrun video for a second or two - in that case we will not have actual video frames at all.
I'd like to know some basics in sync stuff. What should be buffered? Should audio and video in sync mode be played in separate thread(s)? Any clues would be regardful!
Thanks a lot!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我需要这样的东西 - http://www.freepatentsonline.com/7680153.html
漂亮很难理解,但我认为该专利解释了同步的基础知识。
I needed in smth like that - http://www.freepatentsonline.com/7680153.html
Pretty difficult to understand but I think this patent explains the basics of sync.