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.
Asked
Active
Viewed 107 times
0
-
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 Answers
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
-
Thanks a lot @llogan!! This is exactly what I was looking for. Much appreciated. – sJoss Jul 30 '21 at 08:10
-
Is it possible to print the output in the same line? Example: ```video1.mp4: -21.8 video2.mp4: -21.1 video3.mp4: -21.8 -8.3``` – sJoss Aug 03 '21 at 01:22
-