Skip to content

Commit

Permalink
fix(cutter): default compress rate
Browse files Browse the repository at this point in the history
  • Loading branch information
williamfzc committed Sep 1, 2019
1 parent 6424517 commit feb4351
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions stagesepx/cutter/cutter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ def __init__(self,
init video cutter
:param step: step between frames, default to 1
:param compress_rate:
:param target_size:
"""
if not step:
step = 1
self.step = step

# default compress rate is 0.2
if (not compress_rate) and (not target_size):
logger.debug(f'no compress rate or target size received. set compress rate to 0.2')
compress_rate = 0.2

# init inner hook
self._hook_list: typing.List[BaseHook] = list()
compress_hook = CompressHook(overwrite=True, compress_rate=compress_rate, target_size=target_size)
Expand Down

0 comments on commit feb4351

Please sign in to comment.