-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should not save (when recording) segments with zero video frames #1912
Conversation
server/broadcast.go
Outdated
glog.Warningf("Error checking for zero video frame nonce=%d manifestID=%s name=%s bytes=%d took=%s err=%v", | ||
nonce, mid, name, len(seg.Data), time.Since(now), err) | ||
} else { | ||
glog.Infof("Checking for zero video frame nonce=%d manifestID=%s name=%s bytes=%d took=%s returned res=%v", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This'll log every segment, yeah? Seems like it could be a glog.Debugf
at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Moved it around so it will show only for 0-frame segments.
b6841a0
to
65c7146
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -386,6 +386,19 @@ func processSegment(cxn *rtmpConnection, seg *stream.HLSSegment) ([]string, erro | |||
if ros != nil { | |||
go func() { | |||
now := time.Now() | |||
hasZeroVideoFrame, err := ffmpeg.HasZeroVideoFrameBytes(seg.Data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that this function was added in livepeer/lpms#237 and it returns an integer. Fine for now since that PR was already merged, but I think returning a boolean would make this function more straightforward to use and suggest making that change separately.
What does this pull request do? Explain your changes. (required)
Do not save segments with zero video frame to record store.
Specific updates (required)
Check segment before saving using
lpmg.HasZeroVideoFrameBytes
function.How did you test each of these updates (required)
Unit test
Does this pull request close any open issues?
Fixes #1888
Checklist:
make
runs successfully./test.sh
pass