1 (edited by Zachn 25-02-2017 15:16:46)

Topic: PotPlayer freezes when playing MKV file with NVIDIA CUDA

My setup:

i5 2500K
GTX680
8GB DDR3-1600 RAM

Using PotPlayer 1.6.63856

My PotPlayer is configured according to Maken's guide, with ffdshow, LAV Audio/Video Decoder, ReClock and madVR with DXVA as the video renderer. I'm no longer using SVP because my Sony TV has great smooth motion processing and madVR has smooth motion as well, the combination of the 2 is good enough for me without the performance hit of SVP.

Up until now I was using the Built-in FFMpeg decoder for all video formats, but I recently read that I should use the NVIDIA CUDA decoder for better hardware performance, and also to utilize the NVIDIA Edge Enhancement and Noise Reduction features in the NVIDIA control panel.

My issue: When I choose NVIDIA CUDA in the video decoder and play an MKV movie, the player will launch, an image will appear and then freeze. The sound keeps playing as normal but the player is stuck and I have to end the process in Windows.

My settings:

http://image.prntscr.com/image/556ba116dc49428da50314edd954b1fd.png

Marked in Red is where I changed to NVIDIA CUDA:

http://image.prntscr.com/image/673e36ed5ded41b0825102b1c953df08.png

P.S.
Am I to get a performance boost, or better image quality by using the CUDA decoder?

Thx

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

You have already using DXVA (the upper right option at the second screenshot).
So GPU decoder engine is already used. The performance is about with case of CUDA.
Use Tab button when playback to get more information about decoder in use.

About the quality. I have never used NVIDIA Edge Enhancement and Noise Reduction options. Perhaps it worked with DXVA decoder. Try to enable/disable. Did you see any difference?

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

Is using DXVA the same as using CUDA Decoder? I'm not sure because this PotPlayer guide I read says to enable both:

https://wiki.mikejung.biz/PotPlayer

To edit PotPlayers's Video Decoder settings for optimized performance, go to Filter Control, under the expanded options on the left side, click on Video Decoder, then click on Built-in Codec/DXVA Settings. Since I have a GTX 970, I selected CUDA for most video types, and I selected DXVA to be used. Do not select DXVA Copy-Back as it is the slowest Video Decoder. DXVA (Native) is usually the option to go with and it's the default if you enable it in potplayer (it's just called DXVA), for mpc-hc it would be called DXVA2 (Native). To be honest, I'm not entirely sure if DXVA matters if you already selected CUDA for PotPlayer's decoder options, when I play back a video and view the player stats I see that the OpenCodec CUDA decoder is used for video, which is what most people with a high end, Nvidia GPU should use. I also suggest doing with hardware deinterlacing and letting your GTX card handle this instead of enabling it in

https://wiki.mikejung.biz/images/6/6e/PotPlayer_Configuration_Built-in_Video_Decoder_CUDA.png

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

In my experience, the 32bit version of Potplayer freezes with CUDA and SVP running. The 64bit version does not.

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

Zachn wrote:

Is using DXVA the same as using CUDA Decoder?

No. DXVA is not CUDA. But both of them uses the same hardware engine to decode video (from NVIDIA adapter in your case).
And in one time you can use only one decoder: DXVA or CUDA.
So, press Tab hotkey to get more info about currently used decoder in PotPlayer.

6 (edited by Zachn 27-02-2017 19:34:35)

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

This is what I'm getting:

http://image.prntscr.com/image/aee7bae44ef7458f9219eac5dbe0ba35.png

It's using the build in FFMpeg decoder, and using DXVA. If you can only use either DXVA or CUDA, then why would the guide tell you to enable DXVA and set CUDA as the decoder?

BTW why does it say ExtPCM under the Audio Decoder output? I'm using WASAPI Excusive mode and it's bitstreaming:

http://image.prntscr.com/image/4d839c66683442c6ac5e5cf3d79fd4d8.png

Anyway, I tried disabling DXVA, and selecting CUDA as the decoder, it still freezes...

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

There is no information about DXVA at your screenshot.

Video Codec: Built-in FFmpeg Decoder
CPI: 24/26%

Is is software decoder. DXVA (Native) decoder is not used. NVIDIA (CUVID) decoder is not used.

> If you can only use either DXVA or CUDA, then why would the guide tell you to enable DXVA and set CUDA as the decoder?
I tell about DXVA and CUDA DECODERS. One is used at once. About the guide - ask it guide's author wink

I think he wrote guide for common cases and used one decoder by priority: CUDA for NVIDIA users, DXVA - for Intel and AMD users.

8 (edited by Zachn 28-02-2017 16:07:09)

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

How is DXVA not used if my GPU load is 57%?

These are my settings again:
http://image.prntscr.com/image/673e36ed5ded41b0825102b1c953df08.png

What should I change to ensure DXVA is working?

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

I don't know. With the same settings I see DXVA is working to me.
http://www.svp-team.com/forum/misc.php?action=pun_attachment&item=4473

Post's attachments

Native_DXVA.jpg 637.96 kb, 197 downloads since 2017-02-28 

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

GPU load is not the same as HW Decoder (Video engine) load. They are different blocks of graphics adapter.

Just the picture of GPU-Z from Internet.

Post's attachments

GPU-Z.gif, 19.16 kb, 400 x 493
GPU-Z.gif 19.16 kb, 622 downloads since 2017-02-28 

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

OK, it seems to work when I enable DXVA Copy Back mode:

http://image.prntscr.com/image/c24733bc91cc4ce9b901df5d4fed9769.png

But I can't get it to work in Native mode... What gives? I tried setting LAV Video Decoder and selecting Native DXVA, but it only says "LAV Video Decoder" in the Video Decoder, nothing about DXVA, although I do see that the GPU load is higher when it's used.

Should I try a different version of PotPlayer maybe?

Also, can you please explain the difference between the video decoder and video filter? What is the Video Decoder used for, and what is FFDSHOW used for?

Thanks

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

Native DXVA needs DXVA renderer to be successfully connected to it. Each decoded frame must be passed to renderer in graphics memory. Directly.
Check Video - Video renderer. I use Auto: Enhanced Video Renderer (Custom Present)

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

So is madVR not a DXVA renderer?

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

It wont work with Native DXVA Decoder as I can see. Perhaps there is some cause of it wink

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

OK I can get it to work if I do this:

http://image.prntscr.com/image/6bb90ec74b5248649d2b43a54ef1b5bb.png

http://image.prntscr.com/image/b4c45ee6b3bb43b5b915c1ce7c3a55ae.png

Result:

http://image.prntscr.com/image/166bc14892514b8289b576bb4d095658.png

I know DXVA is working because the FPS is higher and smoother and I also see the GPU load is higher.

But my question is about the output, with the built in decoder I get a YUY2 16 bit output, and with LAV I get 12bit NV12, is there a big difference? Can I force YUY2 on LAV?

Also, what is ffdshow being used for? I still don't understand why I need both LAV Video and ffdshow AND madVR.

Thanks

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

ffdShow is software (post)filter. If you want to use only hardware processing (DXVA) then ffdShow is not needed.

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

> with the built in decoder I get a YUY2 16 bit output
And what is the source? Common source have 12bit YV12 color space.

> with LAV I get 12bit NV12
NV12 is similar to YV12 but with swapped color channels.

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

Source is YUY2... the question is if there's a quality difference between YUY2 and NV12?

Also is there a big diff between native DXVA and Copy Back DXVA? I just want to know if I should use the built in FFmpwg decoder or LAV for DXVA.

Thx

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

DXVA Native work: GPU decode frame -> GPU show frame
DXVA Copy Back work: GPU decode frame -> pass to RAM -> (CPU filtering) -> pass back to GPU -> GPU show frame
If you not using ffdShow (CPU filtering) then you don't need two passes to RAM and from RAM.
Quality must be identical. CPU usage higher with DXVA Copy Back due to double copying to/from RAM.

> Source is YUY2
Why do you think so?
Your LAV settings has enabled option YUY2 but it automatically selected YV12.

See YV12 and YUY2 options at your picture.

http://image.prntscr.com/image/b4c45ee6b3bb43b5b915c1ce7c3a55ae.png

YUY2 has better color resolution compared to YV12.
See Chroma subsampling "4:2:0" compared to "4:2:2"

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

Thanks for the explanation, but something doesn't make sense:

1. With built in FFMPeg & DXVA Copy Back:

http://image.prntscr.com/image/16977e23d84245d684169cbb3db49887.png

Input is AVC1 12 bit, Output is YUY2 16 bit. ffdshow shows input and output as YUY2

2. With LAV Video Decoder & Native DXVA:

http://image.prntscr.com/image/de75fadee88040feb3b199fe645333fc.png

Input is NV12 12 bit, Output is NV12 12 bit. ffdshow shows input as YV12 and output as NV12.

Why is that, shouldn't the input be the same? How can I force YUY2 output on LAV Decoder?

You said YUY2 has a better color resolution, I'd like to make sure I get the best output quality.

Thanks

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

> Why is that, shouldn't the input be the same?
No. NV12 is just hardware oriented YV12 for NVIDIA.

> How can I force YUY2 output on LAV Decoder?
Just disable YV12 and NV12 options in LAV decoder properties window.

No one knows what conversation of color is better:
AVC 12bit -- LAV --> NV12 12bit -- GPU --> RGB 24bit
or
AVC 12bit -- FFmpeg --> YUY2 16bit -- GPU --> RGB 24bit

You can try and decide it for yourself.

22 (edited by Zachn 01-03-2017 23:29:11)

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

OK, now I'm really confused.

I changed it like you said, disabled YV12 and NV12 in LAV Video Decoder:

http://image.prntscr.com/image/005679e4a4b54aa5a31389fc8ac2ef1a.png

And now, the input is suddenly YUY2, and output is still NV12:

http://image.prntscr.com/image/7d4e52f5093e4ee88333ef9b7d5e1bb0.png

This stuff is really confusing...

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

Hm. It is not expected. I see the same thing with my computer.
So, I don't know why PotPlayer uses (shows) YV12 color space for Video Codec Output.

24 (edited by Zachn 02-03-2017 08:32:11)

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

Ok, thank you for all the help MAG.

I appreciate it.

I do have one final question: How can I verify that DXVA is working? With the built in decoder it says "DXVA" but with LAV it doesn't, and even if I disable DXVA I still get 60FPS and high GPU load.

Is there some DXVA indication anywhere?

Re: PotPlayer freezes when playing MKV file with NVIDIA CUDA

I always choose either CUDA or DXVA Copy-back. I know it works because I can choose proper GPU in LAV.