[FFmpeg-user] FFmpeg single threaded bottleneck
Gabriel Balaich
roderrooder at gmail.com
Thu May 14 07:11:52 EEST 2020
TLDR; FFmpeg seems to limit certain processes or aspects of a command to a
single processing thread and it's limiting my ability to write / run
complex commands. I'm trying to understand why that is the case and if
there is a way to get around it.
Hey there, about two years ago I inquired via this email list as to why I
may be getting errors like this "real-time buffer [Capture Card] [video
input] too full or near too full (62% of size: 2147480000 [rtbufsize
parameter])! frame dropped!" constantly spammed in my console when trying
to run large / complex FFmpeg commands with a multitude of inputs and
outputs. I thought the issue may have been my inability to increase my
buffer size passed max INT, but was told that that was likely not the
issue. In the end, I ultimately accepted that commands this complex just
weren't possible as I could never really pinpoint the issue. But recently
I've very much wanted to record even more complex sources to multiple
outputs via a single command, and I think I've come closer to finding what
the issue is.
For example, here is a stripped down version of the command I currently use:
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\FFmpeg\EL\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\FFmpeg\MW\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]',
'[4:a]atrim=1.615,asetpts=PTS-STARTPTS,aresample=async=250[a1]',
'[0:a]atrim=4.879,asetpts=PTS-STARTPTS,aresample=async=250[a2]',
'[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\FFmpeg\AM\AM%02d.ts
Just to quickly explain I'm recording 3 video sources and 5 audio sources.
For the video, I'm recording a camera (4k60), my main computer monitor
(3440x1440 at 100FPS), and then a video game console (1920x1080p60, though I'd
like to record 4k on this one too). And for the audio, I'm recording
Discord (voice chat), my microphone EQd and compressed, my raw microphone
at a lower gain (incase the treated one clips so I have something to fall
back on), the audio from my desktop computer, and the audio from whatever
game console I'm capturing at any given moment. The end result, I'm
recording basically everything I'm doing at my setup simultaneously and
synchronized for easy editing with something like Adobe Premiere in post,
with the benefit of having every source recorded to its own output stream
for individual modification.
When I run this command I get the "real-time buffer [Capture Card] [video
input] too full or near too full (62% of size: 2147480000 [rtbufsize
parameter])! frame dropped!" spammed in my console when I start the command
and when I end the command. But only at the beginning and end like I just
described, for the most part, the command runs "normally" and in real-time,
albeit just barely. Seeing as the error is pointing out that my buffer is
too full I was under the impression the issue was the buffer (as previously
stated), but upon further inspection, I can see that FFmpeg is completely
saturating one of my processing threads when running the above command:
[image: image.png]
As a result, when I open something on the computer while running this
command I drop frames, even something as simple as the calculator app,
because anything that requests even a little bit of power from that thread
takes it away from FFmpeg which is capping it out. Furthermore if I try to
add further complexity to my command, like say another 4k capture card with
a 4K input and output to the command (to replace the 1080p card) it just
can't run in real-time, my RAM usage just keeps increasing until my RAM is
completely saturated and my computer bluescreens. Inversely, if I run each
output from the first command as a separate process in three seperate
instances of powershell as opposed to all in one like this:
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 3840x2160 -framerate 60 `
-pixel_format nv12 -i video="AVerMedia HD Capture GC573
1":audio="SPDIF/ADAT (1+2) (RME Fireface UC)" `
-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 (('"[2:v]setpts=PTS-STARTPTS[v1]',
'[2:a]atrim=1.615,asetpts=PTS-STARTPTS,aresample=async=250[a1]',
'[0:a]atrim=4.879,asetpts=PTS-STARTPTS,aresample=async=250[a2]',
'[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
ffmpeg -y `
-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)" `
-map 0:0,0:1 -map 0: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
ffmpeg -y `
-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)" `
-map 0:0,0:1 -map 0: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
But still, at the same time (all three commands started and ended within
less than half a second), the load seems to be more evenly distributed with
no core consistently over 60% usage:
[image: image.png]
Furthermore, there are no real-time buffer errors or dropped frames at all,
all three commands start and end gracefully, and if I open another basic
application while running these commands separately they carry on without a
hiccup. So it would seem pretty obvious to me that the problem was never
the buffer size, but that a process within a single instance of FFmpeg is
limited to a single processing thread, regardless of how many inputs and
outputs you have. Basically, from what I can tell, FFmpeg is incapable of
scaling vertically.
My plan is to upgrade my capture PC with a 16 core Threadripper (1950X) and
another 4K capture card so I can capture from three 4k cards simultaneously
with FFmpeg while simultaneously running an instance of OBS that is
streaming to Twitch and Discord at the same time. The reason for this is so
I can stream at 1080p with the scene functionality of OBS, but then record
each source at its native resolution / FPS to separate streams using FFmpeg
for easy / high-quality post-production editing, as opposed to just
recording with OBS in-which each video source is baked into one stream at a
much lower resolution and framerate. This way if I wanted to remove my
camera from the from a clip, grab something from a scene that wasn't
currently displaying in the active OBS scene, or full screen my camera /
gameplay everything stays crisp because with FFmpeg each video source is
being outputted to its own video stream at full quality.
However, I don't think it's possible for me to do that with a single FFmpeg
command with how FFmpeg is currently functioning in accordance with my
testing. My only option is to run each command separately which on the
surface seems like a fairly simple thing to do, the only problem is...
getting them to start at the same time is no simple task. Even when using a
separate script to start each command as their own processes
programmatically I have a possible drift between each source of about half
a second, as opposed less than a tenth of a second when running everything
as one command. Basically, it's hard to keep things synchronized. On top of
that, it's difficult to manage the output of each command through a single
terminal, and trying to end each process gracefully with "q" or [ctr+c] is
nigh impossible without dipping into an actual programming language that
allows you to start a process or multiple processes while retaining the
ability to send input to the STDIN.
So really my main questions are:
1) What part of an FFmpeg process is limited to a single processing thread?
2) Why is that process limited to a single processing thread?
3) Is it possible to force the said process to use multiple processing
threads?
I've attached the full console output for the two above scenarios I
provided earlier (one command vs separate commands), keep in mind that
while the second scenario is using multiple FFmpeg processes they are still
being run simultaneously, so each input and output is being run at the same
time, just like the first command.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 128885 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20200513/2b0435c8/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 98153 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20200513/2b0435c8/attachment-0001.png>
-------------- next part --------------
PS G:\My Drive\Programming\Powershell\FFmpeg\FFmpeg Context Commands> 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]',
'[4:a]atrim=1.615,asetpts=PTS-STARTPTS,aresample=async=250[a1]',
'[0:a]atrim=4.879,asetpts=PTS-STARTPTS,aresample=async=250[a2]',
'[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
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200328
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 42.102 / 56. 42.102
libavcodec 58. 77.101 / 58. 77.101
libavformat 58. 42.100 / 58. 42.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.101 / 7. 77.101
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, dshow, from 'audio=Analog (1+2) (RME Fireface UC)':
Duration: N/A, start: 593861.081000, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, dshow, from 'audio=ADAT (5+6) (RME Fireface UC)':
Duration: N/A, start: 593861.825000, bitrate: 1411 kb/s
Stream #1:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for Input Stream #2.1 : stereo
Input #2, dshow, from 'video=Game Capture HD60 Pro (Video) (#01):audio=Game Capture HD60 Pro (Audio) (#01)':
Duration: N/A, start: 593863.853714, bitrate: 1411 kb/s
Stream #2:0: Video: rawvideo (YV12 / 0x32315659), yuv420p, 1920x1080, 60 fps, 60 tbr, 10000k tbn, 10000k tbc
Stream #2:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for Input Stream #3.1 : stereo
Input #3, dshow, from 'video=Video (00 Pro Capture HDMI 4K+):audio=ADAT (3+4) (RME Fireface UC)':
Duration: N/A, start: 593864.404000, bitrate: N/A
Stream #3:0: Video: rawvideo (NV12 / 0x3231564E), nv12, 3440x1440, 100 fps, 100 tbr, 10000k tbn, 10000k tbc
Stream #3:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (63% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (64% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (65% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (66% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (67% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (68% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (69% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (70% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (71% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (72% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Guessed Channel Layout for Input Stream #4.1 : stereo
Input #4, dshow, from 'video=AVerMedia HD Capture GC573 1:audio=SPDIF/ADAT (1+2) (RME Fireface UC)':
Duration: N/A, start: 593864.894000, bitrate: 1411 kb/s
Stream #4:0: Video: rawvideo (NV12 / 0x3231564E), nv12, 3840x2160, 60 fps, 60 tbr, 10000k tbn, 10000k tbc
Stream #4:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (73% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Stream #0:0 (pcm_s16le) -> atrim (graph 0)
Stream #1:0 (pcm_s16le) -> atrim (graph 0)
Stream #4:0 (rawvideo) -> setpts (graph 0)
Stream #4:1 (pcm_s16le) -> atrim (graph 0)
Stream #2:0 -> #0:0 [sync #2:1] (rawvideo (native) -> h264 (h264_nvenc))
Stream #2:1 -> #0:1 (pcm_s16le (native) -> aac (native))
Stream #3:0 -> #1:0 [sync #3:1] (rawvideo (native) -> h264 (h264_nvenc))
Stream #3:1 -> #1:1 (pcm_s16le (native) -> aac (native))
setpts (graph 0) -> Stream #2:0 (h264_nvenc)
aresample (graph 0) -> Stream #2:1 (aac)
aresample (graph 0) -> Stream #2:2 (aac)
aresample (graph 0) -> Stream #2:3 (aac)
Press [q] to stop, [?] for help
Output #0, mpegts, to 'C:\Users\gabri\Videos\EL.ts':
Metadata:
encoder : Lavf58.42.100
Stream #0:0: Video: h264 (h264_nvenc) (Main), yuv420p, 1920x1080, q=-1--1, 100000 kb/s, 60 fps, 90k tbn, 60 tbc
Metadata:
encoder : Lavc58.77.101 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 100000000/0/100000000 buffer size: 100000000 vbv_delay: N/A
Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
Output #1, mpegts, to 'C:\Users\gabri\Videos\MW.ts':B time=00:00:00.00 bitrate=N/A speed= 0x
Metadata:
encoder : Lavf58.42.100
Stream #1:0: Video: h264 (h264_nvenc) (Main), nv12, 3440x1440, q=-1--1, 288000 kb/s, 100 fps, 90k tbn, 100 tbc
Metadata:
encoder : Lavc58.77.101 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 288000000/0/288000000 buffer size: 288000000 vbv_delay: N/A
Stream #1:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
Output #2, mpegts, to 'C:\Users\gabri\Videos\AM.ts':
Metadata:
encoder : Lavf58.42.100
Stream #2:0: Video: h264 (h264_nvenc) (Main), nv12(progressive), 3840x2160, q=-1--1, 288000 kb/s, 60 fps, 90k tbn, 60 tbc (default)
Metadata:
encoder : Lavc58.77.101 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 288000000/0/288000000 buffer size: 288000000 vbv_delay: N/A
Stream #2:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
Stream #2:2: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
Stream #2:3: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
frame= 4091 fps= 59 q=9.0 Lq=9.0 q=13.0 size= 1600kB time=00:01:08.28 bitrate= 191.9kbits/s dup=14 drop=0 speed=0.987x
video:2284883kB audio:4221kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
[aac @ 000001ec0e2d8a80] Qavg: 65536.000
[aac @ 000001ec0e2db840] Qavg: 65499.996
[aac @ 000001ec0e2d5d00] Qavg: 65501.238
[aac @ 000001ec0e2d4f40] Qavg: 65501.773
[aac @ 000001ec0e2da180] Qavg: 65503.402
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (63% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (64% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (63% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (65% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (66% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (64% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (67% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (68% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (66% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (69% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (67% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (70% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (71% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (69% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (72% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (73% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (71% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (74% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (72% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (75% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Last message repeated 1 times
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (76% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Last message repeated 1 times
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (74% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (76% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Last message repeated 1 times
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (77% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (76% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (77% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (76% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (78% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Last message repeated 1 times
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (77% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (78% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (77% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (78% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (78% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (79% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (78% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (80% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Last message repeated 1 times
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (79% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (80% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Last message repeated 1 times
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (79% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec68142880] real-time buffer [Video (00 Pro Capture HDMI 4K+)] [video input] too full or near too full (81% of size: 2147480000 [rtbufsize parameter])! frame dropped!
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (80% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Last message repeated 1 times
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (81% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Last message repeated 1 times
[dshow @ 000001ec681704c0] real-time buffer [AVerMedia HD Capture GC573 1] [video input] too full or near too full (82% of size: 2147480000 [rtbufsize parameter])! frame dropped!
Last message repeated 1 times
-------------- next part --------------
1st output:
PS C:\Users\gabri> 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 3840x2160 -framerate 60 `
>> -pixel_format nv12 -i video="AVerMedia HD Capture GC573 1":audio="SPDIF/ADAT (1+2) (RME Fireface UC)" `
>> -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 (('"[2:v]setpts=PTS-STARTPTS[v1]',
>> '[2:a]atrim=1.615,asetpts=PTS-STARTPTS,aresample=async=250[a1]',
>> '[0:a]atrim=4.879,asetpts=PTS-STARTPTS,aresample=async=250[a2]',
>> '[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
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200328
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 42.102 / 56. 42.102
libavcodec 58. 77.101 / 58. 77.101
libavformat 58. 42.100 / 58. 42.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.101 / 7. 77.101
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, dshow, from 'audio=Analog (1+2) (RME Fireface UC)':
Duration: N/A, start: 609378.813000, bitrate: 1411 kb/s
Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for Input Stream #1.0 : stereo
Input #1, dshow, from 'audio=ADAT (5+6) (RME Fireface UC)':
Duration: N/A, start: 609379.641000, bitrate: 1411 kb/s
Stream #1:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Guessed Channel Layout for Input Stream #2.1 : stereo
Input #2, dshow, from 'video=AVerMedia HD Capture GC573 1:audio=SPDIF/ADAT (1+2) (RME Fireface UC)':
Duration: N/A, start: 609380.769000, bitrate: 1411 kb/s
Stream #2:0: Video: rawvideo (NV12 / 0x3231564E), nv12, 3840x2160, 60 fps, 60 tbr, 10000k tbn, 10000k tbc
Stream #2:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
Stream #0:0 (pcm_s16le) -> atrim
Stream #1:0 (pcm_s16le) -> atrim
Stream #2:0 (rawvideo) -> setpts
Stream #2:1 (pcm_s16le) -> atrim
setpts -> Stream #0:0 (h264_nvenc)
aresample -> Stream #0:1 (aac)
aresample -> Stream #0:2 (aac)
aresample -> Stream #0:3 (aac)
Press [q] to stop, [?] for help
Output #0, mpegts, to 'C:\Users\gabri\Videos\AM.ts':
Metadata:
encoder : Lavf58.42.100
Stream #0:0: Video: h264 (h264_nvenc) (Main), nv12(progressive), 3840x2160, q=-1--1, 288000 kb/s, 60 fps, 90k tbn, 60 tbc (default)
Metadata:
encoder : Lavc58.77.101 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 288000000/0/288000000 buffer size: 288000000 vbv_delay: N/A
Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
Stream #0:2: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
Stream #0:3: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
frame= 6949 fps= 59 q=12.0 Lsize= 3506797kB time=00:01:56.12 bitrate=247395.4kbits/s dup=7 drop=0 speed=0.982x
video:3424990kB audio:5645kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 2.220058%
[aac @ 00000288ef735d40] Qavg: 65516.613
[aac @ 00000288ef7341c0] Qavg: 65515.324
[aac @ 00000288ef7361c0] Qavg: 65516.406
2nd output:
PS C:\Users\gabri> ffmpeg -y `
>> -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)" `
>> -map 0:0,0:1 -map 0: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
>>
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200328
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 42.102 / 56. 42.102
libavcodec 58. 77.101 / 58. 77.101
libavformat 58. 42.100 / 58. 42.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.101 / 7. 77.101
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, dshow, from 'video=Game Capture HD60 Pro (Video) (#01):audio=Game Capture HD60 Pro (Audio) (#01)':
Duration: N/A, start: 609380.202000, bitrate: 1411 kb/s
Stream #0:0: Video: rawvideo (YV12 / 0x32315659), yuv420p, 1920x1080, 60 fps, 60 tbr, 10000k tbn, 10000k tbc
Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
Stream #0:0 -> #0:0 [sync #0:1] (rawvideo (native) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mpegts, to 'C:\Users\gabri\Videos\EL.ts':
Metadata:
encoder : Lavf58.42.100
Stream #0:0: Video: h264 (h264_nvenc) (Main), yuv420p, 1920x1080, q=-1--1, 100000 kb/s, 60 fps, 90k tbn, 60 tbc
Metadata:
encoder : Lavc58.77.101 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 100000000/0/100000000 buffer size: 100000000 vbv_delay: N/A
Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
frame= 6978 fps= 59 q=9.0 Lsize= 2702kB time=00:01:56.42 bitrate= 190.2kbits/s speed=0.98x
video:1082kB audio:30kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 143.115768%
[aac @ 000001ed0d35f2c0] Qavg: 65536.000
3rd output:
PS C:\Users\gabri> ffmpeg -y `
>> -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)" `
>> -map 0:0,0:1 -map 0: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
ffmpeg version git-2020-04-03-52523b6 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200328
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 42.102 / 56. 42.102
libavcodec 58. 77.101 / 58. 77.101
libavformat 58. 42.100 / 58. 42.100
libavdevice 58. 9.103 / 58. 9.103
libavfilter 7. 77.101 / 7. 77.101
libswscale 5. 6.101 / 5. 6.101
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Guessed Channel Layout for Input Stream #0.1 : stereo
Input #0, dshow, from 'video=Video (00 Pro Capture HDMI 4K+):audio=ADAT (3+4) (RME Fireface UC)':
Duration: N/A, start: 609379.571000, bitrate: N/A
Stream #0:0: Video: rawvideo (NV12 / 0x3231564E), nv12, 3440x1440, 100 fps, 100 tbr, 10000k tbn, 10000k tbc
Stream #0:1: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
Stream #0:0 -> #0:0 [sync #0:1] (rawvideo (native) -> h264 (h264_nvenc))
Stream #0:1 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mpegts, to 'C:\Users\gabri\Videos\MW.ts':14:32:22.77 bitrate= -0.0kbits/s speed=N/A
Metadata:
encoder : Lavf58.42.100
Stream #0:0: Video: h264 (h264_nvenc) (Main), nv12, 3440x1440, q=-1--1, 288000 kb/s, 100 fps, 90k tbn, 100 tbc
Metadata:
encoder : Lavc58.77.101 h264_nvenc
Side data:
cpb: bitrate max/min/avg: 288000000/0/288000000 buffer size: 288000000 vbv_delay: N/A
Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 320 kb/s
Metadata:
encoder : Lavc58.77.101 aac
frame=11624 fps= 98 q=9.0 Lsize= 64364kB time=00:01:56.23 bitrate=4536.4kbits/s dup=2 drop=0 speed=0.983x
video:59372kB audio:1748kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.306002%
[aac @ 00000228d01c8740] Qavg: 65516.363
More information about the ffmpeg-user
mailing list