Introduction
Introduction Statistics Contact Development Disclaimer Help
tCheck if input file is valid video before attempting to encode - bitreich-tv -…
git clone git://src.adamsgaard.dk/bitreich-tv
Log
Files
Refs
---
commit 6f3514847865e21a214ade45b3c8c01cf9cda678
parent beded2279cdfa35a7d896bfa5729b2dbddec92c6
Author: Anders Damsgaard <[email protected]>
Date: Thu, 13 Aug 2020 10:08:07 +0200
Check if input file is valid video before attempting to encode
Diffstat:
M brtv-start.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/brtv-start.sh b/brtv-start.sh
t@@ -86,7 +86,10 @@ title_slide() {
video_conv() {
printf 'encode %s -> %s\n' "$1" "$2"
- ffmpeg -y -i "$1" $ffmpeg_codec -max_muxing_queue_size 1024 "$2"
+ if ! regeximatch "$(file -ib "$f")" "^video\/"; then
+ die "input video $1 is invalid ($(file -b "$1"))"
+ fi
+ ffmpeg -y -i "$1" $ffmpeg_codec "$2"
}
mkdir -p "$title"
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.