mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 12:39:25 +01:00
change demo_service to is_cvt_h264
按照前端和后端同学要求,将在前端传入的参数名称更改为有具体语义和可复用的变量名
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/11394996
* change demo_service to is_cvt_h264
This commit is contained in:
@@ -95,7 +95,7 @@ class VideoStabilizationPipeline(Pipeline):
|
||||
|
||||
def postprocess(self, inputs: Dict[str, Any], **kwargs) -> Dict[str, Any]:
|
||||
output_video_path = kwargs.get('output_video', None)
|
||||
demo_service = kwargs.get('demo_service', False)
|
||||
is_cvt_h264 = kwargs.get('is_cvt_h264', False)
|
||||
|
||||
if output_video_path is None:
|
||||
output_video_path = tempfile.NamedTemporaryFile(suffix='.mp4').name
|
||||
@@ -112,7 +112,7 @@ class VideoStabilizationPipeline(Pipeline):
|
||||
video_writer.write(new_frame)
|
||||
video_writer.release()
|
||||
|
||||
if demo_service:
|
||||
if is_cvt_h264:
|
||||
assert os.system(
|
||||
'ffmpeg -version'
|
||||
) == 0, 'ffmpeg is not installed correctly, please refer to https://trac.ffmpeg.org/wiki/CompilationGuide.'
|
||||
|
||||
Reference in New Issue
Block a user