Explorar o código

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

Casey DeLorme hai 4 meses
pai
achega
1dd34d6d98
Modificáronse 1 ficheiros con 15 adicións e 0 borrados
  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"
+