简体   繁体   中英

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM