i'm in the process of deciding how to decode received video frames, based on the following:
1. platform is Windows.
2. frames are encoded in H264 or H265.
3. GPU should be used as much
4. certainly we prefer less coding and simplest code. we just need to decode and show the result on screen. no recording is required, not anything else.
still i'm a newbie, but i think one may decode a frame directly by directx or through ffmpeg. am i right?
if so, which one is preferred?
+ Reply to Thread
Results 1 to 9 of 9
Thanks for your reply.
In another words, you say that ffmpeg supports 'some' libraries, or better to say, has imported them which decode by using GPU's, but it doesn't use or support GPU's directly?
If so, isn't it better to use DXVA library directly by using Windows Media Foundation library?
And if so, what's the difference between DirectDraw, DirectShow, DirectX and WMF?
Sorry that I know so little about these.
By GPU i understand main graphic core that can perform also (if designed in such way) general class of computations.
CUDA, Vulkan, OpenCL are usually using those Compute Units and in theory if you are using OpenCl or Vulkan then program can be vendor independent.
Ffmpeg looks at first as ready to use solution but you may find ffmpeg as unsuitable from some reason - hard to say - for sure ffmpeg is self sufficient where Direct xyz need to be used trough created by you codea .
So I deduce that Direct? is not as ready solution as ffmpeg is. Is it correct?
As a programmer, my convenience is not to code much, because my business is something else, and this is just a barrier to overcome. I prefer ready solutions, but I should consider some other factors too, like:
1. I don't need my code to be portable. I know that my application will run on a Windows machine and the Windows version is not before 7.
2. I like it to be fastest solution and use less CPU/GPU. When needed, GPU be used instead.
3. Using ffmpeg needs installing/including some additional prerequisites, while Direct? (still I don't know Direct what! ) is already installed with Windows.
4. By using DirectX (this X differs ), I'm not using any third party component.
5. FFmpeg may facilitate. If so, I should decide. But, does it?
6. I'm newbie in both. So I should begin with either one. If so, which one is more straight-forward?
I hope we'll find the right way together with your guides.
Once again - using VPU's is HW dependent - even different VPU's generations may provide less functionality (older more limited).
There is unique signal flow for every API. If your goal is just display video then perhaps ffmpeg (ffplay) may be some limit... as pointed by JVRaines - this is not easy choice. Perhaps instead ffmpeg something like mpv may be helpful to you... Looks like some API is available https://github.com/mpv-player/mpv/blob/master/libmpv/client.h
Note that the player should be ready to get frames from the application, not directly from a stream url. We send some metadata from server to client as well as the frames. I'll investigate about mpv though, but I think it's a ready to use solution which gets frame from a stream directly and doesn't expect it to include any unknown data.
Besides, let me know your opinion about using DirectX in comparison to mpv.