From 095bd17d1033fc41dc315485ffa396541f92cad6 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 9 Jul 2022 13:10:00 +0200 Subject: [PATCH] mtp/vidchk: grab some frames at the start too --- bin/mtag/vidchk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/mtag/vidchk.py b/bin/mtag/vidchk.py index 64722421..375814ec 100755 --- a/bin/mtag/vidchk.py +++ b/bin/mtag/vidchk.py @@ -71,8 +71,8 @@ def main(): except: return "could not determine resolution" - # grab streams/format metadata + the final keyframe (and the next 2 seconds of frames after it) - zs = "ffprobe -hide_banner -v warning -of json -show_streams -show_format -show_packets -show_data_hash crc32 -read_intervals 999999%+2" + # grab streams/format metadata + 2 seconds of frames at the start and end + zs = "ffprobe -hide_banner -v warning -of json -show_streams -show_format -show_packets -show_data_hash crc32 -read_intervals %+2,999999%+2" cmd = zs.encode("ascii").split(b" ") + [fsenc(fp)] p = sp.Popen(cmd, stdout=sp.PIPE, stderr=sp.PIPE) so, se = p.communicate()