Been setting up a recording build for a friend to resemble mine, but I can't seem to get things to work in real-time despite sufficient (as far as I can tell) hardware.

System specs: 8600K, GTX 1050ti, 16Gb RAM, 1tb 860 EVO

Test command (updated for simplicity):

ffmpeg -y -hide_banner -thread_queue_size 9999 -f dshow -rtbufsize 2147.48M -video_size 1920x1080 -framerate 60 `
-i video="@device_pnp_\\?\usb#vid_07ca&pid_0570&mi_00#7&3886ab1a&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global" `
-thread_queue_size 9999 -f dshow -rtbufsize 2147.48M -video_size 1920x1080 -framerate 60 `
-i video="@device_pnp_\\?\usb#vid_07ca&pid_0570&mi_00#7&24df76f&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global" `
-map 0 -c:v h264_nvenc -r 60 -preset: llhp -pix_fmt yuv420p -b:v 1M -minrate 1M -maxrate 1M -bufsize 1M `
C:\Users\Jordan\Videos\FFmpeg\Left\Left.ts `
-map 1 -c:v h264_nvenc -r 60 -preset: llhp -pix_fmt yuv420p -b:v 1M -minrate 1M -maxrate 1M -bufsize 1M `

The goal of this command is to record 2 seperate syncronized outputs. However, for one reason or another this command is not transcoding video in real-time, which is a big issue when you're trying to record, not simply convert a file. When I omit one of the two outputs or if I halve the resolution of each input / output everything works in real-time. This would make me believe there is a bottleneck in the system somewhere but when monitoring everything in task manager nothing is even close to capping out (GPU encoder, cpu, ram, and SSD below 30% usage).

Furthermore when I try recording both streams in one 4K60 video via OBS things work perfectly fine, as in real-time. So I don't understand how transcoding two 1080p60 streams in FFmpeg would be anymore intensive than one 4K60 stream in OBS...

I have since swapped the 1050ti out for a GTX 1080 with no difference in performance. This would lead me to believe the CPU is at fault. It looks like FFmpeg is really only hitting 1-2 threads... any way to force it to use more? -threads doesn't seem to have any affect regardless of where I inject it into the command. What's really weird is I have have a very similar command but I'm doing two 4K60 streams as opposed two 1080p60 streams with a GTX 1080 and 6800K... As far as I can tell the 8600K has higher per thread performance in comparison to the 6800K so I'm not sure how I'm able to get away with so much more.

Any insight would be higly appreciated.

  • It's not using more threads because you are compressing with nvenc. – chew socks Dec 2 '18 at 21:42
  • Most of that CPU is probably audio, actually. You could try remove all the audio related flags and putting in -an in their place to test this. – chew socks Dec 2 '18 at 21:45
  • Thank you for the comment, I tried removing all audio and put -an in place. Things are still starting far below real-time and then creeping up, looks like it would take about 40-50 minutes... What I don't understand is if I use the same command on my PC (change the capture cards) everything just works right from the get go and it has a theoretically inferior CPU. Could it be something to do with this CPU lacking hyper threading? nvenc is encoding but the CPU is still decoding right? The GPUs encoder is barely being touched. – Nimble Dec 3 '18 at 3:12
  • Your inputs are dshow, so there's not much "decoding" to speak of, mostly memory I/O ops. – Gyan Dec 3 '18 at 5:44
  • Wouldn't that infer that the CPU isn't needed much in the process? The reason I suggested he get an 8600K over the 8700K is I assumed the GPU was doing all the heavy lifting. I'm just comparing his PC to mine and really the only notable difference is that my CPU hyperthreads while his does not. It's all very frustrating, been here about a millions times with FFmpeg though and I eventually figure it out. – Nimble Dec 3 '18 at 6:09

The problem was with the capture cards, I pulled one from his system and put it in mine and was able to replicate the issue. This is not reproducible with any of my other capture cards and I have 4 of them.

The issue seems to be caused by Avermedia's stream engine bloatware stored on the card itself. The card actually shows as two devices, one without stream engine in the name and one with, if you select the one with the issues are alleviated but still present. Anyways seeing as I can confirm the issue is non-existent on Elgato's HD60 Pro we've placed an order for 2 of those.

In retrospect bloatware / unconventional firmware easily explains the extremely hard to diagnose issues. Luckily we purchased the Avermedia Live Gamer HD 2s on deal and can resell them for a full refund, good riddance.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.