Hello,
I am trying to play multiple H264 encoded streams simultaneously. I have two AMD FirePro GPUs (OS: Windows 7) which I'd like to use for decoding those streams.
I've managed to utilize the first GPU for decoding by passing parameter --avcodec-hw=dxva2.
The problem is that by default, avcodec uses only the first GPU it finds and it seems that after I've opened 5-6 streams, VLC logs are starting to fill with avcodec error:
avcodec decoder error: more than X seconds of late video -> dropping frame (computer too slow ?).
I've checked GPU load with GPU-Z and it reports only 20-30% usage with 12 streams. I've also checked it with HWMonitor which says that the load is up to 85%. The result of HWMonitor is more believable though I wonder why GPU-Z shows so low usage. If anyone knows some more realiable tools to monitor GPU usage, I'm more than happy to hear about it.
I'd like to try to balance the decoding load between both GPUs available for further testing. The final question is, how can I pass the device I wanna use for decoding to libavcodec through libVLC so I can assign the second GPU for some of the streams. I checked vlc documentation and spotted parameter --avcodec-options and tried it with value --avcodec-options=hw_accel_device=1. hw_accel_device should be the avcodec parameter to index the device avcodec should use but it seemed to have no effect. All the decoding was done by the first GPU.