Skip to main content

get_codec: use ffmpeg instead of mediaprobe

ID
42ef4d6
date
2026-02-16 08:49:55+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
a6eab9a
message
get_codec: use ffmpeg instead of mediaprobe
changed files
1 file, 3 additions, 2 deletions

Changed files

get_codec (287) → get_codec (291)

diff --git a/get_codec b/get_codec
index 7041e8e..3ea036b 100755
--- a/get_codec
+++ b/get_codec
@@ -10,5 +10,6 @@ then
   exit 1
 fi
 
-print_info "-> mediainfo --Inform=\"Video;%Format%\" ${1:q}"
-mediainfo --Inform="Video;%Format%" "$1"
+ffprobe -v error -select_streams v:0 \
+  -show_entries stream=codec_name \
+  -of csv=print_section=0 "$1"