CPC H04N 19/146 (2014.11) [H04N 19/124 (2014.11); H04N 19/167 (2014.11); H04N 19/176 (2014.11)] | 17 Claims |
1. An electronic device comprising:
a memory; and
a processor operatively connected to the memory,
wherein the processor is configured to:
obtain a maximum allowable bitrate of the electronic device,
determine a maximum quantization value for encoding a video composed of a plurality of frames,
obtain a first bitrate by encoding a first frame set of the video with a quantization value equal to or less than the maximum quantization value,
increase the maximum quantization value in response to the obtained first bitrate exceeding the maximum allowable bitrate,
decrease the maximum quantization value in response to the obtained first bitrate being less than or equal to the maximum allowable bitrate,
obtain a second bitrate by encoding a second frame set subsequent to the first frame set of the video, based on the increased or decreased maximum quantization value,
increase the maximum quantization value in response to the obtained second bitrate exceeding the maximum allowable bitrate,
decrease the maximum quantization value in response to the obtained second bitrate being less than or equal to the maximum allowable bitrate,
determine a first resource level of the first frame set based on the first bitrate,
determine a second resource level of the second frame set based on the second bitrate, and
store the second resource level in a header of video data when the second resource level is higher than the first resource level, and
wherein a resource level is required to reproduce the video in a playback device.
|