Fix HLS audio duration to match video with -shortest flag
HLS outputs were including full audio track instead of trimming to match video duration, causing video to freeze while audio continued playing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -548,7 +548,7 @@ class HLSOutput(Output):
|
|||||||
|
|
||||||
# Add audio codec if we have audio
|
# Add audio codec if we have audio
|
||||||
if audio_source:
|
if audio_source:
|
||||||
cmd.extend(["-c:a", "aac", "-b:a", "128k"])
|
cmd.extend(["-c:a", "aac", "-b:a", "128k", "-shortest"])
|
||||||
|
|
||||||
# HLS specific options for smooth live streaming
|
# HLS specific options for smooth live streaming
|
||||||
cmd.extend([
|
cmd.extend([
|
||||||
@@ -704,7 +704,7 @@ class IPFSHLSOutput(Output):
|
|||||||
|
|
||||||
# Add audio codec if we have audio
|
# Add audio codec if we have audio
|
||||||
if audio_source:
|
if audio_source:
|
||||||
cmd.extend(["-c:a", "aac", "-b:a", "128k"])
|
cmd.extend(["-c:a", "aac", "-b:a", "128k", "-shortest"])
|
||||||
|
|
||||||
# HLS options
|
# HLS options
|
||||||
cmd.extend([
|
cmd.extend([
|
||||||
|
|||||||
Reference in New Issue
Block a user