NVCUVID mpeg2 corrupted output

Hello,

it seems that NVCUVID for Linux has some strange bug. When I try to decode mpeg2 video with cudaDecodeGL sample, it outputs some strange garbage. For instance, the result of decoding plush1_720p_10s.m2v video supplied with CUDA SDK is this: [url]http://barbashov.pro/mpeg2.mp4[/url].

Interesting thing is that I have three test sites for the project:

  1. Amazon g2.2xlarge instance with GRID K520. mpeg2 and h264 decoding both work flawlessly.
  2. My own PC with GTX 680. It hadn’t worked there at first, but then I’ve installed CUDA libraries for Windows, compiled samples with Visual Studio and suddenly it worked! And now mpeg2 works in Linux too. So I guess there is some sort of “switch” somewhere in video card firmware, enabling mpeg2 decoding, that can be turned on by Windows NVCUVID dll, but not by Linux libnvcuvid.so. I know it sounds fantastic, but it’s all I have.
  3. “Production” server. Two GTX 980 Ti, only Linux (Windows can’t be installed), mpeg2 doesn’t work.
    All the sites have identical Ubuntu 15.10 with 352.79 NVIDIA driver.

How do I make it work without installing Windows? :) Any suggestions?

IMPORTANT UPDATE. If you experience this behavoir, try to set field ulCreationFlags of structure CUVIDDECODECREATEINFO to cudaVideoCreate_PreferCUVID explicitly, don’t leave it default.

UPDATE

It turns out that Windows doesn’t help either. I’ve tried the approach on another PC with GTX 680 yesterday. Mpeg2 doesn’t work under Linux, but works under Windows. And there is no way I could make it work under Linux.

The cudaDecodeGL sample(shipped in CUDA 7.5 Production release) works on my Ubuntu 14.04_x64/GTX 970 setup. I don’t see the corrupted output when decoding the “plush1_720p_10s.m2v” video file supplied with the sample.

Also don’t hit this corrupted output with Ubuntu 14.04_x64/GTX745.

Thank you kkang!
Thank you MartinWang!

That’s quite interesting.
Especially since we’ve found GTX 720, tried to test mpeg2 with it and it doesn’t work either.

Anyway, still trying to work this out. You helped a lot, thanks again!

@barbashov

Could you please check whether the OpenGL libs are installed properly on your Ubuntu systems?

Please note that installing Mesa may overwrite the /usr/lib/libGL.so that was previously installed by the NVIDIA driver, so a re-installation of the NVIDIA driver might be required after installing these libraries.

See more @
http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#runfile

@kkang

Thank you for you suggestion, but it’s not the case.

@all

It seems that I’ve managed to fix this error. It works now if I set CUVIDDECODECREATEINFO’s ulCreationFlags field to cudaVideoCreate_PreferCUVID explicitly. But there is interesting thing that I’ve tried that before and it didn’t work. I think it is somehow connected to driver version, but I’m too tired of this bug to continue investigation. It works now and I’m just happy that I can live normal life again :)

Case closed.