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:
zhicheng.sc
2023-01-11 20:07:35 +08:00
parent 8b03375702
commit 962cd4258a

View File

@@ -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.'