VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    hi
    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?
    Quote Quote  
  2. AFAIK ffmpeg doesn't offer GPU decoding (but i can imagine OpenCL decoder), ffmpeg offer interface to vendor API's to decode video with dedicated HW decoder (Intel - QuickSyncVideo, AMD - AMF, NVidia - NVDec), also ffmpeg offer DXVA .

    https://trac.ffmpeg.org/wiki/HWAccelIntro
    Quote Quote  
  3. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    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.
    Quote Quote  
  4. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Awfully broad questions. Perhaps you can read up on it here.
    Quote Quote  
  5. Originally Posted by hamidi2 View Post
    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?
    Yes, those libraries are vendor dependent and they not use GPU but instead they use non standard VPU (Video Processing Unit) unique for each vendor, which occupy part of overall GPU area but those VPU's are largely independent from GPU itself.
    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.

    Originally Posted by hamidi2 View Post
    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.
    This is very good question and only you as programmer/developer can answer for this question - what is more convenient to you.
    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 .
    Quote Quote  
  6. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    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.
    thx
    Quote Quote  
  7. 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
    Quote Quote  
  8. Member
    Join Date
    Apr 2008
    Location
    Iran, Islamic Republic of
    Search Comp PM
    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.
    Thanx
    Quote Quote  
  9. Originally Posted by hamidi2 View Post
    Besides, let me know your opinion about using DirectX in comparison to mpv.
    Thanx
    Well... im not software developer... and all code i've ever made is bare metal type... sorry.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!