CN114760503B - Video playing method, device, system, electronic equipment and storage medium - Google Patents

Video playing method, device, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN114760503B
CN114760503B CN202210397275.8A CN202210397275A CN114760503B CN 114760503 B CN114760503 B CN 114760503B CN 202210397275 A CN202210397275 A CN 202210397275A CN 114760503 B CN114760503 B CN 114760503B
Authority
CN
China
Prior art keywords
video
aspect ratio
target
playing
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210397275.8A
Other languages
Chinese (zh)
Other versions
CN114760503A (en
Inventor
宋尚真
吕嘉伟
韩柏虎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN202210397275.8A priority Critical patent/CN114760503B/en
Publication of CN114760503A publication Critical patent/CN114760503A/en
Application granted granted Critical
Publication of CN114760503B publication Critical patent/CN114760503B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/835Generation of protective data, e.g. certificates
    • H04N21/8352Generation of protective data, e.g. certificates involving content or source identification data, e.g. Unique Material Identifier [UMID]

Abstract

The embodiment of the invention provides a video playing method, a device, a system, electronic equipment and a storage medium, wherein a client sends a request message carrying a video identification of a target video to a server. When the server receives the request message, the server acquires target playing information corresponding to the video identification of the target video, and sends the target playing information to the client. The target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address. When receiving the target playing information, the client acquires a video file of the target video according to the storage address, and plays the target video according to the actual aspect ratio indicated by the aspect ratio information and the video file. Based on the processing, when the client acquires the video file of the target video according to the storage address, the client already acquires the actual aspect ratio of the target video, and the client can play the target video based on the actual aspect ratio of the target video, so that the video playing quality can be improved.

Description

Video playing method, device, system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a video playing method, apparatus, system, electronic device, and storage medium.
Background
With the development of internet technology, clients providing various functions to users are becoming more and more popular. For example, a user may view video through a client for playing video.
In the related art, when playing a video, a client may first obtain a video file of a target video to be played. Then, the client may decode the video file of the target video through the first decoding module to obtain each video frame included in the target video. Meanwhile, the client can decode the video file of the target video through the second decoding module so as to acquire the actual aspect ratio of the target video. When the client acquires the video frames contained in the target video through the first decoding module, if the actual aspect ratio of the target video is not acquired currently, the client plays the video frames contained in the target video according to the preset aspect ratio. Subsequently, when the actual aspect ratio is obtained through the second decoding module, the client switches to playing the video frame contained in the target video according to the actual aspect ratio.
However, switching from playing the video frames contained in the target video at the preset aspect ratio to playing the video frames contained in the target video at the actual aspect ratio may cause distortion of the picture content in the video picture displayed by the client (e.g., the characters in the picture are elongated, etc.), reduce the video playing quality, and affect the viewing experience of the user.
Disclosure of Invention
The embodiment of the invention aims to provide a video playing method, a device, a system, electronic equipment and a storage medium, so as to improve video playing quality and improve watching experience of users. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a video playing method, the method being applied to a video playing system, the system comprising: the method comprises the following steps of:
the client sends a request message carrying a video identifier of a target video to the server;
when the server receives the request message, acquiring playing information corresponding to the video identifier of the target video, taking the playing information as target playing information, and sending the target playing information to the client; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
when the client receives the target playing information, acquiring a video file of the target video according to the storage address; and playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
In a second aspect of the present invention, there is also provided a video playing method, where the method is applied to a client, and the method includes:
sending a request message carrying a video identifier of a target video to a server, so that when the server receives the request message, acquiring playing information corresponding to the video identifier of the target video as target playing information, and sending the target playing information to the client; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
when the target playing information is received, acquiring a video file of the target video according to the storage address;
and playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
Optionally, the playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information includes:
decoding the video file to obtain a video frame contained in the target video;
determining a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information;
And playing the video frames contained in the target video in the determined target display area.
Optionally, the determining, based on the display aspect ratio of the playing window of the client and the actual aspect ratio indicated by the aspect ratio information, a display area of the target video in the playing window as a target display area includes:
judging whether the display aspect ratio of the play window is the same as the actual aspect ratio indicated by the aspect ratio information;
if the display aspect ratio is the same as the actual aspect ratio, determining that all display areas in the playing window are display areas of the target video and serve as target display areas;
and if the display aspect ratio is different from the actual aspect ratio, determining a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtaining the display area of the target video in the playing window as a target display area.
Optionally, the width of the target display area is the same as the width of the playing window, or the height of the target display area is the same as the height of the playing window.
Optionally, the obtaining the video file of the target video according to the storage address includes:
And acquiring a video file of the target video at the storage address in the content distribution network.
In a third aspect of the present invention, there is also provided a video playing method, where the method is applied to a server, and the method includes:
receiving a request message carrying a video identifier of a target video sent by a client;
acquiring playing information corresponding to the video identifier of the target video as target playing information; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
the target playing information is sent to the client, so that the client obtains a video file of the target video according to the storage address when receiving the target playing information; and playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
Optionally, before the playing information corresponding to the video identifier of the target video is obtained and is used as the target playing information, the method further includes:
acquiring each original video frame corresponding to the target video;
encoding each acquired original video frame to obtain a video file of the target video;
Storing the video file of the target video to a content distribution network, and storing the video identification and playing information of the target video to the server correspondingly.
In a fourth aspect of the present invention, there is also provided a video playing system, the system comprising: a client and a server, wherein:
the client is used for sending a request message carrying the video identification of the target video to the server;
the server is used for acquiring playing information corresponding to the video identifier of the target video when receiving the request message, taking the playing information as target playing information and sending the target playing information to the client; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
the client is further configured to obtain, when receiving the target playing information, a video file of the target video according to the storage address; and playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
In a fifth aspect of the present invention, there is also provided a video playing device, the device being applied to a client, the device including:
The sending module is used for sending a request message carrying a video identifier of a target video to a server, so that the server can acquire playing information corresponding to the video identifier of the target video when receiving the request message, and the playing information is used as target playing information and is sent to the client; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
the acquisition module is used for acquiring the video file of the target video according to the storage address when receiving the target playing information;
and the playing module is used for playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
Optionally, the playing module is specifically configured to decode the video file to obtain a video frame included in the target video;
determining a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information;
and playing the video frames contained in the target video in the determined target display area.
Optionally, the playing module is specifically configured to determine whether a display aspect ratio of the playing window and an actual aspect ratio indicated by the aspect ratio information are the same;
if the display aspect ratio is the same as the actual aspect ratio, determining that all display areas in the playing window are display areas of the target video and serve as target display areas;
and if the display aspect ratio is different from the actual aspect ratio, determining a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtaining the display area of the target video in the playing window as a target display area.
Optionally, the width of the target display area is the same as the width of the playing window, or the height of the target display area is the same as the height of the playing window.
Optionally, the acquiring module is specifically configured to acquire a video file of the target video at the storage address in the content distribution network.
In a sixth aspect of the present invention, there is also provided a video playing device, the device being applied to a server, the device comprising:
the receiving module is used for receiving a request message which is sent by the client and carries the video identification of the target video;
The first acquisition module is used for acquiring playing information corresponding to the video identifier of the target video to serve as target playing information; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
the sending module is used for sending the target playing information to the client so that the client can acquire the video file of the target video according to the storage address when receiving the target playing information; and playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
Optionally, the apparatus further includes:
the second acquisition module is used for acquiring each original video frame corresponding to the target video;
the encoding module is used for encoding each acquired original video frame to obtain a video file of the target video;
and the storage module is used for storing the video file of the target video to a content distribution network and storing the video identification and playing information of the target video to the server correspondingly.
In yet another aspect of the present invention, there is also provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory perform communication with each other through the communication bus;
A memory for storing a computer program;
and a processor, configured to implement the video playing method step described in the second aspect or the video playing method step described in the third aspect when executing the program stored in the memory.
In still another aspect of the implementation of the present invention, there is further provided a computer readable storage medium, where a computer program is stored, where the computer program when executed by a processor implements the video playing method according to the second aspect or the video playing method according to the third aspect.
In a further aspect of the present invention there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the video playback method of the second aspect described above, or the video playback method of the third aspect described above.
According to the video playing method provided by the embodiment of the invention, the client sends the request message carrying the video identification of the target video to the server. When receiving the request message, the server acquires playing information corresponding to the video identifier of the target video, and sends the playing information to the client, wherein the playing information comprises aspect ratio information and a storage address, and the aspect ratio information represents the actual aspect ratio of the target video. When receiving the target playing information, the client acquires a video file of the target video according to the storage address; and playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
Based on the above processing, the client first obtains the actual aspect ratio and the storage address of the target video, and correspondingly, when the client obtains the video file of the target video according to the storage address, the client already obtains the actual aspect ratio of the target video. Furthermore, the client can play the target video based on the actual aspect ratio of the target video, so that the situation that the video is played according to the preset aspect ratio due to the fact that the actual aspect ratio of the target video is not obtained in time can be avoided to a certain extent, further, deformation of picture content in a played video picture is avoided to a certain extent, video playing quality can be improved, and viewing experience of a user is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a video playing method provided in an embodiment of the present invention;
FIG. 2 is a flowchart of another video playing method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another video playing method according to an embodiment of the present invention;
FIG. 4 is a flowchart of another video playing method according to an embodiment of the present invention;
Fig. 5 is a flowchart of a video playing method provided in the related art;
FIG. 6 is a flowchart of another video playing method according to an embodiment of the present invention;
FIG. 7 is a flowchart of another video playing method according to an embodiment of the present invention;
fig. 8 is a block diagram of a video playing device according to an embodiment of the present invention;
fig. 9 is a block diagram of another video playing device according to an embodiment of the present invention;
fig. 10 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
In the related art, a process of switching from playing video frames included in a target video according to a preset aspect ratio to playing video frames included in a target video according to an actual aspect ratio may cause distortion of picture content in a displayed video picture, reduce video playing quality, and affect viewing experience of a user.
In order to solve the above problem, an embodiment of the present invention provides a video playing system, which may include: a client and a server, wherein:
the client sends a request message carrying the video identification of the target video to the server.
When receiving the request message, the server acquires playing information corresponding to the video identifier of the target video, takes the playing information as target playing information, and sends the target playing information to the client. Wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address.
When receiving the target playing information, the client acquires a video file of the target video according to the storage address, and plays the target video according to the actual aspect ratio indicated by the aspect ratio information and the video file.
Based on the video playing system provided by the embodiment of the invention, the client firstly acquires the actual aspect ratio and the storage address of the target video, and correspondingly, when the client acquires the video file of the target video according to the storage address, the client already acquires the actual aspect ratio of the target video. Furthermore, the client can play the target video based on the actual aspect ratio of the target video, so that the situation that the video is played according to the preset aspect ratio due to the fact that the actual aspect ratio of the target video is not obtained in time can be avoided to a certain extent, further, deformation of picture content in a played video picture is avoided to a certain extent, video playing quality can be improved, and viewing experience of a user is improved.
For other embodiments of the video playback system described above, reference may be made to the following description of method embodiments with respect to clients and servers.
Referring to fig. 1, fig. 1 is a flowchart of a video playing method according to an embodiment of the present invention, where the method may be applied to the video playing system, and the method may include the following steps:
s101: the client sends a request message carrying the video identification of the target video to the server.
S102: and when the server receives the request message, acquiring playing information corresponding to the video identifier of the target video as target playing information.
Wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address.
S103: and the server sends the target playing information to the client.
S104: and when receiving the target playing information, the client acquires the video file of the target video according to the storage address.
S105: the client plays the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
Based on the video playing method provided by the embodiment of the invention, the client firstly acquires the actual aspect ratio and the storage address of the target video, and correspondingly, when the client acquires the video file of the target video according to the storage address, the client already acquires the actual aspect ratio of the target video. Furthermore, the client can play the target video based on the actual aspect ratio of the target video, so that the situation that the video is played according to the preset aspect ratio due to the fact that the actual aspect ratio of the target video is not obtained in time can be avoided to a certain extent, further, deformation of picture content in a played video picture is avoided to a certain extent, video playing quality can be improved, and viewing experience of a user is improved.
For step S101, the client may be used to play the video, for example, the client may be a system player of an android system, and the client may be installed on a different device, for example, a mobile phone, a computer, a television, and the like.
When the user needs to watch the video, the user can input a playing instruction for the video to be played (i.e. the target video of the embodiment of the invention) to the client. Correspondingly, the client can receive the playing instruction input by the user, further determine the video identification of the target video indicated by the playing instruction, and send a request message carrying the video identification of the target video to the server. The video identification of the target video may be the name of the target video.
For step S102 and step S103, the server may receive the request message sent by the client, and extract the video identifier (i.e., the video identifier of the target video) carried in the received request message. Then, the server can acquire playing information corresponding to the video identification of the target video as target playing information.
The server may store the playing information of a plurality of videos locally, and for each video, the server may acquire the playing information of the video in the following manner.
In an implementation, referring to fig. 2 on the basis of fig. 1, before step S102, the method may further include the steps of:
s106, the server acquires each original video frame corresponding to the target video.
S107, the server encodes each acquired original video frame to obtain a video file of the target video.
S108, the server stores the video file of the target video to the content distribution network, and correspondingly stores the video identification and playing information of the target video to the server.
The playing information of one video may include: aspect ratio information representing an actual aspect ratio of the video, a storage address of the video, a resolution of the video, a video format of the video, and the like.
The server may acquire each original video frame corresponding to the target video, where the original video frame corresponding to the target video is a video frame when the target video is produced, for example, a video frame obtained by capturing by the image capturing device.
Since the resolution, aspect ratio and video format of each original video frame corresponding to the target video are fixed, different playing requirements of the user cannot be met, for example, the video format of the original video frame of the target video is in "AVI" format, and the user may need to play the target video in "HDR" format.
Therefore, in order to meet different playing requirements of users, the server can encode the original video frames corresponding to the target video to obtain the video files of the target video meeting the different playing requirements. The play requirement may include: preset resolution, preset aspect ratio, preset video format, etc. For example, the server may encode each original video frame corresponding to the target video according to a preset resolution of 1080P, a preset aspect ratio of 16:9, a preset video format of "AVI" format, to obtain a video file of the target video, where the resolution of the video file is 1080P, the aspect ratio of 16:9, and the video format of "AVI" format. The server may further encode each original video frame corresponding to the target video according to a preset resolution of 720P, a preset aspect ratio of 16:9, a preset video format of "AVI" format, to obtain a video file of the target video, where the resolution of the video file is 720P, the aspect ratio of 16:9, and the video format of "AVI" format.
After encoding the video file of the target video, the video file of the target video may be stored to a preset storage location, for example, to a preset database, for example, dis (Remote Dictionary Server, remote dictionary service), or may be stored to the CDN (Content Delivery Network ). Furthermore, the server may determine the playing information of the target video, and store the video identifier of the target video and the playing information to the server, that is, record the video identifier of the target video and the corresponding playing information locally in the server.
In another implementation, the servers may include an encoding server and a management server. The encoding server can acquire each original video frame corresponding to the target video, and encode the original video frame corresponding to the target video to obtain a video file of the target video. Further, the encoding server may store the video file of the target video to a preset storage location, for example, store the video file of the target video to a content distribution network. Further, the encoding server may determine playback information of the target video and send the video identification and the playback information of the target video to the management server.
The management server can receive the video identification and the playing information of the target video and store the video identification and the playing information of the target video to the local. Subsequently, the management server can receive the request message sent by the client and acquire the target playing information according to the video identifier of the target video carried in the request message.
Further, the server may send target play information of the target video to the client.
For step S104, the client may receive the target play information sent by the server. Then, based on the received target play information, the actual aspect ratio of the target video and the video file of the target video are acquired.
The target play information contains aspect ratio information indicating the actual aspect ratio of the target video. In one implementation, the aspect ratio information may be an actual aspect ratio of the target video, and the client may directly obtain the actual aspect ratio of the target video and obtain the video file of the target video according to the storage address.
In another implementation, the aspect ratio information may be the actual width and the actual height of the target video. The client can calculate the ratio of the actual width to the actual height of the target video to obtain the actual aspect ratio of the target video, and acquire the video file of the target video according to the storage address.
In one embodiment of the invention, the client may include a rendering layer and a decoding layer, when receiving the target playing information, the client may obtain the video file of the target video according to the storage address through the decoding layer, and meanwhile, the client calculates the ratio of the actual width to the actual height of the target video through the rendering layer to obtain the actual aspect ratio of the target video, and then, the client may not decode the video file to obtain the actual aspect ratio after obtaining the video file of the target video, i.e. may obtain the actual aspect ratio of the target video in advance, so that the client may already obtain the actual aspect ratio of the target video when obtaining the video file of the target video, and then may play the target video according to the actual aspect ratio, thereby improving the video playing quality and improving the user experience.
If the video file of the target video is stored in the preset database, the storage address of the target video represents the storage position of the video file of the target video in the preset database. The client can acquire the video file of the target video under the storage address in the preset database.
If the video file of the target video is stored in the content distribution network, the storage address of the target video indicates the storage location of the video file of the target video in the content distribution network.
Accordingly, step S104 may include the steps of: the client obtains a video file of the target video at a storage address in the content distribution network.
Based on the above processing, the content distribution network includes a plurality of cache servers for storing video files, the cache servers are distributed to areas or networks where client accesses are relatively concentrated, and the client can acquire video files from the cache server closest to the client, so that the efficiency of the client for acquiring video files can be improved.
In one embodiment of the present invention, referring to fig. 3, based on fig. 1, step S105 may include the steps of:
s1051: and the client decodes the video file to obtain a video frame contained in the target video.
S1052: the client determines a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information.
S1053: and the client plays the video frames contained in the target video in the determined target display area.
The play window of the client is a view of a video frame for displaying the target video. Since the display aspect ratio of the play window may be different from the actual aspect ratio, the client needs to determine a target display area for playing the target video from the play window.
In one implementation, the client may include a decoding layer and a rendering layer, the client may decode the video file through the decoding layer to obtain a video frame included in the target video, and determine, through the rendering layer, a target display area of the target video in a play window of the client based on a display aspect ratio of the play window and an actual aspect ratio of the target video. Furthermore, the client may render, through the rendering layer, the video frames contained in the target video in the determined target display area based on the video frames contained in the target video, so as to play the video frames contained in the target video in the target display area.
In one embodiment of the present invention, referring to fig. 4, on the basis of fig. 3, step S1052 may include the steps of:
s10521: the client determines whether the display aspect ratio of the play window and the actual aspect ratio represented by the aspect ratio information are the same.
S10522: if the display aspect ratio is the same as the actual aspect ratio, the client determines that all display areas in the playing window are display areas of the target video and serve as target display areas; if the display aspect ratio is different from the actual aspect ratio, the client determines a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtains the display area of the target video in the playing window as the target display area.
The client may determine whether the display aspect ratio and the actual aspect ratio of the play window are the same, and if the display aspect ratio and the actual aspect ratio are the same, which indicates that playing the target video according to the display aspect ratio does not cause distortion of the picture content in the video picture, the client may determine that all display areas in the play window are target display areas of the target video.
If the display aspect ratio is not the same as the actual aspect ratio, indicating that playing the target video at the display aspect ratio results in distortion of the picture content in the video picture, the client may determine a target display area having an aspect ratio that is the actual aspect ratio from the play window. Since the aspect ratio of the target display area is the actual aspect ratio, playing the target video in the target display area does not cause distortion of the picture content in the video picture.
In one implementation, where the width of the target display area (which may be referred to as the target width) is the same as the width of the playback window, the client may calculate the height of the target display area (which may be referred to as the target height) according to the actual aspect ratio of the target video and the width of the playback window. Then, the client may determine the line segments of the target height on the two longitudinal edges of the play window, respectively, and the two endpoints of one line segment are located on the same straight line with the endpoints of the other line segment, respectively. Furthermore, the client may connect an end point of one line segment with an end point corresponding to another line segment, and the obtained quadrangular region is a target display region.
In another implementation, in the case where the height of the target display area (i.e., the target height) is the same as the height of the play window, the client may calculate the width of the target display area (i.e., the target width) according to the actual aspect ratio of the target video and the height of the play window. Then, the client may determine the line segments of the target width on the two lateral edges of the play window, respectively, and the two endpoints of one line segment are located on the same straight line with the endpoints corresponding to the other line segment, respectively. Furthermore, the client may connect an end point of one line segment with an end point corresponding to another line segment, and the obtained quadrangular region is a target display region.
In addition, when the client displays the video picture of the target video in the target display area, the preset content may be displayed in other display areas than the target display area. For example, the client may display a full black screen in other display areas than the target display area, or may display related information of the target video, such as a profile of the target video, an identification of other videos of the same type of the target video, or the like, in other display areas than the target display area.
In one embodiment of the present invention, in order to improve the video playing quality, more areas in the playing window display the video frames of the target video, and the width of the target display area may be the same as the width of the playing window, or the height of the target display area may be the same as the height of the playing window.
In one implementation, in order to enable all video frames of the target video to be displayed in the playing window, and more areas in the playing window display video frames of the target video, when the actual width of the target video is greater than the actual height, the width of the target display area may be the same as the width of the playing window. When the actual width of the target video is smaller than the actual height, the height of the target display area may be the same as the height of the play window. When the actual width of the target video is equal to the actual height, the width of the target display area may be the same as the width of the play window, or the height of the target display area may be the same as the height of the play window.
Exemplary, the actual aspect ratio of the target video is 4:3, the display aspect ratio of the playback window is 16:9, and the display width of the playback window is 1280 pixels, and the display height of the playback window is 720 pixels. The actual width of the target video is greater than the actual height, and in the case of maintaining the aspect ratio of the target display area to 4:3, the width of the target display area may be the same as the width of the play window (i.e., 1280 pixels), and the height of the target display area is 960 pixels. At this time, the width of the target display area is the same as the width of the playing window, and the height of the target display area is smaller than the height of the playing window, so that all video frames of the target video can be displayed in the playing window, and more areas in the playing window display video frames of the target video.
The actual aspect ratio of the target video is 2:3, the display aspect ratio of the play window is 16:9, the display width of the play window is 1280 pixels, and the display height of the play window is 720 pixels. The actual width of the target video is smaller than the actual height, and in the case of keeping the aspect ratio of the target display area to be 2:3, the height of the target display area may be the same as the height of the play window (i.e., 720 pixels), and then the width of the target display area is 480 pixels. At this time, the height of the target display area is the same as the height of the playing window, and the width of the target display area is smaller than the width of the playing window, so that all video frames of the target video can be displayed in the playing window, and more areas in the playing window display video frames of the target video.
Based on the above processing, when the width of the target display area is the same as the width of the playing window, the video frame of the target video can be made to fill the playing window transversely, and if the height of the target display area is different from the height of the playing window, the playing window is only required to be filled with the preset content longitudinally. When the height of the target display area is the same as that of the playing window, the playing window can be longitudinally filled with video pictures of the target video, and the width of the target display area is different from that of the playing window, so that the playing window is only required to be filled with preset contents transversely, more areas in the playing window can display video pictures of the target video, the playing quality of the video can be improved, and further the user experience is improved.
In one embodiment of the present invention, when the client plays the target video according to the actual aspect ratio, when the video frame of the target video is displayed in the target display area, and the preset content is displayed in the other display areas except for the target display area, that is, the playing window of the client displays the other content except for the video frame of the target video, the user may need to display the video frame of the target video in all the display areas of the playing window, and the user may input a full-screen playing instruction to the client.
Correspondingly, if a full-screen playing instruction input by a user is received, the client can take all the display areas in the playing window as target display areas of the target video, and play video frames contained in the target video in the target display areas so as to realize full-screen playing of the target video.
Referring to fig. 5, fig. 5 is a flowchart of a video playing method provided in the related art.
In the related art, the client may be a system player of an android system, and when playing the video, the client may first download video content data, that is, obtain a video file of the target video. Then, the client can analyze the video content data through the decoding module to obtain a rendering window position and rendering video content, a source program of the decoding module is stored in a ROM (read only memory) of the electronic device, the rendering window position refers to a target display area of the target video in a playing window of the client, and the rendering video content refers to each video frame contained in the target video. The client decodes the video file through the first decoding module to obtain the actual aspect ratio of the target video, and determines the target display area of the target video in the playing window based on the actual aspect ratio of the target video. And meanwhile, the client decodes the video file through the second decoding module to obtain a video frame contained in the target video.
And playing the video frame contained in the target video in the target display area when the client acquires the video frame contained in the target video through the first decoding module.
The actual aspect ratio of the target video needs to be obtained before the target display area corresponding to the actual aspect ratio is determined, but the actual aspect ratio of the target video and the included video frames are obtained simultaneously in the related art, and therefore, in the related art, it cannot be guaranteed that the rendering window position is preferentially determined before the rendering of the video content is determined, that is, it cannot be guaranteed that the client has already obtained the actual aspect ratio of the target video when obtaining the video frames included in the target video.
And if the target display area of the target video in the playing window is determined based on the actual aspect ratio, playing the video frame contained in the target video in the determined target display area.
When the client acquires the video frames contained in the target video through the first decoding module, if the actual aspect ratio of the target video is not acquired currently, the client determines a target display area of the target video in the playing window according to the preset aspect ratio, and plays the video frames contained in the target video in the determined target display area, namely, the client plays the video frames contained in the target video according to the preset aspect ratio. Subsequently, when the actual aspect ratio is obtained through the second decoding module, the client switches to determining a target display area according to the actual aspect ratio, and plays video frames contained in the target video in the target display area.
Switching from playing the video frames contained in the target video according to the preset aspect ratio to playing the video frames contained in the target video according to the actual aspect ratio can occur in the process of stretching the video pictures from the wrong proportion (i.e. the preset aspect ratio) to the correct proportion (i.e. the actual aspect ratio) in the displayed video pictures of the client, namely, the picture content in the displayed video pictures is deformed, the video playing quality is reduced, and the viewing experience of the user is affected.
Referring to fig. 6, fig. 6 is a flowchart of another video playing method according to an embodiment of the present invention.
The original medium is a device used in producing content data (i.e., a target video), for example, an image capturing device used in capturing content data. The encoding server may obtain content data (i.e., each original video frame corresponding to the target video in the foregoing embodiment) in the original medium, encode the content data by using the encoder to obtain a plurality of encoded content data (i.e., video files of the target video in the foregoing embodiment) meeting various playing requirements, store the encoded content data to the CDN, and store encoding information (i.e., resolution, aspect ratio, and video format of the content data) of the content data locally.
Then, the encoding server stores the content-related information (i.e., the play information in the foregoing embodiment) and the content address (i.e., the storage address in the foregoing embodiment) to the play data background, that is, the management server in the foregoing embodiment. Namely, the encoding server acquires each original video frame corresponding to the target video, and encodes the original video frame corresponding to the target video to obtain a video file of the target video. The encoding server stores the video file of the target video to the CDN, and correspondingly stores the video identification and playing information of the target video to the management server.
The client sends a request message carrying the video identification of the target video to the management server. The management server, upon receiving the request message, transmits the content address data (i.e., the storage address in the foregoing embodiment) and the content data width-height information (i.e., the aspect ratio information in the foregoing embodiment) to the client. That is, the server transmits the target play information to the client, the target play information including aspect ratio information indicating an actual aspect ratio of the target video and a storage address.
The client may be an android system player, the player decoding layer is a decoding layer contained in the client, and the player rendering layer is a rendering layer contained in the client. The client can receive the content address data through the decoding layer, acquire the content data from the CDN according to the content address data, and decode the content data to obtain decoded video content. The client obtains the video file of the target video from the CDN according to the storage address through the decoding layer, and decodes the video file of the target video to obtain the video frame contained in the target video.
The client may also determine the video window (i.e. the target display area in the foregoing embodiment) according to the width-height information of the content data through the rendering layer, that is, the client may determine the target display area of the target video in the play window through the rendering layer based on the actual aspect ratio of the target video and the display aspect ratio of the play window of the client.
Furthermore, the client may play based on the decoded video content and the video window, that is, the client may render in the target display area based on the video frames contained in the target video to play the target video.
Based on the above processing, the actual aspect ratio of the target video has been determined at the time of encoding the video file from which the target video is obtained, and therefore, the server can record the actual aspect ratio of the target video in the play information of the target video. When the client acquires the storage address of the target video, the client can acquire the playing information of the target video. Accordingly, when the client acquires the video file of the target video according to the storage address, the actual aspect ratio of the target video is already acquired, that is, the actual aspect ratio of the target video may be acquired in advance. Furthermore, the client can play the target video based on the actual aspect ratio of the target video, decoding the video file after the video file of the target video is acquired is not needed, and the actual aspect ratio of the target video is obtained, so that the target display area of the target video can be determined in the play window earlier, the situation that the video is played according to the preset aspect ratio due to the fact that the actual aspect ratio of the target video is not acquired in time can be avoided to a certain extent, further, deformation of picture content in a played video picture is avoided to a certain extent, video playing quality can be improved, and the target display area of the target video in the play window is determined based on the actual aspect ratio of the target video before the first video frame of the target video is played, further, the target video is played according to the actual aspect ratio of the target video, the phenomenon that the display content in the video picture is deformed can not be seen by a user, and user experience is improved.
Referring to fig. 7, fig. 7 is a flowchart of another video playing method according to an embodiment of the present invention.
The client may perform download parsing on the video metadata (i.e., the target playing information in the foregoing embodiments) while playing the video. That is, the client sends a request message to the server carrying the video identification of the target video. The server sends the target playing information to the client when receiving the request message. The client analyzes the target playing information to obtain the aspect ratio information and the storage address which represent the actual aspect ratio of the target video.
The client may determine the rendering window position (i.e. the target display area in the previous embodiment) based on the parsed aspect ratio information, i.e. the client determines the target display area of the target video in the play window by based on the actual aspect ratio of the target video and the display aspect ratio of the play window of the client.
The client may then download the video content data (i.e., the video file of the target video in the previous embodiment), i.e., the client retrieves the video file of the target video from the CDN according to the storage address. The client can also analyze the video content data through a decoding layer to obtain video rendering content, and a source program of the decoding layer is stored in a ROM of the electronic device. The client decodes the video file of the target video to obtain the video frame contained in the target video.
Further, the client may play based on the rendering window position and the rendering video content, that is, the client may render in the target display area based on the video frames contained in the target video to play the target video.
Based on the above processing, the client may first acquire the actual aspect ratio and the storage address of the target video, and correspondingly, when the client acquires the video file of the target video according to the storage address, the client already acquires the actual aspect ratio of the target video. Furthermore, the client can play the target video based on the actual aspect ratio of the target video, so that the situation that the target video is played according to the preset aspect ratio due to the fact that the actual aspect ratio of the target video is not obtained in time can be avoided to a certain extent, further, deformation of picture content in a played video picture is avoided to a certain extent, video playing quality can be improved, and before the first video frame of the target video is played, the target display area of the target video in the playing window is determined based on the actual aspect ratio of the target video, further, the target video is played according to the actual aspect ratio of the target video, and further, the phenomenon that the displayed content in the video picture is deformed is not seen by a user, and user experience is improved.
Corresponding to the method embodiment of fig. 1, referring to fig. 8, fig. 8 is a block diagram of a video playing device provided by an embodiment of the present invention, where the device is applied to a client, and the device includes:
a sending module 801, configured to send a request message carrying a video identifier of a target video to a server, so that when the server receives the request message, obtain playing information corresponding to the video identifier of the target video, as target playing information, and send the target playing information to the client; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
an obtaining module 802, configured to obtain, when receiving the target playing information, a video file of the target video according to the storage address;
a playing module 803, configured to play the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
Optionally, the playing module 803 is specifically configured to decode the video file to obtain a video frame included in the target video;
determining a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information;
And playing the video frames contained in the target video in the determined target display area.
Optionally, the playing module 803 is specifically configured to determine whether the display aspect ratio of the playing window and the actual aspect ratio indicated by the aspect ratio information are the same;
if the display aspect ratio is the same as the actual aspect ratio, determining that all display areas in the playing window are display areas of the target video and serve as target display areas;
and if the display aspect ratio is different from the actual aspect ratio, determining a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtaining the display area of the target video in the playing window as a target display area.
Optionally, the width of the target display area is the same as the width of the playing window, or the height of the target display area is the same as the height of the playing window.
Optionally, the obtaining module 802 is specifically configured to obtain a video file of the target video at the storage address in the content distribution network.
Based on the video playing device provided by the embodiment of the invention, the client firstly acquires the actual aspect ratio and the storage address of the target video, and correspondingly, when the client acquires the video file of the target video according to the storage address, the client already acquires the actual aspect ratio of the target video. Furthermore, the client can play the target video based on the actual aspect ratio of the target video, so that the situation that the video is played according to the preset aspect ratio due to the fact that the actual aspect ratio of the target video is not obtained in time can be avoided to a certain extent, further, deformation of picture content in a played video picture is avoided to a certain extent, video playing quality can be improved, and viewing experience of a user is improved.
Corresponding to the method embodiment of fig. 1, referring to fig. 9, fig. 9 is a block diagram of a video playing device according to an embodiment of the present invention, where the device is applied to a server, and the device includes:
a receiving module 901, configured to receive a request message carrying a video identifier of a target video sent by a client;
a first obtaining module 902, configured to obtain playing information corresponding to a video identifier of the target video, as target playing information; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
the sending module 903 is configured to send the target playing information to the client, so that when the client receives the target playing information, the client obtains a video file of the target video according to the storage address; and playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information.
Optionally, the apparatus further includes:
the second acquisition module is used for acquiring each original video frame corresponding to the target video;
the encoding module is used for encoding each acquired original video frame to obtain a video file of the target video;
And the storage module is used for storing the video file of the target video to a content distribution network and storing the video identification and playing information of the target video to the server correspondingly.
Based on the video playing device provided by the embodiment of the invention, the client firstly acquires the actual aspect ratio and the storage address of the target video, and correspondingly, when the client acquires the video file of the target video according to the storage address, the client already acquires the actual aspect ratio of the target video. Furthermore, the client can play the target video based on the actual aspect ratio of the target video, so that the situation that the video is played according to the preset aspect ratio due to the fact that the actual aspect ratio of the target video is not obtained in time can be avoided to a certain extent, further, deformation of picture content in a played video picture is avoided to a certain extent, video playing quality can be improved, and viewing experience of a user is improved.
The embodiment of the invention also provides an electronic device, as shown in fig. 10, which comprises a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete communication with each other through the communication bus 1004,
A memory 1003 for storing a computer program;
the processor 1001 is configured to implement the video playing method step applied to the client or the video playing method step applied to the server in the foregoing embodiment when executing the program stored in the memory 1003.
The communication bus mentioned by the above electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In still another embodiment of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements the video playing method applied to a client or the video playing method applied to a server in the above embodiment.
In yet another embodiment of the present invention, a computer program product containing instructions that, when executed on a computer, cause the computer to perform the video playback method applied to a client or the video playback method applied to a server in the above embodiment is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, systems, electronic devices, computer readable storage media and computer program product embodiments, the description is relatively simple as it is substantially similar to method embodiments, as relevant to the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (11)

1. A video playing method, wherein the method is applied to a video playing system, and the system comprises: the method comprises the following steps of:
the client sends a request message carrying a video identifier of a target video to the server;
when the server receives the request message, acquiring playing information corresponding to the video identifier of the target video, taking the playing information as target playing information, and sending the target playing information to the client; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
when the client receives the target playing information, acquiring a video file of the target video according to the storage address; playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information;
The playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information, including:
the client decodes the video file to obtain a video frame contained in the target video;
determining a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information;
playing video frames contained in the target video in the determined target display area;
the determining, based on the display aspect ratio of the playing window of the client and the actual aspect ratio indicated by the aspect ratio information, a display area of the target video in the playing window as a target display area includes:
the client judges whether the display aspect ratio of the play window is the same as the actual aspect ratio represented by the aspect ratio information;
if the display aspect ratio is the same as the actual aspect ratio, determining that all display areas in the playing window are display areas of the target video and serve as target display areas;
and if the display aspect ratio is different from the actual aspect ratio, determining a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtaining the display area of the target video in the playing window as a target display area.
2. A video playing method, wherein the method is applied to a client, and the method comprises:
sending a request message carrying a video identifier of a target video to a server, so that when the server receives the request message, acquiring playing information corresponding to the video identifier of the target video as target playing information, and sending the target playing information to the client; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
when the target playing information is received, acquiring a video file of the target video according to the storage address;
playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information;
the playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information, including:
decoding the video file to obtain a video frame contained in the target video;
determining a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information;
Playing video frames contained in the target video in the determined target display area;
the determining, based on the display aspect ratio of the playing window of the client and the actual aspect ratio indicated by the aspect ratio information, a display area of the target video in the playing window as a target display area includes:
judging whether the display aspect ratio of the play window is the same as the actual aspect ratio indicated by the aspect ratio information;
if the display aspect ratio is the same as the actual aspect ratio, determining that all display areas in the playing window are display areas of the target video and serve as target display areas;
and if the display aspect ratio is different from the actual aspect ratio, determining a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtaining the display area of the target video in the playing window as a target display area.
3. The method of claim 2, wherein the width of the target display area is the same as the width of the play window or the height of the target display area is the same as the height of the play window.
4. The method of claim 2, wherein the retrieving the video file of the target video at the storage address comprises:
And acquiring a video file of the target video at the storage address in the content distribution network.
5. A video playing method, wherein the method is applied to a server, and the method comprises:
receiving a request message carrying a video identifier of a target video sent by a client;
acquiring playing information corresponding to the video identifier of the target video as target playing information; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
the target playing information is sent to the client, so that the client obtains a video file of the target video according to the storage address when receiving the target playing information; playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information;
the step of playing the target video according to the video file by the client according to the actual aspect ratio indicated by the aspect ratio information includes:
decoding the video file to obtain a video frame contained in the target video;
determining a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information;
Playing video frames contained in the target video in the determined target display area;
the step of the client determining a display area of the target video in the play window based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information, as a target display area, includes:
judging whether the display aspect ratio of the play window is the same as the actual aspect ratio indicated by the aspect ratio information;
if the display aspect ratio is the same as the actual aspect ratio, determining that all display areas in the playing window are display areas of the target video and serve as target display areas;
and if the display aspect ratio is different from the actual aspect ratio, determining a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtaining the display area of the target video in the playing window as a target display area.
6. The method according to claim 5, wherein before the obtaining the play information corresponding to the video identifier of the target video as the target play information, the method further comprises:
acquiring each original video frame corresponding to the target video;
Encoding each acquired original video frame to obtain a video file of the target video;
storing the video file of the target video to a content distribution network, and storing the video identification and playing information of the target video to the server correspondingly.
7. A video playback system, the system comprising: a client and a server, wherein:
the client is used for sending a request message carrying the video identification of the target video to the server;
the server is used for acquiring playing information corresponding to the video identifier of the target video when receiving the request message, taking the playing information as target playing information and sending the target playing information to the client; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
the client is further configured to obtain, when receiving the target playing information, a video file of the target video according to the storage address; playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information;
the client is specifically configured to:
Decoding the video file to obtain a video frame contained in the target video;
determining a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information;
playing video frames contained in the target video in the determined target display area;
the client is specifically configured to:
judging whether the display aspect ratio of the play window is the same as the actual aspect ratio indicated by the aspect ratio information;
if the display aspect ratio is the same as the actual aspect ratio, determining that all display areas in the playing window are display areas of the target video and serve as target display areas;
and if the display aspect ratio is different from the actual aspect ratio, determining a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtaining the display area of the target video in the playing window as a target display area.
8. A video playback device, the device being applied to a client, the device comprising:
the sending module is used for sending a request message carrying a video identifier of a target video to a server, so that the server can acquire playing information corresponding to the video identifier of the target video when receiving the request message, and the playing information is used as target playing information and is sent to the client; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
The acquisition module is used for acquiring the video file of the target video according to the storage address when receiving the target playing information;
a playing module, configured to play the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information;
the playing module is specifically configured to:
decoding the video file to obtain a video frame contained in the target video;
determining a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information;
playing video frames contained in the target video in the determined target display area;
the playing module is specifically configured to:
judging whether the display aspect ratio of the play window is the same as the actual aspect ratio indicated by the aspect ratio information;
if the display aspect ratio is the same as the actual aspect ratio, determining that all display areas in the playing window are display areas of the target video and serve as target display areas;
and if the display aspect ratio is different from the actual aspect ratio, determining a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtaining the display area of the target video in the playing window as a target display area.
9. A video playback device, the device being applied to a server, the device comprising:
the receiving module is used for receiving a request message which is sent by the client and carries the video identification of the target video;
the first acquisition module is used for acquiring playing information corresponding to the video identifier of the target video to serve as target playing information; wherein the target play information contains aspect ratio information indicating an actual aspect ratio of the target video and a storage address;
the sending module is used for sending the target playing information to the client so that the client can acquire the video file of the target video according to the storage address when receiving the target playing information; playing the target video according to the video file according to the actual aspect ratio indicated by the aspect ratio information;
the step of playing the target video according to the video file by the client according to the actual aspect ratio indicated by the aspect ratio information includes:
decoding the video file to obtain a video frame contained in the target video;
determining a display area of the target video in the play window as a target display area based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information;
Playing video frames contained in the target video in the determined target display area;
the step of the client determining a display area of the target video in the play window based on the display aspect ratio of the play window of the client and the actual aspect ratio indicated by the aspect ratio information, as a target display area, includes:
judging whether the display aspect ratio of the play window is the same as the actual aspect ratio indicated by the aspect ratio information;
if the display aspect ratio is the same as the actual aspect ratio, determining that all display areas in the playing window are display areas of the target video and serve as target display areas;
and if the display aspect ratio is different from the actual aspect ratio, determining a display area with the aspect ratio being the actual aspect ratio from the playing window, and obtaining the display area of the target video in the playing window as a target display area.
10. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
A processor for implementing the method steps of any of claims 2-4, or claims 5-6, when executing a program stored on a memory.
11. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 2-4, or of claims 5-6.
CN202210397275.8A 2022-04-15 2022-04-15 Video playing method, device, system, electronic equipment and storage medium Active CN114760503B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210397275.8A CN114760503B (en) 2022-04-15 2022-04-15 Video playing method, device, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210397275.8A CN114760503B (en) 2022-04-15 2022-04-15 Video playing method, device, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114760503A CN114760503A (en) 2022-07-15
CN114760503B true CN114760503B (en) 2023-12-05

Family

ID=82331671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210397275.8A Active CN114760503B (en) 2022-04-15 2022-04-15 Video playing method, device, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114760503B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135688A (en) * 2014-07-24 2014-11-05 广州金山网络科技有限公司 Method, user equipment and system for video playing
CN110446110A (en) * 2019-07-29 2019-11-12 深圳市东微智能科技股份有限公司 Playback method, video playback apparatus and the storage medium of video
CN110809189A (en) * 2019-12-03 2020-02-18 北京字节跳动网络技术有限公司 Video playing method and device, electronic equipment and computer readable medium
CN111031359A (en) * 2019-12-24 2020-04-17 北京奇艺世纪科技有限公司 Video playing method and device, electronic equipment and computer readable storage medium
CN111356006A (en) * 2020-03-13 2020-06-30 北京奇艺世纪科技有限公司 Video playing method, device, server and storage medium
CN111372126A (en) * 2019-06-27 2020-07-03 杭州海康威视系统技术有限公司 Video playing method, device and storage medium
CN113518247A (en) * 2021-05-27 2021-10-19 北京奇艺世纪科技有限公司 Video playing method, related equipment and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135688A (en) * 2014-07-24 2014-11-05 广州金山网络科技有限公司 Method, user equipment and system for video playing
CN111372126A (en) * 2019-06-27 2020-07-03 杭州海康威视系统技术有限公司 Video playing method, device and storage medium
CN110446110A (en) * 2019-07-29 2019-11-12 深圳市东微智能科技股份有限公司 Playback method, video playback apparatus and the storage medium of video
CN110809189A (en) * 2019-12-03 2020-02-18 北京字节跳动网络技术有限公司 Video playing method and device, electronic equipment and computer readable medium
CN111031359A (en) * 2019-12-24 2020-04-17 北京奇艺世纪科技有限公司 Video playing method and device, electronic equipment and computer readable storage medium
CN111356006A (en) * 2020-03-13 2020-06-30 北京奇艺世纪科技有限公司 Video playing method, device, server and storage medium
CN113518247A (en) * 2021-05-27 2021-10-19 北京奇艺世纪科技有限公司 Video playing method, related equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114760503A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
US10187668B2 (en) Method, system and server for live streaming audio-video file
US11032570B2 (en) Media data processing method and apparatus
US20170195744A1 (en) Live-stream video advertisement system
CN107634930B (en) Method and device for acquiring media data
US20150156557A1 (en) Display apparatus, method of displaying image thereof, and computer-readable recording medium
US20200106831A1 (en) Version selective content delivery
CN113329267B (en) Video playing method and device, terminal equipment and storage medium
CN110582012B (en) Video switching method, video processing device and storage medium
US10116719B1 (en) Customized dash manifest
US11438645B2 (en) Media information processing method, related device, and computer storage medium
US11729439B2 (en) Methods and systems configured to manage video transcoder latencies
CN113141522A (en) Resource transmission method, device, computer equipment and storage medium
US20080254740A1 (en) Method and system for video stream personalization
CN112218128B (en) Advertisement video playing method, playing client and readable storage medium
CN110636372B (en) Video decoding method, video playing device, electronic equipment and storage medium
CN114760503B (en) Video playing method, device, system, electronic equipment and storage medium
US20090106796A1 (en) Method and system for providng subscription data
CN109756727B (en) Information display method and related equipment
CN111885417B (en) VR video playing method, device, equipment and storage medium
CN115643429A (en) Video playing method and device, electronic equipment and computer readable storage medium
CN112565693A (en) Method, system and equipment for monitoring video on demand
US20110162023A1 (en) Method and system for providing correlated advertisement for complete internet anywhere
KR20150032059A (en) Responsive contents rpoviding system and method of controlling the same
US20230103794A1 (en) Method and apparatus for presenting point cloud viewport, computer-readable medium, and electronic device
WO2020155957A1 (en) Method and apparatus for playing audio/video, and computer device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant