From c58ef4c305c2a2139f6266c10308900049045992 Mon Sep 17 00:00:00 2001 From: Antoine Van Elstraete Date: Wed, 6 Jul 2022 19:51:51 +0200 Subject: [PATCH] Fichier final au format MPEG-4 --- vid_convert.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vid_convert.py b/vid_convert.py index d4ab769..47dcaa9 100755 --- a/vid_convert.py +++ b/vid_convert.py @@ -270,6 +270,14 @@ def create_mkv(filename): remove(file) +def mkv_to_mp4(filename): + options = "-c:a copy -c:v copy -c:s copy -movflags faststart" + command = f"ffmpeg -i {filename}_FINAL.mkv {options} -y NEW_{filename}.mp4" + result = subprocess.getoutput(command) + logging.debug(result) + remove(f"{filename}_FINAL.mkv") + + if __name__ == '__main__': import argparse parser = argparse.ArgumentParser() @@ -308,3 +316,4 @@ if __name__ == '__main__': convert_video(file, infos, vid_part_time, cropsize, crf, animation) vid_part_time += 300 create_mkv(file) + mkv_to_mp4(file)