correct ffmpeg command
This commit is contained in:
1 parent
6f75a645b7
commit
9daa45789d
2 files changed
+12
-3
No files matched your search
@@ -220,12 +220,17 @@ async def s_api_v1_storage_get(request, file_hash=None):
|
||||
subprocess.run([
|
||||
"ffmpeg",
|
||||
"-y",
|
||||
"-ss", "0", # Set start time if needed
|
||||
"-i", file_path,
|
||||
"-t", str(seconds_limit),
|
||||
"-c:v", "libx264",
|
||||
"-preset", "medium", # Set encoding preset for better compatibility
|
||||
"-profile:v", "main", # Set profile for compatibility
|
||||
"-pix_fmt", "yuv420p", # Set pixel format for compatibility
|
||||
"-c:a", "aac",
|
||||
"-movflags", "+faststart",
|
||||
"-b:a", "192k", # Set audio bitrate
|
||||
"-movflags", "+faststart", # Enable fast start for streaming
|
||||
"-map", "0", # Map all streams from the input
|
||||
tempfile_path
|
||||
], check=True)
|
||||
else:
|
||||
@@ -235,9 +240,13 @@ async def s_api_v1_storage_get(request, file_hash=None):
|
||||
"-y",
|
||||
"-i", file_path,
|
||||
"-c:v", "libx264",
|
||||
"-preset", "medium", # Set encoding preset for better compatibility
|
||||
"-profile:v", "main", # Set profile for compatibility
|
||||
"-pix_fmt", "yuv420p", # Set pixel format for compatibility
|
||||
"-c:a", "aac",
|
||||
"-movflags", "+faststart",
|
||||
"-b:a", "192k", # Set audio bitrate
|
||||
"-movflags", "+faststart", # Enable fast start for streaming
|
||||
"-map", "0", # Map all streams from the input
|
||||
tempfile_path
|
||||
], check=True)
|
||||
except BaseException as e:
|
||||
|
||||
Reference in new issue
Block a user