[FFmpeg-user] 4K 60Hz Directshow Video Capture

James Girotti james.girotti at gmail.com
Tue Feb 13 20:32:32 EET 2018

On Tue, Feb 13, 2018 at 6:57 AM, Alex P <alex.p at avenview.com> wrote:

> I think I've figured it out. When I use nv12 or yuv420p as the input and
> output pixel format, I get x1 performance. If I use bgr24/rgb24 as the
> input and yuv444p as the output, I get around x0.3.

Looks like switching pixel formats highly impacts performance. It would be
better for your capture card to output, for example, yuv444p. I can't tell
from the specs if it can do that though.

Careful selecting nv12 as format for output, my quick test showed that the
final output was yuv420p.

> In your testing James, what was the pixel format?

I was testing yuv420p samples as that is what was available to me at the
time. I have made a yuv444p using testsrc. My poor Thuban cannot decode
this FFv1 at realtime and raw-video filesize is gigantic. So I made a
lossless hevc yuv444p. Surprisingly (or maybe not) hevc_cuvid can't decode
it! Again, my poor Thuban cannot decode real-time, but there's some hope:

FFmpeg encoding speed was about 35-40 fps and hw-encoder utilization topped
out at 40%. So there's still a lot of headroom in the hw-encoder. Rough
theoretical calculation: I could get 100fps hw-encoding which is ~1.7X

I got about the same speed for h264_nvenc lossless. I got similar results
using a 3 second raw yuv444p video input file.

If there are other pix_fmts you would like me to test, let me know. I'll do
my best to try.

More information about the ffmpeg-user mailing list