CN106878815B - Video playing method and device - Google Patents

Video playing method and device Download PDF

Info

Publication number
CN106878815B
CN106878815B CN201710139040.8A CN201710139040A CN106878815B CN 106878815 B CN106878815 B CN 106878815B CN 201710139040 A CN201710139040 A CN 201710139040A CN 106878815 B CN106878815 B CN 106878815B
Authority
CN
China
Prior art keywords
file
video
playing
terminal
sending
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710139040.8A
Other languages
Chinese (zh)
Other versions
CN106878815A (en
Inventor
陆世明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Visual Technology Co Ltd
Original Assignee
Qingdao Hisense Electronics 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 Qingdao Hisense Electronics Co Ltd filed Critical Qingdao Hisense Electronics Co Ltd
Priority to CN201710139040.8A priority Critical patent/CN106878815B/en
Publication of CN106878815A publication Critical patent/CN106878815A/en
Application granted granted Critical
Publication of CN106878815B publication Critical patent/CN106878815B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/458Scheduling content for creating a personalised stream, e.g. by combining a locally stored advertisement with an incoming stream; Updating operations, e.g. for OS modules ; time-related management operations
    • H04N21/4586Content update operation triggered locally, e.g. by comparing the version of software modules in a DVB carousel to the version stored locally
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/482End-user interface for program selection
    • H04N21/4825End-user interface for program selection using a list of items to be played back in a given order, e.g. playlists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols

Abstract

The invention provides a video playing method and device, wherein the video playing method comprises the steps of cutting a video file to be played according to an HLS protocol to obtain corresponding video segments, generating an M3U8 file comprising time length information, path information and a playing sequence of each video segment according to each video segment, wherein the playing sequence of the video segments in the M3U8 file is updated in a rolling mode regularly, and sending the M3U8 file to at least playing terminals.

Description

Video playing method and device
Technical Field
The invention relates to a video playing technology, in particular to a playing method and device of videos.
Background
With the development of network technology, the video carousel technology based on the network is rapidly developed, and is widely applied.
The video carousel system generally comprises servers and at least two playing terminals, wherein the servers cut programs to be played circularly according to a hypertext Live Streaming (HTTP Live Streaming, HLS for short) protocol to obtain Transport Stream (TS) files of a plurality of video segments, and regularly write indexes of partial TS files into M3U8 files according to a sequence of circular playing to achieve a Live playing effect.
Because the M3U8 file of the video carousel system only includes a small number of video segments of the program to be played, and is updated periodically, the updated M3U8 file deletes information of the played video segments, so that the playing terminal cannot acquire the total duration of the program to be played and related information of the played video segments, and further when the user wants to repeatedly play the video segments that have been played, the video segments that the user wants to repeatedly play cannot be determined according to the time shift instruction of the user, and similarly, the fast forward or fast reverse time shift function is not supported, and the user can only passively watch all the video segments. Therefore, the existing video carousel system can only realize live video of all the playing terminals, and cannot support the video time shifting function of part of the playing terminals while live video is broadcast.
Disclosure of Invention
The invention provides a method and a device for playing videos, which are used for solving the problems that the existing video carousel technology can only realize live video broadcast of all playing terminals and lacks of a video time shifting function.
, the invention provides a method for playing videos, which is applied to a server side and comprises the following steps:
cutting a video file to be played according to an HLS protocol to obtain a corresponding video segment;
generating an M3U8 file comprising duration information, path information and playing sequence of each video clip according to each video clip, wherein the playing sequence of the video clips in the M3U8 file is updated in a rolling mode at regular intervals;
and sending the M3U8 file to at least playing terminals.
The method for playing video, which transmits the M3U8 file to at least playback terminals, includes:
and after the playing sequence of the video clips in the M3U8 file is updated every time, sending the M3U8 file to each playing terminal.
The method for playing video, which transmits the M3U8 file to at least playback terminals, includes:
and when an M3U8 file updating request sent by an th play terminal is received, sending the M3U8 file to the th play terminal.
The method for playing the video, further comprising:
and at the preset updating moment, rotating the playing sequence of the video clips in the M3U8 file according to the preset updating number of the video clips.
The method for playing the video, further comprising:
receiving a video acquisition message sent by a second playing terminal, wherein the video acquisition message comprises path information of an th video clip;
and sending the th video clip to the second playing terminal.
In a second aspect, the present invention provides kinds of video playing devices, wherein the devices comprise:
the cutting unit is used for cutting the video file to be played according to the HLS protocol to obtain a corresponding video segment;
an M3U8 file generating unit, configured to generate an M3U8 file including duration information, path information, and a playing order of each video clip according to each video clip, and periodically scroll and update the playing order of the video clips in the M3U8 file;
and the sending unit is used for sending the M3U8 file to at least broadcasting terminals.
In the apparatus for playing back video as described above, the sending unit is further configured to send the M3U8 file to each of the playback terminals after updating the playback order of the video clips in the M3U8 file each time.
The apparatus for playing back video as described above, further comprising: a receiving unit;
the receiving unit is used for receiving an update request of an M3U8 file sent by an th playing terminal;
the sending unit is further configured to send the M3U8 file to the th playback terminal when the receiving unit receives the M3U8 file update request.
In the video playback apparatus as described above, the M3U8 file generating unit is specifically configured to,
and at the preset updating moment, rotating the playing sequence of the video clips in the M3U8 file according to the preset updating number of the video clips.
The apparatus for playing back video as described above, further comprising: a receiving unit;
the receiving unit is used for receiving a video acquisition message sent by a second playing terminal, wherein the video acquisition message comprises the path information of the th video clip;
the sending unit is further configured to send the th video clip to the second playback terminal when the receiving unit receives the video acquisition message.
The video playing method provided by the invention comprises the steps of cutting a video file to be played into corresponding video segments, generating an M3U8 file according to all the video segments, wherein the M3U8 file comprises duration information, path information and playing sequence of all the video segments, and then sending the M3U8 file to a plurality of playing terminals, so that the playing terminals can obtain the total duration information of the whole video file to be played. When the playing terminal receives a time shifting instruction input by a user, the skipped video clip can be determined according to the time shifting instruction and the total duration information, and then the skipped video clip is played, so that the time-shifted playing of the video clip is realized. Meanwhile, the server regularly updates the M3U8 file and changes the playing sequence of each video clip in the M3U8 file, so that a plurality of playing terminals receive the M3U8 file updated in real time and play the same video clip although the playing terminals access the playing system at different moments, and the video live broadcasting effect is guaranteed. According to the video playing method provided by the invention, the duration information, the path information and the playing sequence of all the video clips are stored in the M3U8 file, and the M3U8 file is updated regularly, so that the video carousel system can ensure the live video effect and simultaneously support the playing terminal to perform time-shifting playing according to the time-shifting instruction input by the user.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, is briefly introduced in the drawings required in the description of the embodiments or the prior art, it is obvious that the drawings in the following description are embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic view of an application scenario of a video playing method provided by the present invention;
fig. 2 is a schematic flowchart of an embodiment of a video playing method provided by the present invention;
fig. 3 is a schematic flowchart of a second embodiment of a video playing method provided by the present invention;
fig. 4 is a schematic structural diagram of an embodiment of a video playing apparatus provided by the present invention;
fig. 5 is a schematic structural diagram of a second embodiment of a video playing apparatus provided in the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete description of the technical solutions of the embodiments of the present invention will be given below with reference to the accompanying drawings of the embodiments of the present invention, and it is obvious that the described embodiments are partial embodiments of of the present invention, rather than all embodiments.
Fig. 1 is a schematic view of an application scenario of a video playing method provided by the present invention, as shown in fig. 1, a video carousel system generally includes servers 101 and at least playing terminals 102, where the server 101 is configured to cut a video file to be played according to an HLS protocol to obtain a plurality of TS files, generate an M3U8 file according to the TS files and a playing plan, and update the M3U8 file, the playing terminals 102 acquire the M3U8 file and play the video file according to a playing sequence in the M3U8 file, and the playing terminals 102 may specifically be a television, a computer, or the like equipped with a player.
For example, if there are three programs to be played in a loop: the server 101 divides the video files A, B and C according to an HLS protocol and the size of each video file to obtain four video fragments of a1.ts, a2.ts, a3.ts and a4.ts generated after the video files A are cut, three video fragments of b1.ts, b2.ts and b3.ts generated after the video files B are cut, three video fragments of c1.ts, c2.ts and c3.ts generated after the video files C are cut, and 10 video fragments are generated by A, B, C video files.
The existing video carousel method can be exemplified by that, when the preset playing sequence is A, B, C three video files are played in a loop, the server 101 usually only stores 3 video segments in the M3U8 file, and periodically updates the video segments in the M3U8 file, assuming that the content contains three video segments of a1.ts, a2.ts and a3.ts when times of update in the M3U8 file, the content becomes a2.ts, a3.ts and a4.ts after the second update, then times of update are carried out to a3.ts, a4.ts and b1.ts … …, and so on, when the n time of update, the content in the M3U8 file is c1.ts, c3.ts and c3.ts, and n +1 times of update are carried out to M3U8 file after n +1 times of update, c2.ts, c3.ts and a1.ts, so that new loop update is started, and the video segments can be played in a multi-play system after n +1 times of update, even if the terminal 102 is opened, the video segments can be played in a multi-play effect is different from that of the terminal 583.
The content update cycle in the M3U8 file is shown in the table below. Wherein n is a positive integer greater than 1.
As shown in the above table, in the existing video carousel method, the content in the M3U8 file only includes a small number of video segments, and lacks information related to the total duration of the video to be played, so that the time shift function cannot be implemented, and meanwhile, when a user wants to repeatedly play a video segment that has been played once, since the M3U8 file has deleted the index information of the video segment, the implementation of the time shift function is also affected, so that the existing video carousel method cannot implement the time shift function.
In order to solve the above problems, the aspect of the present invention provides video playing methods, and the following embodiments are used to describe the video playing methods provided by the present invention in detail.
Fig. 2 is a schematic flowchart of an embodiment of a video playing method provided by the present invention, where an execution subject of the method is the server 101 shown in fig. 1, the apparatus may be implemented by software or hardware, and the apparatus may be integrated in the server or may be the server, and the present invention is not limited to this.
S201, cutting a video file to be played according to an HLS protocol to obtain a corresponding video segment;
s202, generating an M3U8 file comprising duration information, path information and a playing sequence of each video clip according to each video clip, wherein the playing sequence of the video clips in the M3U8 file is updated in a rolling mode at regular intervals;
s203, sending the M3U8 file to at least playing terminals.
Specifically, in S201, the server cuts at least video files to be played according to the HLS protocol to obtain video segments corresponding to at least video files to be played, for example, the video files to be played may be a plurality of notification video files that need to be played repeatedly.
When there are only video files to be played and the video files do not need to be cut according to the HLS protocol, M3U8 files can be directly generated according to the indexes of the video files for each playing terminal to access.
Specifically, in S202, the server generates an M3U8 file according to all the video segments obtained by cutting in S201, the M3U8 file includes the duration information, the path information, and the playing sequence of each video segment, for example, the M3U8 file lists the index of each video segment according to the playing sequence, the index may specifically be the path information of the storage address of the video segment in the server, and may also be the network path information of the video segment in other network memories, optionally, the playing sequence of each video segment in the M3U8 file may specifically be the arranging sequence of the path information of each video segment in the M3U8 file, when the playing terminal reads the M3U8 file, the playing starts from the th video segment in the M3U8 file according to the convention, and the playing is automatically performed one by one, so that the effect that all the playing terminals simultaneously display the content reported by the same can be realized.
Specifically, after the server generates the M3U8 file, the server may periodically update the M3U8 file according to the size and duration information of each video clip in the M3U8 file, specifically, after the th video clip in the M3U8 file starts playing but before the video clip ends playing, the M3U8 file may be updated, so that the original second video clip becomes the th video clip to be played, and the original th video clip becomes the last video clip to be played.
For example, still taking A, B, C three video files as an example, in the video playing method provided by the present invention, the content of the M3U8 file generated by the server includes a1.ts, a2.ts, a3.ts, a4.ts, b1.ts, b2.ts, b3.ts, c1.ts, c2.ts, and c3.ts at th update, all video segments are changed into a2.ts, a3.ts, a4.ts … … c2.ts, c3.ts, and a1.ts after the second update, and then updates are performed into a3.ts, a4.ts … … c2.ts, c3.ts, a1.ts, and a2. by analogy, the update cycle of the M3U8 file is as shown in the following table.
Figure BDA0001242256630000071
Optionally, implementations of the server updating the M3U8 file are as follows:
and at the preset updating moment, rotating the playing sequence of the video clips in the M3U8 file according to the preset updating number of the video clips.
Specifically, a preset update period or a plurality of preset update times may be set, and the server may detect the update times according to the update period. At the update time, the server updates the playing order of the video clips in the M3U8 file in a round-robin fashion as shown in the above table.
By storing all the video clips in the M3U8 file, the playing terminal can acquire the time information of all the video files to be played after acquiring the M3U8 file, so that the time shifting can be realized by using a jump instruction in the existing playing software when the playing terminal receives a time shifting instruction input by a user. The specific time-shift implementation is not limiting of the invention.
Specifically, in S203, after the server generates the M3U8 file, the server sends the M3U8 file to at least playback terminals, the server may send the M3U8 file to all the playback terminals in the list according to the list of the playback terminals stored in the server itself, and since the M3U8 file includes information of all the video files to be played, the playback terminals may further obtain time information of all the videos to be played when receiving the M3U8 file, so that the playback terminals may play the video files when receiving the M3U8 file, and implement time-shift playback of the video segments according to the received time-shift instruction.
The video playing method provided by the invention comprises the steps of cutting a video file to be played into a plurality of video segments, generating an M3U8 file according to all the video segments, wherein the M3U8 file comprises duration information, path information and playing sequence of all the video segments, and then sending the M3U8 file to a plurality of playing terminals, so that the playing terminals can acquire the total duration information of the whole video file to be played. When the playing terminal receives a time shifting instruction input by a user, the skipped video clip can be determined according to the time shifting instruction and the total duration information, and then the skipped video clip is played, so that the time-shifted playing of the video clip is realized. Meanwhile, the server regularly updates the M3U8 file and changes the playing sequence of each video clip in the M3U8 file, so that a plurality of playing terminals receive the M3U8 file updated in real time and play the same video clip although the playing terminals access the playing system at different moments, and the video live broadcasting effect is guaranteed. According to the video playing method provided by the invention, the duration information, the path information and the playing sequence of all the video clips are stored in the M3U8 file, and the M3U8 file is updated regularly, so that the video carousel system can ensure the live video effect and simultaneously support the playing terminal to perform time-shifting playing according to the time-shifting instruction input by the user.
The manner of transmitting the M3U8 file to at least cast terminals in S203 will be described in detail below in conjunction with the embodiment shown in fig. 2.
possible implementations:
after the playing sequence of the video clips in the M3U8 file is updated every time, the M3U8 file is sent to each playing terminal.
Specifically, after each time the M3U8 file is updated, the server sends the updated M3U8 file to each cast terminals.
Another possible implementations:
and when an M3U8 file updating request sent by the th playing terminal is received, sending the M3U8 file to the th playing terminal.
Specifically, after updating the M3U8 file each time, the server does not actively send the updated M3U8 file to every playback terminals, but when playback terminals exist and actively send an M3U8 file update request to the server, the server sends the M3U8 file to a playback terminal, for example, the playback terminal is a playback terminal that is added to the playback system for the first time.
Specifically, when the terminal does not receive the time shift command input by the user, the terminal may receive the M3U8 file periodically transmitted by the server, or may periodically request the server for an updated M3U8 file.
For example, if the play terminal receives a time shift instruction input by a user, the play terminal stops updating the M3U8 file and performs circular play of video clips according to sequence information of the video clips in the existing M3U8 file. The play terminal may restart to actively request the server for the updated M3U8 file when receiving an update instruction or restart input by the user.
Optionally, on the basis of the embodiment shown in fig. 2, after sending the M3U8 file to the user, the method further includes:
receiving a video acquisition message sent by a second playing terminal, wherein the video acquisition message comprises path information of an th video clip;
and sending th video clip to the second play terminal.
Specifically, the second playing terminal is any playing terminals in the playing system, when the second playing terminal reads the video clip in the M3U8 file for playing after acquiring the M3U8 file, the playing terminal needs to send a video acquisition message to the server because the M3U8 file only contains the path information of the video clip, and the video acquisition message contains the path information of the -th video clip that the second playing terminal plans to play.
Fig. 3 is a schematic flow chart of a second embodiment of the video playing method provided by the present invention, an execution main body of the method is the playing terminal 102 shown in fig. 1, the playing terminal 102 may be implemented by software or hardware, the apparatus may be integrated in a device having a real function, such as a television, a computer, and the like, and the method is not limited to this, as shown in fig. 3, and the method includes:
s301, a time shifting instruction is obtained, and the time shifting instruction indicates the time to be played in the video;
s302, determining a frame to be played corresponding to the moment to be played according to the moment to be played and a pre-obtained M3U8 file, wherein the M3U8 file comprises duration information, path information and a playing sequence of at least two video clips;
s303, according to the path information corresponding to the th video clip to which the frame to be played belongs, the th video clip is obtained, and the th video clip is played from the frame to be played of the th video clip.
Specifically, in S301, the playing terminal receives a time shift instruction input by a user, where the time shift instruction is used to indicate a time to be played in the video, where the specific time shift instruction includes a time shift time, and the time shift time may specifically be information of a specified time point to which time is required to be shifted, and may also be information of a time period to be shifted forward, and the playing terminal may further define that only forward time shift or backward time shift is supported .
Specifically, in S302, the playing terminal acquires a frame to be played corresponding to a time to be played according to a time shift instruction and a pre-acquired M3U8 file, exemplarily, the playing terminal can integrate all video clips in the M3U8 file and the playing sequence of each video clip to obtain a video file to be played, and can acquire the whole time information of all the video clips in the M3U8 file according to the video file, so as to perform time shift in the video file according to the time shift instruction, exemplarily, the playing terminal acquires the mapping relation between each time point in the total time length of all the video clips and each frame image in each video clip according to the time length information and the playing sequence of each video clip in the M3U8 file, and determines the frame to be played corresponding to the time to be played according to the time to be played and the mapping relation.
When the playing terminal receives a time shifting instruction input by a user, a player of the playing terminal can determine a frame to be played corresponding to the time shifting instruction by adopting a jump function of the player, wherein the frame to be played is a video starting point required to be played by the user. The M3U8 file is the same as the M3U8 file in the embodiment shown in fig. 2, and is the latest M3U8 file that the playback terminal acquires from the server before receiving the time shift instruction.
Specifically, in S303, the playing terminal acquires a th video segment according to the path information corresponding to the th video segment to which the frame to be played belongs, and starts to play the th video segment from the th video segment to be played, for example, a video acquisition message may be sent to the server for the playing terminal, where the video acquisition message includes th path information of a th video segment, so that the server sends the th video segment to the playing terminal after acquiring the th video segment according to the th path information.
Optionally, on the basis of the embodiment shown in fig. 3, before the receiving, by the play terminal, the method further includes:
acquiring an M3U8 file;
and acquiring the video clips according to the path information and the playing sequence in the M3U8 file for playing.
Specifically, before the playing terminal receives a time shift instruction input by a user, the playing terminal acquires an M3U8 file, for example, the playing terminal may request the server to update an M3U8 file at regular intervals according to , or the server may periodically send an updated M3U8 file to the playing terminal, after receiving the updated M3U8 file, the playing terminal automatically acquires and plays video clips according to path information and a playing sequence in the updated M3U8 file.
Optionally, after the playing terminal receives the time shift instruction input by the user, the playing terminal deletes the updated M3U8 file after receiving the updated M3U8 file actively sent by the server.
In another aspect, the present invention further provides a playing apparatus kinds of videos, configured to execute the method for playing a video corresponding to the embodiment shown in fig. 2, where fig. 4 is a schematic structural diagram of an embodiment of the playing apparatus for videos provided by the present invention, and as shown in fig. 4, the playing apparatus includes:
the cutting unit 401 is configured to cut a video file to be played according to an HLS protocol to obtain a corresponding video segment;
an M3U8 file generating unit 402, configured to generate an M3U8 file including duration information, path information, and playing order of each video clip according to each video clip, and periodically scroll and update the playing order of the video clips in the M3U8 file;
a sending unit 403, configured to send the M3U8 file to at least cast terminals.
Optionally, on the basis of the embodiment shown in fig. 4, the sending unit 403 is further configured to send the M3U8 file to each of the playback terminals after updating the playback order of the video clips in the M3U8 file each time.
Optionally, on the basis of the embodiment shown in fig. 4, fig. 5 is a schematic structural diagram of a second embodiment of a video playing apparatus provided by the present invention. As shown in fig. 5, the video playing apparatus further includes: a receiving unit 404;
the receiving unit 404 is configured to receive an M3U8 file update request sent by an th cast terminal;
the sending unit 403 is further configured to send the M3U8 file to the th cast terminal when the receiving unit receives the M3U8 file update request.
Optionally, on the basis of any embodiment described above, the M3U8 file generating unit 402 is specifically configured to rotate, at a preset update time, the playing order of the video clips in the M3U8 file according to the preset update number of the video clips.
Optionally, on the basis of the embodiment shown in fig. 5, the receiving unit 404 is further configured to receive a video obtaining message sent by the second display terminal, where the video obtaining message includes path information of the th video clip;
the sending unit 403 is further configured to send th video clip to the second playback terminal when the receiving unit receives the video acquisition message.
It will be understood by those skilled in the art that all or a portion of the steps of implementing the various method embodiments described above may be performed by hardware associated with program instructions, and that the program may be stored in a computer readable storage medium, which when executed performs the steps comprising the various method embodiments described above, including ROM, RAM, magnetic or optical disks, among various media capable of storing program code.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1, A method for playing video, said method comprising:
cutting a video file to be played according to an HLS protocol to obtain a corresponding video segment;
generating an M3U8 file comprising duration information, path information and playing sequence of each video clip according to each video clip, wherein the playing sequence of the video clips in the M3U8 file is updated in a rolling mode at regular intervals;
sending the M3U8 file to at least playing terminals;
and at the preset updating moment, rotating the playing sequence of the video clips in the M3U8 file according to the preset updating number of the video clips.
2. The method of claim 1, wherein the sending the M3U8 file to at least cast terminals comprises:
and after the playing sequence of the video clips in the M3U8 file is updated every time, sending the M3U8 file to each playing terminal.
3. The method of claim 1, wherein the sending the M3U8 file to at least cast terminals comprises:
and when an M3U8 file updating request sent by an th play terminal is received, sending the M3U8 file to the th play terminal.
4. The method of any of , wherein the method further comprises:
receiving a video acquisition message sent by a second playing terminal, wherein the video acquisition message comprises path information of an th video clip;
and sending the th video clip to the second playing terminal.
A playback apparatus for videos, comprising:
the cutting unit is used for cutting the video file to be played according to the HLS protocol to obtain a corresponding video segment;
an M3U8 file generating unit, configured to generate an M3U8 file including duration information, path information, and a playing order of each video clip according to each video clip, and periodically scroll and update the playing order of the video clips in the M3U8 file;
a sending unit, configured to send the M3U8 file to at least playback terminals;
the M3U8 file generating unit is specifically configured to, at a preset update time, rotate a playing sequence of the video clips in the M3U8 file according to a preset number of updated video clips.
6. The apparatus according to claim 5, wherein the sending unit is further configured to send the M3U8 file to each of the playback terminals after updating the playback order of the video clips in the M3U8 file each time.
7. The apparatus of claim 5, further comprising: a receiving unit;
the receiving unit is used for receiving an update request of an M3U8 file sent by an th playing terminal;
the sending unit is further configured to send the M3U8 file to the th playback terminal when the receiving unit receives the M3U8 file update request.
8. The device of claim 7, wherein the receiving unit is further configured to receive a video acquisition message sent by a second display terminal, and the video acquisition message includes path information of a th video clip;
the sending unit is further configured to send the th video clip to the second playback terminal when the receiving unit receives the video acquisition message.
CN201710139040.8A 2017-03-09 2017-03-09 Video playing method and device Active CN106878815B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710139040.8A CN106878815B (en) 2017-03-09 2017-03-09 Video playing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710139040.8A CN106878815B (en) 2017-03-09 2017-03-09 Video playing method and device

Publications (2)

Publication Number Publication Date
CN106878815A CN106878815A (en) 2017-06-20
CN106878815B true CN106878815B (en) 2020-01-31

Family

ID=59171249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710139040.8A Active CN106878815B (en) 2017-03-09 2017-03-09 Video playing method and device

Country Status (1)

Country Link
CN (1) CN106878815B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107864382B (en) * 2017-10-24 2018-10-09 广东省南方数字电视无线传播有限公司 Video broadcasting method, device and system
CN109274982B (en) * 2018-09-30 2021-01-01 武汉斗鱼网络科技有限公司 Video carousel method and device, computer equipment and storage medium
CN109756757B (en) * 2019-03-21 2021-07-13 北京数码视讯软件技术发展有限公司 Live broadcast data processing method and device, live broadcast method and device and live broadcast server
CN112995770B (en) * 2019-12-02 2023-03-24 深圳市雅阅科技有限公司 Video playing method and device, storage medium and computer equipment
CN112381002B (en) * 2020-11-16 2023-08-15 深圳技术大学 Human body risk posture recognition method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685263A (en) * 2013-12-06 2014-03-26 乐视致新电子科技(天津)有限公司 Method, server and system for broadcasting media resources in turn
CN104469433A (en) * 2013-09-13 2015-03-25 深圳市腾讯计算机系统有限公司 Live video replay method and device
CN105744309A (en) * 2014-12-12 2016-07-06 中兴通讯股份有限公司 Method, device and system for generating and playing, and terminal
CN105898527A (en) * 2015-11-18 2016-08-24 乐视网信息技术(北京)股份有限公司 Advertisement video splicing method and video server
CN106331789A (en) * 2016-09-13 2017-01-11 聚好看科技股份有限公司 Carousel program playing control method and carousel program playing control device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8849095B2 (en) * 2011-07-26 2014-09-30 Ooyala, Inc. Goal-based video delivery system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104469433A (en) * 2013-09-13 2015-03-25 深圳市腾讯计算机系统有限公司 Live video replay method and device
CN103685263A (en) * 2013-12-06 2014-03-26 乐视致新电子科技(天津)有限公司 Method, server and system for broadcasting media resources in turn
CN105744309A (en) * 2014-12-12 2016-07-06 中兴通讯股份有限公司 Method, device and system for generating and playing, and terminal
CN105898527A (en) * 2015-11-18 2016-08-24 乐视网信息技术(北京)股份有限公司 Advertisement video splicing method and video server
CN106331789A (en) * 2016-09-13 2017-01-11 聚好看科技股份有限公司 Carousel program playing control method and carousel program playing control device

Also Published As

Publication number Publication date
CN106878815A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN106878815B (en) Video playing method and device
EP3120569B1 (en) Manifest re-assembler for a streaming video channel
US9077956B1 (en) Scene identification
US9253533B1 (en) Scene identification
JP5824465B2 (en) Method and apparatus for adaptation in HTTP streaming
JP5917508B2 (en) Method and apparatus for synchronizing paused playback across platforms
JP5979483B2 (en) Content reproduction apparatus, content reproduction system, and content reproduction method
JP2013021574A (en) Generation device, distribution server, generation method, reproduction device, reproduction method, reproduction system, generation program, reproduction program, recording medium, and data structure
WO2017092327A1 (en) Playing method and apparatus
JP2010166335A (en) System for starting broadcast type application
RU2012145099A (en) CONTENT PLAYBACK DEVICE, MANAGEMENT INFORMATION SERVER AND CONTENT PLAYBACK SYSTEM
CN107920258B (en) Data processing method and device
CN106331089A (en) Video play control method and system
CN113727199A (en) HLS slice rapid playing starting method
US10609105B2 (en) System and method for streaming music on mobile devices
US20170013037A1 (en) Media fragment rotation method, client and system
CN114025199A (en) Live video editing method, device and system
WO2017076009A1 (en) Program watch-back method, player and terminal
EP3085105A2 (en) Multiple views recording
CN111010620A (en) Method and device for multimedia resource carousel, electronic equipment and storage medium
US20180324480A1 (en) Client and Method for Playing a Sequence of Video Streams, and Corresponding Server and Computer Program Product
KR101397183B1 (en) Method and apparatus for managing playlist file in streaming service
WO2012094992A1 (en) Method and system for data acquisition
CN114500476A (en) Multimedia playing method and device and computer readable storage medium
CN106302465B (en) A kind of method and device of playing audio-video data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Patentee after: Hisense Video Technology Co.,Ltd.

Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Patentee before: HISENSE ELECTRIC Co.,Ltd.

CP01 Change in the name or title of a patent holder