livepeer / go-livepeer

Official Go implementation of the Livepeer protocol
http://livepeer.org
MIT License
546 stars 171 forks source link

Should not save (when recording) segments with zero video frames #1888

Closed darkdarkdragon closed 3 years ago

darkdarkdragon commented 3 years ago

Problem

Mist sometimes emit segments with zero video frames. We have special check for such frames in lpms, so they not transcoded. But if recording is enabled - these segments saved in the source stream. And these segments cause problems when playing such streams - our test player and bitmovin player stop at such a segment.

Proposed solution

We do have function in lpms that check for such segments https://github.com/livepeer/lpms/blob/master/ffmpeg/extras.h#L5 but we don't expose this function publicly. We should expose this function and use to check source segments before saving.

Other potential solutions

We could delay saving source segment until transcoder response and check for specific error. That solution have potential problem that if transcoder is unavailable then broadcaster can't tell if segment is good or bad.

yondonfu commented 3 years ago

That solution have potential problem that if transcoder is unavailable then broadcaster can't tell if segment is good or bad.

And the reason that its important for the broadcaster to be able to determine if the source segment has zero video frames is because even if there are no transcoded results we still want to include the source segment in the recording without corresponding transcoding renditions right?

darkdarkdragon commented 3 years ago

That solution have potential problem that if transcoder is unavailable then broadcaster can't tell if segment is good or bad.

And the reason that its important for the broadcaster to be able to determine if the source segment has zero video frames is because even if there are no transcoded results we still want to include the source segment in the recording without corresponding transcoding renditions right?

Yes - if our transcoding pipeline is down then user at least will get his source stream.