Commit 128c5194 authored by Priscila Manhaes's avatar Priscila Manhaes

refactor to remove index that do not need anymore

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@45469 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e4e6ebdb
...@@ -63,8 +63,8 @@ class Handler(object): ...@@ -63,8 +63,8 @@ class Handler(object):
output_url] output_url]
# XXX ffmpeg has a bug that needs this options to work with webm format # XXX ffmpeg has a bug that needs this options to work with webm format
if destination_format == "webm": if destination_format == "webm":
command.insert(3, "32k")
command.insert(3, "-ab") command.insert(3, "-ab")
command.insert(4, "32k")
try: try:
stdout, stderr = Popen(command, stdout, stderr = Popen(command,
stdout=PIPE, stdout=PIPE,
...@@ -106,11 +106,9 @@ class Handler(object): ...@@ -106,11 +106,9 @@ class Handler(object):
self.input.getUrl(), self.input.getUrl(),
"-y", "-y",
output_url] output_url]
index = 3
for metadata in metadata_dict: for metadata in metadata_dict:
command.insert(index, "-metadata") command.insert(3, "%s=%s"%(metadata, metadata_dict[metadata]))
command.insert(index+1, "%s=%s"%(metadata, metadata_dict[metadata])) command.insert(3, "-metadata")
index += 2
try: try:
stdout, stderr = Popen(command, stdout, stderr = Popen(command,
stdout=PIPE, stdout=PIPE,
......
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