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)