0

ffmpeg -i input.mp4 -af ebur128=framelog=verbose -f null - 2>&1 | awk '/I:/{print $2}' The above command extract only LUFS value from input.mp4 file. But If there are number of mp4 files, how to apply similar command to extract LUFS value only from multiple mp4 files? Please help.

llogan
  • 121,796
  • 28
  • 232
  • 243
sJoss
  • 1
  • 1
  • I would put this question this way, " How to extract only LUFS value from multiple mp4 files? – sJoss Jul 29 '21 at 06:52

1 Answers1

1

Adapting this answer from How do you convert an entire directory with ffmpeg?

for i in *.mp4; do echo "$i:"; ffmpeg -i "$i" -map 0:a -af ebur128=framelog=verbose -f null - 2>&1 | awk '/I:/{print $2}'; done

Example output:

video1.mp4:
-21.8
video2.mp4:
-21.1
video3.mp4:
-21.8
-8.3
  • Note that video3.mp4 contains 2 separate audio streams.
  • This is assuming you can use Bash shell.
  • -map 0:a was added to only process the audio so the video is ignored and therefore the command is faster. See FFmpeg Wiki: Map.
llogan
  • 121,796
  • 28
  • 232
  • 243