Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 5th August 2010, 08:34   #1  |  Link
Dal
Registered User
 
Join Date: Aug 2008
Posts: 63
DXVA - How to tell if it's really working?

Hi, I'm not sure this is the right place to post this, feel free to move it where it belongs.

I use MeGui to encode SD streams (from DVBViewer) into h264 format, using the DXVA profiles in MeGui.

MediaInfo gives me this info about one of the files (it is inside a mkv container):

Code:
Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High@L3.1
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Muxing mode                      : Container profile=Unknown@3.1
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 11mn 9s
Bit rate                         : 1 494 Kbps
Width                            : 544 pixels
Height                           : 400 pixels
Display aspect ratio             : 4:3
Frame rate                       : 25.000 fps
Color space                      : YUV
Chroma subsampling               : 4:2:0
Bit depth                        : 8 bits
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.275
Stream size                      : 117 MiB (85%)
Writing library                  : x264 core 104 r1677 19df41a
Encoding settings                : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=1494 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / vbv_maxrate=17500 / vbv_bufsize=14000 / ip_ratio=1.40 / aq=1:1.00 / nal_hrd=none
Is the Level setting and ReFrames correct for this resolution?

But how can I tell that hardware acceleration is really used when playing those files?
I haven't come across an easy way to show this.

Usually, I use Zoom Player (with PowerDVD Decoder v8 and v10).
I see that PowerDVD is in use, but I haven't found a way to see if it actually uses hardware acceleration to play the file.

So is there a program to detect this? Some other player maybe?

It would have been nice to be 100% sure if my settings are correct before I start encoding all my movies and series to a DXVA compatible format.

Thank you.
Dal is offline   Reply With Quote
Old 5th August 2010, 09:06   #2  |  Link
TheImperial2004
C# Addict
 
TheImperial2004's Avatar
 
Join Date: Oct 2008
Location: Saudi Arabia
Posts: 114
Hi .

I always AviDemux to encode using Libx264 . And "All" of my encodes are playing using DXVA under MPC-HC . Whatever encoding settings I use , it'll play using DXVA . I'm not sure about profiles though , as AviDemux won't allow me to set them .



Good luck
__________________
AviDemux Windows Builds

Last edited by TheImperial2004; 5th August 2010 at 09:33.
TheImperial2004 is offline   Reply With Quote
Old 5th August 2010, 09:18   #3  |  Link
tetsuo55
MPC-HC Project Manager
 
Join Date: Mar 2007
Posts: 2,317
Open your task manager and check the cpu usage
for an sd file it should be near 0, for hd file between 5 and 20
__________________
MPC-HC, an open source project everyone can improve. Want to help? Test Nightly Builds, submit patches or bugs and chat on IRC
tetsuo55 is offline   Reply With Quote
Old 5th August 2010, 09:23   #4  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
That's pretty outdated.
There are no problems with b-pyramid or a large number of b-frames.
You don't need to manually specify the number of reference frames, since as long as you set the level x264 will take care of it. Many hardware decoders (mainly GPUs and some standalones) don't care about the DPB limit of level 4.1, but it's still a good idea to keep within that limit to ensure maximum compatibility.
If you set a level don't forget the appropriate VBV settings.
nurbs is offline   Reply With Quote
Old 5th August 2010, 09:32   #5  |  Link
TheImperial2004
C# Addict
 
TheImperial2004's Avatar
 
Join Date: Oct 2008
Location: Saudi Arabia
Posts: 114
Quote:
That's pretty outdated.
I'll re-edit my post thanks for the clarification .

Edit : I encoded some samples now using various combos of settings and all of them played fine using DXVA under MPC-HC (SD & HD samples) .
__________________
AviDemux Windows Builds

Last edited by TheImperial2004; 5th August 2010 at 09:36.
TheImperial2004 is offline   Reply With Quote
Old 5th August 2010, 11:37   #6  |  Link
Dal
Registered User
 
Join Date: Aug 2008
Posts: 63
Thank you all for your answers.

Quote:
Originally Posted by tetsuo55 View Post
Open your task manager and check the cpu usage
for an sd file it should be near 0, for hd file between 5 and 20
Is this really the only way? If so, there is obviously a gap in all the fine programs available in this scene; a kind of hardware acceleraton detector

Quote:
Originally Posted by nurbs View Post
You don't need to manually specify the number of reference frames, since as long as you set the level x264 will take care of it. Many hardware decoders (mainly GPUs and some standalones) don't care about the DPB limit of level 4.1, but it's still a good idea to keep within that limit to ensure maximum compatibility.
If you set a level don't forget the appropriate VBV settings.
Maybe a stupid question, but what are the VBV settings?
What is the criteria for HA to kick in anyways?
Is that the level is properly set (3.1 for SD, 4.1 for HD, what is 5.1 for?) combined with the right number of ReFrames?
But x264 will take care of the referance frames now? But it wasn't always like this?

Quote:
Originally Posted by TheImperial2004 View Post
I encoded some samples now using various combos of settings and all of them played fine using DXVA under MPC-HC (SD & HD samples) .
Very nice, but how can you be *sure* that DXVA is actually in use?

Thanks again.
Dal is offline   Reply With Quote
Old 5th August 2010, 11:49   #7  |  Link
TheImperial2004
C# Addict
 
TheImperial2004's Avatar
 
Join Date: Oct 2008
Location: Saudi Arabia
Posts: 114
Quote:
Very nice, but how can you be *sure* that DXVA is actually in use?
Simply , check MPC-HC status bar . It should show : Playing [DXVA] , that means your video decoding is accelerated . OR , check your task manager to see how is your CPU load . It should be near 0% for SD content and 5 - 20% for HD as tetsuo55 states . Heck , you can even use CPU-Z to check CPU load -if C1E(2) is enabled-

Good luck
__________________
AviDemux Windows Builds
TheImperial2004 is offline   Reply With Quote
Old 5th August 2010, 11:50   #8  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
VBV settings are the maximum rate at which the player can read (defined by the profile and level; look it up in the wikipedia H.264 article) and the buffer size on the player. The latter is generally not specified in the manual, but the rule of thumb is to use the same setting as for the maximum rate.
For SD you can use level 3.0 or higher, for 720p 3.1 or higher and above that level 4.0 or higher. If you specify the level x264 will automatically reduce the number of reference frames unless you specify a higher number manually. It didn't always do that. Most hardware players (standalone and GPU; mobile is usually more restricted) should handle level 4.1 since that is more or less what blu-ray uses.

TheImperial2004 knows that DXVA is used because MPC-HC shows "playing [DXVA]" when it is used.
nurbs is offline   Reply With Quote
Old 5th August 2010, 11:55   #9  |  Link
TheImperial2004
C# Addict
 
TheImperial2004's Avatar
 
Join Date: Oct 2008
Location: Saudi Arabia
Posts: 114
Quote:
TheImperial2004 knows that DXVA is used because MPC-HC shows "playing [DXVA]" when it is used.
Yup . And it doesn't show it if DXVA wasn't acually in use
__________________
AviDemux Windows Builds
TheImperial2004 is offline   Reply With Quote
Old 5th August 2010, 12:06   #10  |  Link
Dal
Registered User
 
Join Date: Aug 2008
Posts: 63
Quote:
Originally Posted by nurbs View Post
VBV settings are the maximum rate at which the player can read (defined by the profile and level; look it up in the wikipedia H.264 article) and the buffer size on the player. The latter is generally not specified in the manual, but the rule of thumb is to use the same setting as for the maximum rate.
For SD you can use level 3.0 or higher, for 720p 3.1 or higher and above that level 4.0 or higher. If you specify the level x264 will automatically reduce the number of reference frames unless you specify a higher number manually. It didn't always do that. Most hardware players (standalone and GPU; mobile is usually more restricted) should handle level 4.1 since that is more or less what blu-ray uses.
Ok, thank you.
So what you're basically saying is that if I use MeGui as encoder and choose one of the DXVA profiles (there are only two left I see), together with the bitrate calculator for file size, I shouldn't need to worry about anything else? DXVA support will be present? :P

Just out of curiousity: If HD material is hardware accelerated with level 4.1, what is the point of setting it higher, say to level 5.1? What is the difference?

Quote:
Originally Posted by TheImperial2004 View Post
Yup . And it doesn't show it if DXVA wasn't acually in use
Nice! I need to encode some samples to provoke this to happen, seeing is believing
Dal is offline   Reply With Quote
Old 5th August 2010, 12:23   #11  |  Link
nurbs
Registered User
 
Join Date: Dec 2005
Posts: 1,460
I just looked at those MeGUI presets and they have level and VBV parameters set so DXVA will work. In the main window of the codec configuration you can adjust the "preset" slider to select your desired speed/quality tradeoff and the "tuning" dropdown where you can tune for your content, like film or animation. As long as you don't touch anything else it's guaranteed to work.

Higher levels mainly allow you to use higher resolutions and/or framerates, more reference frames at the same resolution and higher VBV maximum bitrate.
The resolutions and framerates don't matter if your source material is from DVD and Blu-Ray (unless you have a 1080i30 source and bob it to 1080p60). VBV maxrate doesn't matter either in most backup scenarios since the bitrates most people use are too small for it to be a problem. Reference frames bring a little extra quality, but with each additional reference frame you gain only about half as much as with the previous one, so the benefit is diminishing. Extra reference frames are generally more useful on animation, but that's what the tunings I mentioned take care of.
nurbs is offline   Reply With Quote
Old 5th August 2010, 12:23   #12  |  Link
littleD
Registered User
 
littleD's Avatar
 
Join Date: Aug 2008
Posts: 343
Quote:
Quote:
TheImperial2004 knows that DXVA is used because MPC-HC shows "playing [DXVA]" when it is used.
Yup . And it doesn't show it if DXVA wasn't acually in use
There is case when you see no dxva while it is in use. MPC-HC +EVR+h264 on win XP.

Quote:
Just out of curiousity: If HD material is hardware accelerated with level 4.1, what is the point of setting it higher, say to level 5.1? What is the difference?
I see no point. Difference is your gpu wont accelerate 5.1 if you have Radeon 3xxx or lower.
littleD is offline   Reply With Quote
Old 5th August 2010, 12:33   #13  |  Link
TheImperial2004
C# Addict
 
TheImperial2004's Avatar
 
Join Date: Oct 2008
Location: Saudi Arabia
Posts: 114
Quote:
There is case when you see no dxva while it is in use. MPC-HC +EVR+h264 on win XP.
hmm . I thought that EVR was only available under Vista , 7 and Server 2008's ?
__________________
AviDemux Windows Builds
TheImperial2004 is offline   Reply With Quote
Old 5th August 2010, 12:38   #14  |  Link
JEEB
もこたんインしたお!
 
JEEB's Avatar
 
Join Date: Jan 2008
Location: Finland / Japan
Posts: 512
Quote:
Originally Posted by TheImperial2004 View Post
hmm . I thought that EVR was only available under Vista , 7 and Server 2008's ?
It comes with .NET 3.0 or 3.5 IIRC, which is available for XP as well.
__________________
[I'm human, no debug]
JEEB is offline   Reply With Quote
Old 5th August 2010, 17:04   #15  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
EVR is available for XP but DXVA won't work with it. For DXVA on XP VMR9 should be used.
Keiyakusha is offline   Reply With Quote
Old 5th August 2010, 18:11   #16  |  Link
Mounir
Registered User
 
Join Date: Nov 2006
Posts: 773
dxva also work in Overlay, i know i use it

http://en.wikipedia.org/wiki/DirectX_Video_Acceleration
Mounir is offline   Reply With Quote
Old 5th August 2010, 19:52   #17  |  Link
littleD
Registered User
 
littleD's Avatar
 
Join Date: Aug 2008
Posts: 343
Quote:
Originally Posted by Keiyakusha View Post
EVR is available for XP but DXVA won't work with it. For DXVA on XP VMR9 should be used.
Yes, You can. Just make sure You have dxva2.dll in system32 folder. Even if drivers natively dont support specific format in dxva2 (only h264 on radeon with xp, rest formats are supported), it still can play with evr in dxva1 compatibility mode.
littleD is offline   Reply With Quote
Old 3rd September 2010, 23:25   #18  |  Link
Dal
Registered User
 
Join Date: Aug 2008
Posts: 63
Quote:
Originally Posted by nurbs View Post
I just looked at those MeGUI presets and they have level and VBV parameters set so DXVA will work. In the main window of the codec configuration you can adjust the "preset" slider to select your desired speed/quality tradeoff and the "tuning" dropdown where you can tune for your content, like film or animation. As long as you don't touch anything else it's guaranteed to work.
Hello again.
Maybe this post should have been posted to other forums, like the MeGui forum and the x264 forum, it's kinda hard to say what the problem is. But since we started a DXVA discussion here, I'll post it here first:

I just discovered something very sad. I say sad because I have already encoded many files with this setting:
Lately I have begun to use the MeGUI setting called x264: DXVA Standard Def, but I tweaked it to use Automated 2-pass (actually, the Bitrate Calculator enforces that) and dragged the slider to Slower and Very Slow.
Those two settings sets the referance frames to 8 and 16 respectively.
But today I was going to try the encoded files on a computer other than the one I usually use, playing them with Media Player Classic Home Cinema. I noticed that the DXVA display did not show up as it should in the bottom bar.
That was with the last officially released MPCHC (1.3.1249.0)
With newer beta versions, the DXVA flag is raised, but the picture is full of artifacts.
Double checking this on my main computer, the problem is the same there.
When using FFDShow DXVA decoder (in Zoom Player), the picture is also full of artifacts.
I guess that rules out bugs with both MPCHC and FFDShow, since MCPHC uses it's own internal filters?

Going through the files with Mediainfo, it dawns on me that all the files with problem has 16 referance frames, and even those with 8 referance frames has problems, only with fewer artifacts.

The reason I haven't discovered this before, is because my normal settings; Zoom Player using Cyberlink Video Decoder v10, plays the files without problems, seemingly with DXVA on.

However, unfortunately the files does not seem to be compatible with the rest of the world

This leaves a few questions:
- Is 8 and 16 referance frames not compatible with the Level3.1 (SD video) setting?
- Are there bugs in FFDShow DXVA Decoder and MPCHC?
- Is there something wrong with the MeGui DXVA settings?
- Are my files lost forever, or is there a way to change the referance frames?

Feeling a bit frustrated now, I really hope someone out there has an answer / solution for this.
BTW: Samples can be provided any time.

Thanks again.
Dal is offline   Reply With Quote
Old 4th September 2010, 03:42   #19  |  Link
Sharktooth
Mr. Sandman
 
Sharktooth's Avatar
 
Join Date: Sep 2003
Location: Haddonfield, IL
Posts: 11,768
what version of megui and presets you used for your encodes?
btw, i dont think there is a known software that can change the refs vaule.
Sharktooth is offline   Reply With Quote
Old 4th September 2010, 07:48   #20  |  Link
Dal
Registered User
 
Join Date: Aug 2008
Posts: 63
Hi, and thanks for answering.
Quote:
Originally Posted by Sharktooth View Post
what version of megui and presets you used for your encodes?
I use MeGUI v0.3.5.8 with Tx264 v5.3 presets.
Quote:
Originally Posted by Sharktooth View Post
btw, i dont think there is a known software that can change the refs vaule.
Yeah, I was afraid of that
Dal is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 00:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.