Search

CN-122027834-A - Video playing method and device, storage medium and electronic equipment

CN122027834ACN 122027834 ACN122027834 ACN 122027834ACN-122027834-A

Abstract

The application discloses a video playing method, a video playing device, a storage medium and electronic equipment, which relate to the technical field of video processing and comprise the steps of responding to switching of a player of a target video, determining a video frame to be rendered of the target video from decoded video frames of the target video, and determining a first video frame to be decoded of the target video; and in response to the completion of the initialization of the first video player, sharing the video frame to be rendered and the first video frame to be decoded with the first video player so as to switch the player of the target video into the first video player. The application can avoid the situation that the video stops playing by playing the video frames to be rendered and the audio content of the video frames to be rendered in the video playing process, and can realize the synchronization of switching the up-and-down playing content before and after the player by sharing the video frames in the player, thereby improving the user experience.

Inventors

  • WANG WEI
  • XU JIN
  • LU MIN
  • DUO HAOXUE

Assignees

  • 咪咕互动娱乐有限公司
  • 咪咕文化科技有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260512
Application Date
20251223

Claims (10)

  1. 1. A video playing method, comprising: In response to switching a player of a target video, determining a video frame to be rendered of the target video from decoded video frames of the target video, and determining a first video frame to be decoded of the target video; Playing the video frames to be rendered and the audio content corresponding to the video frames to be rendered; And in response to the completion of the initialization of the first video player, sharing the video frames to be rendered and the first video frames to be decoded with the first video player so as to switch the player of the target video to the first video player.
  2. 2. The method of claim 1, wherein prior to the determining the target video to render video frame from the decoded video frames of the target video and determining the target video to decode video frame, the method further comprises: responding to the playing of the target video by a second video player, and if the target video is determined to meet the player switching condition, switching the player of the target video; the determining the video frame to be rendered of the target video from the decoded video frames of the target video, and determining the video frame to be decoded of the target video, includes: Determining a decoded video frame of the target video by the second video player; Determining a video frame to be rendered of the target video from the decoded video frames, and determining a video frame to be decoded of the target video.
  3. 3. The method of claim 2, wherein before the switching of the player of the target video if the target video is determined to meet a player switching condition in response to the playing of the target video by the second video player, the method further comprises: responding to a playing request of terminal equipment for a target video, and determining first characteristic information corresponding to the terminal equipment and second characteristic information corresponding to the target video; Determining a playing mode of the target video according to the first characteristic information and the second characteristic information; And under the condition that the playing mode is collaborative playing, determining a plurality of video players which play the target video in the terminal equipment in a collaborative mode, wherein the plurality of video players comprise the first video player and the second video player.
  4. 4. The method of claim 3, wherein after the switching of the player of the target video if the target video is determined to meet a player switching condition in response to the playing of the target video by a second video player, the method further comprises: Determining the first video player from the plurality of video players; And initializing the first video player.
  5. 5. The method of claim 2, wherein the switching the player of the target video if it is determined that the target video meets a player switching condition in response to playing the target video by a second video player comprises: in response to playing the target video by a second video player, determining a second video frame to be decoded of the target video, and sharing the second video frame to be decoded with the first video player; and in the process of playing the target video through the first video player, if the target video is determined to be in accordance with the player switching condition, switching the player of the target video.
  6. 6. The method of any of claims 2 to 5, wherein prior to the playing of the video frame to be rendered and the audio content corresponding to the video frame to be rendered, the method further comprises: Generating a first compensation video frame corresponding to the target video based on the decoded video frame and the video frame to be rendered, wherein the first compensation video frame is used for compensating a video picture after the second video player finishes playing; After the video frame to be rendered and the audio content corresponding to the video frame to be rendered are played, the method further comprises: And generating a second compensation video frame corresponding to the target video based on the video frame to be rendered and the first video frame to be decoded, wherein the second compensation video frame is used for compensating a video picture before the first video player starts to play.
  7. 7. A video playback device, comprising: A determining module configured to determine a video frame to be rendered of a target video from decoded video frames of the target video and determine a first video frame to be decoded of the target video in response to switching a player of the target video; the playing module is configured to play the video frames to be rendered and the audio content corresponding to the video frames to be rendered; And the sharing module is configured to share the video frames to be rendered and the first video frames to be decoded with the first video player in response to the completion of the initialization of the first video player so as to switch the player of the target video to the first video player.
  8. 8. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any one of claims 1 to 6.
  9. 9. An electronic device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, characterized in that the processor implements the method of any one of claims 1 to 6 when executing the computer program.
  10. 10. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Description

Video playing method and device, storage medium and electronic equipment Technical Field The present application relates to the field of video processing technologies, and in particular, to a video playing method, a device, a storage medium, and an electronic apparatus. Background The video player (Terminal-based Video Player) in the Terminal device is a tool for playing video directly in command line terminals (e.g., linux Shell, macOS Terminal, windows WSL) without a graphical interface (GUI), and typically renders video frames to the Terminal window through a character drawing (ASCII/Unicode) or Terminal graphic Protocol (e.g., sixel, KITTY GRAPHICS protocols). Currently, in the case of video playing by a video player in a terminal device, if switching of the video player is required during the video playing process, for example, if the video player fails to play, another player is required to play the video being played continuously. However, in this way, when other players are needed to play the video being played, the different players respectively read the stream, respectively de-multiplex, respectively decode and render the video when the mechanical energy is played, so that the situation that the video playing is stopped in the process of switching the players is caused, and the user experience is affected. Disclosure of Invention In view of this, the present application provides a video playing method, apparatus, storage medium and electronic device, and aims to improve the technical problem that in the prior art, when other players are needed to play continuously the video being played, because different players respectively read streams, respectively de-multiplex, respectively decode and render when playing mechanical energy, the situation that video playing is stopped will exist in the process of switching the players, and user experience is affected. In a first aspect, the present application provides a video playing method, including: In response to switching a player of a target video, determining a video frame to be rendered of the target video from decoded video frames of the target video, and determining a first video frame to be decoded of the target video; Playing the video frames to be rendered and the audio content corresponding to the video frames to be rendered; And in response to the completion of the initialization of the first video player, sharing the video frames to be rendered and the first video frames to be decoded with the first video player so as to switch the player of the target video to the first video player. In a second aspect, the present application provides a video playing device, including: A determining module configured to determine a video frame to be rendered of a target video from decoded video frames of the target video and determine a first video frame to be decoded of the target video in response to switching a player of the target video; the playing module is configured to play the video frames to be rendered and the audio content corresponding to the video frames to be rendered; And the sharing module is configured to share the video frames to be rendered and the first video frames to be decoded with the first video player in response to the completion of the initialization of the first video player so as to switch the player of the target video to the first video player. In a third aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the video playing method of the first aspect. In a fourth aspect, the present application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, where the processor implements the video playing method according to the first aspect when executing the computer program. In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the video playing method of the first aspect. According to the technical scheme, the video playing method, the video playing device, the storage medium and the electronic equipment comprise the steps of determining a video frame to be rendered of a target video from decoded video frames of the target video and determining a first video frame to be decoded of the target video in response to switching of players of the target video, playing the video frame to be rendered and audio content corresponding to the video frame to be rendered, and sharing the video frame to be rendered and the first video frame to be decoded with a first video player in response to completion of initialization of the first video player so as to switch the players of the target video into the first video player. Compared with the prior art, the method and the device have the advantages that under the condition that the play