[FFmpeg-user] FFmpeg single threaded bottleneck

Gabriel Balaich roderrooder at gmail.com
Thu May 14 21:04:42 EEST 2020

> Disable Game Mode in Windows 10 and retest.
Just tried disabling game mode and unfortunately, I still have one thread
being completely maxed out when running all three outputs in one instance
of FFmpeg like so:
ffmpeg -y `
-thread_queue_size 9999 -indexmem 9999 -f dshow -rtbufsize 2147.48M -i
audio="Analog (1+2) (RME Fireface UC)" `
-thread_queue_size 9999 -indexmem 9999 -f dshow -rtbufsize 2147.48M -i
audio="ADAT (5+6) (RME Fireface UC)" `
-thread_queue_size 9999 -indexmem 9999 -f dshow -rtbufsize 2147.48M
-video_size 1920x1080 -framerate 60 `
-pixel_format yuv420p -i video="Game Capture HD60 Pro (Video)
(#01)":audio="Game Capture HD60 Pro (Audio) (#01)" `
-thread_queue_size 9999 -indexmem 9999 -f dshow -rtbufsize 2147.48M
-video_size 3440x1440 -framerate 100 `
-pixel_format nv12 -i video="Video (00 Pro Capture HDMI 4K+)":audio="ADAT
(3+4) (RME Fireface UC)" `
-thread_queue_size 9999 -indexmem 9999 -f dshow -rtbufsize 2147.48M
-video_size 3840x2160 -framerate 60 `
-pixel_format nv12 -i video="AVerMedia HD Capture GC573
1":audio="SPDIF/ADAT (1+2) (RME Fireface UC)" `
-map 2:0,2:1 -map 2:1 -c:v h264_nvenc -preset: hp -r 60 -rc-lookahead 120
-pix_fmt yuv420p -b:v 100M -minrate 100M `
-maxrate 100M -bufsize 100M -c:a aac -ar 44100 -b:a 320k -af
"aresample=async=250" `
-ss 00:00:02.482 -vsync 1 -max_muxing_queue_size 9999
C:\Users\gabri\Videos\EL.ts `
-map 3:0,3:1 -map 3:1 -c:v h264_nvenc -preset: hp -r 100 -rc-lookahead 200
-pix_fmt nv12 -b:v 288M -minrate 288M `
-maxrate 288M -bufsize 288M -c:a aac -ar 44100 -b:a 320k -af "atrim=0.034,
asetpts=PTS-STARTPTS, aresample=async=250" `
-ss 00:00:01.904 -vsync 1 -max_muxing_queue_size 9999
C:\Users\gabri\Videos\MW.ts `
-c:v h264_nvenc -preset: hp -r 60 -rc-lookahead 120 -pix_fmt nv12 `
-b:v 288M -minrate 288M -maxrate 288M -bufsize 288M -c:a aac -ar 44100 -b:a
320k `
-filter_complex (('"[4:v]setpts=PTS-STARTPTS[v1]',
'[1:a]atrim=4.199,asetpts=PTS-STARTPTS,aresample=async=250[a3]"') -join
';') `
-map "[v1]" -map "[a1]" -map "[a2]" -map "[a3]" `
-vsync 1 -max_muxing_queue_size 9999 C:\Users\gabri\Videos\AM.ts
[image: image.png]

As before, when I run each output in its own instance of FFmpeg that thread
doesn't even reach 60% usage. Maybe worth mention / pointing out, when I'm
running all the inputs / outputs in one instance it's always an issue with
that thread specifically, the one at index 4 (when starting at 0) as can be
seen in the screenshot above.

Also, just as a sanity check, my photos are showing right? I guess I didn't
stop to think that this email list may not support in-line images.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 117895 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20200514/cdbd74ed/attachment.png>

More information about the ffmpeg-user mailing list