Ver Fonte

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

Casey DeLorme há 3 meses atrás
pai
commit
1dd34d6d98
1 ficheiros alterados com 15 adições e 0 exclusões
  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"
+