dotfiles/.local/bin/scripts/ffmeta

14 lines
481 B
Text
Raw Normal View History

2021-09-20 21:34:00 +02:00
#!/bin/sh
2025-02-04 11:52:56 +01:00
# View media metadata using ffprobe
2022-01-31 11:16:04 +01:00
# Accepts filenames from args or stdin (one file per line)
2022-05-12 11:32:39 +02:00
# TODO only print header when interactive
2022-01-31 11:16:04 +01:00
if test "$#" -eq 0
then cat
else printf '%s\n' "$@"
fi | while read f; do
2021-09-20 21:34:00 +02:00
highlight "$f"
2025-02-04 11:52:56 +01:00
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
2021-09-20 21:34:00 +02:00
done | less