Skip to content

Commit

Permalink
deal with flv format
Browse files Browse the repository at this point in the history
  • Loading branch information
xinntao committed Sep 18, 2022
1 parent e5763af commit e5e79fb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions inference_realesrgan_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,11 @@ def main():
else:
is_video = False

if is_video and args.input.endswith('.flv'):
mp4_path = args.input.replace('.flv', '.mp4')
os.system(f'ffmpeg -i {args.input} -codec copy {mp4_path}')
args.input = mp4_path

if args.extract_frame_first and not is_video:
args.extract_frame_first = False

Expand Down

0 comments on commit e5e79fb

Please sign in to comment.