View Full Version : ffdshow's DXVA video decoder problem
RazvanuZu
9th June 2012, 11:10
Hi guys,
I'm using Avisynth v2.5.8 (official build), AvsP v2.0.2, GraphStudio and the latest build of ffdshow tryouts (2012-04-09).
This is the graph made by me:
http://thumbnails70.imagebam.com/19511/a656a9195109546.gif (http://www.imagebam.com/image/a656a9195109546)
The problem is that when I try to open this graph in AvsP I get this error:
http://thumbnails59.imagebam.com/19511/d1bbe3195109551.gif (http://www.imagebam.com/image/d1bbe3195109551)
I am sure this decoder doesn't start when I open the graph in AvsP because I can't see its icon in the notifications area.
What can I do in this case?
Thank you very much!
PS: http://thumbnails6.imagebam.com/19512/3bcd18195111468.gif (http://www.imagebam.com/image/3bcd18195111468)
clsid
9th June 2012, 14:43
You can't use a native DXVA decoder with AviSynth.
RazvanuZu
9th June 2012, 14:56
Oh, I didn't know this... In fact this was the first time I tried to use this decoder (DXVA)...
So there's nothing to do about this? I really want to use a DXVA decoder from now on, but I don't know what should I do in order to get it working...
Thanks! :)
Guest
9th June 2012, 15:35
If you are looking for GPU decoding and not necessarily DXVA decoding, then there are GPU-enabled Avisynth source filters, such as DGDecNV.
RazvanuZu
9th June 2012, 15:45
I'm looking for DXVA decoding. :)
I can't do anything about DXVA decoding with ffdshow tryouts, can I?
By the way, are there any quality differences between CPU decoding, DXVA decoding and GPU decoding?
Andouille
9th June 2012, 16:04
By the way, are there any quality differences between CPU decoding, DXVA decoding and GPU decoding?
Nope. All H.264 decoders output the same thing. If not, it's broken.
The only différence is the speed.
RazvanuZu
13th June 2012, 15:41
After some research I found that I need a video renderer and because of this I have switched to CoreAVC 3.0.1.
Now I have a problem with CoreAVC: when I try to use DXVA decoding I get this error -> http://thumbnails25.imagebam.com/19603/d69b10196023898.gif (http://www.imagebam.com/image/d69b10196023898)
If I select CUDA decoding or CPU-only decoding, this error doesn't appear, but MeGUI crashes after 1-2 minutes of work.
Please help me to get this DXVA decoder (@CoreAVC) or ffdshow's DXVA decoder working.
Thanks in advance!
vivan
13th June 2012, 23:21
Omg.
Please help me to get this DXVA decoder (@CoreAVC) or ffdshow's DXVA decoder working.
You can't use a native DXVA decoder with AviSynth.
Try LAV decoder with CUVID or DXVA-Copyback.
RazvanuZu
17th June 2012, 16:26
Thanks, vivan! Everything's working fine now.
Music Fan
27th September 2013, 09:00
Does it mean there is a way to use ATI's GPU in Avisynth ?
detmek
27th September 2013, 12:00
Yes, with DirectShowSoruce() or DSS2() (if you have Haali Splitter) and LAV Video decoder set to DXVA-Copyback.
Music Fan
27th September 2013, 12:28
Great, I believed it was only possible for Nvidia cards, not ATI's :)
I didn't know LAV.
Do we need to set anything in ffdshow and GraphStudio as explained in the first post, or just LAV is enough ?
detmek
27th September 2013, 13:32
If you have multiple H.264 decoders you have to make sure that LAV Video decoder is preferred decoder, that it has highest priority. Other then that, no. LAV is all you need.
Music Fan
27th September 2013, 13:33
Thanks, I will test it. ;)
Music Fan
27th September 2013, 17:08
Tested ; seems to work but the CPU works as much as with FFVideoSource() while it should use less CPU if GPU is used (I chose well DXVA-Copyback in LAV's options).:confused:
Actually the CPU works even a little bit more with DirectShowSource() and LAV (1 or 2 %) than with FFVideoSource().
I also verified with AVSMeter, same result.
Everything was disabled in ffdshow and the command DirectShowSource() didn't work before to install LAV, so LAV was clearly used thus I don't understand this result.:confused:
detmek
27th September 2013, 19:07
I just tried with Nvidia 9500GT and CPU usage is 0-1% with DXVA Copyback. Are you sure that LAV Video decoder is used and that it uses UVD chip? Download and start GPU-Z to check GPU and UVD usage. Also, open LAV decoder during test and see if it uses DXVA-Copyback or fails to avcodec.
Music Fan
28th September 2013, 11:32
Are you sure that LAV Video decoder is used and that it uses UVD chip?
I don't know.
My card is an Asus EAH5450 (clone of ATI HD 5450).
The DXVA works with MPC-HC (when I choose system default in output, directshowvideo), the CPU usage is 0-1% with h264 HD files.
Download and start GPU-Z to check GPU and UVD usage.
I downloaded it but as the CPU usage is around 20 % when I open my script in Virtual Dub, I guess the GPU is not used.
Also, open LAV decoder during test and see if it uses DXVA-Copyback or fails to avcodec.
I see "inactive".
But as I said above, my script couldn't be opened in Virtual Dub before to install LAV, so I guess LAV brought something because now my script is opened, while ffdshow is not used.
Even when I choose none instead of DXVA as video decoder in LAV, I see the video in Virtual Dub, so I don't understand how h264 is decoded.:confused:
My script is very simple, one line ;
directshowsource("H:\my video.mp4", audio=false)
also tested with a TS, both including h264, same result (CPU around 20 %).
Thanks for your help ;)
detmek
28th September 2013, 13:42
What OS do you have? LAV Video needs Windows 7/8 or at least Windows Vista. It only supports DXVA2.
If you open LAV Video decoder during script playback you can see what mode is used by LAV video.
https://dl.dropboxusercontent.com/u/19804113/Forumi/Slike/Doom9/DXVA%20Copyback%20active.png
If you see dxva2cb that DXVA-Copyback is used. If you see avcodec that LAV Video decoder falls back to software decoding.
Music Fan
29th September 2013, 10:30
What OS do you have? LAV Video needs Windows 7/8 or at least Windows Vista. It only supports DXVA2.
I have XP, I didn't know LAV was not good for XP. So I won't be able to use my ATI's GPU with Avisynth :( Unless LAV becomes XP compatible in the future (or unless ffdshow release a similar function).
If you see dxva2cb that DXVA-Copyback is used. If you see avcodec that LAV Video decoder falls back to software decoding.
I see "inactive". But as it concerns hardware decoder and as my video is decoded since I installed LAV, I guess that a software h264 LAV's filter is used, but not DXVA.
It would mean that LAV partially works also on XP.
detmek
29th September 2013, 13:31
AFAIK, nev does not plan to add support for DXVA1 decoding as official support for Windows XP ends in spring 2014.
So, your only options for hardware accelerated video decoding while using Avisynth are:
- buy Nvidia card and use CoreAVC with CUDA or
- upgrade OS to Windows 7 or Windows 8 and use LAV Video decoder in Copyback mod.
Music Fan
3rd October 2013, 15:14
That's what I feared.:(
For DXVA in avisynth with a Nvidia card, shouldn't we use DGDecNV ?
Asmodian
3rd October 2013, 20:15
Well I would suggest DGDecNV for gpu decoding on an Nvidia card but it would CUDA decoding, not DXVA.
I would bet a bit of money Nev will not implement anything for DXVA on XP or anything special for XP.. XP really is too old at this point (typing on an XP machine at work atm :( ).
Music Fan
3rd October 2013, 20:30
It's old but still used a lot. Is it so hard to code for XP compared to Win7 ?
I hope ffdshow's team will do something in the kind of LAV DXVA copyback for XP.
What's the difference between decoding by CUDA and DXVA ?
Guest
3rd October 2013, 20:36
Strictly speaking, it is CUVID, not CUDA, that performs the decoding for DGDecNV. CUVID is an API to the PureVideo engine.
clsid
7th October 2013, 21:40
CUVID works on XP.
Don't expect any improvements to ffdshow. Its project has been pretty much dead for more than a year.
Music Fan
7th October 2013, 22:29
Didn't know that, bad news.:(
CUVID works on XP
Ok but I need DXVA copyback for my ATI.
clsid
8th October 2013, 19:02
Copy-back is a feature of DXVA2, which requires Vista or above. It is not a limitation that is specific to the implementation in LAV.
Music Fan
8th October 2013, 19:28
Ok, so there is no hope for my configuration.:o
Music Fan
14th March 2014, 17:46
Hi,
is it still impossible to use DXVA decoding with Avisynth on Windows XP ?
As I said above a few months ago, I'd like to use my ATI's GPU with avisynth, which can be done with LAV but not on XP. And as clsid said, Copy-back is a feature of DXVA2, which requires Vista or above.
Thus I wonder if another way than copyback to use DXVA decoding with Avisynth exists or would be technically possible.
nevcairiel
14th March 2014, 17:48
DXVA1, which is used on Windows XP, is extremely limited. You won't be able to use it with AviSynth. You should switch to a newer OS if thats a requirement for you.
Music Fan
14th March 2014, 17:59
Ok, but I'd like to understand why MPC-HC (and maybe other players) can use DXVA on XP and Avisynth can't.:confused:
Is it because players do real time and Avisynth needs a kind of buffer memory (to store decoded frames) to allow slower than real time rendering, which wouldn't be possible with DXVA1 ?
nevcairiel
14th March 2014, 18:23
All you can do with DXVA1 is decode the video and then immediately show it on the screen (for playback). AviSynth needs to process the image to do its job, thats just not possible with DXVA1.
You don't need to fully understand it to accept that its impossible.
Music Fan
14th March 2014, 18:58
I understand, you answered my question.;) I guess that's what is called copy-back and that it's impossible with DXVA1.
CUDA looks different on that point because it can be used with Avisynth on XP, thanks to DGDecNV.
Music Fan
26th April 2014, 16:29
Hi,
I do have Windows 7 64 now but I still can't make LAV work with Avisynth ;
Yes, with DirectShowSource() or DSS2() (if you have Haali Splitter) and LAV Video decoder set to DXVA-Copyback.
I don't have Haali Splitter, is it also needed for DirectShowSource() (which I tried but DXVA-Copyback stays inactive) or only for DSS2() ?
I got picture (I opened my script in Virtual Dub) but as I see "inactive" below DXVA-Copyback in LAV's video decoder window, I guess the video is decoded by another filter.
clsid
26th April 2014, 17:01
You must access the settings of LAV by clicking on its tray icon to see the correct decoder state. Clicking on the Start menu shortcut loads another instance, which shows <inactive> because that instance of the filter is in fact not active!
Music Fan
27th April 2014, 00:16
I don't see its tray icon :confused:
But I believe LAV's copyback is not used because my CPU is around 45 % when I play this script while it's only around 3% when I play the TS file (the same than the one in my script) in MPC-HC (which use GPU).
clsid
27th April 2014, 20:24
Win7DSFilterTweaker can help you set LAV Video as preferred decoder.
Music Fan
28th April 2014, 09:30
Thanks, I will try this.
Music Fan
28th April 2014, 13:11
It works now when I play an Avisynth script opened in Virtual Dub (I see active for dxva2cb when I click on LAV's tray icon), but the CPU usage for a 1080p24 h264 video is around 20 %, which is quiet high for DXVA.
With MPC-HC 32 bit (installed on Win 7 pro 64) set also on LAV DXVA copyback playing the same video (without Avisynth), CPU usage is around 13 %.
I'm astonished by this difference because my script is very simple, one line (it was just for the test) ;
directshowsource(F:\my video.mp4")
I guess it means Avisynth needs more resources than MPC-HC because the decoder is exactly the same.
With Microsoft decoder instead of LAV's (chosen with Win7DSFilterTweaker), CPU usage is around 40 % (twice dxva2cb).
Before to install MPC-HC 32 bit (for compatibility with Avisynth 32 bit), I installed MPC-HC 64 bit and the CPU usage was around only 3 % with 1080p videos ! I used the default setting (DXVA activated but I don't know if LAV was used).
I had the same result (3 %) with MPC-HC 32 bit on XP 32 bit.
Does it mean that MPC-HC 32 bit works better on 32 bit OS than on 64 bit OS ?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.