ffmpeg - Fill timestamp gaps with silence

This commit is contained in:
lml committed 2026-03-17 22:15:26 +08:00
1 parent 5bacce50af
commit 082a8e65d0
2 files changed
+12

No files matched your search

+6
View File
@@ -34,6 +34,8 @@ class FFmpegMacOsConverter implements WhisperAudioConverter {
}
// FFmpeg arguments optimized for Whisper.cpp:
// -map 0:a:0 : Select first audio stream explicitly
// -af aresample=async=1:first_pts=0 : Fill timestamp gaps with silence
// -ar 16000 : 16kHz sampling rate
// -ac 1 : Mono channel
// -c:a pcm_s16le : 16-bit little-endian PCM (WAV)
@@ -41,6 +43,10 @@ class FFmpegMacOsConverter implements WhisperAudioConverter {
'-y',
'-i',
'"${input.path}"',
'-map',
'0:a:0',
'-af',
'aresample=async=1:first_pts=0',
'-ar',
'16000',
'-ac',
+6
View File
@@ -25,6 +25,8 @@ class FFmpegWindowsConverter implements WhisperAudioConverter {
}
// FFmpeg arguments optimized for Whisper.cpp:
// -map 0:a:0 : Select first audio stream explicitly
// -af aresample=async=1:first_pts=0 : Fill timestamp gaps with silence
// -ar 16000 : 16kHz sampling rate
// -ac 1 : Mono channel
// -c:a pcm_s16le : 16-bit little-endian PCM (WAV)
@@ -32,6 +34,10 @@ class FFmpegWindowsConverter implements WhisperAudioConverter {
'-y',
'-i',
'"${input.path}"',
'-map',
'0:a:0',
'-af',
'aresample=async=1:first_pts=0',
'-ar',
'16000',
'-ac',