"Performance warning. Host to device transfer not complete, GPU will be stalled"

Hi,
we’re using CasparCG 2.0.7. on our workstation.
CPU i9-9900
GPU Quadro P2000
32GB RAM
Windows 10 64-bit

We’re using only simple video playout and RTMP send to server.

Whole the time this error is coming up in CasparCG:

[trace] [image_mixer] Performance warning. Host to device transfer not complete, GPU will be stalled

I couldn’t find it via Google, and here on forum.
Any idea what’s causing it?

Thank you!

Check this post and see if your settings are as the post indicates.

This post gave me the idea to ask you, if you have disabled the "Aero* theme in Windows, by activating the “optimize for best performance” in control panel. A thing you always need to do to make Caspar work properly.

Tried and I’m still getting this problem:

Now that I see the screenshot you posted (and paid a bit more attention to the original post), this is a trace message, so maybe @Julusian or any of the core developers might shed some light in all this.

@veks, do you have any performance issues because of this bug? Have you tried with a newer version of CasparCG Server?

@noquierouser as far as I can tell we didn’t had any performance issues that we’ve noticed. But I’m concerned that we might get it at some point.

As for the latest CasparCG 2.3.0 we’ve tried to get it working to stream to RTMP server an playout output and it wouldn’t send anything and this is the config:

 <channels>
        <channel>
            <video-mode>720p5000</video-mode>
            <consumers>
				<ffmpeg>
			<path>rtmp://192.168.1.13:1935/test/stream2</path>
			<args>-vcodec libx264 -crf 20 -vf scale=1280x720,format=pix_fmts=yuv420p -acodec aac -ab 96k -ac 2 -ar 44100 -f flv</args>
		</ffmpeg>
		<ffmpeg>
			<path>rtmp://192.168.1.22:8888/test/stream1</path>
			<args>-vcodec libx264 -crf 20 -vf scale=1280x720,format=pix_fmts=yuv420p -acodec aac -ab 96k -ac 2 -ar 44100 -f flv</args>   
		</ffmpeg>
            </consumers>
        </channel>
    </channels>

This works fine with 2.0.7. Of course with “stream” tag instead of “ffmpeg”.

Thanks! :slight_smile:

@noquierouser the 2.0 code is from before I started working on caspar so unfortonately I cannot be of any help here.

@veks The syntax of args needed for 2.2+ changed significantly. There are many other cases of this around the forum which should provide some help on getting your comamnds updated

@Julusian
and this is another problem we get on 2.3.0


Any idea what is the reason for this?

Thanks!

@Julusian
Ok, it seems I’ve solved it by using this FFMpeg command:

			<args>-codec:v libx264 -preset:v fast -crf:v 22 -b:v 6000k -maxrate:v 7000k -bufsize:v 200k -codec:a aac -b:a 192k -ar:a 44100 -format flv</args>

But I’m getting this, which shows that Caspar/FFMpeg aren’t using NVIDIA/CUDA for encoding, which command can I use in FFMpeg to force it?

[ffmpeg] [libx264 @ 00000225DC8BCD80] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
[2020-06-01 12:21:22.380] [info]    [ffmpeg] [libx264 @ 00000225DC8BCD80] profile High 4:2:2, level 3.2, 4:2:2, 8-bit

Im not sure what will be causing that error without seeing the parameters, but its going to be not understanding one of them.

not using the gpu is expected. you have to explicitly tell ffmpeg to use the hardware encoder with -codec:v h264_nvenc. It might need some other parameter to be different too, but Ive never tried.