I combine bash, ffmpeg, sed to write to a file only the basic metadata information that interests me: file type and name, title(s), video-, audio- and subtitlestreams details.
A single file or all files in a dir.
Linux.
Only tested on a bunch of mkv videos b.t.w.
script: ffmpeg_metadata.sh
output file: ffmpeg_metadata.txt
The sed commands do all kind of things to 'purify' the given ffmpeg output.
Hereby not the whole script but the code that does things (hope it renders satisfactory, cause I've had trouble with line breaks in this post)...
echo -e "File name(s) (specific or wildcard,
no spaces or special chars, except '-' '_')?"
read -p "" INPUT
echo
for i in ${INPUT}; do ffmpeg -i "$i" -hide_banner; done |& tee ./ffmpeg_metadata.txt
sed -r -i "/Input|title|Stream/!d;s/[[:space:]]*[[:space:]]/ /g;s/^[[:space:]]//g;s/[[:space:]]:/:/g;s/Input/\n&/g;1i MULTIMEDIA METADATA" ./ffmpeg_metadata.txt
the /Input|title|Stream/!d
says: don't delete the lines containing exactly these words aka strings. I.o.w. keep only those lines.
Here, for two mkv's, it results in:
MULTIMEDIA METADATA
Input #0, matroska,webm, from 'film1.mkv':
title: film1
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1276x686 [SAR 1:1 DAR 638:343], SAR 343:359 DAR 638:359, 23.97 fps, 23.97 tbr, 1k tbn, 47.94 tbc (default)
title: film1_Track
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
title: film1_Track
Input #0, matroska,webm, from 'film2.mkv':
title: film2
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 640x360 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default)
title: film2_Track
Stream #0:1(eng): Audio: aac (LC), 44100 Hz, stereo, fltp (default)
title: film2_Track
Stream #0:2(eng): Subtitle: ass (default)
title: film2_Track
Stream #0:3(es): Subtitle: subrip (default)
title: film2_Track
Could be further reduced by leaving out the 'title' within sed.
So, only file name and streams.
Or, e.g., one could add the lines containing the word 'Duration', which also include the bitrate.
Etcetera, etcetera.
The day ffmpeg-development starts respelling words, this script will also need respelling :-D
Cheerio (not included in ouput file ;-) )!