Video encoding dynamic reference frame selection
A computer implemented method includes obtaining video frames to transmit. The video frames are encoded and transmitted via a network connection. A probability that a last video frame will be or was received is determined. A next frame is encoded and transmitted as a P-frame that identifies changes from a previously transmitted frame. The previously transmitted frame is selected as a function of the probability that the last transmitted video frame was received.
1 . A computer implemented method comprising:
obtaining video frames to transmit;
encoding and transmitting multiple frames via a network connection;
determining a probability that a last video frame will be or was received, wherein the determining the probability includes:
receiving network quality information; and
generating the probability based on the received network quality information; and
encoding and transmitting a next frame as a P-frame that identifies changes from a previously transmitted frame selected as a function of the generated probability, including selecting, for use as a reference frame, between using the last video frame and a frame transmitted prior to the last video frame, wherein the previously transmitted frame is selected, for use as the reference frame, in response to:
obtaining a probability threshold;
comparing the generated probability to the probability threshold; and
selecting the frame transmitted prior to the last video frame in response to the probability threshold being greater than the generated probability.
2 . The method of claim 1 wherein the probability threshold is user settable.
3 . The method of claim 2 wherein the probability threshold is application specific.
4 . The method of claim 1 wherein the probability threshold is at least 99 percent.
5 . The method of claim 1 wherein the received network quality information comprises cellular network signal strength received from a cellular network, receipt of an acknowledgement within a selected time, a network congestion signal, network packet error rates, or buffering occurring because of unsuccessful transmission.
6 . The method of claim 1 wherein the network quality information is indicative of future network quality.
7 . The method of claim 1 wherein the frame transmitted before the last video frame is more than one frame before the last video frame.
8 . The method of claim 1 wherein the determining the probability is performed without counting on whether the last video frame was received.
9 . The method of claim 1 further comprising:
determining a probability that a given video frame will be or was received; and
encoding and transmitting a subsequent frame as a P-frame that identifies changes from the given video frame, the given video frame being selected as a reference frame for the subsequent frame in response to the probability threshold being less than the probability that the given video frame will be or was received.
10 . A computer system comprising one or more processing units and memory, wherein the computer system implements a video encoder configured to perform operations comprising:
obtaining video frames to transmit;
encoding and transmitting multiple frames via a network connection;
determining a probability that a last video frame will be or was received, wherein the determining the probability includes:
obtaining a measure of quality of the network connection; and
generating the probability based on the obtained measure; and
encoding and transmitting a next frame as a P-frame that identifies changes from a previously transmitted frame selected as a function of the generated probability, including selecting, for use as a reference frame, between using the last video frame and a frame transmitted prior to the last video frame, wherein the previously transmitted frame is selected, for use as the reference frame, in response to:
obtaining a probability threshold;
comparing the generated probability to the probability threshold; and
selecting the frame transmitted prior to the last video frame in response to the probability threshold being greater than the generated probability.
11 . The computer system of claim 10 wherein the measure of quality of the network connection comprises cellular network signal strength received from a cellular network, receipt of an acknowledgement within a selected time, a network congestion signal, network packet error rates, or buffering occurring because of unsuccessful transmission.
12 . The computer system of claim 10 wherein the determining the probability is performed without counting on whether the last video frame was received.
13 . The computer system of claim 10 wherein the operations further comprise:
determining a probability that a given video frame will be or was received; and
encoding and transmitting a subsequent frame as a P-frame that identifies changes from the given video frame, the given video frame being selected as a reference frame for the subsequent frame in response to the probability threshold being less than the probability that the given video frame will be or was received.
14 . The computer system of claim 10 wherein the probability threshold is user settable and is application specific.
15 . A machine-readable storage device having instructions for execution by a processor of a machine to cause the processor to perform operations to perform a method, the operations comprising:
obtaining video frames to transmit;
encoding and transmitting multiple frames via a network connection;
determining a probability that a last video frame will be or was received, wherein the determining the probability includes:
receiving network quality information; and
generating the probability based on the received network quality information; and
encoding and transmitting a next frame as a P-frame that identifies changes from a previously transmitted frame selected as a function of the generated probability, including selecting, for use as a reference frame, between using the last video frame and a frame transmitted prior to the last video frame, wherein the previously transmitted frame is selected, for use as the reference frame, in response to:
obtaining a probability threshold;
comparing the generated probability to the probability threshold; and
selecting the frame transmitted prior to the last video frame in response to the probability threshold being greater than the generated probability.
16 . The device of claim 15 wherein the probability threshold is user settable and is application specific.
17 . The device of claim 15 wherein the received network quality information comprises cellular network signal strength received from a cellular network, receipt of an acknowledgement within a selected time, a network congestion signal, network packet error rates, or buffering occurring because of unsuccessful transmission.
18 . The device of claim 15 wherein the frame transmitted before the last video frame is more than one frame before the last video frame.
19 . The device of claim 15 wherein the determining the probability is performed without counting on whether the last video frame was received.
20 . The device of claim 15 wherein the operations further comprise:
determining a probability that a given previous frame will be or was received; and
encoding and transmitting a subsequent frame as a P-frame that identifies changes from the given previous frame, the given previous frame being selected as a reference frame for the subsequent frame in response to the probability threshold being less than the probability that the given previous frame will be or was received.