Video frame extraction method and apparatus, computer-readable medium
AssigneeTencent Technology (Shenzhen) Company Limited
InventorWenhuan ZHOU
Life of this patent
Estimating the term…
Abstract
A video frame extraction method performed by a computing device includes: obtaining a key frame timestamp table of a video based on a first sampling stride, the first sampling stride being adjusted according to a length of the object video; obtaining a timestamp of a key frame to be extracted from the key frame timestamp table based on a second sampling stride, the second sampling stride being determined according to a quantity of key frame timestamps in the key frame timestamp table and a quantity of to-be-extracted key frames; reading, according to the timestamp, frame data of the key frame; and generating, based on a hard decoding result of the frame data, a thumbnail corresponding to the key frame.
Claims20
A video frame extraction method performed by a computing device, comprising:
- obtaining a key frame timestamp table of a video based on a first sampling stride, the first sampling stride being adjusted according to a length of the video;
- obtaining a timestamp of a key frame to be extracted from the key frame timestamp table based on a second sampling stride, the second sampling stride being determined according to a quantity of key frame timestamps in the key frame timestamp table and a quantity of to-be-extracted key frames;
- reading, according to the timestamp, frame data of the key frame;
- and
- generating, based on a hard decoding result of the frame data, a thumbnail corresponding to the key frame.
A video frame extraction apparatus, comprising:
- a memory and a processor coupled to the memory, the processor being configured to perform:
- obtaining a key frame timestamp table of a video based on a first sampling stride, the first sampling stride being adjusted according to a length of the video;
- obtaining a timestamp of a key frame to be extracted from the key frame timestamp table based on a second sampling stride, the second sampling stride being determined according to a quantity of key frame timestamps in the key frame timestamp table and a quantity of to-be-extracted key frames;
- reading, according to the timestamp, frame data of the key frame;
- and
- generating, based on a hard decoding result of the frame data, a thumbnail corresponding to the key frame.
A non-transitory computer-readable medium, storing a computer program, the computer program, when executed by a processor, cause the processor to perform:
- obtaining a key frame timestamp table of a video based on a first sampling stride, the first sampling stride being adjusted according to a length of the video;
- obtaining a timestamp of a key frame to be extracted from the key frame timestamp table based on a second sampling stride, the second sampling stride being determined according to a quantity of key frame timestamps in the key frame timestamp table and a quantity of to-be-extracted key frames;
- reading, according to the timestamp, frame data of the key frame;
- and
- generating, based on a hard decoding result of the frame data, a thumbnail corresponding to the key frame.
Dependencies are inferred from the claim text.