Max rtbufsize Via dshow

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Max rtbufsize Via dshow

Gabriel Balaich
Up until a few days ago I had been running two capture cards, 1x4K card and
1x1080P card, I would encode both streams with a
GTX 1080 no dropped frames no issues. But just recently I replaced the
1080P capture card with another 4K capture card to prep
for a new camera and can't get things working gracefully. On my first test
encoding 2x4K60 streams simultaneously I dropped
frames starting the recording *and *ending the recording, but nothing
in-between.

Errors displayed:
[dshow @ 000001499bb17180] 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 @ 00000149944e7080] real-time buffer [AVerMedia HD Capture GC573 1]
[video input] too full or near too full (62% of
size: 2147480000 [rtbufsize parameter])! frame dropped!

The obvious answer, according to the warning, would be increasing rtbufsize
but I seem to have hit the cap... If I try to increase
rtbufsize passed 2147.48M I get another error:
[dshow @ 00000250df6c7080] Value 3000000000.000000 for parameter
'rtbufsize' out of range [0 - 2.14748e+09]
[dshow @ 00000250df6c7080] Error setting option rtbufsize to value 3000M.
video=AVerMedia HD Capture GC573 1:audio=SPDIF/ADAT (1+2) (RME Fireface
UC): Result too large

Is this a baked in limitation of FFmpeg or dshow? And if it is, why impose
said limitation?

Since then I've tried messing with other parts of my command and found that
by re-arranging my inputs / outputs I can prevent
frame drops upon starting a recording but I still can't end a recording
without dropping a bunch of frames.

Anyone know why re-arranging my inputs / outputs would prevent frames from
dropping when starting a recording or affect
anything? Is it possible to bypass the rtbufsize cap? Any other ideas?

Here is my full command, Ignore the blank numbers next to -ss, will be used
to sync outputs when everything is working:
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
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Max rtbufsize Via dshow

Carl Eugen Hoyos-2
2018-09-14 18:26 GMT+02:00, Gabriel Balaich <[hidden email]>:

> Errors displayed:
> [dshow @ 000001499bb17180] 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!

This indicates a performance issue...

> Here is my full command

... but it's easier to debug if you also provide the complete,
uncut console output.

Carl Eugen
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Max rtbufsize Via dshow

Gabriel Balaich
>
> 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?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Max rtbufsize Via dshow

Gabriel Balaich
>
> 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?
>

Bump, hoping I can find a solution to this.

For whatever reason I thought that rtbufsize was a component of dshow but
that is clearly not the case as it is called before dshow / it clearly
states that it is a format option and part of the "libavformat library" in
the documentation. I tried downloading the source code and tracing the
error back to where the limit is defined but I can only make it back so far
before getting lost in the code. As far as I can tell "libaveformat" is a
library exclusive to FFmpeg, anyone in here from the devel list that would
know why a limit is imposed? Also, if anyone knows, is rtbufsize
using my system RAM, VRAM, or the RAM on the capture card? My system as
32GB of memory as stated before, GPU has 8GB, but I'm
not sure how much the capture card has, could that be the limiting factor?

Could be possible that increasing the buffer size wouldn't even help, if
anyone has any other ideas I'm all ears.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Max rtbufsize Via dshow

rogerdpack2
In reply to this post by Gabriel Balaich
On Fri, Sep 14, 2018 at 10:33 AM Gabriel Balaich <[hidden email]> wrote:

>
> Up until a few days ago I had been running two capture cards, 1x4K card and
> 1x1080P card, I would encode both streams with a
> GTX 1080 no dropped frames no issues. But just recently I replaced the
> 1080P capture card with another 4K capture card to prep
> for a new camera and can't get things working gracefully. On my first test
> encoding 2x4K60 streams simultaneously I dropped
> frames starting the recording *and *ending the recording, but nothing
> in-between.
>
> Errors displayed:
> [dshow @ 000001499bb17180] 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 @ 00000149944e7080] real-time buffer [AVerMedia HD Capture GC573 1]
> [video input] too full or near too full (62% of
> size: 2147480000 [rtbufsize parameter])! frame dropped!
>
> The obvious answer, according to the warning, would be increasing rtbufsize
> but I seem to have hit the cap... If I try to increase
> rtbufsize passed 2147.48M I get another error:
> [dshow @ 00000250df6c7080] Value 3000000000.000000 for parameter
> 'rtbufsize' out of range [0 - 2.14748e+09]
> [dshow @ 00000250df6c7080] Error setting option rtbufsize to value 3000M.
> video=AVerMedia HD Capture GC573 1:audio=SPDIF/ADAT (1+2) (RME Fireface
> UC): Result too large
>
> Is this a baked in limitation of FFmpeg or dshow? And if it is, why impose
> said limitation?

The limits "max signed INT" I believe (2B).
Anyway this message typically means your system isn't keeping up with
encoding.  I'd think nvenc would be able to handle it but maybe not?

> Since then I've tried messing with other parts of my command and found that
> by re-arranging my inputs / outputs I can prevent
> frame drops upon starting a recording but I still can't end a recording
> without dropping a bunch of frames.
>
> Anyone know why re-arranging my inputs / outputs would prevent frames from
> dropping when starting a recording or affect
> anything? Is it possible to bypass the rtbufsize cap? Any other ideas?
>
> Here is my full command, Ignore the blank numbers next to -ss, will be used
> to sync outputs when everything is working:
> 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
> _______________________________________________
> ffmpeg-user mailing list
> [hidden email]
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> [hidden email] with subject "unsubscribe".
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Max rtbufsize Via dshow

Michael Shaffer
In reply to this post by Gabriel Balaich
>
> 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?
>

I'm using a GeForce 1060 3GB and when I stop the process the GPU usage
spikes. Not sure why..

http://kdca.neocities.org/gpuspike.jpg
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Max rtbufsize Via dshow

Gabriel Balaich
In reply to this post by rogerdpack2
>
> The limits "max signed INT" I believe (2B).
> Anyway this message typically means your system isn't keeping up with
> encoding.  I'd think nvenc would be able to handle it but maybe not?


That actually makes a lot of sense! So I assume when I put it 2147.48M
it's being converted to  2,147,480,000 which is just below the maximum
number an int can hold. So simple, can't believe that didn't cross my
mind.

It seems like it would be fairly easy to change the variable to a
unsigned long int... but that doesn't seem very future proof with 8k, 12k,
& 16K just around the corner. Wouldn't it make more sense to use a
double in the 64-Bit version of FFmpeg? Or maybe changing the
conversion... is anyone really setting a buffer lower than 1KB?

As for performance, the encoder is around 60% usage except for when
I start and end recordings in-which there are spikes. I was able to
alleviate the spike when starting a recording by re-arranging my inputs
and outputs... which doesn't make a ton of sense to me. But I haven't
been able to do anything about the spike when ending a recording. It
seems like the entire buffer is being thrown at the encoder at once
when ending a recording or something. I'm just pressing Q to quit, is
there a more "graceful" way?
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Max rtbufsize Via dshow

Gabriel Balaich
In reply to this post by Michael Shaffer
>
> I'm using a GeForce 1060 3GB and when I stop the process the GPU usage
> spikes. Not sure why..
>
> http://kdca.neocities.org/gpuspike.jpg


Thank you for your corroboration!
_______________________________________________
ffmpeg-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".