Quick fix Linux Video Capabilites for ignacio martinez

This commit is contained in:
Julien Lengrand-Lambert
2012-06-09 19:21:34 +02:00
parent 6f83e26f68
commit 7d9438e344
2 changed files with 10 additions and 3 deletions

3
.gitignore vendored
View File

@@ -4,4 +4,5 @@ build
dist
MANIFEST
packaging
doc/build
doc/build
*~

View File

@@ -11,6 +11,7 @@
"""
import os
import sys
import sys
import cv
@@ -363,7 +364,12 @@ class FaceMovie(object):
:type fps: int
"""
filename = os.path.join(out_folder, "output.avi")
fourcc = cv.CV_FOURCC('C', 'V', 'I', 'D')
# Codec is OS dependant.
# FIXME : Find an unified version
if "win" in sys.platform:
fourcc = cv.CV_FOURCC('C', 'V', 'I', 'D')
else: # some kind of Linux platform
fourcc = cv.CV_FOURCC('I', '4', '2', '0')
if self.crop:
width = self.width
@@ -442,4 +448,4 @@ class FaceMovie(object):
out_name = os.path.join(out_folder, file_name)
print "Saving %s" %(out_name)
cv.SaveImage(out_name, im)
cv.SaveImage(out_name, im)