POV-Ray : Newsgroups : povray.off-topic : ffmpeg and normalizing audio volume : Re: ffmpeg and normalizing audio volume Server Time
2 Jul 2024 23:10:34 EDT (-0400)
  Re: ffmpeg and normalizing audio volume  
From: jr
Date: 8 May 2016 11:11:49
Message: <572f5735$1@news.povray.org>
hi,

On 08/05/2016 13:44, Doctor John wrote:
> I've just been informed by She_who_must_be_obeyed that if I don't lay
> the table for Sunday lunch, the consequences will be terrible.

:-)

> I'll do some testing later on this evening

I'm thinking with 40G data (3500+? files) even a modest improvement to
the suggested script will be worthwhile.  the pipeline getting the dB
value uses four processes, using 'sed' instead of grep etc
cuts that to two:

DBV=$(ffmpeg -i "$1" -af volumedetect -f null /dev/null | sed -r -n \
-e '/max_volume:/s,^[^:]+: +[+-]?([[:digit:]]+\.[[:digit:]]+) dB,\1,p')

(the RE is copied and pasted so ought to be correct.  if you need the
sign, simply shift the '(' 5 characters to the left)

btw, there's a widely available PDF of the "sed & awk" book, it's a good
resource to have to hand when working with patterns and REs.

jr.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.