def _cut_orig_mp4(orig_mp4_filename, cut_mp4_filename, lang, line): # title.make_mp4_with_title(orig_mp4_filename, lang) cmd = ['ffmpeg', '-y', '-i', orig_mp4_filename, '-c', 'copy'] cmd += ffmpeg.meta_args(orig_mp4_filename, lang) cmd += ffmpeg.ss_args(orig_mp4_filename) cmd += ffmpeg.to_args(orig_mp4_filename) cmd += [cut_mp4_filename] _run_ffmpeg_at_line(cmd, line, 'mkv')
def _cut_orig_m4a(orig_mp4_filename, lang, line): cmd = ['ffmpeg', '-y', '-i', orig_mp4_filename] cmd += ffmpeg.meta_args(orig_mp4_filename, lang) cmd += ffmpeg.ss_args(orig_mp4_filename) cmd += ffmpeg.to_args(orig_mp4_filename) cmd += ['-c:a', 'copy', '-vn', meta.get_work_filename(orig_mp4_filename, ' ' + lang + '.m4a')] _run_ffmpeg_at_line(cmd, line, 'm4a')
def _encode_orig_mp3(orig_mp4_filename, lang, line): cmd = ['ffmpeg', '-y', '-i', orig_mp4_filename, '-ac', '1', '-codec:a', 'mp3', '-b:a', '96k'] cmd += ffmpeg.ss_args(orig_mp4_filename) cmd += ffmpeg.to_args(orig_mp4_filename) cmd += ffmpeg.meta_args(orig_mp4_filename, lang) cmd += [meta.get_work_filename(orig_mp4_filename, ' ' + lang + '.mp3')] _run_ffmpeg_at_line(cmd, line, 'mp3')