重新编码音频
This commit is contained in:
parent
a25d5fbe06
commit
92bc5791ac
@ -214,7 +214,7 @@ def quick_split_video(file):
|
||||
split_process = subprocess.Popen([
|
||||
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
||||
"-ss", str(current_sec),
|
||||
"-i", file, "-c", "copy", "-f", "mp4",
|
||||
"-i", file, "-c:v", "copy", "-c:a", "aac", "-f", "mp4",
|
||||
"-t", str(VIDEO_CLIP_EACH_SEC + VIDEO_CLIP_OVERFLOW_SEC),
|
||||
"-fflags", "+genpts", "-shortest", "-movflags", "faststart",
|
||||
os.path.join(VIDEO_OUTPUT_DIR, "{}.mp4".format(current_dt))
|
||||
@ -237,7 +237,7 @@ def _common_ffmpeg_setting():
|
||||
|
||||
def _common_ffmpeg_params():
|
||||
return (
|
||||
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-c:a", "copy",
|
||||
"-f", "mp4", "-b:v", VIDEO_BITRATE, "-c:a", "aac",
|
||||
"-preset:v", "fast", "-profile:v", "main", "-avoid_negative_ts", "1",
|
||||
"-qmin", "18", "-qmax", "38", "-crf", str(VIDEO_CRF), "-g:v", str(VIDEO_GOP),
|
||||
"-fflags", "+genpts", "-shortest"
|
||||
|
Loading…
x
Reference in New Issue
Block a user