Fichier final au format MPEG-4

This commit is contained in:
Antoine Van Elstraete 2022-07-06 19:51:51 +02:00
parent f2b77697da
commit c58ef4c305
Signed by: AntoineVe
GPG Key ID: E36069A977E2A9ED

View File

@ -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)