Skip to content

Stuttering Video on AMD GPU with DXVA on some H.264 LiveTV streams #496

Open

Description

@YARD2

System Info:
Ryzen 5 2500U with Vega iGPU
Windows 10

I noticed that on a few TV Live streams with h264 / recordings via satellite (Astra 19.2) results
in stuttering video if DXVA is enabled on AMD GPUs.
Intel and Nvidia are OK.
Without DXVA (using Software decoding) it is also OK.
But it works with the Microsoft Filter DTV Video Decoder and DXVA.

Tested with:
LAVFilter 0.76.1 with DVBviewer
MPC-HC newest version

Sample:
Sample

Activity

  1. psyborg55 commented on Sep 11, 2022

    @psyborg55

    Maybe not the same problem, but is also noticeable on Eutelsat 7east channel CineFilm. AMD GPU as well.
    I think channel use L4.1 format, while most others are L4.0

  2. mitzsch commented on Sep 19, 2022

    @mitzsch

    Noticed a similar issue on my end too. GPU is a RX580.
    The end crawl of a single Bluray rip is stuttering like a mess, turning off the hw decoding fixes it. Works fine with an Nvidia GPU.
    Interestingly I could not recreate the problem with your sample. @YARD2

    Another thing I noticed is, that the same issue also shows up when using mpv (maybe you (@YARD2) could try mpv too? ), however only in windows - under linux using vaapi it was fine. (your sample was fine there too)

  3. YARD2 commented on Oct 4, 2022

    @YARD2
    Author

    mpv is working in Windows with the latest build i tried.

  4. vdrfan commented on Nov 25, 2022

    @vdrfan

    I have a similar problem (buggy DXVA on some TV Live Streams).
    But older Driver works (last working 20.12.1).
    My Problem is - i cannot use old Driver becouse of a HDR Bug in old Driver.

    I spend the whole day with testing Adrenalin Drivers to find working Drivers.

    i can test 3200G, 3400G, 5600G with two different Mainboards, and all of them having the same problem.

    here are my result:
    testfiles: https://drive.google.com/file/d/1WBjMTsYIGX2S32s91UME7HA_8o1KuutM/view?usp=sharing

    tested with MPC-BE
    Renderer doesn't matter - (EVR/MADVR/MPCVR).
    Decoder: MPC Decoder - DX11 Hardware Decode
    info: VLC has same problem.

    tested working Drivers: 19.9.2, 20.12.1 (and maybe all between of them)

    tested buggy Drivers:
    21.2.3, 21.4.1, 21.5.2, 21.6.1, 21.8.2, 21.9.1, 21.10.2, 21.10.3, 21.11.1, 21.12.1,
    22.1.1, 22.1.2, 22.2.1, 22.2.2, 22.2.3, 22.3.1, 22.3.2,
    22.4.1, 22.4.2, 22.5.1, 22.5.2, 22.6.1, 22.7.1, 22.8.1,
    22.10.2, 22.10.3, 22.11.1

    i did not find a working driver starting from 21.2.3
    some of them(21.2.3, 21.4.1, 21.5.2) are starting playing without problems, and get buggy when skipping.

  5. Clemens12345 commented on Jan 7, 2023

    @Clemens12345

    Same issue here with 6700 xt. Reported it also to AMD via their tool, is probably more an issue of AMD (hw or driver) then of LAV.
    Will maybe do a test with my R7 7700x as well, but probably need to remove my GPU for that as I can not select the other device in the menu.
    https://www.dropbox.com/s/3xen8e8axfmf7py/01-07_16-33-14_VTM%204_Top%20Gear%20-%20S30%20E03.%20Freddie%20Flintoff%2C%20Chris%20Harris%20en%20Paddy%20M.ts?dl=0

  6. kasper93 commented on Jan 11, 2023

    @kasper93
    Contributor

    Could you try reporting it here? https://github.com/GPUOpen-LibrariesAndSDKs/AMF it has higher chance going to correct people.

    And indeed I've seen it too where interlaced files are completely unplayable. It is probably regression in driver, because it used to work.

  7. TomArrow commented on Jan 16, 2023

    @TomArrow

    Was just googling AMD DXVA video playback stuttering and landed here. Just thought I'd add - for moral support - I also get video playback stuttering with DXVA in MPC-HC. Not sure if this is LAV related (dunno if MPC-HC uses LAV), but I definitely think this is an AMD issue. Was a problem on a few months old drivers as well as current drivers. Specifically for me it tends to happen when I try to playback a video at slower or faster speed. It stutters really badly for a while but eventually it "settles" and plays back decently, which is really strange. And when I go back to normal speed the stuttering is back for a while until it resolves.

  8. vdrfan commented on Jan 16, 2023

    @vdrfan

    it has nothing to do with LAV, VLC has same problem.
    there are working AMD drivers 19.9.2 and 20.12.1.
    my observation: playback is like slow motion - and error does not recover.

  9. clsid2 commented on Jan 16, 2023

    @clsid2
    Contributor

    Use a GPU monitoring tool to check if maybe it gets stuck in a low clockspeed or low memory speed state. Maybe it is downclocking too aggressively.

  10. vdrfan commented on Jan 16, 2023

    @vdrfan

    i checkd GPU in taskmanager, nothing special found.
    this bug cannot be from downclocking - movie plays with 1 frame per second.
    there are working drivers - it must be a driver issue.
    i filmed it. https://drive.google.com/file/d/1sgcMGeGMLNe74OtB7unfZ9-dupT49ORd/view

  11. clsid2 commented on Jan 16, 2023

    @clsid2
    Contributor

    It is obvious that it is a driver bug. The driver controls the power states.
    Task manager is crap. Use something like GPU-Z.

  12. vdrfan commented on Jan 16, 2023

    @vdrfan

    it will bring us nothing further (if power states causes problem).
    i already know that this is a driver problem.
    i will test it tomorrow with GPU-Z.

  13. TomArrow commented on Jan 22, 2023

    @TomArrow

    Is 20.12.1 the last version people know about that still worked fine?

  14. vdrfan commented on Jan 22, 2023

    @vdrfan

    Yes. but 20.12.1 driver has a HDR Bug.
    Aleksoid1978/VideoRenderer#71
    how can we tell AMD to fix it.

  15. Clemens12345 commented on Feb 15, 2023

    @Clemens12345

    Not solved with 23.2.1 on 6700 xt. :(

  16. vdrfan commented on Mar 11, 2023

    @vdrfan

    Same issue here with: Asus Vivobook Pro 16X OLED M7600QE (Ryzen 5800H).
    I think all IGPUs from AMD have this problem (i can only test VEGA)
    Is there any Graphics from AMD without that issue, maybe RDNA is ok?

  17. kasper93 commented on Mar 28, 2023

    @kasper93
    Contributor

    testfiles: https://drive.google.com/file/d/1WBjMTsYIGX2S32s91UME7HA_8o1KuutM/view?usp=sharing

    Those samples works correctly with Microsoft DTV-DVD Video Decoder. Can do over 400 fps on my GPU, while LAV/ffmpeg goes up to 40, which results in not smooth playback on this 50fps file.

    Driver issue is only with interlaced samples, progressive ones seem to work correctly in non ffmpeg based decoders.

  18. vdrfan commented on Mar 28, 2023

    @vdrfan

    @kasper93, my samples are progressiv.
    and it has nothing todo with Video Decoder (every Video Decoder has the same problem when you usw HW Decoding).
    if you have Veag Graphics - can you test with this file: https://drive.google.com/file/d/1WBjMTsYIGX2S32s91UME7HA_8o1KuutM/view

  19. kasper93 commented on Mar 28, 2023

    @kasper93
    Contributor

    @vdrfan: Maybe there are some preconditions to make it not work. But like I said for me the 720p ERROR.ts file works ok with Microsoft's decoder. While interlaced samples reliably doesn't work on anything.

    The point I'm making here is that while there may be a driver issue, at least progressive samples can be fixed in userspace. And there is definitely difference between decoders at least for this specific file.

  20. vdrfan commented on Mar 29, 2023

    @vdrfan

    @kasper93, my mistake. i thought you have testet with your own files.
    with Microsoft DTV-DVD Video Decoder, the testfiles are working.
    ffmpeg based decoders(LAV, MPC ...) have the problem with Vega Graphics?
    can we tell that ffmpeg devs to fix it.

    funny: Microsoft DTV-DVD Video Decoder thinks it is interlaced: dwInterlaceFlags: 0x00000081(AMINTERLACE_IsInterlaced and AMINTERLACE_DisplayModeBobOrWeave), but it is is progressiv.

  21. vdrfan commented on Apr 3, 2023

    @vdrfan

    @kasper93,
    interlaced Videos are working with ffmpeg based decoders, but not with Microsoft DTV-DVD Video Decoder
    progressiv video exactly reversed (not working with ffmpeg, working with Microsoft DTV).
    frustrating.
    interlaced Sample: https://drive.google.com/file/d/1-Ih1p8sUhPEvwKft6pba-Dxn7Ckuan1a/view?usp=sharing
    progressiv Sample: https://drive.google.com/file/d/1WBjMTsYIGX2S32s91UME7HA_8o1KuutM/view?usp=share_link

  22. Clemens12345 commented on Aug 27, 2023

    @Clemens12345

    Just installed latest 23.8.1 driver on my Windows PC with 6700xt.
    When selecting DXVA2, SW decoding seems to be used.
    When selecting D3D11, HW decoding seems to be used and the problem seems to be solved.
    Can some one confirm this?

    EDIT when using EVR custom renderer instead of MPC video renderer, DXVA2 works, and also there problem seems to be solved.
    Will maybe check Linux as well somewhere coming days as I had the problem there as well.

    EDIT2 have the issue still sometimes, but issue seems to recover after 1-2 seconds.

  23. Clemens12345 commented on Sep 6, 2023

    @Clemens12345

    Can be just an impression, looks even better with drivers 23.9.1.
    Confirmation of someone else would be nice (and then this issue can be closed here).
    Linux I might test next weekend / next week.

  24. kasper93 commented on Sep 7, 2023

    @kasper93
    Contributor

    I can still reproduce the issue on 23.9.1. Not with all samples, but try Sample2_#2750.zip it is really bad.

    It looks like it gives frames out of order from the decoder, with a little bit of seeking you can sometimes fix it, but it general it breaks.

  25. Clemens12345 commented on Sep 8, 2023

    @Clemens12345

    @kasper93 I tried that sample, have it the first 2 seconds or so but then it recovers and is fine ( I guess it recovers at the second iframe or so, would need to check when exactly those are)
    Which card? Here 6700 xt.

  26. Timohal commented on Aug 20, 2024

    @Timohal

    I confirm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions