def METHOD_NAME(self, inputs: Dict[str, Any],
                **post_params) -> Dict[str, Any]:
    video = tensor2vid(inputs['video'], self.model.cfg.mean,
                       self.model.cfg.std)
    output_video_path = post_params.get('output_video', None)
    temp_video_file = False
    if output_video_path is None:
        output_video_path = tempfile.NamedTemporaryFile(suffix='.mp4').name
        temp_video_file = True
    temp_dir = tempfile.mkdtemp()
    for fid, frame in enumerate(video):
        tpth = os.path.join(temp_dir, '%06d.png' % (fid + 1))
        cv2.imwrite(tpth, frame[:, :, ::-1],
                    [int(cv2.IMWRITE_JPEG_QUALITY), 100])
    cmd = f'ffmpeg -y -f image2 -loglevel quiet -framerate 8.0 -i {temp_dir}/%06d.png \
    -vcodec libx264 -crf 17 -pix_fmt yuv420p {output_video_path}'
    status, output = subprocess.getstatusoutput(cmd)
    if status != 0:
        logger.error('Save Video Error with {}'.format(output))
    os.system(f'rm -rf {temp_dir}')
    if temp_video_file:
        video_file_content = b''
        with open(output_video_path, 'rb') as f:
            video_file_content = f.read()
        os.remove(output_video_path)
        return {OutputKeys.OUTPUT_VIDEO: video_file_content}
    else:
        return {OutputKeys.OUTPUT_VIDEO: output_video_path}