diff --git a/util/api.py b/util/api.py index 46c698e..59206dd 100644 --- a/util/api.py +++ b/util/api.py @@ -73,7 +73,7 @@ def get_template_info(template_id): 'scenic_name': remote_template_info.get('scenicName', '景区'), 'name': remote_template_info.get('name', '模版'), 'video_size': '1920x1080', - 'frame_rate': 30, + 'frame_rate': 25, 'overall_duration': 30, 'video_parts': [ diff --git a/util/ffmpeg.py b/util/ffmpeg.py index 48edfd7..0f878d0 100644 --- a/util/ffmpeg.py +++ b/util/ffmpeg.py @@ -82,6 +82,8 @@ def probe_video_info(video_file): stderr=subprocess.STDOUT, **subprocess_args(True) ) + if result.returncode != 0: + return 0, 0, 0 all_result = result.stdout.decode('utf-8').strip() wh, duration = all_result.split('\n') width, height = wh.strip().split('x')