1
I need to be able to analyse a video file containing multiple audio tracks and output the results to a text file. I know there are several filters which could give me the results I'm after, but I'm finding almost no information on syntax. Ultimately, I have a video with 3 audio tracks (2 channels per track). Track 1 (0:1) contains stereo audio, the others (0:2, 0:3) are silent. Is there a way to use either the volumedetect filter, the silencedetect filter or the astats filter to read these audio tracks and provide me with this info?
So far I've tried:
ffmpeg -i "mov" -af astats=metadata=1:reset=1,ametadata=print:key=lavfi.astats.Peak_level.Peak_count:file=log.txt -f null -y "log.txt"
What I get is a txt file with this header and no metadata:
;FFMETADATA1 major_brand=qt minor_version=512 compatible_brands=qt encoder=Lavf57.72.101
Console output is:
video:3867kB audio:56252kB subtitle:0kB other streams:0kB global headers:0kB mux
ing overhead: unknown
[Parsed_astats_0 @ 000000000206ec00] Channel: 1
[Parsed_astats_0 @ 000000000206ec00] DC offset: 0.002583
[Parsed_astats_0 @ 000000000206ec00] Min level: -188217600.000000
[Parsed_astats_0 @ 000000000206ec00] Max level: 159772160.000000
[Parsed_astats_0 @ 000000000206ec00] Min difference: 512.000000
[Parsed_astats_0 @ 000000000206ec00] Max difference: 7082496.000000
[Parsed_astats_0 @ 000000000206ec00] Mean difference: 1883352.211144
[Parsed_astats_0 @ 000000000206ec00] RMS difference: 2358521.937019
[Parsed_astats_0 @ 000000000206ec00] Peak level dB: -21.145393
[Parsed_astats_0 @ 000000000206ec00] RMS level dB: -28.110640
[Parsed_astats_0 @ 000000000206ec00] RMS peak dB: -28.110640
[Parsed_astats_0 @ 000000000206ec00] RMS trough dB: -28.110640
[Parsed_astats_0 @ 000000000206ec00] Crest factor: 2.229782
[Parsed_astats_0 @ 000000000206ec00] Flat factor: 0.000000
[Parsed_astats_0 @ 000000000206ec00] Peak count: 2
[Parsed_astats_0 @ 000000000206ec00] Bit depth: 24/24
[Parsed_astats_0 @ 000000000206ec00] Channel: 2
[Parsed_astats_0 @ 000000000206ec00] DC offset: 0.002886
[Parsed_astats_0 @ 000000000206ec00] Min level: -182797568.000000
[Parsed_astats_0 @ 000000000206ec00] Max level: 178699776.000000
[Parsed_astats_0 @ 000000000206ec00] Min difference: 3584.000000
[Parsed_astats_0 @ 000000000206ec00] Max difference: 7476224.000000
[Parsed_astats_0 @ 000000000206ec00] Mean difference: 1951990.490714
[Parsed_astats_0 @ 000000000206ec00] RMS difference: 2428434.732920
[Parsed_astats_0 @ 000000000206ec00] Peak level dB: -21.399189
[Parsed_astats_0 @ 000000000206ec00] RMS level dB: -28.031096
[Parsed_astats_0 @ 000000000206ec00] RMS peak dB: -28.031096
[Parsed_astats_0 @ 000000000206ec00] RMS trough dB: -28.031096
[Parsed_astats_0 @ 000000000206ec00] Crest factor: 2.145830
[Parsed_astats_0 @ 000000000206ec00] Flat factor: 0.000000
[Parsed_astats_0 @ 000000000206ec00] Peak count: 2
[Parsed_astats_0 @ 000000000206ec00] Bit depth: 24/24
[Parsed_astats_0 @ 000000000206ec00] Overall
[Parsed_astats_0 @ 000000000206ec00] DC offset: 0.002886
[Parsed_astats_0 @ 000000000206ec00] Min level: -188217600.000000
[Parsed_astats_0 @ 000000000206ec00] Max level: 178699776.000000
[Parsed_astats_0 @ 000000000206ec00] Min difference: 512.000000
[Parsed_astats_0 @ 000000000206ec00] Max difference: 7476224.000000
[Parsed_astats_0 @ 000000000206ec00] Mean difference: 1917671.350929
[Parsed_astats_0 @ 000000000206ec00] RMS difference: 2393733.587876
[Parsed_astats_0 @ 000000000206ec00] Peak level dB: -21.145393
[Parsed_astats_0 @ 000000000206ec00] RMS level dB: -28.070686
[Parsed_astats_0 @ 000000000206ec00] RMS peak dB: -28.031096
[Parsed_astats_0 @ 000000000206ec00] RMS trough dB: -28.110640
[Parsed_astats_0 @ 000000000206ec00] Flat factor: 0.000000
[Parsed_astats_0 @ 000000000206ec00] Peak count: 2.000000
[Parsed_astats_0 @ 000000000206ec00] Bit depth: 24/24
[Parsed_astats_0 @ 000000000206ec00] Number of samples: 1024
problem is audio tracks 2 and 3 are being ignored.
How do I read multiple audio tracks?
Thanks.