Commit 649f3906 authored by Priscila Manhaes's avatar Priscila Manhaes

commited remainder code that should be in r45441

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@45443 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e513981b
...@@ -32,7 +32,6 @@ from cloudooo.file import File ...@@ -32,7 +32,6 @@ from cloudooo.file import File
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
from tempfile import mktemp from tempfile import mktemp
class Handler(object): class Handler(object):
"""FFMPEG Handler is used to handler inputed audio and video files""" """FFMPEG Handler is used to handler inputed audio and video files"""
...@@ -62,6 +61,10 @@ class Handler(object): ...@@ -62,6 +61,10 @@ class Handler(object):
self.input.getUrl(), self.input.getUrl(),
"-y", "-y",
output_url] output_url]
# XXX ffmpeg has a bug that needs this options to work with webm format
if destination_format == "webm":
command.insert(3, "-ab")
command.insert(4, "32k")
try: try:
stdout, stderr = Popen(command, stdout, stderr = Popen(command,
stdout=PIPE, stdout=PIPE,
...@@ -97,3 +100,4 @@ class Handler(object): ...@@ -97,3 +100,4 @@ class Handler(object):
metadata -- expected an dictionary with metadata. metadata -- expected an dictionary with metadata.
""" """
raise NotImplementedError raise NotImplementedError
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment