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

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

Info

Publication number
CN115633191A
CN115633191A CN202211121355.7A CN202211121355A CN115633191A CN 115633191 A CN115633191 A CN 115633191A CN 202211121355 A CN202211121355 A CN 202211121355A CN 115633191 A CN115633191 A CN 115633191A
Authority
CN
China
Prior art keywords
playing
video
initial
time
request
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.)
Pending
Application number
CN202211121355.7A
Other languages
Chinese (zh)
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211121355.7A priority Critical patent/CN115633191A/en
Publication of CN115633191A publication Critical patent/CN115633191A/en
Pending legal-status Critical Current

Links

Images

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/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • 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/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234345Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440218Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440245Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment

Abstract

The disclosure provides a video playing method, relates to the field of artificial intelligence, and particularly relates to cloud computing, video processing and media cloud technologies. The video playing method comprises the following steps: the terminal equipment acquires an initial playing request; generating an initial first playing request and an initial second playing request according to the initial playing time, the first preset time and the second preset time; sending a video identifier, an initial first playing request and an initial second playing request, and receiving a first video clip and a second video clip; and playing the target video according to the first video clip and the second video clip. The video playing method comprises the following steps: the method comprises the steps that a server receives a video identifier, an initial first playing request and an initial second playing request sent by terminal equipment; obtaining a first video segment according to the initial first playing request by using a first video transcoding mode; obtaining a second video segment according to the initial second playing request by using a second video transcoding mode; and sending the first video clip and the second video clip to the terminal equipment.

Description

Video playing method, device, system, electronic equipment and readable storage medium
Technical Field
The disclosure relates to the field of artificial intelligence, in particular to cloud computing, video processing and media cloud technologies, which can be applied to intelligent cloud scenes. A video playing method, device, system, electronic equipment and readable storage medium are provided.
Background
Video transcoding is widely applied to the fields of broadcast television, internet video and the like, and provides live video service or video on demand service for users. Therefore, video transcoding is an important link in the video playing process.
Video transcoding used in video on demand service refers to converting an existing video file into another video file to adapt to different network bandwidths, different processing capabilities of terminal equipment, and the like, so as to achieve the purpose of playing video in the terminal equipment.
Disclosure of Invention
According to a first aspect of the present disclosure, a video playing method is provided, which is applied to a terminal device, and includes: acquiring an initial playing request, wherein the initial playing request comprises a video identifier of a target video; generating an initial first playing request according to initial playing time and a first preset time length, and generating an initial second playing request according to the initial playing time, the first preset time length and a second preset time length; sending the video identifier, the initial first playing request and the initial second playing request to a server, and receiving a first video clip corresponding to the initial first playing request and a second video clip corresponding to the initial second playing request, which are sent by the server; and playing the target video according to the first video clip and the second video clip.
According to a second aspect of the present disclosure, there is provided a video playing method applied to a server, including: receiving a video identifier, an initial first playing request and an initial second playing request sent by terminal equipment, and acquiring a video file of a target video according to the video identifier; performing video transcoding on the video file according to the initial first playing request by using a first video transcoding mode to obtain a first video segment; performing video transcoding on the video file according to the initial second playing request by using a second video transcoding mode to obtain a second video segment; and sending the first video clip and the second video clip to the terminal equipment so as to be used for playing the target video by the terminal equipment.
According to a third aspect of the present disclosure, there is provided a video playing apparatus, located in a terminal device, including: the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring an initial playing request which comprises a video identifier of a target video; the first generation unit is used for generating an initial first playing request according to initial playing time and first preset time length and generating an initial second playing request according to the initial playing time, the first preset time length and second preset time length; the processing unit is used for sending the video identifier, the initial first playing request and the initial second playing request to a server, and receiving a first video clip which is sent by the server and corresponds to the initial first playing request and a second video clip which is sent by the server and corresponds to the initial second playing request; and the playing unit is used for playing the target video according to the first video clip and the second video clip.
According to a fourth aspect of the present disclosure, there is provided a video playing apparatus, located at a server, comprising: the receiving unit is used for receiving a video identifier, an initial first playing request and an initial second playing request sent by the terminal equipment and acquiring a video file of a target video according to the video identifier; the first transcoding unit is used for performing video transcoding on the video file according to the initial first playing request by using a first video transcoding mode to obtain a first video segment; the second transcoding unit is used for performing video transcoding on the video file according to the initial second playing request by using a second video transcoding mode to obtain a second video segment; a sending unit, configured to send the first video segment and the second video segment to the terminal device, so that the terminal device plays the target video.
According to a fifth aspect of the present disclosure, there is provided a video playing system, including a terminal device and a server; wherein the terminal device is configured to perform the method of the first aspect, and the server is configured to perform the method of the second aspect.
According to a sixth aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
According to a seventh aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method as described above.
According to an eighth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method as described above.
According to the technical scheme, the response speed and flexibility of video playing can be improved, the aim of transcoding the video by the server according to actual requirements is fulfilled, the server is not required to transcode the video file of the target video into different versions in advance, and therefore transcoding computing power and storage resources of the server are effectively saved.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic illustration according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 4 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a fifth embodiment of the present disclosure;
fig. 6 is a block diagram of an electronic device for implementing a video playing method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure. As shown in fig. 1, the video playing method of this embodiment is applied to a terminal device, and specifically includes the following steps:
s101, acquiring an initial playing request, wherein the initial playing request comprises a video identifier of a target video;
s102, generating an initial first playing request according to initial playing time and first preset time, and generating an initial second playing request according to the initial playing time, the first preset time and second preset time;
s103, sending the video identifier, the initial first playing request and the initial second playing request to a server, and receiving a first video clip corresponding to the initial first playing request and a second video clip corresponding to the initial second playing request sent by the server;
and S104, playing the target video according to the first video clip and the second video clip.
The execution main body of the video playing method is the terminal device, after the terminal device obtains the initial playing request, the terminal device obtains the corresponding video segment of the target video from the server to play in a mode of converting the initial playing request into the initial first playing request and the initial second playing request, so that the response speed and flexibility of video playing are improved, the aim of transcoding the video by the server according to actual requirements is fulfilled, the server is not required to transcode the video file of the target video into different versions in advance, and the transcoding computing power and storage resources of the server are effectively saved.
The terminal equipment of the embodiment can be equipment capable of playing videos, such as a mobile phone, a computer, an intelligent household appliance, an automatic driving automobile and the like; the terminal device of this embodiment can execute the video playing method provided by this embodiment through the video playing application running thereon.
The terminal device of this embodiment executes the initial play request obtained in S101, and is configured to request the server to play a target video, where the target video is a video to be played in the terminal device; the video identifier of the target video included in the initial play request is used for the server to search for a video file of the target video for video transcoding, and may be information such as a name of the target video, a storage address of the video file of the target video, and the like.
The initial play request obtained by the terminal device executing S101 in this embodiment may further include a start play time, where the start play time is a play start time of the target video, and may be 0 minute and 0 second of the target video, and may also be a start end time of the target video.
After executing S101 to obtain the initial play request, the terminal device of this embodiment may further execute the following: acquiring the equipment attribute and/or the network attribute of the terminal equipment; obtaining a coding parameter according to the obtained equipment attribute and/or network attribute; the encoding parameters obtained in this embodiment include at least one of parameters such as video resolution, video packaging format, video encoding standard, video encoding level, audio encoding format, and audio code rate.
The terminal device of this embodiment executes the device attribute obtained in S101, which may be a device type of the terminal device (e.g., a mobile phone or a computer), a device model of the terminal device (e.g., a mobile phone model), and the like; the network attribute obtained by the terminal device executing S101 in this embodiment may be a network type of the terminal device (e.g., wireless network or wired network), a mobile signal type of the terminal device (e.g., 4G signal or 5G signal), and the like.
The terminal device of this embodiment executes the encoding parameters obtained in S101, and is used for the server to perform video transcoding (after a video file of a target video is decoded, the video file is encoded according to the encoding parameters), so that a video segment obtained by transcoding can be better matched with the device attribute and/or the network attribute of the terminal device, and thus the success rate and accuracy of the terminal device when playing the video are improved.
When the terminal device of this embodiment executes S101, the encoding parameters corresponding to the device attributes and/or the network attributes may be obtained according to the preset correspondence table; the device attribute and/or the network attribute may be input to a coding parameter prediction model obtained by pre-training, and an output result of the model may be used as a coding parameter corresponding to the device attribute and/or the network attribute.
After the terminal device of this embodiment executes S101 to obtain the initial play request, execute S102 to generate an initial first play request according to the initial play time and the first preset time, and generate an initial second play request according to the initial play time, the first preset time, and the second preset time.
The terminal device of this embodiment executes the initial first play request generated in S102, which is used to request the server to obtain the first video segment (i.e. the first video segment) when playing the target video; the terminal device of this embodiment executes the initial second play request generated in S102, so as to request the server to acquire one or more video clips located after the first video clip when the target video is played (i.e., the second video clip, which may be regarded as a cached video clip located after the first video clip).
That is to say, after acquiring the initial play request, the terminal device in this embodiment does not directly acquire the video segment using the initial play request, but converts the initial play request according to the initial play time, the first preset time duration, and the second preset time duration, so as to acquire the corresponding video segment through the server according to the initial first play request and the initial second play request obtained through the conversion.
When executing S102, the terminal device of this embodiment may obtain the initial playing time from the initial playing request, or may use a default time (e.g., 0 minutes and 0 seconds or a slice header end time) as the initial playing time.
When the terminal device of this embodiment executes S102 to generate the initial first play request according to the initial play time and the first preset time, the optional implementation manner that can be adopted is as follows: determining a first playing time interval according to the initial playing time and a first preset time length; an initial first play request is generated according to the determined first play period.
That is to say, the initial first play request generated by the terminal device in this embodiment is used by the server to obtain the first video segment when the target video is played in a manner of performing video transcoding on the video file of the target video according to the first play time period included in the server, so that the purpose of performing video play in the terminal device with the video segment as a granularity is achieved, and the flexibility of video play is improved.
For example, if the first preset duration is 2 seconds, if the initial playing time is 0 minutes and 0 seconds of the target video; the terminal device of this embodiment executes S102 to determine that the first play time period is (0 min 0S-0 min 2S), and further generates an initial first play request for acquiring a video clip corresponding to (0 min 0S-0 min 2S) according to the first play time period.
When the terminal device of this embodiment executes S102 to generate the initial second play request according to the initial play time, the first preset time and the second preset time, the optional implementation manner that can be adopted is as follows: determining initial ending time according to the initial playing time and a first preset time length; determining a second playing time period according to the initial ending time and a second preset time length; an initial second play request is generated according to the determined second play period.
That is to say, the initial second play request generated by the terminal device in this embodiment is used by the server to obtain one or more video segments after the first video segment of the target video is played in a manner of performing video transcoding on the video file of the target video according to the second play time period included in the server, so that the purpose of performing video playing in the terminal device by using the video segments as granularity is achieved, and the flexibility of video playing is improved.
When the terminal device of this embodiment executes S102 to determine the second playing period according to the initial ending time and the second preset time duration, the optional implementation manner that may be adopted is as follows: obtaining initial sub-playing time periods of the first preset time period number by taking the initial ending time as a time starting point and taking the second preset time length as a time interval; determining a second playing time interval according to the obtained initial sub-playing time intervals of the first preset time interval number; wherein different initial subplayback periods correspond to different video segments in the target video.
In this embodiment, the playing time length corresponding to the sub-playing time periods of the first preset time period number is smaller than the difference between the playing time length of the target video and the first preset time length.
When the terminal device of this embodiment executes S102, the video type may be determined according to the video identifier of the target video, and then the number corresponding to the video type is used as the first preset time period number; for example, the number corresponding to a drama video is 10, the number corresponding to a movie video is 20, and the number corresponding to a streaming video is 4.
That is to say, the terminal device of this embodiment generates the initial second play request by acquiring the sub-play time periods of the first preset time period number, so that the initial second play request is only used for acquiring the partial video segment located after the first video segment in the target video, thereby avoiding the problem that the partial video segment in the acquired second video segment cannot be played under the condition that a jump occurs in the subsequent play process, effectively saving the transcoding calculation power of the server, and improving the accuracy of video play.
For example, if the first preset time duration is 2 seconds, if the initial playing time is 0 minutes and 0 seconds, if the second preset time duration is 3 seconds, if the number of the first preset time periods is 3; the terminal device of this embodiment executes S102 to determine that the initial end time is 0 min 2 sec, and the obtained initial sub-play time periods are (0 min 2 sec to 0 min 5 sec), (0 min 5 sec to 0 min 8 sec) and (0 min 8 sec to 0 min 11 sec), and then takes the three initial sub-play time periods as the second play time period.
In order to increase the response speed of video playing, the first preset duration and the second preset duration used by the terminal device of this embodiment when executing S102 are both second-level durations; the first preset time period and the second preset time period may be the same or different.
After executing S102 to generate the initial first play request and the initial second play request, the terminal device of this embodiment executes S103 to send the video identifier, the initial first play request, and the initial second play request to the server, and receive the first video segment corresponding to the initial first play request and the second video segment corresponding to the initial second play request that are sent by the server.
If the terminal device of this embodiment obtains the encoding parameter when executing S101, the terminal device may also send the obtained encoding parameter to the server when executing S103.
It can be understood that the terminal device of this embodiment only includes one video clip in the first video clip received in S103, and includes one or more video clips in the second video clip, where each video clip corresponds to a different initial subplaytime period.
After executing S103 to receive the first video segment and the second video segment sent by the server, the terminal device of this embodiment executes S104 to play the target video according to the first video segment and the second video segment.
When the terminal device of this embodiment performs S104 to play the target video according to the first video segment and the second video segment, at least one video segment included in the first video segment and the second video segment may be sequentially played according to the playing time interval corresponding to the video segment.
After the terminal device of this embodiment performs S104 to play the target video according to the first video segment and the second video segment, the following may also be performed: under the condition that the current playing state meets the preset requirement, determining the current ending time according to the last video clip; determining a third playing time period according to the current ending time and a third preset time length; generating a third playing request according to the determined third playing time interval; sending the generated third playing request to a server, and receiving a third video clip which is sent by the server and corresponds to the third playing request; and after the target video is played according to the third video segment, the step of determining whether the current playing state meets the preset requirement is carried out, and the steps are carried out in a circulating manner until the target video is played.
When the terminal device of this embodiment executes S104 to determine that the current playing state meets the preset requirement, it may determine that the current playing state meets the preset requirement under the condition that it is determined that the current played time is greater than or equal to the preset time threshold; or determining that the current playing state meets the preset requirement under the condition that the number of the video clips which are not played currently is less than the preset clip number.
When the terminal device of this embodiment executes S104, a third play time period including at least one sub-play time period may be determined according to the current end time and a third preset duration in a manner of determining the second play time period in S102; or taking the time length corresponding to the video clip which is not played in the target video as a third preset time length, and taking the playing time period corresponding to the video clip which is not played as a third playing time period.
That is to say, the terminal device of this embodiment continuously acquires, by the server, the video segments that are not played in the target video according to the actual playing condition of the target video, thereby avoiding the problem of consuming the transcoding computing power of the server due to not playing the acquired video segments, and improving the accuracy of video playing.
Fig. 2 is a schematic diagram according to a second embodiment of the present disclosure. As shown in fig. 2, after executing S104 "performing playing of the target video according to the first video segment and the second video segment", the video playing method of this embodiment may further include the following contents:
s201, under the condition that a skip playing request is obtained, determining skip playing time corresponding to the skip playing request;
s202, generating a skip first playing request according to the skip playing time and a fourth preset time length, and generating a skip second playing request according to the skip playing time, the fourth preset time length and a fifth preset time length;
s203, sending the skip first playing request and the skip second playing request to the server, and receiving a fourth video clip corresponding to the skip first playing request and a fifth video clip corresponding to the skip second playing request sent by the server;
and S204, playing the target video according to the fourth video clip and the fifth video clip.
That is to say, the terminal device of this embodiment acquires the corresponding video segment of the target video from the server for playing by converting the skip play request into the skip first play request and the skip second play request when acquiring the skip play request, so as to improve the response speed and flexibility when adjusting the play video, and achieve the purpose of transcoding the video by the server according to the actual requirement, without transcoding the video file of the target video into different versions in advance by the server, thereby effectively saving the transcoding computing power and storage resources of the server.
The terminal device of this embodiment executes the skip play time determined in S201, specifically, when the terminal device plays the target video, the skip play request corresponds to the time in the play progress bar; for example, when the target video is played, the skip play request is to skip to 10 minutes and 10 seconds of the target video for playing, and 10 minutes and 10 seconds are the skip play time determined in this embodiment.
The terminal device of this embodiment executes the skip first play request generated in S202, and is configured to request the server to obtain a first video segment (i.e., a fourth video segment) to be played after the video skip; the terminal device of this embodiment executes the skip second play request generated in S202, so as to request the server to obtain one or more video clips to be played after the video skip, which are located after the first video clip (i.e. a fifth video clip, which may be regarded as a cached video clip).
When the terminal device of this embodiment executes S203 to generate the skip first play request according to the skip play time and the fourth preset time, the optional implementation manner that can be adopted is as follows: determining a fourth playing time interval according to the jumping playing time and a fourth preset time length; and generating a skip first play request according to the determined fourth play period.
When the terminal device of this embodiment executes S203 to generate the skip second play request according to the skip play time, the fourth preset time and the fifth preset time, the optional implementation manner that can be adopted is as follows: determining the skip ending time according to the skip playing time and a fourth preset time length; determining a fifth playing time period according to the skip ending time and a fifth preset time length; and generating a jump second play request according to the determined fifth play period.
When the terminal device of this embodiment determines the fifth playing period according to the skip ending time and the fifth preset duration after executing S203, the optional implementation manner that may be adopted is: obtaining skip sub-playing time periods with the number of second preset time periods by taking the skip ending time as a time starting point and taking the fifth preset time period as a time interval; determining a fifth playing time period according to the obtained skip sub-playing time periods with the second preset time period number; wherein different rotor-skipping playing periods correspond to different video segments in the target video.
In this embodiment, the number of the first preset time period and the number of the second preset time period may be the same or different; the fourth preset time length may be the same as or different from the first preset time length; the fifth preset time period may be the same as or different from the second preset time period.
That is to say, when the terminal device of this embodiment converts the initial play request and the skip play request, the used conversion principle is the same, so that when the terminal device of this embodiment processes video skip, the purpose of playing video in the terminal device with video clips as granularity can also be achieved, and the flexibility of video playing is improved.
Fig. 3 is a schematic diagram according to a third embodiment of the present disclosure. As shown in fig. 3, the video playing method of this embodiment, applied to a server, specifically includes the following steps:
s301, receiving a video identifier, an initial first playing request and an initial second playing request sent by a terminal device, and acquiring a video file of a target video according to the video identifier;
s302, performing video transcoding on the video file according to the initial first playing request by using a first video transcoding mode to obtain a first video segment;
s303, performing video transcoding on the video file according to the initial second playing request by using a second video transcoding mode to obtain a second video segment;
s304, the first video clip and the second video clip are sent to the terminal device, so that the terminal device plays the target video.
The execution main body of the video playing method is located in the server, the server obtains corresponding video segments by using different video transcoding modes according to different playing requests, the response speed and flexibility of the terminal device in video playing can be improved, the purpose of video transcoding according to actual requirements is achieved, video files of target videos do not need to be transcoded into different versions in advance, and therefore transcoding computing power and storage resources of the server are effectively saved.
The server of this embodiment may also receive the encoding parameters sent by the terminal device while executing S301 to receive the video identifier, the initial first play request, and the initial second play request sent by the terminal device, and then complete video transcoding according to the received encoding parameters.
In this embodiment, the first video transcoding mode used by the server to execute S302 is a hardware transcoding mode, that is, a video card, a digital signal processor, an FPGA chip, or the like is used for encoding, so as to increase the transcoding speed of the first video segment.
When the server executes S302 to perform video transcoding on the video file according to the initial first play request to obtain the first video segment, the server in this embodiment may obtain video content corresponding to the first play time period in the video file, and then complete video transcoding in a hardware transcoding manner in combination with the received encoding parameters to obtain the first video segment.
The second video transcoding method used by the server to execute S303 in this embodiment is a software transcoding method, that is, a CPU is used for encoding, so as to improve the transcoding compression rate of the second video segment.
When the server executes S303 to perform video transcoding on the video file according to the initial second play request to obtain the second video segment, the server in this embodiment may obtain video content corresponding to the second play time period in the video file, and then complete video transcoding in a software transcoding manner in combination with the received encoding parameters to obtain the second video segment.
It is understood that if the server of the present embodiment is not capable of receiving the encoding parameters sent by the terminal device, the default encoding parameters may be used for video transcoding.
After executing S304 to transmit the first video segment and the second video segment to the terminal device, the server of this embodiment may further execute the following: receiving a third playing request sent by the terminal equipment; performing video transcoding on the video file according to the third playing request by using the first video transcoding mode or the second video transcoding mode to obtain a third video segment; and sending the obtained third video clip to the terminal equipment so as to be used for playing the target video by the terminal equipment.
After executing S304 to transmit the first video segment and the second video segment to the terminal device, the server of this embodiment may further execute the following: receiving a first play skipping request and a second play skipping request sent by terminal equipment; performing video transcoding on the video file according to the first skip playing request by using a first video transcoding mode to obtain a fourth video segment; performing video transcoding on the video file according to the second playing request by using a second video transcoding mode to obtain a fifth video segment; and sending the fourth video clip and the fifth video clip to the terminal equipment for playing the target video by the terminal equipment.
Fig. 4 is a schematic diagram according to a fourth embodiment of the present disclosure. As shown in fig. 4, the video playing apparatus 400 of the present embodiment is located in a terminal device, and includes:
the obtaining unit 401 is configured to obtain an initial playing request, where the initial playing request includes a video identifier of a target video;
a first generating unit 402, configured to generate an initial first playing request according to an initial playing time and a first preset time, and generate an initial second playing request according to the initial playing time, the first preset time and a second preset time;
the processing unit 403 is configured to send the video identifier, the initial first playing request, and the initial second playing request to a server, and receive a first video segment corresponding to the initial first playing request and a second video segment corresponding to the initial second playing request sent by the server;
the playing unit 404 is configured to play the target video according to the first video segment and the second video segment.
The obtaining unit 401 of this embodiment obtains an initial playing request, which is used to request a server to play a target video, where the target video is a video to be played in a terminal device; the video identifier of the target video included in the initial play request is used for the server to search for a video file of the target video for video transcoding, and may be information such as a name of the target video, a storage address of the video file of the target video, and the like.
The initial playing request obtained by the obtaining unit 401 may further include a start playing time, where the start playing time is a playing start time of the target video, and may be 0 minute and 0 second of the target video, or may be a title end time of the target video.
The acquisition unit 401, after acquiring the initial play request, may further execute: acquiring the equipment attribute and/or the network attribute of the terminal equipment; obtaining a coding parameter according to the obtained equipment attribute and/or network attribute; the encoding parameter obtained by the obtaining unit 401 includes at least one of parameters such as video resolution, video packaging format, video encoding standard, video encoding level, audio encoding format, and audio code rate.
The device attribute acquired by the acquiring unit 401 may be a device type of the terminal device (for example, whether a mobile phone or a computer), a device model of the terminal device (for example, a mobile phone model), or the like; the network attribute acquired by the acquiring unit 401 may be a network type of the terminal device (e.g., wireless network or wired network), a mobile signal type of the terminal device (e.g., 4G signal or 5G signal), and the like.
The encoding parameters obtained by the obtaining unit 401 are used for video transcoding by the server (after a video file of a target video is decoded, the video file is encoded according to the encoding parameters in the process of video transcoding), so that video segments obtained through transcoding can be better matched with the device attribute and/or the network attribute of the terminal device, and the success rate and the accuracy of the terminal device in playing the video are improved.
The obtaining unit 401 may obtain the coding parameters corresponding to the device attributes and/or the network attributes according to a preset correspondence table; or inputting the device attribute and/or the network attribute into a coding parameter prediction model obtained by pre-training, and taking an output result of the model as a coding parameter corresponding to the device attribute and/or the network attribute.
In the terminal device of this embodiment, after the obtaining unit 401 obtains the initial playing request, the first generating unit 402 generates an initial first playing request according to the initial playing time and the first preset time, and generates an initial second playing request according to the initial playing time, the first preset time and the second preset time.
The first generation unit 402 generates an initial first play request for requesting the server to acquire a first video clip (i.e., a first video clip) when the target video is played; the first generation unit 402 generates an initial second play request for requesting the server to acquire one or more video clips located after the first video clip (i.e., a second video clip, which can be regarded as a cached video clip located after the first video clip) when the target video is played.
That is to say, after the terminal device of this embodiment obtains the initial playing request, the terminal device does not directly obtain the video segment by using the initial playing request, but the first generating unit 402 converts the initial playing request according to the initial playing time, the first preset time and the second preset time, so as to obtain the corresponding video segment through the server according to the initial first playing request and the initial second playing request obtained by the conversion.
The first generating unit 402 may obtain the initial playing time from the initial playing request, or may use a default time (e.g., 0 min 0 sec or a slice head end time) as the initial playing time.
When the first generating unit 402 generates the initial first playing request according to the initial playing time and the first preset time, the optional implementation manner that can be adopted is as follows: determining a first playing time interval according to the initial playing time and a first preset time length; an initial first play request is generated according to the determined first play period.
That is to say, the initial first play request generated by the first generating unit 402 is used by the server to obtain a first video segment when the target video is played by performing video transcoding on a video file of the target video according to the first play time period included in the initial first play request, so that the purpose of performing video playing in the terminal device by using the video segment as granularity is achieved, and the flexibility of video playing is improved.
When the first generating unit 402 generates the initial second play request according to the initial play time, the first preset time and the second preset time, the optional implementation manner that can be adopted is as follows: determining initial ending time according to the initial playing time and a first preset time length; determining a second playing time period according to the initial ending time and a second preset time length; an initial second play request is generated according to the determined second play period.
That is to say, the initial second play request generated by the first generating unit 402 is used by the server to obtain one or more video segments after the first video segment of the target video is played by performing video transcoding on the video file of the target video according to the second play time period included in the initial second play request, so that the purpose of performing video playing in the terminal device by using the video segments as granularity is achieved, and the flexibility of video playing is improved.
When determining the second playing period according to the initial ending time and the second preset time length, the first generating unit 402 may adopt an optional implementation manner as follows: obtaining initial sub-playing time periods of the first preset time period number by taking the initial ending time as a time starting point and taking the second preset time length as a time interval; determining a second playing time interval according to the obtained initial sub-playing time intervals of the first preset time interval number; wherein different initial subplaytime periods correspond to different video segments in the target video.
In this embodiment, the playing time length corresponding to the sub-playing time period of the first preset time period number is smaller than the difference value between the playing time length of the target video and the first preset time length.
The first generating unit 402 may determine the video type according to the video identifier of the target video, and then take the number corresponding to the video type as the first preset time period number.
That is to say, the first generating unit 402 generates the initial second playing request by acquiring the sub-playing time periods of the first preset time period number, so that the initial second playing request is only used for acquiring the partial video segment located after the first video segment in the target video, thereby avoiding the problem that the partial video segment in the acquired second video segment cannot be played under the condition that a jump occurs in the subsequent playing process, effectively saving the code calculation power of the server, and improving the accuracy of video playing.
In order to increase the response speed of video playing, the first preset duration and the second preset duration used by the first generating unit 402 are both second-level durations; the first preset time period and the second preset time period may be the same or different.
After the first generation unit 402 generates the initial first play request and the initial second play request, the processing unit 403 of the terminal device of this embodiment sends the video identifier, the initial first play request, and the initial second play request to the server, and receives the first video clip corresponding to the initial first play request and the second video clip corresponding to the initial second play request sent by the server.
If the acquiring unit 401 obtains the encoding parameter, the processing unit 403 may also transmit the acquired encoding parameter to the server together.
It is understood that the first video segment received by the processing unit 403 includes only one video segment, and the second video segment includes one or more video segments, each of which corresponds to a different initial subplaytime period.
After the processing unit 403 receives the first video segment and the second video segment sent by the server, the playing unit 404 plays the target video according to the first video segment and the second video segment.
When playing the target video according to the first video segment and the second video segment, the playing unit 404 may sequentially play at least one video segment included in the first video segment and the second video segment according to the playing time period corresponding to the video segment.
The video playing apparatus 400 located in the terminal device in this embodiment may further include a second generating unit 405, configured to execute the following: under the condition that the current playing state meets the preset requirement, determining the current ending time according to the last video clip; determining a third playing time period according to the current ending time and a third preset time length; generating a third playing request according to the determined third playing time interval; sending the generated third playing request to a server, and receiving a third video clip which is sent by the server and corresponds to the third playing request; and after the target video is played according to the third video segment, the step of determining whether the current playing state meets the preset requirement is executed, and the steps are circularly carried out until the target video is played.
The second generating unit 405, when determining that the current playing state meets the preset requirement, may determine that the current playing state meets the preset requirement under the condition that it is determined that the current played time is greater than or equal to the preset time threshold; or determining that the current playing state meets the preset requirement under the condition that the number of the video clips which are not played currently is less than the preset clip number.
The second generating unit 405 may determine a third playing period including at least one sub-playing period according to the current ending time and a third preset time length by using the manner that the first generating unit 402 determines the second playing period; or taking the time length corresponding to the video clip which is not played in the target video as a third preset time length, and taking the playing time period corresponding to the video clip which is not played as a third playing time period.
That is to say, the second generating unit 405 continuously obtains the unplayed video segments in the target video through the server according to the actual playing situation of the target video, so that the problem of consuming the transcoding computing power of the server due to unplaying the obtained video segments is avoided, and the accuracy of video playing is improved.
The video playing apparatus 400 located in the terminal device in this embodiment may further include a third generating unit 406, configured to execute the following: under the condition of acquiring a skip playing request, determining skip playing time corresponding to the skip playing request; generating a skip first playing request according to the skip playing time and a fourth preset time length, and generating a skip second playing request according to the skip playing time, the fourth preset time length and a fifth preset time length; sending the first playing request and the second playing request to a server, and receiving a fourth video clip corresponding to the first playing request and a fifth video clip corresponding to the second playing request sent by the server; and playing the target video according to the fourth video clip and the fifth video clip.
The third generating unit 406 generates a skip first playing request, which is used to request the server to obtain a first video segment (i.e. a fourth video segment) to be played after the video skip; the third generating unit 406 generates a jump second play request, which is used to request the server to obtain one or more video clips to be played after the video jump, which are located after the first video clip (i.e. a fifth video clip, which can be regarded as a buffered video clip).
When the third generating unit 406 generates the skip first playing request according to the skip playing time and the fourth preset time, the optional implementation manner that can be adopted is as follows: determining a fourth playing time interval according to the jumping playing time and a fourth preset time length; and generating a skip first play request according to the determined fourth play period.
When the third generating unit 406 generates the skip second playing request according to the skip playing time, the fourth preset time and the fifth preset time, the optional implementation manner that can be adopted is as follows: determining the skip ending time according to the skip playing time and a fourth preset time length; determining a fifth playing time period according to the skip ending time and a fifth preset time length; and generating a jump second play request according to the determined fifth play period.
When the third generating unit 406 determines the fifth playing period according to the jump ending time and the fifth preset time length, the optional implementation manners that may be adopted are: obtaining skip sub-playing time periods with the number of second preset time periods by taking the skip ending time as a time starting point and taking the fifth preset time period as a time interval; determining a fifth playing time interval according to the obtained skip sub-playing time intervals with the second preset time interval number; wherein different rotor-skipping playing periods correspond to different video segments in the target video.
Fig. 5 is a schematic diagram according to a fifth embodiment of the present disclosure. As shown in fig. 5, the video playing apparatus 500 of the present embodiment, located on a server, includes:
the first receiving unit 501 is configured to receive a video identifier, an initial first playing request, and an initial second playing request sent by a terminal device, and obtain a video file of a target video according to the video identifier;
the first transcoding unit 502 is configured to perform video transcoding on the video file according to the initial first playing request by using a first video transcoding manner, so as to obtain a first video segment;
the second transcoding unit 503 is configured to perform video transcoding on the video file according to the initial second playing request by using a second video transcoding manner, so as to obtain a second video segment;
a sending unit 504, configured to send the first video segment and the second video segment to the terminal device, so that the terminal device plays the target video.
The first receiving unit 501 may also receive coding parameters sent by the terminal device while receiving the video identifier, the initial first play request, and the initial second play request sent by the terminal device, and then complete video transcoding according to the received coding parameters.
The first video transcoding mode used by the first transcoding unit 502 is a hardware transcoding mode, i.e., a video card, a digital signal processor, an FPGA chip, etc. are used for encoding, so as to increase the transcoding speed of the first video segment.
When video transcoding is performed on a video file according to an initial first play request to obtain a first video segment, the first transcoding unit 502 may obtain video content corresponding to a first play time period in the video file, and then complete video transcoding in a hardware transcoding manner by combining the received encoding parameters to obtain the first video segment.
The second video transcoding method used by the second transcoding unit 503 is a software transcoding method, i.e., a CPU is used for encoding, thereby improving the transcoding compression rate of the second video segment.
When video transcoding is performed on the video file according to the initial second play request to obtain a second video segment, the second transcoding unit 503 may acquire video content corresponding to a second play time period in the video file, and then complete video transcoding in a software transcoding manner by combining the received encoding parameters to obtain the second video segment.
It is understood that, if the server of the present embodiment is not capable of receiving the encoding parameters sent by the terminal device, the default encoding parameters may be used for video transcoding.
The video playing apparatus 500 located in the server in this embodiment may further include a second receiving unit 505, configured to execute the following: receiving a third playing request sent by the terminal equipment; performing video transcoding on the video file according to the third playing request by using the first video transcoding mode or the second video transcoding mode to obtain a third video segment; and sending the obtained third video clip to the terminal equipment so as to be used for playing the target video by the terminal equipment.
The video playing apparatus 500 located in the server in this embodiment may further include a third receiving unit 506, configured to execute the following: receiving a first play skipping request and a second play skipping request sent by terminal equipment; performing video transcoding on the video file according to the first skip playing request by using a first video transcoding mode to obtain a fourth video segment; performing video transcoding on the video file according to the second playing request by using a second video transcoding mode to obtain a fifth video segment; and sending the fourth video clip and the fifth video clip to the terminal equipment for playing the target video by the terminal equipment.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the personal information of the related user all accord with the regulations of related laws and regulations, and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
As shown in fig. 6, it is a block diagram of an electronic device of a video playing method according to an embodiment of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the device 600 comprises a computing unit 601, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the device 600 can also be stored. The calculation unit 601, the ROM602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of exhibitors, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 601 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the respective methods and processes described above, such as a video playing method. For example, in some embodiments, the video playback method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608.
In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 600 via ROM602 and/or communications unit 609. When the computer program is loaded into the RAM603 and executed by the computing unit 601, one or more steps of the video playback method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the video playing method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable video playback device, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a presentation device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for presenting information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server may be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service extensibility in a traditional physical host and VPS service ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (28)

1. A video playing method is applied to terminal equipment and comprises the following steps:
acquiring an initial playing request, wherein the initial playing request comprises a video identifier of a target video;
generating an initial first playing request according to initial playing time and first preset time, and generating an initial second playing request according to the initial playing time, the first preset time and second preset time;
sending the video identifier, the initial first playing request and the initial second playing request to a server, and receiving a first video clip corresponding to the initial first playing request and a second video clip corresponding to the initial second playing request, which are sent by the server;
and playing the target video according to the first video clip and the second video clip.
2. The method of claim 1, wherein the generating an initial first play request according to the starting play time and a first preset duration comprises:
determining a first playing time interval according to the initial playing time and the first preset time length;
and generating the initial first playing request according to the first playing time interval.
3. The method according to any one of claims 1-2, wherein the generating an initial second play request according to the starting play time, the first preset time duration and a second preset time duration comprises:
determining an initial ending time according to the initial playing time and the first preset time length;
determining a second playing time period according to the initial ending time and the second preset time length;
and generating the initial second playing request according to the second playing time interval.
4. The method of claim 3, wherein said determining a second playing period according to said initial end time and said second preset duration comprises:
obtaining initial sub-playing time periods with the number of first preset time periods by taking the initial ending time as a time starting point and the second preset time length as a time interval;
and determining the second playing time interval according to the initial sub-playing time intervals of the first preset time interval number.
5. The method of any of claims 1-4, further comprising,
under the condition that the current playing state meets the preset requirement, determining the current ending time according to the last video clip;
determining a third playing time period according to the current ending time and a third preset time length;
generating a third playing request according to the third playing time interval;
sending the third playing request to the server, and receiving a third video segment which is sent by the server and corresponds to the third playing request;
and after the target video is played according to the third video segment, the step of determining whether the current playing state meets the preset requirement is executed, and the steps are circularly carried out until the target video is played.
6. The method of any of claims 1-5, further comprising,
under the condition of acquiring a skip playing request, determining skip playing time corresponding to the skip playing request;
generating a skip first playing request according to the skip playing time and a fourth preset time length, and generating a skip second playing request according to the skip playing time, the fourth preset time length and a fifth preset time length;
sending the skip first playing request and the skip second playing request to the server, and receiving a fourth video clip corresponding to the skip first playing request and a fifth video clip corresponding to the skip second playing request sent by the server;
and playing the target video according to the fourth video clip and the fifth video clip.
7. The method of claim 6, wherein the generating a skip first play request according to the skip play time and a fourth preset duration comprises:
determining a fourth playing time period according to the jumping playing time and the fourth preset time length;
and generating the jump first playing request according to the fourth playing time interval.
8. The method according to any one of claims 6-7, wherein the generating a skip second play request according to the skip play time, the fourth preset time duration, and a fifth preset time duration comprises:
determining the skip ending time according to the skip playing time and the fourth preset time;
determining a fifth playing time period according to the skip ending time and the fifth preset time length;
and generating the second skip playing request according to the fifth playing time interval.
9. The method as claimed in claim 8, wherein the determining a fifth play period according to the jump ending time and the fifth preset duration comprises:
obtaining skip sub-playing time periods with a second preset time period number by taking the skip ending time as a time starting point and the fifth preset time period as a time interval;
and determining the fifth playing time interval according to the jumping sub-playing time intervals with the second preset time interval number.
10. A video playing method is applied to a server and comprises the following steps:
receiving a video identifier, an initial first playing request and an initial second playing request sent by terminal equipment, and acquiring a video file of a target video according to the video identifier;
performing video transcoding on the video file according to the initial first playing request by using a first video transcoding mode to obtain a first video segment;
performing video transcoding on the video file according to the initial second playing request by using a second video transcoding mode to obtain a second video segment;
and sending the first video clip and the second video clip to the terminal equipment so as to be used for playing the target video by the terminal equipment.
11. The method of claim 10, further comprising,
receiving a third playing request sent by the terminal equipment;
performing video transcoding on the video file according to the third playing request by using the first video transcoding mode or the second video transcoding mode to obtain a third video segment;
and sending the third video clip to the terminal equipment so as to be used for playing the target video by the terminal equipment.
12. The method of any of claims 10-11, further comprising,
receiving a first play skipping request and a second play skipping request sent by the terminal equipment;
performing video transcoding on the video file according to the skip first playing request by using the first video transcoding mode to obtain a fourth video segment;
performing video transcoding on the video file according to the second skip playing request by using the second video transcoding mode to obtain a fifth video segment;
and sending the fourth video clip and the fifth video clip to the terminal equipment so as to be used for playing the target video by the terminal equipment.
13. A video playing device is located in a terminal device and comprises:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for acquiring an initial playing request which comprises a video identifier of a target video;
the first generation unit is used for generating an initial first playing request according to initial playing time and first preset time length and generating an initial second playing request according to the initial playing time, the first preset time length and second preset time length;
the processing unit is used for sending the video identifier, the initial first playing request and the initial second playing request to a server, and receiving a first video clip corresponding to the initial first playing request and a second video clip corresponding to the initial second playing request which are sent by the server;
and the playing unit is used for playing the target video according to the first video clip and the second video clip.
14. The apparatus according to claim 13, wherein the first generating unit, when generating the initial first play request according to the initial play time and a first preset time, specifically performs:
determining a first playing time interval according to the initial playing time and the first preset time length;
and generating the initial first playing request according to the first playing time interval.
15. The apparatus according to any one of claims 13 to 14, wherein the first generating unit, when generating an initial second play request according to the initial play time, the first preset time duration and a second preset time duration, specifically performs:
determining an initial ending time according to the initial playing time and the first preset time length;
determining a second playing time period according to the initial ending time and the second preset time length;
and generating the initial second playing request according to the second playing time interval.
16. The apparatus according to claim 15, wherein the first generating unit, when determining a second playing period according to the initial ending time and the second preset time, specifically performs:
obtaining initial sub-playing time periods with the number of first preset time periods by taking the initial ending time as a time starting point and the second preset time length as a time interval;
and determining the second playing time interval according to the initial sub-playing time intervals of the first preset time interval number.
17. The apparatus according to any of claims 13-16, further comprising a second generating unit for performing:
under the condition that the current playing state meets the preset requirement, determining the current ending time according to the last video clip;
determining a third playing time period according to the current ending time and a third preset time length;
generating a third playing request according to the third playing time interval;
sending the third playing request to the server, and receiving a third video segment which is sent by the server and corresponds to the third playing request;
and after the target video is played according to the third video segment, the step of determining whether the current playing state meets the preset requirement is carried out, and the steps are carried out in a circulating manner until the target video is played.
18. The apparatus according to any of claims 13-17, further comprising a third generating unit for performing:
under the condition of acquiring a skip playing request, determining skip playing time corresponding to the skip playing request;
generating a skip first playing request according to the skip playing time and a fourth preset time length, and generating a skip second playing request according to the skip playing time, the fourth preset time length and a fifth preset time length;
sending the skip first playing request and the skip second playing request to the server, and receiving a fourth video clip corresponding to the skip first playing request and a fifth video clip corresponding to the skip second playing request sent by the server;
and playing the target video according to the fourth video clip and the fifth video clip.
19. The apparatus according to claim 18, wherein the third generating unit, when generating the skip first playing request according to the skip playing time and a fourth preset time length, specifically performs:
determining a fourth playing time period according to the jumping playing time and the fourth preset time length;
and generating the jump first playing request according to the fourth playing time interval.
20. The apparatus according to any one of claims 18 to 19, wherein the third generating unit, when generating a jump second play request according to the jump play time, the fourth preset time duration, and a fifth preset time duration, specifically performs:
determining the skip ending time according to the skip playing time and the fourth preset time;
determining a fifth playing time period according to the skip ending time and the fifth preset time length;
and generating the second skip playing request according to the fifth playing time interval.
21. The apparatus as claimed in claim 20, wherein the third generating unit, when determining a fifth playing period according to the jump ending time and the fifth preset duration, specifically performs:
obtaining skip sub-play time periods with a second preset time period number by taking the skip ending time as a time starting point and the fifth preset time length as a time interval;
and determining the fifth playing time interval according to the jumping sub-playing time intervals with the second preset time interval number.
22. A video playback apparatus, located at a server, comprising:
the receiving unit is used for receiving a video identifier, an initial first playing request and an initial second playing request sent by the terminal equipment and acquiring a video file of a target video according to the video identifier;
the first transcoding unit is used for performing video transcoding on the video file according to the initial first playing request by using a first video transcoding mode to obtain a first video segment;
the second transcoding unit is used for performing video transcoding on the video file according to the initial second playing request by using a second video transcoding mode to obtain a second video segment;
a sending unit, configured to send the first video segment and the second video segment to the terminal device, so that the terminal device plays the target video.
23. The apparatus of claim 22, further comprising a second receiving unit configured to perform:
receiving a third playing request sent by the terminal equipment;
performing video transcoding on the video file according to the third playing request by using the first video transcoding mode or the second video transcoding mode to obtain a third video segment;
and sending the third video clip to the terminal equipment so as to be used for playing the target video by the terminal equipment.
24. The apparatus according to any of claims 22-23, further comprising a third receiving unit configured to perform:
receiving a first play skipping request and a second play skipping request sent by the terminal equipment;
performing video transcoding on the video file according to the skip first playing request by using the first video transcoding mode to obtain a fourth video segment;
performing video transcoding on the video file according to the second skip playing request by using the second video transcoding mode to obtain a fifth video segment;
and sending the fourth video clip and the fifth video clip to the terminal equipment so as to be used for playing the target video by the terminal equipment.
25. A video playing system comprises a terminal device and a server;
wherein the terminal device is configured to perform the method of any of the preceding claims 1-9, and the server is configured to perform the method of any of the preceding claims 10-12.
26. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-12.
27. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-12.
28. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-12.
CN202211121355.7A 2022-09-15 2022-09-15 Video playing method, device, system, electronic equipment and readable storage medium Pending CN115633191A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211121355.7A CN115633191A (en) 2022-09-15 2022-09-15 Video playing method, device, system, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211121355.7A CN115633191A (en) 2022-09-15 2022-09-15 Video playing method, device, system, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN115633191A true CN115633191A (en) 2023-01-20

Family

ID=84903090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211121355.7A Pending CN115633191A (en) 2022-09-15 2022-09-15 Video playing method, device, system, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115633191A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116389758A (en) * 2023-04-07 2023-07-04 北京度友信息技术有限公司 Video transcoding method and device, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116389758A (en) * 2023-04-07 2023-07-04 北京度友信息技术有限公司 Video transcoding method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN105052107B (en) Media content Adaptive Transmission is carried out using quality information
US8819754B2 (en) Media streaming with enhanced seek operation
CN108124202B (en) Method for making stream media server support H L S protocol
CN111135569A (en) Cloud game processing method and device, storage medium and electronic equipment
CN107634930B (en) Method and device for acquiring media data
US10476928B2 (en) Network video playback method and apparatus
US9712590B2 (en) Method and device for transmitting streaming media
CN111836076B (en) Video resolution switching method and device and electronic equipment
CN110662017B (en) Video playing quality detection method and device
CN111031389B (en) Video processing method, electronic device and storage medium
CN115633191A (en) Video playing method, device, system, electronic equipment and readable storage medium
CN114245175A (en) Video transcoding method and device, electronic equipment and storage medium
CN114422799A (en) Video file decoding method and device, electronic equipment and program product
CN114040245A (en) Video playing method and device, computer storage medium and electronic equipment
CN113490055A (en) Data processing method and device
CN114501084B (en) Play method, device, equipment and medium of player
CN113079386B (en) Video online playing method and device, electronic equipment and storage medium
CN115988269A (en) Video playing method, device, system, electronic equipment and storage medium
CN115767149A (en) Video data transmission method and device
CN113766266B (en) Audio and video processing method, device, equipment and storage medium
CN112449209B (en) Video storage method and device, cloud server and computer readable storage medium
CN107205164B (en) Video transcoding method and device
CN116033235B (en) Data transmission method, digital person production equipment and digital person display equipment
US20230421779A1 (en) Decoding processing method and apparatus, computer device, and storage medium
CN113055714B (en) Video information processing method, device, equipment and 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