dotfiles/.local/bin/scripts/ffmeta
2025-02-04 11:57:49 +01:00

13 lines
481 B
Bash
Executable file

#!/bin/sh
# View media metadata using ffprobe
# Accepts filenames from args or stdin (one file per line)
# TODO only print header when interactive
if test "$#" -eq 0
then cat
else printf '%s\n' "$@"
fi | while read f; do
highlight "$f"
find "$f" -type f -exec ffprobe -hide_banner \
-loglevel $(expr 34 - $#) -print_format default=noprint_wrappers=1 -show_format -pretty {} \;
# loglevel: from 32 shows stream details (steps of 8), so only for small groups
done | less