You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
702 B
Python
24 lines
702 B
Python
#!/usr/bin/env python
|
|
|
|
import cgi, sys, datetime
|
|
import cgitb; cgitb.enable()
|
|
import subprocess
|
|
|
|
print "Content-type: text/html"
|
|
print
|
|
print "hello from python<br>"
|
|
|
|
n = datetime.datetime.now()
|
|
|
|
basename = n.strftime("%Y-%m-%dT%H-%M-%S")
|
|
|
|
o1 = subprocess.check_output(["scripts/black2.py", "--output", basename+".avi", "--time", "5"])
|
|
print o1 + "<br>\n"
|
|
o2 = subprocess.check_output(["ffmpeg", "-i", basename+".avi", "-y", basename+".mp4"])
|
|
print o2 + "<br>\n"
|
|
o2 = subprocess.check_output(["ffmpeg", "-i", basename+".avi", "-ss", "1", "-vframes", "1", "-y", basename+".jpg"])
|
|
print o2 + "<br>\n"
|
|
|
|
# print """<a href=\"../{0}.mp4\">VIDEO</a>""".format(basename)
|
|
print """<a href="index.cgi">OK</a>"""
|