Skip to content

Commit 6acf8b7

Browse files
committed
add extra verbose frames logging
1 parent 8f42239 commit 6acf8b7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/server/lib/video_capture.coffee

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
_ = require("lodash")
22
utils = require("fluent-ffmpeg/lib/utils")
33
debug = require("debug")("cypress:server:video")
4+
# extra verbose logs for logging individual frames
5+
debugFrames = require("debug")("cypress:server:video:frames")
46
ffmpeg = require("fluent-ffmpeg")
57
stream = require("stream")
68
Promise = require("bluebird")
@@ -59,13 +61,16 @@ module.exports = {
5961
## we have written at least 1 byte
6062
written = true
6163

64+
debugFrames("video frame")
6265
if wantsWrite
6366
if not wantsWrite = pt.write(data)
67+
debugFrames("video stream wants to drain")
6468
pt.once "drain", ->
69+
debugFrames("video stream drained")
6570
wantsWrite = true
6671
else
6772
skipped += 1
68-
# console.log("skipping frame. total is", skipped)
73+
debugFrames("skipping frame. total is %d", skipped)
6974

7075
cmd = ffmpeg({
7176
source: pt

0 commit comments

Comments
 (0)