Skip to content

Commit 8ccad85

Browse files
authored
Merge pull request #1830 from boazsender/automated-transcriptions
Make ffmpeg progress reporting less noisy.
2 parents 6bf1138 + 0677b9a commit 8ccad85

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

functions/src/events/scrapeEvents.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,13 @@ const extractAudioFromVideo = async (
154154
console.log(`Spawned FFmpeg with command: ${commandLine}`)
155155
})
156156
.on("progress", progress => {
157-
console.log(`Processing: ${progress.percent}% done`)
157+
if (
158+
progress &&
159+
progress.percent &&
160+
Math.round(progress.percent) % 10 === 0
161+
) {
162+
console.log(`Processing: ${progress.percent}% done`)
163+
}
158164
})
159165
.on("end", () => {
160166
console.log("FFmpeg processing finished successfully")

0 commit comments

Comments
 (0)