[英]Using DirectX api to view h264 stream decoded by FFMPEG
I am trying to stream a video between two clients. 我正在尝试在两个客户端之间流式传输视频。
Client A shall upstream the video to a server in h264 format and Client B shall downstream it from the server. 客户端A应将视频以h264格式上传到服务器,客户端B应将其从服务器之后上传。 To downstream, I am using FFMPEG to decode the NAT over RTP packages. 对于下游,我正在使用FFMPEG来解码RTP包上的NAT。
My problem is that I must display the image using the DirectX API which requires parameters: 我的问题是我必须使用DirectX API来显示图像,该图像需要以下参数:
On the other hand, the resulting parameters from downstreaming with FFMPEG are SPS (Sequence Parameter Set) and PPS (Picture Parameter Set). 另一方面,从FFMPEG的下游得到的参数是SPS(序列参数集)和PPS(图片参数集)。
I assume that FFMPEG's PPS and DirectX's "picture parameters" are at least tangentially related, however I'm not sure how to obtain the remaining parameters ( bitstream
, quant_matrx
and slce_info
) from PPS and SPS. 我假设FFMPEG的PPS和DirectX的“图片参数”至少是切线相关的,但是我不确定如何从PPS和SPS获得其余参数( bitstream
, quant_matrx
和slce_info
)。
Any suggestions (barring those that send me back to Google whence I wearily trudge after two days worth of searches) are greatly appreciated. 非常感谢您提出的任何建议(除非那些建议让我在经过两天的搜索后疲惫不堪的情况下重新回到Google那里)。
Regards 问候
-E -E
Sounds like you're trying to use a DirectX interface that wants encoded video, not decoded video as you should be getting from ffmpeg. 听起来您正在尝试使用DirectX接口,该接口需要编码的视频,而不是解码的视频,而应该从ffmpeg获取。 You should have a series of decoded frames you need to simply display via DirectX/DirectShow. 您应该具有一系列需要通过DirectX / DirectShow简单显示的解码帧。
If you want to have DirectX and/or the video driver/hardware decode it, you need to find the right interface to submit it to. 如果您希望DirectX和/或视频驱动器/硬件对其进行解码,则需要找到正确的接口以提交给它。
I'm afraid your question is lacking in detail needed to give any better answer. 恐怕您的问题缺少提供更好答案的详细信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.