+

HK40083106A - Video playing method, apparatus, and computer readable storage medium - Google Patents

Video playing method, apparatus, and computer readable storage medium Download PDF

Info

Publication number
HK40083106A
HK40083106A HK42023072147.4A HK42023072147A HK40083106A HK 40083106 A HK40083106 A HK 40083106A HK 42023072147 A HK42023072147 A HK 42023072147A HK 40083106 A HK40083106 A HK 40083106A
Authority
HK
Hong Kong
Prior art keywords
video
target
file
playing
played
Prior art date
Application number
HK42023072147.4A
Other languages
Chinese (zh)
Other versions
HK40083106B (en
Inventor
唐松军
Original Assignee
腾讯科技(深圳)有限公司
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Publication of HK40083106A publication Critical patent/HK40083106A/en
Publication of HK40083106B publication Critical patent/HK40083106B/en

Links

Description

Video playing method and device and computer readable storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a video playing method and apparatus, and a computer-readable storage medium.
Background
With the continuous development of internet technology, the rapid development of streaming media technology and related applications, the way of watching videos at any time and any place is well received by industries such as education, entertainment and the like, and the streaming media technology is widely applied in various industries. People can watch the stream media on-demand and live program through various web pages to enrich the amateur life of the people.
However, in the prior art, in the process of playing different video files across files, the next video file is played after the current video file is played, and this switching method is cumbersome, which results in a low video playing efficiency.
Disclosure of Invention
The embodiment of the application provides a video playing method and device and a computer readable storage medium, which can simplify the playing process of multiple video files, improve the switching efficiency of the video files and further improve the video playing efficiency.
The embodiment of the application provides a video playing method, which comprises the following steps:
displaying a video to be played, wherein the video to be played consists of a plurality of video files, a playing progress bar of the video to be played consists of a plurality of intervals formed by a plurality of marking controls at intervals, and each interval is determined by one video file;
receiving touch operation on a current progress control, wherein the touch operation carries a target progress coordinate;
and determining a target interval in which the target progress coordinate falls, and calling a target video file corresponding to the target interval to play.
Correspondingly, an embodiment of the present application provides a video playing apparatus, including:
the display unit is used for displaying a video to be played, the video to be played is composed of a plurality of video files, a playing progress bar of the video to be played is composed of a plurality of intervals formed by a plurality of marking controls at intervals, and each interval is determined by one video file;
the receiving unit is used for receiving touch operation on the current progress control, and the touch operation carries a target progress coordinate;
and the playing unit is used for determining a target interval in which the target progress coordinate falls and calling a target video file corresponding to the target interval to play.
In one embodiment, the receiving unit includes:
a receiving touch subunit, configured to receive a touch operation for a current progress control on the playing progress bar, where the current progress control indicates a current playing coordinate of the video to be played;
and the response dragging subunit is used for responding to the touch operation and dragging the current progress control from the current playing coordinate to a target progress coordinate.
In one embodiment, the display unit includes:
the response display subunit is used for responding to the playing request of the video to be played and displaying the video to be played;
the acquisition subunit is used for acquiring the playing time length of each video file in the video to be played;
the combination subunit is used for generating a playing progress bar of the video to be played by combining the playing duration of each video file;
and the position information determining subunit is used for determining the position information of the marking control corresponding to each video file according to the playing time length of each video file and displaying the position information.
In an embodiment, the video playing apparatus further includes:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for receiving a play request aiming at a video to be played and acquiring a target file list corresponding to the video to be played according to the play request;
the downloading unit is used for downloading and analyzing the play list of each video file in the target file list to obtain the play duration of each video file;
the computing unit is used for computing the starting time of each video file in the video to be played according to the playing sequence and the playing duration of each video file and determining the file index value of each video file;
and the construction unit is used for constructing the file information of each video file according to the file index value, the playing time length, the downloading address of the playlist and the starting time of each video file and storing the file information into the file information list.
In one embodiment, the playback unit includes:
the traversal subunit is used for traversing each file information in the file information list based on the target progress coordinate;
the determining subunit is used for determining a target video file matched with the target progress coordinate according to a traversal result;
and the playing subunit is used for playing the target video file according to the target file information corresponding to the target video file and the target progress coordinate.
In an embodiment, the determining subunit includes:
the first obtaining module is used for obtaining a target file index value corresponding to the target starting time when the target starting time matched with the target progress coordinate exists in the file information list;
and the determining module is used for searching the target file information corresponding to the target file index value and determining a target video file matched with the target progress coordinate according to the target file information.
In one embodiment, the playback subunit includes:
the second acquisition module is used for acquiring a target download address of the playlist according to the target file information corresponding to the target video file;
the third acquisition module is used for acquiring a play list of the target video file according to the target download address;
and the downloading module is used for downloading the target media file corresponding to the target progress coordinate based on the play list of the target video file and playing the target media file.
In an embodiment, the video playing apparatus further includes:
a to-be-played video file determining unit, configured to determine, when playing of a currently played video file in the to-be-played video is finished, a video file to be played in the file information list according to a playing sequence;
the video file to be played downloading unit is used for downloading a play list corresponding to the video file to be played according to the file information list;
and the video file to be played playing unit is used for playing the video file to be played according to the play list corresponding to the video file to be played.
In addition, a computer-readable storage medium is provided, where the computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to perform steps in any one of the video playing methods provided in the embodiments of the present application.
In addition, the embodiment of the present application further provides a computer device, which includes a processor and a memory, where the memory stores an application program, and the processor is configured to run the application program in the memory to implement the video playing method provided in the embodiment of the present application.
Embodiments of the present application also provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the steps in the video playing method provided by the embodiment of the application.
The embodiment of the application displays the video to be played; receiving touch operation on the current progress control; and determining a target interval in which the target progress coordinate falls, and calling a target video file corresponding to the target interval to play. Therefore, the touch operation of the user on the current progress control according to the playing progress bar of the video to be played is received, the target interval in which the target progress coordinate falls is determined according to the target progress coordinate carried in the touch operation, the video file corresponding to the target interval is called and played, the playing of the multi-video file and the skip playing of the cross-video file are achieved, the playing flow of the multi-video file is simplified, the switching efficiency of the video file is improved, and the video playing efficiency is further improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of an implementation scenario of a video playing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a video playing method according to an embodiment of the present application;
fig. 3 is a schematic view of a playing screen of a video playing method according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a video playing method according to an embodiment of the present application;
fig. 5 is another schematic flowchart of a video playing method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a video playing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a video playing method and device and a computer readable storage medium. The video playing device may be integrated in a computer device, and the computer device may be a server or a terminal.
For a better understanding of the embodiments of the present application, reference is made to the following terms:
HLS: the adaptive code rate streaming media transmission Protocol based on the hypertext Transfer Protocol (HTTP) includes an index file of M3U8, a TS media fragment file, and a key encryption string file. HLS is a new generation streaming media transport protocol, and the basic implementation principle is to fragment a large media file, record the resource path of the fragment file in an M3U8 file (i.e. playlist, playlist), and attach some additional descriptions (e.g. multi-bandwidth information of the resource, etc.) for providing to the client. The client can obtain the corresponding media resource according to the M3U8 file and play the media resource.
M3u8 file: refers to M3U (Moving Picture Experts Group Audio Layer 3Uniform Resource Locator) file in UTF-8 encoding format. The M3U file records an index plain text file, and when the index plain text file is opened, the playing software does not play the index plain text file, but finds the network address of the corresponding audio/video file according to the index of the index plain text file for online playing. The M3U8 is a common streaming media format, mainly exists in a file list form, supports live broadcast and on-demand, and is most commonly used in platforms such as Android, iOS and the like.
TS: namely, a high-definition movie package format, TS (Transport Stream, simply referred to as TS) is a package format performed by shooting with a japanese high-definition camera, and is collectively called MPEG2-TS. It is sent in packets, each of 188 bytes in length. The packet is structured with 4 bytes in the header and 184 bytes in the payload. Many types of data, such as video, audio, custom information, etc., can be filled in the TS stream. MPEG2-TS is mainly applied to programs transmitted in real time, such as television programs broadcast in real time. The MPEG2-TS format is characterized by the requirement that it can be decoded independently from any segment of the video stream.
Referring to fig. 1, taking an example that a video playing device is integrated in a computer device, fig. 1 is a schematic view of an implementation scenario of a video playing method provided in an embodiment of the present application, where the video playing method includes a server a and a terminal B, where the server a may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Network acceleration service (CDN), and a big data and artificial intelligence platform.
The terminal B may be various computer devices capable of playing video, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, and a smart watch, but is not limited thereto. The terminal B can display a video to be played; receiving touch operation on the current progress control; and determining a target interval in which the target progress coordinate falls, and calling a target video file corresponding to the target interval to play.
The terminal B and the server a may be directly or indirectly connected through a wired or wireless communication manner, and the server a may obtain data uploaded by the terminal B to perform a corresponding video playing operation, which is not limited herein.
It should be noted that the schematic diagram of the implementation environment scene of the video playing method shown in fig. 1 is only an example, and the implementation environment scene of the video playing method described in the embodiment of the present application is for more clearly explaining the technical solution of the embodiment of the present application, and does not constitute a limitation to the technical solution provided by the embodiment of the present application. As can be known to those skilled in the art, with the evolution of video playing and the appearance of new service scenes, the technical solution provided in the present application is also applicable to similar technical problems.
The following are detailed below. It should be noted that the following description of the embodiments is not intended to limit the preferred order of the embodiments.
The present embodiment will be described from the perspective of a video playing apparatus, where the video playing apparatus may be specifically integrated in a computer device, and the computer device may be a terminal, and the present application is not limited herein.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a video playing method according to an embodiment of the present application. The video playing method can be executed by a terminal, wherein the video playing method comprises the following steps:
in step 101, a video to be played is displayed.
With the continuous development of internet technology, streaming media technology and related applications are rapidly developed, and the mode of watching videos anytime and anywhere is well popular in industries such as education, entertainment and the like, and the streaming media technology is widely applied in various industries. People can watch the stream media on demand and the live program through various webpages to enrich the leisure and entertainment life of the people.
However, in the prior art, in the process of playing different video files across files, most of the video files are played next after the currently played video file is played, or the currently played video file needs to be exited, and the currently played video file is returned to a file list formed by a plurality of video files, and then the next video file to be played is selected for playing. The switching method is complicated, and particularly for programs such as television series, when a user wants to review videos of the first episode or the second episode, the user needs to select the corresponding video file in the file list and then perform skip playing operation, so that the switching efficiency of multiple video files is low, and the playing efficiency of the video is low.
In order to solve the above problems, an embodiment of the present application provides a video playing method, in which a touch operation, triggered by a user based on a playing progress bar of a video to be played, on a current progress control is received, and a target interval in which a target progress coordinate falls is determined according to a target progress coordinate carried in the touch operation, so as to call and play a video file corresponding to the target interval, thereby implementing playing of multiple video files and skip playing of cross-video files, simplifying a playing flow of the multiple video files, improving switching efficiency of the video files, and further improving video playing efficiency. The following describes the video playing method provided in the present application in detail.
First, a video to be played may be displayed.
The video to be played can be composed of a plurality of video files, the playing progress bar of the video to be played is composed of a plurality of intervals formed by a plurality of marking controls at intervals, and each interval is determined by one video file.
Specifically, after receiving a playing request for a video to be played, the video to be played can be acquired and displayed, a playing progress bar is displayed according to the video to be played, and a mark control and a current progress control corresponding to each video file are displayed in the playing progress bar. The current progress control indicates the current playing progress of the video to be played, for example, indicates that the video to be played is played for the 10 th minute, or the 10 th minute and the 10 th second, and so on, so that the user can know the playing progress of the video to be played currently through the current progress control, and can know the corresponding interval of each video file in the playing progress bar through the marking control, and then can perform skip playing of different video files through the playing progress bar according to the marking control corresponding to each video file.
The currently displayed video to be played may be a first video file in the video to be played, a video file determined according to a viewing record of a user, or any video file in the video to be played selected by the user, which is not limited herein.
In an embodiment, after receiving a play request for a video to be played, the play request for the video to be played may be responded to, the video to be played is displayed, meanwhile, the play duration of each video file in the video to be played may be obtained, and a play progress bar for the video to be played is generated in combination with the play duration of each video file, so that the position information of the mark control corresponding to each video file may be determined according to the play duration of each video file for displaying.
For example, referring to fig. 3, fig. 3 is a schematic view of a playing picture of a video playing method provided in an embodiment of the present application, and it is assumed that a video to be played includes a video file 1, a video file 2, and a video file 3, and meanwhile, it is assumed that a playing time of the video file 1 is 50 minutes, a playing time of the video file 2 is 50 minutes, and a playing time of the video file 3 is 40 minutes. At this time, a video file 1 in a video to be played is displayed, wherein a playing progress bar of the video to be played may be generated by combining the video file 1, the video file 2, and the video file 3, a total duration of the playing progress bar is an accumulation of playing durations of the video file 1, the video file 2, and the video file 3, that is, the total duration of the playing progress bar is 50+40=140 minutes, and meanwhile, position information of a mark control corresponding to each video file may be determined according to the playing durations of the video file 1, the video file 2, and the video file 3, specifically, a mark control 1 corresponding to the video file 1 may be displayed at the 0 th minute in the playing progress bar, that is, the mark control 1 corresponding to the video file 1 may be displayed at the starting point position of the playing progress bar, because the starting point position in the playing progress bar already has a function of distinguishing mark, therefore, the mark control 1 may not be displayed, correspondingly, a mark control 2 corresponding to the video file 2 may be displayed at the 50 th minute in the playing progress bar, a mark interval between the mark control 1 and the mark interval between the mark control 2, and the video file 3, and the mark interval between the mark control 1 and the mark control 2, where the mark interval between the mark control 1 and the mark interval between the mark control 2 is formed.
In an embodiment, a user may preset the number of the mark controls displayed in the playing progress bar of the video to be played, that is, the number of the video files. For example, assuming that the video to be played is composed of 10 video files, the user may set that the mark controls corresponding to 3 video files are displayed in the play progress bar of the video to be played, and the user may also set that the mark controls corresponding to all the video files are displayed in the play progress bar of the video to be played, that is, the mark controls of 10 video files are displayed in the play progress bar of the video to be played.
In step 102, a touch operation on the current progress control is received.
The touch operation (Seek) may be an operation triggered by a user dragging a current progress control through a play progress bar, the touch operation carries a target progress coordinate (Seek to position), the target progress coordinate may be a play progress of a video to be played to which the user wants to jump, for example, the 10 th minute, or the 10 rd second in the 3 rd minute, and so on of the video to be played, an interval in which the target progress coordinate is located may be different from an interval in which the current play coordinate is located, that is, a video file corresponding to the target progress coordinate may be different from a video file corresponding to the current play coordinate. For example, suppose that a video to be played is currently playing a video frame at 10 minutes, and at the same time suppose that a user wants to watch the video from the content at 20 minutes in the video to be played, at this time, the user can trigger a touch operation to jump the current playing progress from 10 minutes to 20 minutes, and then the target progress coordinate is a position corresponding to the 20 minutes in the playing progress bar, where the user can trigger the touch operation by selecting the current progress control and moving the current progress control to the target progress coordinate, or can trigger the touch operation by clicking the position corresponding to the target progress coordinate in the playing progress bar, and so on.
In an embodiment, a touch operation for a current progress control on the playing progress bar may be received, where the current progress control indicates a current playing coordinate of the video to be played; and responding to the touch operation, and dragging the current progress control from the current playing coordinate to the target progress coordinate. For example, assuming that the content of the video to be played in the tenth minute is currently being played, the current playing coordinate is the tenth minute of the video to be played. At this time, the current progress control indicates the content of the tenth minute of the video to be played currently, for example, assuming that the picture of the video to be played currently is the picture of the 10 th minute in the playing progress bar, and assuming that the target progress coordinate is the position corresponding to the 60 th minute in the playing progress bar, the current progress control indicates that the current playing coordinate is the position corresponding to the 10 th minute in the playing progress bar, after receiving the touch operation for the current progress control on the playing progress bar, the touch operation may be responded, and then the current progress control may be dragged from the position of the 10 th minute in the playing progress bar to the position of the 60 th minute corresponding to the target progress coordinate.
In step 103, a target interval in which the target progress coordinate falls is determined, and a target video file corresponding to the target interval is called to play.
After the target progress coordinate of the skip playing operation of the video to be played is determined, the target video file corresponding to the target interval can be called to play according to the target interval in which the target progress coordinate falls, so that skip playing of the cross-video file is realized. The target interval is an interval formed by the interval between two adjacent marking controls in front and back of the target progress coordinate in the playing progress bar, and the target interval can be different from the interval where the current progress control is located.
In an embodiment, in order to determine a target interval in which the target progress coordinate falls to determine that a corresponding target video file is played, an index table may be constructed according to file information and an index value of each video file, specifically, a target file list corresponding to a video to be played may be obtained after a play request for the video to be played is received, the target file list includes a play list (M3U 8 file) corresponding to each video file in the video to be played, the M3U8 file of each video file in the target file list is downloaded and parsed, a play duration of each video file may be obtained, a start time of each video file in the video to be played may be calculated according to a play sequence and a play duration of each video file, and a file index value of each video file may be determined, so that file information of each video file may be constructed according to a file index value, a play duration, a download address of a play list, and a start time of each video file may be stored in a file information list. The file information of each video file may not only include the file index value, the playing Time length, the downloading address of the playlist, and the start Time of each video file, but also may include the start display timestamp of each video file, which may be a display timestamp of a first frame video frame of each video file (PTS), for example.
For example, for a video to be played with a playing sequence of video file 1, video file 2, and video file 3, the file index value of video file 1 may be 1, the file index value of video file 2 may be 2, the file index value of video file 3 may be 3, and so on. The file index value may also be determined by other means, and is not limited herein.
For example, if each TS file in the M3U8 file of the video file 1 is a video clip with a duration of 1 minute, and the M3U8 file of the video file 1 includes 50 TS files with a duration of 1 minute, the playing duration of the video file 1 can be obtained after the TS files in the M3U8 file of the video file 1 are analyzed.
The download address of the playlist may be a download address corresponding to the playlist of each video file in the video to be played, that is, a download address corresponding to the M3U8 file of each video file, and the corresponding M3U8 file in the target file list may be found and downloaded through the download address.
The starting time may be a relative starting time of each video file in the video to be played, for example, it is assumed that the video to be played includes video file 1, video file 2, and video file 3, and meanwhile, it is assumed that the playing time of video file 1 is 50 minutes, the playing time of video file 2 is 50 minutes, and the playing time of video file 3 is 40 minutes. The starting time of the video file 1 in the video to be played is 0, the starting time of the video file 2 in the video to be played is 50 minutes, and the starting time of the video file 3 in the video to be played is 100 minutes.
In an embodiment, the current playing coordinate of the progress control may be determined by the start time of the video file corresponding to the interval where the progress control is located, the display time stamp of the currently playing video frame, and the start display time stamp of the video file, for example, assuming that the start time of the video file corresponding to the interval where the progress control is located is 30 minutes, the display time stamp of the currently playing video frame is 16 minutes, and the start display time stamp of the video file is 10 minutes, the current playing coordinate of the progress control may be 30+ (16-10) =36 minutes.
After the file information of each video file is constructed and stored in the file information list, the corresponding video file can be found in the file information list according to the file information of each video, so as to implement skip playing of the cross-video file, specifically, the step of determining the target interval in which the target progress coordinate falls and calling the target video file corresponding to the target interval to play may include:
(1) Traversing each file information in the file information list based on the target progress coordinate;
(2) Determining a target video file matched with the target progress coordinate according to the traversal result;
(3) And playing the target video file according to the target file information corresponding to the target video file and the target progress coordinate.
The method includes traversing each file information in a file information list according to a target progress coordinate carried by touch operation, determining the start time of a video file as a target start time when the target start time matched with the target progress coordinate exists in the file information list, namely finding that a certain video file exists, and enabling the target progress coordinate to be in a start time interval formed by the start time of the video file and corresponding playing termination time, wherein the start time interval is formed by the start time of the certain video file and a time interval between the corresponding playing termination times, so that a target file index value corresponding to the target start time can be obtained, target file information corresponding to the target file index value is found according to the target file index value, and a target video file matched with the target progress coordinate is determined according to the target file information.
The playing termination time may be the sum of the start time of any video file and the playing duration of the video file, for example, if the start time of the video file 4 in the video to be played is 140 minutes and the playing duration is 50 minutes, the playing termination time is 140+50=190 minutes.
For example, it may be assumed that the video to be played includes a video file 1, a video file 2, and a video file 3, the playing time of the video file 1 is 50 minutes, the file index value is 1, the playing time of the video file 2 is 50 minutes, the file index value is 2, the playing time of the video file 3 is 40 minutes, and the file index value is 3. The starting time of the video file 1 in the video to be played is 0, the starting time of the video file 2 in the video to be played is 50 minutes, and the starting time of the video file 3 in the video to be played is 100 minutes. Meanwhile, it may be assumed that the user moves the current progress control to a position corresponding to the video content at the 60 th minute along the play progress bar, that is, the target progress coordinate is a position corresponding to the video content at the 60 th minute in the play progress bar. At this time, file information of the video file 1, the video file 2 and the video file 3 may be traversed in a file information list of a video to be played, an initial time interval in which a target progress coordinate is located is searched for in the traversing process, since an initial time interval formed by the initial time of the video file 1 and the corresponding playing termination time is (0, 50 minutes), an initial time interval formed by the initial time of the video file 2 and the corresponding playing termination time is (50 minutes, 100 minutes), and an initial time interval formed by the initial time of the video file 3 and the corresponding playing termination time is (100 minutes, 140 minutes), it is possible to search for that the target progress coordinate is located in a target interval (50 minutes, 100 minutes), and further determine the initial time of the target interval as the target initial time, so that a target file index value 2 corresponding to the target initial time of 50 minutes may be searched for in the file information list, and a target file information corresponding to the target file index value may be searched for according to the target file index value 2, and a target file matched to the target progress coordinate of the target file of the video file 2 may be determined according to the target file information list.
In an embodiment, the step of playing the target video file according to the target file information corresponding to the target video file and the target progress coordinate may include:
(1) Acquiring a target download address of a playlist according to target file information corresponding to the target video file;
(2) Acquiring a play list of a target video file according to the target download address;
(3) And downloading a target media file corresponding to the target progress coordinate based on the play list of the target video file, and playing the target media file.
The target file information may be file information of a target video file, the target download address may be a download address (Uniform Resource Locator, URL for short) of a playlist of the target video file in the target file information, the target media file may be a media file corresponding to the target progress coordinate in the playlist of the target video file, the media file may be a media fragment Resource, and the media fragment Resource may be a TS file.
Specifically, a target download address of the playlist may be searched in the target file information corresponding to the target video file, and the playlist of the target video file, that is, the M3U8 file, may be downloaded according to the target download address, and a media segment resource of the target video file, that is, a TS file, may be recorded in the M3U8 file, and then the target media file corresponding to the target progress coordinate may be searched and downloaded in the TS file recorded in the M3U8 file of the target video file, and then the target media file may be played, so as to realize playing a content corresponding to the target progress coordinate in the video to be played, and further may realize skipping and playing of multiple video files. For example, assuming that the playing time of the target video file is 30 minutes and the starting time in the video to be played is 40 minutes, meanwhile, assuming that the M3U8 file of the target video file records 30 TS files, each TS file is a media segment with a time duration of 1min (minute), and each TS file may be named as:
ts target video file _1min
Ts target video file _2min
Ts target video File _3min
......
Ts target video file _29min
Target video file _30min
Assuming that the target progress coordinate is 59 minutes, a 59-30=29 TS file, i.e., a target video file _29min.ts, can be found in the TS files recorded by the M3U8 file, and the TS file is downloaded for playing. And when the file is played, the next TS file, namely the target video file _30min.
Specifically, when the target progress coordinate is 59 minutes and 10 seconds, a target media file target video file _29min.ts can be found in a TS file recorded by an M3U8 file, a target video frame corresponding to 10 seconds in the target media file is determined according to a display time stamp (PTS) of each frame of video frame in the target media file, and the target video file is played based on the target video frame, so that the video to be played, which jumps from the current playing coordinate to the target progress coordinate, is played.
In an embodiment, when the playing of the video file currently played in the video to be played is finished, the video file to be played may be determined in the file information list according to the playing sequence, for example, assuming that the current progress control is located at the 50 th minute position in the playing progress bar, that is, the playing of the video file 1 is finished, the video file to be played may be determined to be the video file 2 according to the playing sequence of the video to be played, and then the playlist corresponding to the video file to be played may be downloaded according to the file information list, and the video file to be played is played according to the playlist corresponding to the video file to be played. Specifically, when the playing of the currently played video file is finished, the next video file of the currently played video file, that is, the video file to be played, may be determined in the file information list according to the playing sequence of each video file in the video to be played, and the download address of the M3U8 file of the video file to be played is searched through the file information of the video file to be played stored in the file information list, so as to download the M3U8 file corresponding to the video file to be played according to the download address, thereby obtaining the TS file recorded in the M3U8 file of the video file to be played, and download and play each TS file according to the sequence, thereby implementing the playing of the video file to be played.
As can be seen from the above, in the embodiment of the present application, a video to be played is displayed; receiving touch operation on the current progress control; and determining a target interval in which the target progress coordinate falls, and calling a target video file corresponding to the target interval to play. Therefore, the touch operation of the user on the current progress control according to the playing progress bar of the video to be played is received, the target interval in which the target progress coordinate falls is determined according to the target progress coordinate carried in the touch operation, the video file corresponding to the target interval is called and played, the playing of the multi-video file and the skip playing of the cross-video file are achieved, the playing flow of the multi-video file is simplified, the data processing efficiency is improved, and the video switching efficiency is further improved.
The method described in the above examples is further illustrated in detail below by way of example.
In this embodiment, the video playback apparatus will be described by taking an example in which the video playback apparatus is specifically integrated in a computer device. The video playing method takes a terminal as an execution main body to carry out specific description. Specifically, please refer to fig. 4, where fig. 4 is a schematic flowchart of a video playing method according to an embodiment of the present application.
For a better description of the embodiments of the present application, please refer to fig. 4 and 5 together. As shown in fig. 5, fig. 5 is another schematic flow chart of a video playing method according to an embodiment of the present application. The specific process is as follows:
in step 201, the terminal receives a play request for a video to be played, acquires a target file list corresponding to the video to be played according to the play request, downloads and analyzes a play list of each video file in the target file list, and obtains a play duration of each video file.
The video to be played includes at least one video file, the target file list includes a playlist (M3U 8 file) of each video file in the video to be played, and each M3U8 file records a media segment resource, that is, a TS file, of the target video file.
In order to determine a target interval in which the target progress coordinate falls to determine that a corresponding target video file is played, an index table may be constructed according to file information and an index value of each video file, specifically, the terminal may obtain a target file list corresponding to a video to be played after receiving a play request for the video to be played, where the target file list includes a play list corresponding to each video file in the video to be played, download an M3U8 file of each video file in the target file list and parse a TS file recorded in the M3U8 file of each video file to obtain a segment duration of each TS file, accumulate the segment duration of each video file, and obtain a play duration of each video file.
In step 202, the terminal calculates the start time of each video file in the video to be played according to the playing sequence and the playing duration of each video file, determines the file index value of each video file, constructs the file information of each video file according to the file index value, the playing duration, the downloading address of the playlist, and the start time of each video file, and stores the file information in the file information list.
Specifically, the terminal may calculate the start time of each video file in the video to be played according to the playing sequence and the playing duration of each video file, and determine the file index value of each video file according to the playing sequence of each video file, so that the file information of each video file may be constructed according to the file index value, the playing duration, the download address of the playlist, and the start time of each video file and stored in the file information list. The file information of each video file may not only include a file index value, a playing Time, a downloading address of a playlist, and a start Time of each video file, but also may be determined according to an actual situation, and is not limited herein, for example, the file information of each video file may further include a start display timestamp of each video file, where the start display timestamp may be a display timestamp (PTS, for short) of a first frame video frame of each video file.
For example, for a video to be played with a playing sequence of video file 1, video file 2, and video file 3, the file index value of video file 1 may be 1, the file index value of video file 2 may be 2, the file index value of video file 3 may be 3, and so on. The file index value may also be determined by other means, and is not limited herein.
For example, if each TS file in the M3U8 file of the video file 1 is a video clip with a duration of 1 minute, and the M3U8 file of the video file 1 includes 50 TS files with a duration of 1 minute, the playing duration of the video file 1 can be obtained after the TS files in the M3U8 file of the video file 1 are analyzed.
The download address of the playlist may be a download address corresponding to the playlist of each video file in the video to be played, that is, a download address corresponding to the M3U8 file of each video file, and the corresponding M3U8 file in the target file list may be found and downloaded through the download address.
The starting time may be a relative starting time of each video file in the video to be played, for example, it is assumed that the video to be played includes video file 1, video file 2, and video file 3, and meanwhile, it is assumed that the playing time of video file 1 is 50 minutes, the playing time of video file 2 is 50 minutes, and the playing time of video file 3 is 40 minutes. The starting time of the video file 1 in the video to be played is 0, the starting time of the video file 2 in the video to be played is 50 minutes, and the starting time of the video file 3 in the video to be played is 100 minutes.
In an embodiment, the file information of each video file may be constructed in the form of a data structure, for example, may be:
in step 203, the terminal responds to the play request of the video to be played, displays the video to be played, obtains the play duration of each video file in the video to be played, generates a play progress bar of the video to be played in combination with the play duration of each video file, and determines the position information of the mark control corresponding to each video file according to the play duration of each video file to display.
The video to be played currently displayed by the terminal may be a first video file in the video to be played, a video file determined according to a viewing record of the user, or any video file in the video to be played selected by the user, which is not limited herein.
Specifically, after receiving a play request for a video to be played, the terminal may respond to the play request for the video to be played, display the video to be played, and meanwhile, may obtain a play duration of each video file in the video to be played, and generate a play progress bar of the video to be played in combination with the play duration of each video file, so that the position information of the mark control corresponding to each video file may be determined according to the play duration of each video file to be displayed.
For example, please continue to refer to fig. 3, assume that the video to be played includes video file 1, video file 2, and video file 3, and assume that the playing time of video file 1 is 50 minutes, the playing time of video file 2 is 50 minutes, and the playing time of video file 3 is 40 minutes. At this time, a video file 1 in a video to be played is displayed, wherein a playing progress bar of the video to be played may be generated by combining the video file 1, the video file 2, and the video file 3, a total duration of the playing progress bar is an accumulation of playing durations of the video file 1, the video file 2, and the video file 3, that is, the total duration of the playing progress bar is 50+40=140 minutes, and meanwhile, position information of a mark control corresponding to each video file may be determined according to the playing durations of the video file 1, the video file 2, and the video file 3, specifically, a mark control 1 corresponding to the video file 1 may be displayed at the 0 th minute in the playing progress bar, that is, the mark control 1 corresponding to the video file 1 may be displayed at the starting point position of the playing progress bar, because the starting point position in the playing progress bar already has a function of distinguishing mark, therefore, the mark control 1 may not be displayed, correspondingly, a mark control 2 corresponding to the video file 2 may be displayed at the 50 th minute in the playing progress bar, a mark interval between the mark control 1 and the mark interval between the mark control 2, and the video file 3, and the mark interval between the mark control 1 and the mark control 2, where the mark interval between the mark control 1 and the mark interval between the mark control 2 is formed.
In an embodiment, a user may preset the number of the mark controls displayed in the playing progress bar of the video to be played, that is, the number of the video files. For example, assuming that the video to be played is composed of 10 video files, the user may set that the mark controls corresponding to 3 video files are displayed in the play progress bar of the video to be played, and the user may also set that the mark controls corresponding to all the video files are displayed in the play progress bar of the video to be played, that is, the mark controls of 10 video files are displayed in the play progress bar of the video to be played.
In step 204, the terminal receives a touch operation for the current progress control on the playing progress bar, and drags the current progress control from the current playing coordinate to the target progress coordinate in response to the touch operation.
The terminal can receive touch operation aiming at the current progress control on the playing progress bar, the current progress control indicates the current playing coordinate of the video to be played, and then the terminal can respond to the touch operation and drag the current progress control from the current playing coordinate to the target progress coordinate. For example, assuming that a picture of a currently played video to be played is a picture at the 10 th minute in the playing progress bar, and meanwhile, assuming that the target progress coordinate is a position corresponding to the 60 th minute in the playing progress bar, the current progress control indicates that the current playing coordinate is the position corresponding to the 10 th minute in the playing progress bar, after receiving a touch operation for the current progress control on the playing progress bar, the terminal may respond to the touch operation, and may drag the current progress control from the position at the 10 th minute in the playing progress bar to the position at the 60 th minute corresponding to the target progress coordinate.
In step 205, the terminal traverses each file information in the file information list based on the target progress coordinate, and when finding that the target start time matched with the target progress coordinate exists in the file information list, obtains a target file index value corresponding to the target start time.
Specifically, the terminal may traverse each file information in the file information list according to a target progress coordinate carried by the touch operation, and when a target start time matching the target progress coordinate exists in the file information list, that is, when a certain video file exists, so that the target progress coordinate is located in a start time interval formed by the start time of the video file and the corresponding play termination time, the start time of the video file may be determined as the target start time, and the start time interval is formed by a time interval between the start time of the certain video file and the corresponding play termination time, so that a target file index value corresponding to the target start time may be obtained.
The playing end time may be the sum of the start time of any video file and the playing time length of the video file, for example, if the start time of the video file 4 in the video to be played is 140 minutes, and the playing time length is 50 minutes, the playing end time is 140+50=190 minutes.
For example, it may be assumed that the video to be played includes video file 1, video file 2, and video file 3, the playing time of video file 1 is 50 minutes, the file index value is 1, the playing time of video file 2 is 50 minutes, the file index value is 2, the playing time of video file 3 is 40 minutes, and the file index value is 3. The starting time of the video file 1 in the video to be played is 0, the starting time of the video file 2 in the video to be played is 50 minutes, and the starting time of the video file 3 in the video to be played is 100 minutes. Meanwhile, it can be assumed that the user moves the current progress control to the position corresponding to the video content at the 60 th minute along the playing progress bar, that is, the target progress coordinate is the position corresponding to the video content at the 60 th minute in the playing progress bar. At this time, file information of the video file 1, the video file 2 and the video file 3 may be traversed in a file information list of a video to be played, and a start time interval where a target progress coordinate is located is searched for, in the traversing process, because a start time interval formed by the start time of the video file 1 and the corresponding play termination time is (0, 50 minutes), a start time interval formed by the start time of the video file 2 and the corresponding play termination time is (50 minutes, 100 minutes), and a start time interval formed by the start time of the video file 3 and the corresponding play termination time is (100 minutes, 140 minutes), it is possible to search for a target progress coordinate of 60 minutes in the target interval (50 minutes, 100 minutes), and further determine the start time of 50 minutes in the target interval as the target start time, thereby it is possible to search for a target file index value 2 corresponding to the target start time of 50 minutes in the file information list, and search for target file information corresponding to the target file index value according to the target file index value 2, and determine a target file matched with the target progress coordinate of 60 minutes, that is the video file 2, and the video file 2 according to the target file index value according to the target file information.
In step 206, the terminal searches for target file information corresponding to the target file index value, and determines a target video file matched with the target progress coordinate according to the target file information.
After the terminal obtains the target file index value, the terminal can search the target file information with the file index value as the target file index value in the file information list according to the target file index value, and can determine the target video file matched with the target progress coordinate according to the target file information.
In step 207, the terminal obtains a target download address of the playlist according to the target file information corresponding to the target video file, obtains the playlist of the target video file according to the target download address, downloads the target media file corresponding to the target progress coordinate based on the playlist of the target video file, and plays the target media file.
The target file information may be file information of a target video file, the target download address may be a download address (Uniform Resource Locator, URL for short) of a playlist of the target video file in the target file information, the target media file may be a media file corresponding to a target progress coordinate in the playlist of the target video file, the media file may be a media fragment Resource, and the media fragment Resource may be a TS file.
Specifically, the terminal can search a target download address of the playlist in the target file information corresponding to the target video file, and download the playlist of the target video file, that is, the M3U8 file, according to the target download address, and record the media segment resource of the target video file, that is, the TS file, in the M3U8 file, and further can search and download the target media file corresponding to the target progress coordinate in the TS file recorded in the M3U8 file of the target video file, and further can play the target media file, so as to play the content corresponding to the target progress coordinate in the video to be played, and further can skip and play multiple video files. For example, assuming that the playing time of the target video file is 30 minutes and the starting time in the video to be played is 40 minutes, meanwhile, assuming that the M3U8 file of the target video file records 30 TS files, each TS file is a media segment with a time of 1 minute, and each TS file may be named as:
target video file _1min
Ts target video file _2min
Ts target video file _3min
......
Target video file _29min
Target video file _30min
Assuming that the target progress coordinate is 33 minutes, 33-30=3 TS files, that is, the target video file _3min.ts, can be found in the TS files recorded by the M3U8 file, and the TS files are downloaded for playing. When the file is played, the next TS file can be played continuously according to the sequence, namely the target video file _4min.
Specifically, when the target progress coordinate is 3 minutes and 10 seconds, the terminal may find a target media file (target video file _3 min.ts) in a TS file recorded by the M3U8 file, determine a target video frame corresponding to 10 seconds in the target media file according to a display timestamp of each frame of video frame in the target media file, and play the target video file based on the target video frame, so as to implement playing of a video to be played, which jumps to the target progress coordinate from a current playing coordinate.
As can be seen from the above, in the embodiment of the present application, a terminal receives a play request for a video to be played, obtains a target file list corresponding to the video to be played according to the play request, downloads and analyzes a play list of each video file in the target file list, and obtains a play duration of each video file; the terminal calculates the initial time of each video file in the video to be played according to the playing sequence and the playing duration of each video file, determines the file index value of each video file, constructs the file information of each video file according to the file index value, the playing duration, the downloading address of the playing list and the initial time of each video file, and stores the file information into the file information list; the terminal responds to a playing request of a video to be played, displays the video to be played, acquires the playing time of each video file in the video to be played, generates a playing progress bar of the video to be played by combining the playing time of each video file, and determines the position information of a marking control corresponding to each video file according to the playing time of each video file to display; the terminal receives touch operation aiming at the current progress control on the playing progress bar, responds to the touch operation and drags the current progress control to the target progress coordinate from the current playing coordinate; the terminal traverses each file information in the file information list based on the target progress coordinate, and when a target starting time matched with the target progress coordinate exists in the file information list, a target file index value corresponding to the target starting time is obtained; the terminal searches for target file information corresponding to the target file index value, determines a target video file matched with the target progress coordinate according to the target file information, and plays the target video file according to the target file information corresponding to the target video file and the target progress coordinate; and the terminal acquires a target downloading address of a playlist according to the target file information corresponding to the target video file, acquires the playlist of the target video file according to the target downloading address, downloads a target media file corresponding to the target progress coordinate based on the playlist of the target video file, and plays the target media file. Therefore, a target file list of the video to be played is obtained by receiving a playing request for the video to be played, file information of each video file is further constructed according to the target file list and stored in the file information list, when a touch operation of a user on the current progress control according to a playing progress bar of the video to be played is received, the target video file corresponding to the target progress coordinate can be determined according to the target progress coordinate carried in the touch operation and the file information of each video file in the file information list, and therefore the target video file is played according to a downloading address of the playing list in the file information of the target video file, playing of the multi-video file and skip playing of the cross-video file are achieved, the playing flow of the multi-video file is simplified, the switching efficiency of the video file is improved, and the video playing efficiency is further improved.
In order to better implement the above method, an embodiment of the present invention further provides a video playing apparatus, which may be integrated in a terminal.
For example, as shown in fig. 6, for a schematic structural diagram of a video playing apparatus provided in an embodiment of the present application, the video playing apparatus may include a display unit 301, a receiving unit 302, and a playing unit 303, as follows:
the display unit 301 is configured to display a video to be played, where the video to be played is composed of a plurality of video files, a playing progress bar of the video to be played is composed of a plurality of intervals formed at intervals by a plurality of marking controls, and each interval is determined by one video file;
a receiving unit 302, configured to receive a touch operation on a current progress control, where the touch operation carries a target progress coordinate;
the playing unit 303 is configured to determine a target interval in which the target progress coordinate falls, and call a target video file corresponding to the target interval to play.
In an embodiment, the receiving unit 302 includes:
a receiving touch control subunit, configured to receive a touch control operation for a current progress control on the play progress bar, where the current progress control indicates a current play coordinate of the video to be played;
and the response dragging subunit is used for responding to the touch operation and dragging the current progress control from the current playing coordinate to a target progress coordinate.
In one embodiment, the display unit 301 includes:
the response display subunit is used for responding to the playing request of the video to be played and displaying the video to be played;
the acquisition subunit is used for acquiring the playing time length of each video file in the video to be played;
the combination subunit is used for generating a playing progress bar of the video to be played by combining the playing duration of each video file;
and the position information determining subunit is used for determining the position information of the marking control corresponding to each video file according to the playing time length of each video file and displaying the position information.
In an embodiment, the video playing apparatus further includes:
the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is used for receiving a play request aiming at a video to be played and acquiring a target file list corresponding to the video to be played according to the play request;
the downloading unit is used for downloading and analyzing the play list of each video file in the target file list to obtain the play duration of each video file;
the computing unit is used for computing the initial time of each video file in the video to be played according to the playing sequence and the playing duration of each video file and determining the file index value of each video file;
and the construction unit is used for constructing the file information of each video file according to the file index value, the playing time length, the downloading address and the starting time of each video file and storing the file information into the file information list.
In one embodiment, the playing unit 303 includes:
the traversal subunit is used for traversing each file information in the file information list based on the target progress coordinate;
the determining subunit is used for determining a target video file matched with the target progress coordinate according to the traversal result;
and the playing subunit is used for playing the target video file according to the target file information corresponding to the target video file and the target progress coordinate.
In one embodiment, the determining subunit includes:
the first acquisition module is used for acquiring a target file index value corresponding to the target starting time when the target starting time matched with the target progress coordinate exists in the file information list;
and the determining module is used for searching the target file information corresponding to the target file index value and determining the target video file matched with the target progress coordinate according to the target file information.
In one embodiment, the playback subunit includes:
the second acquisition module is used for acquiring a target download address of the playlist according to the target file information corresponding to the target video file;
the third acquisition module is used for acquiring a play list of the target video file according to the target download address;
and the downloading module is used for downloading the target media file corresponding to the target progress coordinate based on the play list of the target video file and playing the target media file.
In an embodiment, the video playing apparatus further includes:
a to-be-played video file determining unit, configured to determine, when playing of a currently played video file in the to-be-played video is finished, a video file to be played in the file information list according to a playing sequence;
a video file to be played downloading unit, configured to download, according to the file information list, a play list corresponding to the video file to be played;
and the video file to be played playing unit is used for playing the video file to be played according to the play list corresponding to the video file to be played.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
As can be seen from the above, in the embodiment of the present application, the video to be played is displayed through the display unit 301; the receiving unit 302 receives a touch operation on the current progress control; the playing unit 303 determines a target interval in which the target progress coordinate falls, and calls a target video file corresponding to the target interval to play. Therefore, the touch operation of the user on the current progress control according to the playing progress bar of the video to be played is received, the target interval in which the target progress coordinate falls is determined according to the target progress coordinate carried in the touch operation, the video file corresponding to the target interval is called and played, the playing of the multi-video file and the skip playing of the cross-video file are achieved, the playing flow of the multi-video file is simplified, the switching efficiency of the video file is improved, and the video playing efficiency is further improved.
An embodiment of the present application further provides a computer device, as shown in fig. 7, which shows a schematic structural diagram of a computer device according to an embodiment of the present application, where the computer device may be a terminal, and specifically:
the computer device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 7 does not constitute a limitation of the computer device, and may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device as a whole. Alternatively, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and video playback by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that the functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions as follows:
acquiring page jump relation data of each page in a client, and constructing a page jump structure tree according to the page jump relation data; determining the first node position of a target current page in the page jump structure tree; performing path traversal based on the first node position to determine a target path; determining a target page jump control identification of a target current page according to the target path; and sending the target page jump control identification to the client so that the client performs page jump according to the target page jump control corresponding to the target page jump control identification.
The above operations can be implemented in the foregoing embodiments, and are not described herein. It should be noted that the computer device provided in the embodiment of the present application and the method for video playing in the foregoing embodiment belong to the same concept, and specific implementation processes thereof are described in the foregoing method embodiment, and are not described herein again.
As can be seen from the above, in the embodiment of the present application, a video to be played is displayed; receiving touch operation on the current progress control; and determining a target interval in which the target progress coordinate falls, and calling a target video file corresponding to the target interval to play. Therefore, the touch operation of the user on the current progress control according to the playing progress bar of the video to be played is received, the target interval in which the target progress coordinate falls is determined according to the target progress coordinate carried in the touch operation, the video file corresponding to the target interval is called and played, the playing of the multi-video file and the skip playing of the cross-video file are achieved, the playing flow of the multi-video file is simplified, the switching efficiency of the video file is improved, and the video playing efficiency is further improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any one of the video playing methods provided in the embodiments of the present application. For example, the instructions may perform the steps of:
displaying a video to be played; receiving touch operation on the current progress control; and determining a target interval in which the target progress coordinate falls, and calling a target video file corresponding to the target interval to play.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any video playing method provided in the embodiments of the present application, beneficial effects that can be achieved by any video playing method provided in the embodiments of the present application can be achieved, for details, see the foregoing embodiments, and are not described herein again.
According to one aspect of the application, there is provided, among other things, a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations provided by the embodiments described above.
The video playing method, the video playing device and the computer readable storage medium provided by the embodiments of the present application are described in detail above, and specific examples are applied herein to illustrate the principles and implementations of the present application, and the descriptions of the above embodiments are only used to help understand the method and the core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A video playback method, comprising:
displaying a video to be played, wherein the video to be played consists of a plurality of video files, a playing progress bar of the video to be played consists of a plurality of intervals formed by a plurality of marking controls at intervals, and each interval is determined by one video file;
receiving touch operation on a current progress control, wherein the touch operation carries a target progress coordinate;
and determining a target interval in which the target progress coordinate falls, and calling a target video file corresponding to the target interval to play.
2. The video playing method according to claim 1, wherein the receiving a touch operation on a current progress control includes:
receiving a touch operation aiming at a current progress control on the playing progress bar, wherein the current progress control indicates the current playing coordinate of the video to be played;
and responding to the touch operation, and dragging the current progress control from the current playing coordinate to a target progress coordinate.
3. The video playing method according to claim 1, wherein said displaying the video to be played comprises:
responding to a playing request of the video to be played, and displaying the video to be played;
acquiring the playing time length of each video file in the video to be played;
generating a playing progress bar of the video to be played by combining the playing duration of each video file;
and determining the position information of the marking control corresponding to each video file according to the playing time length of each video file for displaying.
4. The video playback method of any one of claims 1 to 3, wherein before displaying the video to be played, further comprising:
receiving a playing request aiming at a video to be played, and acquiring a target file list corresponding to the video to be played according to the playing request;
downloading and analyzing a play list of each video file in the target file list to obtain the play duration of each video file;
calculating the initial time of each video file in the video to be played according to the playing sequence and the playing duration of each video file, and determining the file index value of each video file;
and constructing file information of each video file according to the file index value, the playing time length, the downloading address of the play list and the starting time of each video file, and storing the file information into the file information list.
5. The video playing method according to claim 4, wherein the determining a target interval in which the target progress coordinate falls, and calling a target video file corresponding to the target interval to play comprises:
traversing each file information in the file information list based on the target progress coordinate;
determining a target video file matched with the target progress coordinate according to the traversal result;
and playing the target video file according to the target file information corresponding to the target video file and the target progress coordinate.
6. The video playing method according to claim 5, wherein the determining a target video file matching the target progress coordinate according to the traversal result comprises:
when the target starting time matched with the target progress coordinate exists in the file information list, acquiring a target file index value corresponding to the target starting time;
and searching target file information corresponding to the target file index value, and determining a target video file matched with the target progress coordinate according to the target file information.
7. The video playing method according to claim 5, wherein the playing the target video file according to the target file information corresponding to the target video file and the target progress coordinate comprises:
acquiring a target download address of a playlist according to target file information corresponding to the target video file;
acquiring a play list of a target video file according to the target download address;
and downloading a target media file corresponding to the target progress coordinate based on the play list of the target video file, and playing the target media file.
8. The video playback method of claim 1, wherein after displaying the video to be played, further comprising:
when the playing of the currently played video file in the video to be played is finished, determining the video file to be played in the file information list according to the playing sequence;
downloading a play list corresponding to the video file to be played according to the file information list;
and playing the video file to be played according to the play list corresponding to the video file to be played.
9. A video playback apparatus, comprising:
the display unit is used for displaying a video to be played, the video to be played is composed of a plurality of video files, a playing progress bar of the video to be played is composed of a plurality of intervals formed by a plurality of marking controls at intervals, and each interval is determined by one video file;
the receiving unit is used for receiving touch operation on the current progress control, and the touch operation carries a target progress coordinate;
and the playing unit is used for determining a target interval in which the target progress coordinate falls and calling a target video file corresponding to the target interval to play.
10. A computer readable storage medium storing instructions adapted to be loaded by a processor to perform the steps of the video playback method according to any one of claims 1 to 8.
HK42023072147.4A 2023-04-27 Video playing method, apparatus, and computer readable storage medium HK40083106B (en)

Publications (2)

Publication Number Publication Date
HK40083106A true HK40083106A (en) 2023-06-23
HK40083106B HK40083106B (en) 2025-02-07

Family

ID=

Similar Documents

Publication Publication Date Title
CN108391179B (en) Live broadcast data processing method and device, server, terminal and storage medium
US12356026B2 (en) Methods and systems for dynamic routing of content using a static playlist manifest
EP4184921B1 (en) Methods and systems for determining a video player playback position
US10826949B2 (en) Distributed control of media content item during webcast
JP5917508B2 (en) Method and apparatus for synchronizing paused playback across platforms
CN101415069B (en) A server and method for sending video played online
CN109168037B (en) Video playing method and device
US11778286B2 (en) Systems and methods for summarizing missed portions of storylines
CN112839238B (en) Screen projection playing method and device and storage medium
US10225319B2 (en) System and method of a link surfed http live streaming broadcasting system
JP5833114B2 (en) Method and apparatus for providing streaming media programs and targeted advertisements to be compatible with HTTP live streaming
US11647252B2 (en) Identification of elements in a group for dynamic element replacement
CN105979373A (en) Play method and device
CN110933460A (en) Video splicing method and device, and computer storage medium
CN110381383A (en) A kind of method and device generated based on mobile terminal interactive audiovisual
US20150268808A1 (en) Method, Device and System for Multi-Speed Playing
WO2016209400A1 (en) Optimized delivery of sequential content by skipping redundant segments
CN112311874A (en) Media data processing method and device, storage medium and electronic equipment
CN108156490B (en) Method, system and storage medium for playing back live television by using mobile terminal
CN115734033B (en) Video playing method, device and computer readable storage medium
HK40083106A (en) Video playing method, apparatus, and computer readable storage medium
CN117319696A (en) Live video playing control method and device
US20230262292A1 (en) Content playing method and system
CN103053170A (en) Systems And Methods To Provide Trick Play During Streaming Playback
KR20160056859A (en) Apparatus and method for displaying multimedia contents
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载