mirror of
https://github.com/webadderallorg/Recordly.git
synced 2026-09-26 15:55:35 +00:00
fix(audio): drop null muxer from probe to restore duration parsing
- Remove -f null - from probeMediaDurationSeconds() ffmpeg args so the command always exits non-zero (no output file specified) - Without -f null -, ffmpeg exits code 1 and stderr lands in the catch block where Duration is parsed, fixing the bug where duration returned 0 on valid recordings - probeMediaDurationSeconds returning 0 caused the videoDuration > 0 gate to skip all audio sync correction, leaving system audio misaligned in the final recording
This commit is contained in:
@@ -1589,7 +1589,7 @@ async function muxNativeVideoExportAudio(
|
||||
async function probeMediaDurationSeconds(filePath: string): Promise<number> {
|
||||
const ffmpegPath = getFfmpegBinaryPath()
|
||||
try {
|
||||
await execFileAsync(ffmpegPath, ['-i', filePath, '-f', 'null', '-'], { timeout: 30000, maxBuffer: 2 * 1024 * 1024 })
|
||||
await execFileAsync(ffmpegPath, ['-i', filePath], { timeout: 30000, maxBuffer: 2 * 1024 * 1024 })
|
||||
} catch (error) {
|
||||
// ffmpeg reports info on stderr even on "success" — parse it from the error
|
||||
const stderr = (error as NodeJS.ErrnoException & { stderr?: string })?.stderr ?? ''
|
||||
|
||||
Reference in New Issue
Block a user