Browse Source

Merge branch 'master' of git.caseydelorme.com:cdelorme/arch-desktop

Casey DeLorme 4 months ago
parent
commit
1dd34d6d98
1 changed files with 15 additions and 0 deletions
  1. 15 0
      install/usr/local/bin/mp42png

+ 15 - 0
install/usr/local/bin/mp42png

@@ -0,0 +1,15 @@
+#!/bin/bash
+extract_mp4_to_png()
+{
+	local bname="$(basename $1)"
+	local dname="${bname%.*}"
+	if [ -d "$dname" ]; then
+		echo "directory ($dname) already exists..."
+		return
+	fi
+	mkdir -p "$dname"
+	ffmpeg -i "$bname" -r 1 -f image2 "${dname}/%03d.png"
+}
+
+extract_mp4_to_png "$1"
+