[FFmpeg-user] Problem with astats and adrawgraph
Michael Koch
astroelectronic at t-online.de
Tue Nov 26 18:32:41 EET 2019
Am 26.11.2019 um 14:26 schrieb Paul B Mahol:
>
>> I have a new example with testsrc2 and anoisesrc. There is no input file
>> required for reproducing.
>> There are two graphs: The first one uses signalstats and drawgraph, and
>> the second one uses astats and adrawgraph. The problem is that the two
>> graphs don't advance with the same speed in X direction. Do you have an
>> idea how to make them synchrone?The video width is the same in both
>> cases, otherwise vstack wouldn't work.
>> The speed of drawgraph is correct, 1 pixel per frame. The speed of
>> adrawgraph is too fast.
>>
>> Other question: reset=1 in astats means that the calculation result is
>> reset after each frame. But how does the filter know when a frame ends,
>> if the input of this filter is only an audio signal?
>>
>> c://ffmpeg/ffmpeg -f lavfi -i testsrc2=size=hd1080:duration=10:rate=25
>> -f lavfi -i anoisesrc=d=10:c=pink:r=48000 -lavfi
>> [0]signalstats,drawgraph=m1=lavfi.signalstats.YAVG:mode=line:slide=scroll:min=0:max=255,settb=1/25[G1];[1]astats=metadata=1:reset=1,adrawgraph=m1=lavfi.astats.1.RMS_level:mode=line:slide=scroll:min=-90:max=0,settb=1/25[G2];[G1][G2]vstack,settb=1/25
>> -r 25 -y test.mp4
>>
> Use asetnsamples, to change size of audio frame to match you video FPS.
At which place would you insert it? I did insert asetnsamples=n=48000/25
before astats and now I get "Error while filtering: Cannot allocate memory"
Console output is below.
Michael
F:\2019-10-30_Sylvia>c://ffmpeg/ffmpeg -f lavfi -i
testsrc2=size=hd1080:duration
=36:rate=25 -f lavfi -i anoisesrc=d=36:c=pink:r=48000 -lavfi
[0]signalstats,draw
graph=m1=lavfi.signalstats.YAVG:mode=line:slide=scroll:min=0:max=255,settb=1/25[
G1];[1]asetnsamples=n=48000/25,astats=metadata=1:reset=1,adrawgraph=m1=lavfi.ast
ats.1.RMS_level:mode=line:slide=scroll:min=-90:max=0,settb=1/25[G2];[G1][G2]vsta
ck,settb=1/25 -r 25 -y test.mp4
ffmpeg version git-2019-11-25-d5e3d8e Copyright (c) 2000-2019 the FFmpeg
develop
ers
built with gcc 9.2.1 (GCC) 20191125
configuration: --enable-gpl --enable-version3 --enable-sdl2
--enable-fontconfi
g --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d
--enable-libb
luray --enable-libfreetype --enable-libmp3lame
--enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-libshine --e
nable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame
--enable
-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 -
-enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib
--enable-gmp --enab
le-libvidstab --enable-libvorbis --enable-libvo-amrwbenc
--enable-libmysofa --en
able-libspeex --enable-libxvid --enable-libaom --enable-libmfx
--enable-ffnvcode
c --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec
--enable-dxva2 -
-enable-avisynth --enable-libopenmpt --enable-amf
libavutil 56. 36.100 / 56. 36.100
libavcodec 58. 62.100 / 58. 62.100
libavformat 58. 35.100 / 58. 35.100
libavdevice 58. 9.101 / 58. 9.101
libavfilter 7. 67.100 / 7. 67.100
libswscale 5. 6.100 / 5. 6.100
libswresample 3. 6.100 / 3. 6.100
libpostproc 55. 6.100 / 55. 6.100
Input #0, lavfi, from 'testsrc2=size=hd1080:duration=36:rate=25':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p,
1920x1080 [SAR 1:
1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
Input #1, lavfi, from 'anoisesrc=d=36:c=pink:r=48000':
Duration: N/A, start: 0.000000, bitrate: 3072 kb/s
Stream #1:0: Audio: pcm_f64le, 48000 Hz, mono, dbl, 3072 kb/s
Stream mapping:
Stream #0:0 (rawvideo) -> signalstats (graph 0)
Stream #1:0 (pcm_f64le) -> asetnsamples (graph 0)
settb (graph 0) -> Stream #0:0 (libx264)
Stream #1:0 -> #0:1 (pcm_f64le (native) -> aac (native))
Press [q] to stop, [?] for help
Error while filtering: Cannot allocate memory
Failed to inject frame into filter network: Cannot allocate memory
Error while processing the decoded data for stream #1:0
[Parsed_astats_4 @ 00000000005eb6c0] Channel: 1
[Parsed_astats_4 @ 00000000005eb6c0] DC offset: nan
[Parsed_astats_4 @ 00000000005eb6c0] Min level:
17976931348623157081452742373170
43567980705675258449965989174768031572607800285387605895586327668781715404589535
14382464234321326889464182768467546703537516986049910576551282076245490090389328
94407586850845513394230458323690322294816580855933212334827479782620414472316873
8177180919299881250404026184124858368.000000
[Parsed_astats_4 @ 00000000005eb6c0] Max level:
-1797693134862315708145274237317
04356798070567525844996598917476803157260780028538760589558632766878171540458953
51438246423432132688946418276846754670353751698604991057655128207624549009038932
89440758685084551339423045832369032229481658085593321233482747978262041447231687
38177180919299881250404026184124858368.000000
[Parsed_astats_4 @ 00000000005eb6c0] Min difference:
179769313486231570814527423
73170435679807056752584499659891747680315726078002853876058955863276687817154045
89535143824642343213268894641827684675467035375169860499105765512820762454900903
89328944075868508455133942304583236903222948165808559332123348274797826204144723
168738177180919299881250404026184124858368.000000
[Parsed_astats_4 @ 00000000005eb6c0] Max difference: 0.000000
[Parsed_astats_4 @ 00000000005eb6c0] Mean difference: 0.000000
[Parsed_astats_4 @ 00000000005eb6c0] RMS difference: 0.000000
[Parsed_astats_4 @ 00000000005eb6c0] Peak level dB: nan
[Parsed_astats_4 @ 00000000005eb6c0] RMS level dB: nan
[Parsed_astats_4 @ 00000000005eb6c0] RMS peak dB: nan
[Parsed_astats_4 @ 00000000005eb6c0] RMS trough dB: nan
[Parsed_astats_4 @ 00000000005eb6c0] Crest factor: 1.000000
[Parsed_astats_4 @ 00000000005eb6c0] Flat factor: nan
[Parsed_astats_4 @ 00000000005eb6c0] Peak count: 0
[Parsed_astats_4 @ 00000000005eb6c0] Bit depth: 0/0
[Parsed_astats_4 @ 00000000005eb6c0] Dynamic range: inf
[Parsed_astats_4 @ 00000000005eb6c0] Zero crossings: 0
[Parsed_astats_4 @ 00000000005eb6c0] Zero crossings rate: nan
[Parsed_astats_4 @ 00000000005eb6c0] Number of NaNs: 0
[Parsed_astats_4 @ 00000000005eb6c0] Number of Infs: 0
[Parsed_astats_4 @ 00000000005eb6c0] Number of denormals: 0
[Parsed_astats_4 @ 00000000005eb6c0] Overall
[Parsed_astats_4 @ 00000000005eb6c0] DC offset: nan
[Parsed_astats_4 @ 00000000005eb6c0] Min level:
17976931348623157081452742373170
43567980705675258449965989174768031572607800285387605895586327668781715404589535
14382464234321326889464182768467546703537516986049910576551282076245490090389328
94407586850845513394230458323690322294816580855933212334827479782620414472316873
8177180919299881250404026184124858368.000000
[Parsed_astats_4 @ 00000000005eb6c0] Max level:
-1797693134862315708145274237317
04356798070567525844996598917476803157260780028538760589558632766878171540458953
51438246423432132688946418276846754670353751698604991057655128207624549009038932
89440758685084551339423045832369032229481658085593321233482747978262041447231687
38177180919299881250404026184124858368.000000
[Parsed_astats_4 @ 00000000005eb6c0] Min difference:
179769313486231570814527423
73170435679807056752584499659891747680315726078002853876058955863276687817154045
89535143824642343213268894641827684675467035375169860499105765512820762454900903
89328944075868508455133942304583236903222948165808559332123348274797826204144723
168738177180919299881250404026184124858368.000000
[Parsed_astats_4 @ 00000000005eb6c0] Max difference: 0.000000
[Parsed_astats_4 @ 00000000005eb6c0] Mean difference: 0.000000
[Parsed_astats_4 @ 00000000005eb6c0] RMS difference: 0.000000
[Parsed_astats_4 @ 00000000005eb6c0] Peak level dB: nan
[Parsed_astats_4 @ 00000000005eb6c0] RMS level dB: nan
[Parsed_astats_4 @ 00000000005eb6c0] RMS peak dB: nan
[Parsed_astats_4 @ 00000000005eb6c0] RMS trough dB: 3082.547156
[Parsed_astats_4 @ 00000000005eb6c0] Flat factor: nan
[Parsed_astats_4 @ 00000000005eb6c0] Peak count: 0.000000
[Parsed_astats_4 @ 00000000005eb6c0] Bit depth: 0/0
[Parsed_astats_4 @ 00000000005eb6c0] Number of samples: 0
[Parsed_astats_4 @ 00000000005eb6c0] Number of NaNs: 0.000000
[Parsed_astats_4 @ 00000000005eb6c0] Number of Infs: 0.000000
[Parsed_astats_4 @ 00000000005eb6c0] Number of denormals: 0.000000
Conversion failed!
More information about the ffmpeg-user
mailing list