|
![](/i/fill.gif) |
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
|
![](/i/fill.gif) |