FFMPEG命令替换
This commit is contained in:
parent
7e4b8cd601
commit
7999e76499
@ -9,7 +9,7 @@ from config import FFMPEG_EXEC, VIDEO_BITRATE, FFMPEG_USE_NVIDIA_GPU, VIDEO_CLIP
|
|||||||
|
|
||||||
def get_video_real_duration(filename):
|
def get_video_real_duration(filename):
|
||||||
ffmpeg_process = subprocess.Popen([
|
ffmpeg_process = subprocess.Popen([
|
||||||
"ffmpeg", "-hide_banner", "-progress", "-", "-v", "0", "-i", filename, "-c", "copy", "-f", "null", "-"
|
FFMPEG_EXEC, "-hide_banner", "-progress", "-", "-v", "0", "-i", filename, "-c", "copy", "-f", "null", "-"
|
||||||
], stdout=subprocess.PIPE)
|
], stdout=subprocess.PIPE)
|
||||||
return handle_ffmpeg_output(ffmpeg_process.stdout)
|
return handle_ffmpeg_output(ffmpeg_process.stdout)
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ def quick_split_video(file):
|
|||||||
print("CUR_DT", current_dt)
|
print("CUR_DT", current_dt)
|
||||||
print("BIAS_T", current_sec)
|
print("BIAS_T", current_sec)
|
||||||
split_process = subprocess.Popen([
|
split_process = subprocess.Popen([
|
||||||
"ffmpeg", "-y", "-hide_banner", "-progress", "-", "-v", "0",
|
FFMPEG_EXEC, "-y", "-hide_banner", "-progress", "-", "-v", "0",
|
||||||
"-ss", str(current_sec),
|
"-ss", str(current_sec),
|
||||||
"-i", file_name, "-c", "copy", "-f", "mp4",
|
"-i", file_name, "-c", "copy", "-f", "mp4",
|
||||||
"-t", str(VIDEO_CLIP_EACH_SEC + VIDEO_CLIP_OVERFLOW_SEC),
|
"-t", str(VIDEO_CLIP_EACH_SEC + VIDEO_CLIP_OVERFLOW_SEC),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user