[FFmpeg-user] Max rtbufsize Via dshow

Gabriel Balaich roderrooder at gmail.com
Sat Sep 15 02:04:03 EEST 2018


>
> This indicates a performance issue...
>
> ... but it's easier to debug if you also provide the complete,
> uncut console output.
>

Thank you for the reply.

System specs:
Asus X99-E
Intel 6800K
Nvidia GTX 1080
G.Skill Tridentz 32GB DDR4
1TB Samsung 860 Evo
Magwell Pro Capture HDMI 4K Plus
Avermedia Live Gamer 4K
Corsair HX750

Uncut console:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\djcim> ffmpeg -y -hide_banner -thread_queue_size 9999 -indexmem
9999 -guess_layout_max 0 -f dshow -rtbufsize 2147.48M `
>> -i audio="Analog (1+2) (RME Fireface UC)" `
>> -thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow
-rtbufsize 2147.48M `
>> -i audio="ADAT (5+6) (RME Fireface UC)" `
>> -thread_queue_size 9999 -indexmem 9999 -r 25 -f lavfi -rtbufsize
2147.48M -i color=c=black:s=50x50 `
>> -thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow
-video_size 3840x2160 -rtbufsize 2147.48M `
>> -framerate 60 -pixel_format nv12 -i video="AVerMedia HD Capture GC573
1":audio="SPDIF/ADAT (1+2) (RME Fireface UC)" `
>> -thread_queue_size 9999 -indexmem 9999 -guess_layout_max 0 -f dshow
-video_size 3840x2160 -rtbufsize 2147.48M `
>> -framerate 60 -pixel_format nv12 -i video="Video (00 Pro Capture HDMI
4K+)":audio="ADAT (3+4) (RME Fireface UC)" `
>> -map 2,0 -map 0 -c:v libx264 -r 25 -rc-lookahead 50 -forced-idr 1
-sc_threshold 0 -flags +cgop `
>> -force_key_frames "expr:gte(t,n_forced*2)" -preset ultrafast -pix_fmt
nv12 -b:v 16K -minrate 16K -maxrate 16K -bufsize 16k `
>> -c:a aac -ar 44100 -b:a 384k -ac 2 -af "aresample=async=250" -vsync 1
-ss 00:00:00.000 `
>> -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9
-reset_timestamps 1 `
>> -segment_format_options max_delay=0
C:\Users\djcim\Videos\Main\Discord\Discord%02d.ts `
>> -map 2,1 -map 1 -c:v libx264 -r 25 -rc-lookahead 50 -forced-idr 1
-sc_threshold 0 -flags +cgop `
>> -force_key_frames "expr:gte(t,n_forced*2)" -preset ultrafast -pix_fmt
nv12 -b:v 16K -minrate 16K -maxrate 16K -bufsize 16k `
>> -c:a aac -ar 44100 -b:a 384k -ac 2 -af "aresample=async=250" -vsync 1
-ss 00:00:00.000 `
>> -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9
-reset_timestamps 1 `
>> -segment_format_options max_delay=0
C:\Users\djcim\Videos\Main\Soundboard\Soundboard%02d.ts `
>> -map 3:0,3:1 -map 3:1 -c:v h264_nvenc -r 60 -rc-lookahead 120
-forced-idr 1 -strict_gop 1 -sc_threshold 0 -flags +cgop `
>> -force_key_frames "expr:gte(t,n_forced*2)" -preset: llhp -pix_fmt nv12
-b:v 250M -minrate 250M -maxrate 250M -bufsize 250M `
>> -c:a aac -ar 44100 -b:a 384k -ac 2 -af "pan=mono|c0=c0,
aresample=async=250" -vsync 1 -ss 00:00:00.000 `
>> -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9
-reset_timestamps 1 `
>> -segment_format_options max_delay=0
C:\Users\djcim\Videos\Main\Camera\Camera%02d.ts `
>> -map 4:0,4:1 -map 4:1 -c:v h264_nvenc -r 60 -rc-lookahead 120
-forced-idr 1 -strict_gop 1 -sc_threshold 0 -flags +cgop `
>> -force_key_frames "expr:gte(t,n_forced*2)" -preset: llhp -pix_fmt nv12
-b:v 250M -minrate 250M -maxrate 250M -bufsize 250M `
>> -c:a aac -ar 44100 -b:a 384k -ac 2 -af "atrim=0.086,
asetpts=PTS-STARTPTS, aresample=async=250" -vsync 1 -ss 00:00:00.000 `
>> -max_muxing_queue_size 9999 -f segment -segment_time 600 -segment_wrap 9
-reset_timestamps 1 `
>> -segment_format_options max_delay=0
C:\Users\djcim\Videos\Main\Magewell\Magewell%02d.ts
Input #0, dshow, from 'audio=Analog (1+2) (RME Fireface UC)':
  Duration: N/A, start: 72723.212000, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Input #1, dshow, from 'audio=ADAT (5+6) (RME Fireface UC)':
  Duration: N/A, start: 72723.898000, bitrate: 1411 kb/s
    Stream #1:0: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Input #2, lavfi, from 'color=c=black:s=50x50':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #2:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 50x50 [SAR
1:1 DAR 1:1], 25 tbr, 25 tbn, 25 tbc
Input #3, dshow, from 'video=AVerMedia HD Capture GC573 1:audio=SPDIF/ADAT
(1+2) (RME Fireface UC)':
  Duration: N/A, start: 72724.839000, bitrate: 1411 kb/s
    Stream #3:0: Video: rawvideo (NV12 / 0x3231564E), nv12, 3840x2160, 60
fps, 60 tbr, 10000k tbn, 10000k tbc
    Stream #3:1: Audio: pcm_s16le, 44100 Hz, 2 channels, s16, 1411 kb/s
Input #4, dshow, from 'video=Video (00 Pro Capture HDMI 4K+):audio=ADAT
(3+4) (RME Fireface UC)':
  Duration: N/A, start: 72726.999000, bitrate: N/A
    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, 2 channels, s16, 1411 kb/s
Stream mapping:
  Stream #2:0 -> #0:0 [sync #0:0] (rawvideo (native) -> h264 (libx264))
  Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
  Stream #2:0 -> #1:0 [sync #1:0] (rawvideo (native) -> h264 (libx264))
  Stream #1:0 -> #1:1 (pcm_s16le (native) -> aac (native))
  Stream #3:0 -> #2:0 [sync #3:1] (rawvideo (native) -> h264 (h264_nvenc))
  Stream #3:1 -> #2:1 (pcm_s16le (native) -> aac (native))
  Stream #4:0 -> #3:0 [sync #4:1] (rawvideo (native) -> h264 (h264_nvenc))
  Stream #4:1 -> #3:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 000001a8f7a97ec0] using SAR=1/1
[libx264 @ 000001a8f7a97ec0] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001a8f7a97ec0] profile Constrained Baseline, level 1.0,
4:2:0, 8-bit
[libx264 @ 000001a8f7a97ec0] 264 - core 157 r2932 303c484 - H.264/MPEG-4
AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html -
options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=2
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=0 intra_refresh=0 rc_lookahead=50 rc=cbr mbtree=0
bitrate=16 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=16
vbv_bufsize=16 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
[libx264 @ 000001a8f7adefc0] using SAR=1/1
[libx264 @ 000001a8f7adefc0] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 000001a8f7adefc0] profile Constrained Baseline, level 1.0,
4:2:0, 8-bit
[libx264 @ 000001a8f7adefc0] 264 - core 157 r2932 303c484 - H.264/MPEG-4
AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html -
options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1
psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=1 8x8dct=0
cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=2
lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=250
keyint_min=25 scenecut=0 intra_refresh=0 rc_lookahead=50 rc=cbr mbtree=0
bitrate=16 ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=16
vbv_bufsize=16 nal_hrd=none filler=0 ip_ratio=1.40 aq=0
[segment @ 000001a8fd0abd00] Opening
'C:\Users\djcim\Videos\Main\Discord\Discord00.ts' for writing
Output #0, segment, to 'C:\Users\djcim\Videos\Main\Discord\Discord%02d.ts':
  Metadata:
    encoder         : Lavf58.18.100
    Stream #0:0: Video: h264 (libx264), nv12(progressive), 50x50 [SAR 1:1
DAR 1:1], q=-1--1, 16 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.27.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 16000/0/16000 buffer size: 16000 vbv_delay:
-1
    Stream #0:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 384 kb/s
    Metadata:
      encoder         : Lavc58.27.101 aac
[segment @ 000001a8f7ad6e40] Opening
'C:\Users\djcim\Videos\Main\Soundboard\Soundboard00.ts' for writing
Output #1, segment, to
'C:\Users\djcim\Videos\Main\Soundboard\Soundboard%02d.ts':
  Metadata:
    encoder         : Lavf58.18.100
    Stream #1:0: Video: h264 (libx264), nv12(progressive), 50x50 [SAR 1:1
DAR 1:1], q=-1--1, 16 kb/s, 25 fps, 90k tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.27.101 libx264
    Side data:
      cpb: bitrate max/min/avg: 16000/0/16000 buffer size: 16000 vbv_delay:
-1
    Stream #1:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 384 kb/s
    Metadata:
      encoder         : Lavc58.27.101 aac
[Parsed_pan_0 @ 000001a8f0b24c40] Pure channel mapping detected: 0
[segment @ 000001a8fd1c4780] Opening
'C:\Users\djcim\Videos\Main\Camera\Camera00.ts' for writing
Output #2, segment, to 'C:\Users\djcim\Videos\Main\Camera\Camera%02d.ts':
  Metadata:
    encoder         : Lavf58.18.100
    Stream #2:0: Video: h264 (h264_nvenc) (Main), nv12, 3840x2160, q=-1--1,
250000 kb/s, 60 fps, 90k tbn, 60 tbc
    Metadata:
      encoder         : Lavc58.27.101 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 250000000/0/250000000 buffer size:
250000000 vbv_delay: -1
    Stream #2:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 384 kb/s
    Metadata:
      encoder         : Lavc58.27.101 aac
[segment @ 000001a8fd26a480] Opening
'C:\Users\djcim\Videos\Main\Magewell\Magewell00.ts' for writinged=0.359x
Output #3, segment, to
'C:\Users\djcim\Videos\Main\Magewell\Magewell%02d.ts':
  Metadata:
    encoder         : Lavf58.18.100
    Stream #3:0: Video: h264 (h264_nvenc) (Main), nv12(progressive),
3840x2160, q=-1--1, 250000 kb/s, 60 fps, 90k tbn, 60 tbc
    Metadata:
      encoder         : Lavc58.27.101 h264_nvenc
    Side data:
      cpb: bitrate max/min/avg: 250000000/0/250000000 buffer size:
250000000 vbv_delay: -1
    Stream #3:1: Audio: aac (LC), 44100 Hz, stereo, fltp, 384 kb/s
    Metadata:
      encoder         : Lavc58.27.101 aac
frame=  425 fps= 21 q=-1.0 Lq=-1.0 q=8.0 q=9.0 size=N/A time=00:00:16.96
bitrate=N/A dup=105 drop=0 speed=0.825x
video:145040kB audio:776kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: unknown
[libx264 @ 000001a8f7a97ec0] frame I:9     Avg QP: 0.19  size:    28
[libx264 @ 000001a8f7a97ec0] frame P:416   Avg QP: 0.00  size:    10
[libx264 @ 000001a8f7a97ec0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 000001a8f7a97ec0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:
0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
[libx264 @ 000001a8f7a97ec0] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter:
0.0% 0.0% 0.0%
[libx264 @ 000001a8f7a97ec0] i16 v,h,dc,p: 75%  0% 25%  0%
[libx264 @ 000001a8f7a97ec0] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 000001a8f7a97ec0] kb/s:2.08
[aac @ 000001a8f7a95a40] Qavg: 65446.918
[libx264 @ 000001a8f7adefc0] frame I:9     Avg QP: 0.19  size:    28
[libx264 @ 000001a8f7adefc0] frame P:416   Avg QP: 0.00  size:    10
[libx264 @ 000001a8f7adefc0] mb I  I16..4: 100.0%  0.0%  0.0%
[libx264 @ 000001a8f7adefc0] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:
0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
[libx264 @ 000001a8f7adefc0] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0% inter:
0.0% 0.0% 0.0%
[libx264 @ 000001a8f7adefc0] i16 v,h,dc,p: 75%  0% 25%  0%
[libx264 @ 000001a8f7adefc0] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 000001a8f7adefc0] kb/s:2.08
[aac @ 000001a8f7ad8240] Qavg: 65446.918
[dshow @ 000001a8f0b2da40] real-time buffer [AVerMedia HD Capture GC573 1]
[video input] too full or near too full (62% of size: 2147480000 [rtbufsize
parameter])! frame dropped!
[dshow @ 000001a8f0b2da40] 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 @ 000001a8f0b2da40] 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 @ 000001a8f0b2da40] 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 @ 000001a8f0b2da40] real-time buffer [AVerMedia HD Capture GC573 1]
[video input] too full or near too full (71% of size: 2147480000 [rtbufsize
parameter])! frame dropped!
[aac @ 000001a8f7adbd80] Qavg: 65466.938
[dshow @ 000001a8f0b2da40] 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 @ 000001a8f0b2da40] 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 @ 000001a8f0b2da40] real-time buffer [AVerMedia HD Capture GC573 1]
[video input] too full or near too full (76% of size: 2147480000 [rtbufsize
parameter])! frame dropped!
    Last message repeated 1 times
[dshow @ 000001a8f0b2da40] real-time buffer [AVerMedia HD Capture GC573 1]
[video input] too full or near too full (77% of size: 2147480000 [rtbufsize
parameter])! frame dropped!
    Last message repeated 1 times
[dshow @ 000001a8f0b2da40] real-time buffer [AVerMedia HD Capture GC573 1]
[video input] too full or near too full (78% of size: 2147480000 [rtbufsize
parameter])! frame dropped!
    Last message repeated 1 times
[dshow @ 000001a8f0b3a7c0] real-time buffer [Video (00 Pro Capture HDMI
4K+)] [video input] too full or near too full (62% of size: 2147480000
[rtbufsize parameter])! frame dropped!
[dshow @ 000001a8f0b2da40] real-time buffer [AVerMedia HD Capture GC573 1]
[video input] too full or near too full (79% of size: 2147480000 [rtbufsize
parameter])! frame dropped!
    Last message repeated 1 times
[dshow @ 000001a8f0b2da40] 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 @ 000001a8f0b3a7c0] 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!
[aac @ 000001a8f7ade200] Qavg: 65458.449
[dshow @ 000001a8f0b3a7c0] 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 @ 000001a8f0b3a7c0] 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 @ 000001a8f0b2da40] real-time buffer [AVerMedia HD Capture GC573 1]
[video input] too full or near too full (81% of size: 2147480000 [rtbufsize
parameter])! frame dropped!
[dshow @ 000001a8f0b3a7c0] 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 @ 000001a8f0b3a7c0] 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 @ 000001a8f0b2da40] real-time buffer [AVerMedia HD Capture GC573 1]
[video input] too full or near too full (81% of size: 2147480000 [rtbufsize
parameter])! frame dropped!
[dshow @ 000001a8f0b3a7c0] 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 @ 000001a8f0b3a7c0] 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 @ 000001a8f0b3a7c0] 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!
    Last message repeated 1 times
[dshow @ 000001a8f0b3a7c0] 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 @ 000001a8f0b3a7c0] 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!
    Last message repeated 1 times
[dshow @ 000001a8f0b3a7c0] 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!
PS C:\Users\djcim>

If I watch my encoding performance through task manager everything is
consistent / flat at about 60% usage, until I end the recording, then it
jumps up to 100% usage for a few seconds. VRAM, RAM, CPU, GPU (3D), and
DISK are well below 50% usage throughout the entire process.

I don't really know anything but I would assume this has something to do
with the buffer being off-loaded to the encoder all at once when
ending a recording?


More information about the ffmpeg-user mailing list