开发者

Using DirectX api to view h264 stream decoded by FFMPEG

开发者 https://www.devze.com 2023-03-03 23:08 出处:网络
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 us

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:

  1. bitstream
  2. picture parameters
  3. quantization matrix
  4. 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

-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. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号