correct ffmpeg command
This commit is contained in:
parent
222d014385
commit
5f4d90d410
|
|
@ -220,11 +220,15 @@ async def s_api_v1_storage_get(request, file_hash=None):
|
||||||
subprocess.run([
|
subprocess.run([
|
||||||
"ffmpeg",
|
"ffmpeg",
|
||||||
"-y",
|
"-y",
|
||||||
"-ss", "0", # Seek to start (fast seeking)
|
"-ss", "0", # Set start time (fast seeking)
|
||||||
"-i", file_path,
|
"-i", file_path,
|
||||||
"-t", str(seconds_limit), # Set the duration of the output
|
"-t", str(seconds_limit), # Set duration of the output
|
||||||
"-c:v", "libx264", # Encode video with libx264
|
"-c:v", "libx264", # Encode video with libx264
|
||||||
|
"-profile:v", "baseline", # Set baseline profile for compatibility with Telegram
|
||||||
|
"-level", "3.0", # Set level to 3.0 for compatibility
|
||||||
|
"-pix_fmt", "yuv420p", # Set pixel format for maximum compatibility
|
||||||
"-c:a", "aac", # Encode audio with AAC
|
"-c:a", "aac", # Encode audio with AAC
|
||||||
|
"-b:a", "128k", # Set audio bitrate
|
||||||
"-movflags", "+faststart", # Enable fast start for streaming
|
"-movflags", "+faststart", # Enable fast start for streaming
|
||||||
tempfile_path
|
tempfile_path
|
||||||
], check=True)
|
], check=True)
|
||||||
|
|
@ -233,10 +237,15 @@ async def s_api_v1_storage_get(request, file_hash=None):
|
||||||
subprocess.run([
|
subprocess.run([
|
||||||
"ffmpeg",
|
"ffmpeg",
|
||||||
"-y",
|
"-y",
|
||||||
"-ss", "0", # Seek to start (fast seeking)
|
"-ss", "0", # Set start time (fast seeking)
|
||||||
"-i", file_path,
|
"-i", file_path,
|
||||||
|
# "-t", str(seconds_limit), # Set duration of the output
|
||||||
"-c:v", "libx264", # Encode video with libx264
|
"-c:v", "libx264", # Encode video with libx264
|
||||||
|
"-profile:v", "baseline", # Set baseline profile for compatibility with Telegram
|
||||||
|
"-level", "3.0", # Set level to 3.0 for compatibility
|
||||||
|
"-pix_fmt", "yuv420p", # Set pixel format for maximum compatibility
|
||||||
"-c:a", "aac", # Encode audio with AAC
|
"-c:a", "aac", # Encode audio with AAC
|
||||||
|
"-b:a", "128k", # Set audio bitrate
|
||||||
"-movflags", "+faststart", # Enable fast start for streaming
|
"-movflags", "+faststart", # Enable fast start for streaming
|
||||||
tempfile_path
|
tempfile_path
|
||||||
], check=True)
|
], check=True)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue