28 lines
744 B
Python
28 lines
744 B
Python
|
import sys
|
||
|
import os
|
||
|
|
||
|
#ppt = sys.argv[1]
|
||
|
#doc = sys.argv[2]
|
||
|
mp4 = sys.argv[1]
|
||
|
lang_code = sys.argv[2]
|
||
|
#srt = sys.argv[3]
|
||
|
|
||
|
final = os.path.splitext(mp4)[0]
|
||
|
final = final + "_final.mp4"
|
||
|
|
||
|
os.system("python google_srt.py " + mp4 + " " + lang_code)
|
||
|
print("-"*30)
|
||
|
print("Ready to create subtitles")
|
||
|
os.system("python AWS_S3.py " + mp4 + " " + lang_code)
|
||
|
print("-"*30)
|
||
|
print("JSON created")
|
||
|
os.system("python awSRT.py " + "aws_subtitle.srt")
|
||
|
print("-"*30)
|
||
|
print("Ready to hardburn subtitles")
|
||
|
os.system("python burn1.py " + mp4 + " aws_subtitle.srt")
|
||
|
print("-"*30)
|
||
|
print("Ready to embed subtitles")
|
||
|
os.system("ffmpeg -i " + mp4 + " -i aws_subtitle.srt" +
|
||
|
" -c copy -c:s mov_text overlay.mp4")
|
||
|
print("It's Magic!")
|