Solution for extract date and LUFS from a file with script
is Given Below:
I am using
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
to extract LUFS and then using
for i in *.mp4; do ffprobe -v quiet -select_streams v:0 -show_entries format=filename:stream_tags=creation_time -of default=noprint_wrappers=1:nokey=1 "$i"; done
to extract date of creation of mp4 files.
How can I have those both command as a sequence or a script file so that I run the command only once, and I get both of those command run.
I want to get the output as;
File name
LUFS
Creation date
It will be great if the command will also export all outputs in a text file.
Please help.
Thank you in advance!!
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}'; ffprobe -v quiet -select_streams v:0 -show_entries format_tags=creation_time -of default=nw=1:nk=1 "$i"; done >> lufs.log
Example result:
audio_and_time.mp4
-20.0
2020-07-22T17:48:25.000000Z
audio_no_time.mp4
-24.0
no_audio.mp4
2020-07-22T17:48:25.000000Z
two_audio_streams.mp4
-13.6
-26.6
2012-08-05T10:18:05.000000Z
no_audio_no_time.mp4