mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-03 05:25:28 +00:00
Improved embeddedsubtitles provider by turning on Audio Sync during audio extraction process
This commit is contained in:
parent
14a361dd97
commit
c69be93cd6
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ def encode_audio_stream(path, ffmpeg_path, audio_stream_language=None):
|
||||||
logger.debug(f"Whisper will only use the {audio_stream_language} audio stream for {path}")
|
logger.debug(f"Whisper will only use the {audio_stream_language} audio stream for {path}")
|
||||||
inp = inp[f'a:m:language:{audio_stream_language}']
|
inp = inp[f'a:m:language:{audio_stream_language}']
|
||||||
|
|
||||||
out, _ = inp.output("-", format="s16le", acodec="pcm_s16le", ac=1, ar=16000) \
|
out, _ = inp.output("-", format="s16le", acodec="pcm_s16le", ac=1, ar=16000, af="aresample=async=1") \
|
||||||
.run(cmd=[ffmpeg_path, "-nostdin"], capture_stdout=True, capture_stderr=True)
|
.run(cmd=[ffmpeg_path, "-nostdin"], capture_stdout=True, capture_stderr=True)
|
||||||
|
|
||||||
except ffmpeg.Error as e:
|
except ffmpeg.Error as e:
|
||||||
|
|
Loading…
Reference in a new issue