[FFmpeg-user] FFmpeg Not Transcoding In Real Time

Gabriel Balaich roderrooder at gmail.com
Wed Dec 5 19:33:36 EET 2018


>
> It's hard for me to understand your complete commandline, there are a lot
> of options. It seems to me that some of your options are not optimum, but
> they may be the settings that you want/need, which is fine that's up to you
> to decide (I don't quite understand why you'd want to output in NV12, but
> that's your business). I suggest that you drastically simplify your
> commandline. It will be easier to troubleshoot. You might also try saving
> the input directly to a file without any transcoding. Then use that file to
> test with at first to see how many FPS you can get. Something like:
>
> ffmpeg -i "whatever_your_input_is" -map 0 -c copy -t 60 input1.ts
>
> ffmpeg -i input1.ts -c:v h264_nvenc output1.ts
>
> If that performs well, then try two inputs. If that performs well, then try
> the "live" input, etc.
>
Thanks for the reply!

Basically every option in the command is put in place to keep the two parts
syncronized (A/V) with themselves and each other during segmentation. I run
basically the same command on my computer but with more sources, it took
months and months to figure out how to keep everything synchronized.

That being said I definitely should have simplified the command before
asking for help, I guess my thought process was I need this specific
command working not a simpler one, but that makes it extremely hard to
troubleshoot. I eventually simplified things down to this:

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 `
C:\Users\Jordan\Videos\FFmpeg\Right\Right.ts

And the same issues persisted, also my color format was nv12 at the time
because I was just trying to test things, oops.

I went on to swap out the CPU, RAM, SSD, and nothing fixed the issue
despite the same command working on my PC with the same software and
drivers... However eventually I pulled one of the caputre cards from his
system and put it in mine and was able to replicate the issue, this was 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. 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. In retrospect bloatware / unconventional firmware easily
explains the extremely hard to diagnose issues. This still doesn't quite
explain why they work perfectly in OBS but not FFmpeg, I mean the stream
engine software does seem to be pretty clearly built for OBS... But
honestly at this point I don't care, I've spent way too much time trying to
get these cards to work while knowing other ones work right out the gate.

We decided to just put a new order in for a couple Elgato HD60 Pros which I
can confirm do not exhibit the same behavior. We originally purchase the
Avermedia Live Gamer HD 2s because they were on deal for $100 and had
pretty much identical features to the Elgatos on paper.


More information about the ffmpeg-user mailing list