audio – Getting just the “loudnorm” summary from ffmpeg
I am trying to print just the summary from the loudnorm output in my ffmpeg command.
When using the command:
ffmpeg -hide_banner -y -i input.mp4 -loglevel info -nostats -map 0:a:0 -af loudnorm=I=-23.000000:LRA=7.000000:tp=-3.000000:print_format=json -f null -
I get an output like this:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf60.3.100 Duration: 00:00:30.03, start: 0.000000, bitrate: 20124 kb/s Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 19866 kb/s, 23.98 fps, 23.98 tbr, 19184 tbn (default) Metadata: handler_name : VideoHandler vendor_id : [0][0][0][0] encoder : Lavc60.3.100 h264_nvenc Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 253 kb/s (default) Metadata: handler_name : SoundHandler vendor_id : [0][0][0][0] Stream mapping: Stream #0:1 -> #0:0 (aac (native) -> pcm_s16le (native)) Press [q] to stop, [?] for help Output #0, null, to 'pipe:': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf60.3.100 Stream #0:0(und): Audio: pcm_s16le, 192000 Hz, stereo, s16, 6144 kb/s (default) Metadata: handler_name : SoundHandler vendor_id : [0][0][0][0] encoder : Lavc60.3.100 pcm_s16le size=N/A time=00:00:27.20 bitrate=N/A speed=27.2x video:0kB audio:22512kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [Parsed_loudnorm_0 @ 0x600001ffc000] { "input_i" : "-23.37", "input_tp" : "-7.19", "input_lra" : "4.00", "input_thresh" : "-33.76", "output_i" : "-22.94", "output_tp" : "-6.71", "output_lra" : "3.20", "output_thresh" : "-33.10", "normalization_type" : "dynamic", "target_offset" : "-0.06" }
What I would like to get is just:
{ "input_i" : "-23.37", "input_tp" : "-7.19", "input_lra" : "4.00", "input_thresh" : "-33.76", "output_i" : "-22.94", "output_tp" : "-6.71", "output_lra" : "3.20", "output_thresh" : "-33.10", "normalization_type" : "dynamic", "target_offset" : "-0.06" }
Is there something about my ffmpeg build which prints the stream info by default?
Is there some way to set this to ‘quiet’ without stifling the loudnorm output?
It seems like this is not the way that the command outputs for others, based on the explainations I found online.
I have also tried setting loglevel to quiet, but that mutes the loudnorm output as well.
I have also tried -nostats, but that does not effect the stream output section.
Read more here: Source link