I'm actually playing a MPEG video in C++ using ffmpeg. However, there is several video stream.
In my test video there is 4 videos streams with ids : 0, 16, 33, 49 and no audio stream. But formatContext->streams[i] give me only 2 streams : a video stream with PID 33 and an audio stream with PID 49 whereas there should be 4 videos streams ! It's the same with VLC (in the console we can see the 4 pids but there is only one video stream and one audio stream).
I'm sure my video contains 4 videos streams identified by these PID. I don't find how to get them with ffmpeg.
I try to read a mpeg2 video from a stream with ffmpeg library. In my first tests, I tried to read from a byte buffer, but now I read directly from a file (in my ReadPacket function) in order to be sure it's right data. I tried many way to do that, but av_open_input_stream function return always -1. I post my code here and hope someone could help me ! If someone have a full code to do that, i''ll be happy to see it. Thanks.
I have a C++ DLL which uses ffmepg to read a video. When it gets a picture, I transmit AVFrame (and put it to RGB24 format with sws_scale) to C# code thanks to a callback.
I try to display this picture with DirectX (Texture texture = Texture.FromMemory(..) ). When I convert the AVFrame to bmp, it's working but the image loses alpha canal. I would like use directly AVFrame->data but DirectX do not know how manage it !
Is someone knowning how to display an AVFrame in DirectX ?
I would like to display keyframe and the others frame.