I am trying to stream a video between t开发者_运维问答wo clients.
Client A shall upstream the video to a server in h264 format and Client B shall downstream it from the server. To downstream, I am using FFMPEG to decode the NAT over RTP packages.
My problem is that I must display the image using the DirectX API which requires parameters:
- bitstream
- picture parameters
- quantization matrix
- slice info.
On the other hand, the resulting parameters from downstreaming with FFMPEG are SPS (Sequence Parameter Set) and PPS (Picture Parameter Set).
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.
Any suggestions (barring those that send me back to Google whence I wearily trudge after two days worth of searches) are greatly appreciated.
Regards
-ESounds like you're trying to use a DirectX interface that wants encoded video, not decoded video as you should be getting from ffmpeg. You should have a series of decoded frames you need to simply display via 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.
I'm afraid your question is lacking in detail needed to give any better answer.
精彩评论