From a4d7f1d215751d70b701575d2e4e80f260aa8cad Mon Sep 17 00:00:00 2001 From: neingeist Date: Fri, 17 Mar 2023 15:16:25 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20check-mp4:=20check=20mp4=20files=20?= =?UTF-8?q?by=20calling=20ffmpeg=20with=20the=20right=20options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check-m4b | 1 + check-mp4 | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 120000 check-m4b create mode 100755 check-mp4 diff --git a/check-m4b b/check-m4b new file mode 120000 index 0000000..ea58527 --- /dev/null +++ b/check-m4b @@ -0,0 +1 @@ +check-mp4 \ No newline at end of file diff --git a/check-mp4 b/check-mp4 new file mode 100755 index 0000000..4f17e06 --- /dev/null +++ b/check-mp4 @@ -0,0 +1,14 @@ +#!/bin/sh +# check MP4 files by calling ffmpeg with the right options + +rc=0 +for mp4 in "$@"; do + echo -n "$mp4: " + if ffmpeg -v error -i "$mp4" -f null -; then + echo "OK" + else + echo "ERR" + rc=1 + fi +done +exit $rc