Steps:
1. pip3 install git+https://github.com/agermanidis/autosub.git
2.1 generate srt file only no translation:
autosub -S ja -D ja infile.mp4
2.2 generate a srt with translation:
autosub -S ja -D zh-CN -K 'google translate api key' input.mp4
3. Combine subtitle with video
ffmpeg -i infile.mp4 -i infile.srt -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=chi outfile.mp4
No comments:
Post a Comment