CN115802118A - Time-shifting review method and device for live video - Google Patents

Time-shifting review method and device for live video Download PDF

Info

Publication number
CN115802118A
CN115802118A CN202211467466.3A CN202211467466A CN115802118A CN 115802118 A CN115802118 A CN 115802118A CN 202211467466 A CN202211467466 A CN 202211467466A CN 115802118 A CN115802118 A CN 115802118A
Authority
CN
China
Prior art keywords
video
time
index file
review
metadata
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211467466.3A
Other languages
Chinese (zh)
Inventor
张俊勤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202211467466.3A priority Critical patent/CN115802118A/en
Publication of CN115802118A publication Critical patent/CN115802118A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a time-shifting review method and device for live videos. One embodiment of the method comprises: acquiring a time-shifting review request for a live video, wherein the time-shifting review request is used for requesting the time-shifting video after a specified time point in the live video or requesting the review video in a specified time period in the live video; according to the time-shifting review request, determining a target index file corresponding to the time-shifting video from index files corresponding to the live video, or reviewing a target index file corresponding to the video, wherein the index files represent metadata of a slice video corresponding to the live video; and determining and playing the time-shifted video or the review video according to the target index file. According to the method and the device, the target index files corresponding to the time-shifted video and the review video are dynamically generated based on the index files corresponding to the live video, so that the time-shifted review function of the live video is realized, the controllability of a user on the live video is improved, and the experience of the user is improved.

Description

Time-shifting review method and device for live video
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a live broadcast technology, and in particular relates to a time-shifting review method and device for live broadcast video, a computer readable medium and electronic equipment.
Background
Currently, a large number of clients (such as a radio and television client, an education platform client and a live platform client) have a time-shift review requirement in a video live broadcast process. The time-shift review requirements can be specifically categorized into two types: one is that the user provides a start time and an end time to view a part of the Live video between the start time and the end time, which is technically implemented as HLS (HTTP Live Streaming, HTTP-based adaptive bitrate Streaming protocol) on-demand, i.e., review; another category is that the user only provides a start time or time shift duration to view a part of the live video after the start time, technically implemented as HLS live, i.e. time shifted.
Disclosure of Invention
The embodiment of the application provides a time-shifting review method and device for live video, a computer readable medium and electronic equipment.
In a first aspect, an embodiment of the present application provides a time-shifted review method for a live video, including: acquiring a time-shifting review request for a live video, wherein the time-shifting review request is used for requesting the time-shifting video after a specified time point in the live video or requesting the review video in a specified time period in the live video; according to the time-shifting review request, determining a target index file corresponding to the time-shifting video from index files corresponding to the live video, or reviewing a target index file corresponding to the video, wherein the index files represent metadata of a slice video corresponding to the live video; and determining and playing the time-shifted video or the review video according to the target index file.
In some examples, the determining, according to the time-shift review request, a target index file corresponding to the time-shift video from index files corresponding to live videos includes: according to the appointed time point in the time-shifting review request, determining metadata of an initial slice video corresponding to the time-shifting video from an index file corresponding to the live video; the method comprises the steps that an initial target index file comprising a plurality of metadata is gradually determined from an index file corresponding to a live video according to the time sequence of a slice video from the metadata of an initial slice video; and naming each index file in the obtained plurality of initial target index files as a target index file which uniquely corresponds to the target user sending the time-shifting look-back request based on a preset naming rule.
In some examples, the determining and playing the time-shifted video according to the target index file includes: sending the plurality of target index files to playing equipment corresponding to a target user; and determining and sequentially playing the slice videos in the time-shifting videos according to the plurality of target index files through the playing equipment.
In some examples, the step of determining, starting from the metadata of the start slice video and in a time sequence of the slice video, an initial target index file including a plurality of metadata from an index file corresponding to the live video includes: and circularly executing the following determination operations until the metadata of the last slice video corresponding to the live video: and determining an initial target index file comprising a plurality of metadata according to a preset target duration and the playing duration of a slice video corresponding to each metadata from the first metadata, wherein the first metadata corresponding to the first determination operation is the metadata of the initial slice video, and the first metadata corresponding to the subsequent determination operation is the first metadata after the plurality of metadata corresponding to the last determination operation in the index file corresponding to the live video.
In some examples, the determining, according to the time-shift review request, a target index file corresponding to the review video from index files corresponding to live videos includes: according to the specified time period in the time-shifting review request, determining an initial target index file corresponding to the review video from the index files corresponding to the live video; and naming the initial target index file as a target index file which uniquely corresponds to the target user who sends the time-shift review request based on a preset naming rule.
In some examples, the determining and playing the review video according to the target index file includes: sending the target index file to playing equipment corresponding to a target user; and determining and sequentially playing the slice videos in the review videos according to the target index file through the playing equipment.
In some examples, before determining, according to the time-shift review request, a target index file corresponding to the time-shift video from index files corresponding to live videos or a target index file corresponding to review videos, the method further includes: slicing the live video to obtain a plurality of sliced videos; and generating at least one index file corresponding to the live video by taking the preset time length as a unit based on the metadata corresponding to the plurality of slice videos, wherein the length of all the slice videos corresponding to each index file in the at least one index file is the preset time length.
In some examples, the method further comprises: and determining metadata corresponding to the plurality of slice videos according to a preset custom tag.
In a second aspect, an embodiment of the present application provides a time-shift review device for live video, including: the device comprises an acquisition unit, a display unit and a display unit, wherein the acquisition unit is configured to acquire a time-shifting review request for a live video, wherein the time-shifting review request is used for requesting the time-shifting video after a specified time point in the live video or requesting the review video within a specified time period in the live video; the first determining unit is configured to determine a target index file corresponding to the time-shifted video or a target index file corresponding to the review video from index files corresponding to the live video according to the time-shifted review request, wherein the index files represent metadata of slice videos corresponding to the live video; and the second determining unit is configured to determine and play the time-shifted video or the review video according to the target index file.
In some examples, the first determining unit is further configured to: according to the appointed time point in the time-shifting review request, determining metadata of an initial slice video corresponding to the time-shifting video from an index file corresponding to the live video; the method comprises the steps that an initial target index file comprising a plurality of metadata is gradually determined from an index file corresponding to a live video according to the time sequence of a slice video from the metadata of an initial slice video; and naming each index file in the obtained plurality of initial target index files as a target index file which uniquely corresponds to the target user sending the time-shifting look-back request based on a preset naming rule.
In some examples, the second determining unit is further configured to: sending the plurality of target index files to playing equipment corresponding to a target user; and determining and sequentially playing the slice videos in the time-shifting videos according to the plurality of target index files through the playing equipment.
In some examples, the first determining unit is further configured to: and circularly executing the following determination operations until the metadata of the last slice video corresponding to the live video: and determining an initial target index file comprising a plurality of metadata according to a preset target duration and the playing duration of a slice video corresponding to each metadata starting from the first metadata, wherein the first metadata corresponding to the first determination operation is the metadata of the initial slice video, and the first metadata corresponding to the subsequent determination operation is the first metadata after the plurality of metadata corresponding to the last determination operation in the index file corresponding to the live video.
In some examples, the first determining unit is further configured to: according to the specified time period in the time-shifting review request, determining an initial target index file corresponding to the review video from the index files corresponding to the live video; and naming the initial target index file as a target index file which only corresponds to the target user sending the time-shift look-back request based on a preset naming rule.
In some examples, the second determining unit is further configured to: sending the target index file to playing equipment corresponding to a target user; and determining and sequentially playing the slice videos in the review videos according to the target index file through the playing equipment.
In some examples, the apparatus further comprises: the slicing unit is configured to slice the live video to obtain a plurality of sliced videos; the generating unit is configured to generate at least one index file corresponding to the live video in units of a preset time length based on metadata corresponding to each of the plurality of slice videos, wherein the length of all the slice videos corresponding to each of the at least one index file is the preset time length.
In some examples, the apparatus further comprises: and the third determining unit is configured to determine the metadata corresponding to each of the plurality of slice videos according to a preset custom tag.
In a third aspect, the present application provides a computer-readable medium, on which a computer program is stored, where the program, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement a method as described in any implementation of the first aspect.
According to the time-shifting review method and the time-shifting review device for the live video, the time-shifting review request for the live video is acquired, wherein the time-shifting review request is used for requesting the time-shifting video after a specified time point in the live video or requesting the review video in a specified time period in the live video; according to the time-shifting review request, determining a target index file corresponding to the time-shifting video or a target index file corresponding to the review video from index files corresponding to the live video, wherein the index files represent metadata of a slice video corresponding to the live video; and determining and playing the time-shifted video or the review video according to the target index file, so that the target index files corresponding to the time-shifted video and the review video are dynamically generated based on the index file corresponding to the live video, the time-shifted review function of the live video is realized, the controllability of the user on the live video is improved, and the experience of the user is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a time-shifted review method of live video according to the present application;
fig. 3 is a schematic diagram of an application scene of a time-shift review method of live video according to the present embodiment;
FIG. 4 is a flow diagram of yet another embodiment of a time-shifted review method of live video according to the present application;
FIG. 5 is a block diagram of one embodiment of a time-shifted review device for live video according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not to be construed as limiting the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 shows an exemplary architecture 100 to which the live video time-shift review method and apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The communication connections between the terminal devices 101, 102, 103 form a topological network, and the network 104 serves to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may use the terminal devices 101, 102, 103 to interact with the server 105 over the network 104 to receive or transmit data or the like. The terminal devices 101, 102, 103 may be hardware devices or software that support network connections for data interaction and data processing. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices supporting network connection, information acquisition, interaction, display, processing, and the like, including but not limited to smart phones, tablet computers, e-book readers, laptop portable computers, desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It may be implemented, for example, as multiple software or software modules for providing distributed services, or as a single software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, for example, a background processing server that determines a requested time-shifted video, a review video, in response to receiving a time-shift review request issued by the terminal apparatus 101, 102, 103. As an example, the server 105 may be a cloud server.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster composed of multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. And is not particularly limited herein.
It should be further noted that the time-shift review method for live videos provided by the embodiments of the present application may be executed by a server, may also be executed by a terminal device, and may also be executed by the server and the terminal device in cooperation with each other. Accordingly, each part (for example, each unit) included in the time-shift review device for live video may be entirely disposed in the server, may be entirely disposed in the terminal device, and may be disposed in the server and the terminal device, respectively.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. When the electronic device on which the time-shift review method of the live video is executed does not need to perform data transmission with other electronic devices, the system architecture may only include the electronic device (e.g., a server or a terminal device) on which the time-shift review method of the live video is executed.
With continued reference to fig. 2, a flow 200 of one embodiment of a time-shifted review method of live video is shown, comprising the steps of:
step 201, a time-shifted review request for a live video is obtained.
In this embodiment, an execution subject (for example, a terminal device or a server in fig. 1) of the time-shift review method for a live video may obtain a time-shift review request for the live video. The time-shifting review request is used for requesting a time-shifting video after a specified time point in the live video or requesting a review video in a specified time period in the live video.
And in the process of watching the live video through the terminal equipment, the user sends a time-shifting review request to the execution main body in a specified mode. The designated manner includes, but is not limited to, a preset action and a preset voice. The preset action may be, for example, a manner of dragging a play progress bar of a live video displayed in the terminal device, or a manner of filling a designated time point or a designated time period in a designated interface.
For a single user, a time-shifted review request is referred to as a time-shifted request or a review request. When the request acquired by the execution main body is a time shift request, a specified time point can be determined from the time shift request, and the time shift request is used for requesting a time shift video after the specified time point in the live video. The user can determine the designated time point by providing the designated time point or providing the time shifting duration. It should be noted that, in the time-shift scenario, the time-shift video starts from the specified time point, and continues to be updated backwards until the live video ends, or the user makes a further operation instruction (e.g., another time-shift request).
As an example, the current time is 10.
When the request acquired by the execution main body is a review request, a specified time period can be determined from the review request, and the review request is used for requesting a review video in the specified time period in the live video. Wherein, the user can determine the designated time period by providing the starting time and the ending time.
Step 202, according to the time-shifting review request, determining a target index file corresponding to the time-shifting video from the index files corresponding to the live video, or determining a target index file corresponding to the review video.
In this embodiment, the execution main body may determine, according to the time-shift review request, a target index file corresponding to the time-shift video from index files corresponding to live videos, or determine a target index file corresponding to review videos. The index file represents metadata of a slice video corresponding to the live video.
The live streaming slicing tool can acquire live videos in real time, and outputs live streaming sliced videos meeting HLS specifications through online real-time segmentation. The live streaming slicing tool generally receives a TS (Transport Stream) Stream output from an encoder or other systems through a UDP (User Datagram Protocol) Protocol, and slices the TS Stream into small files (slice videos) having a fixed play length in real time. These small files, separated from the continuous live stream (live video), have a tight continuity in the playout structure and can be seamlessly re-packaged to meet HLS playout requirements.
The metadata of the slice video includes TS information and storage location information of the slice video, wherein the TS information includes, but is not limited to, information such as a size of the slice video, a time stamp (e.g., start time, end time, play time length), and the like.
For split videos split from a live video, an index file may be generated based on metadata for each split video. The index file is continuously updated along with continuous generation of a slice video corresponding to a new video generated in the live broadcast process so as to meet the requirements of HLS live broadcast specifications. The index file may be, for example, an M3U8 file. m3u8 is a video playing standard introduced by apple, which is one of m3u, except that UTF-8 is adopted as an encoding format.
In this embodiment, for the time shift requirement, the execution main body first determines a specified time point from the time shift look-back request; then, the metadata corresponding to the slice video from the specified time point can be determined from the index file corresponding to the live video, and a target index file corresponding to the time-shifted video is generated. In the time-shifting scene, the technology is HLS live broadcast, and only migration is carried out forward in time. The execution main body can continuously update the metadata of the slice video corresponding to the current time in the target index file along with the time continuation in a live broadcast mode, so that the time-shifted video in the time-shifted scene meets the requirement of an HLS live broadcast specification.
In this embodiment, for the review requirement, the execution main body first determines a specified time period from the time-shift review request; and further determining metadata corresponding to all slice videos in a specified time period from index files corresponding to the live videos, and generating target index files corresponding to the time-shifted videos.
In some optional implementations of this embodiment, for the time shift requirement, the executing main body may execute the step 202 by:
firstly, according to the appointed time point in the time-shifting review request, determining the metadata of the start slice video corresponding to the time-shifting video from the index file corresponding to the live video.
The execution main body can compare the time information of the slice video with the specified time point, take the metadata to which the time information matched with the specified time point belongs as the metadata of the start slice video corresponding to the time shift video, and take the slice video corresponding to the time information matched with the specified time point as the start slice video corresponding to the time shift video.
And secondly, gradually determining an initial target index file comprising a plurality of metadata from the index file corresponding to the live video according to the time sequence of the slice video from the metadata of the initial slice video.
The index file corresponding to the live video comprises a metadata list, and the metadata in the metadata list is stored according to the time sequence of the corresponding slice video.
As an example, the execution body may generate an initial target index file based on a specified amount of metadata. Taking the specified number as 3 as an example, the index file corresponding to the live video includes a plurality of metadata, the metadata are sequentially sorted according to natural numbers according to the time sequence of the slice video, and the sequence number of the metadata of the start slice video is 60, the execution main body may store the metadata of sequence numbers 60 to 62 in an initial target index file, store the metadata of sequence numbers 63 to 65 in an initial target index file, and store the metadata of sequence numbers 66 to 68 in an initial target index file until the last metadata corresponding to the live video.
Thirdly, each of the obtained plurality of initial target index files is named as a target index file which uniquely corresponds to a target user who sends a time-shift review request based on a preset naming rule.
Considering that there may be a case where there are multiple live breaks in the time period in which the user is time-shifted, that is, a case where the sliced video cannot be found within a certain period of time, it is necessary to maintain a session for each live viewer to record the position of the last viewed sliced video. Considering that all users do not have the permission to open cookies, in the implementation manner, each of the obtained multiple initial target index files is named as a target index file which uniquely corresponds to a target user who sends a time-shifting review request, so that the last watching position of each live viewer can be accurately recorded, and meanwhile, the number of people of the HLS viewers can be accurately counted; the perfect concatenation is also possible for the case of multiple interruptions during time shifting.
As an example, the preset naming rule is shown in the following table:
Figure BDA0003956891990000101
in this implementation manner, for the time shift requirement of the user, the execution subject continuously updates the target index file in the time shift scenario and names the target index file as the target index file uniquely corresponding to the target user who sends the time shift review request, so that the time shift requirement of each live broadcast user can be met, and the experience of the live broadcast user in the time shift scenario is further improved.
In some optional implementations of this embodiment, the executing body may execute the second step by:
and circularly executing the following determination operations until the metadata of the last slice video corresponding to the live video: and determining an initial target index file comprising a plurality of metadata according to the preset target duration and the playing duration of the slice video corresponding to each metadata from the first metadata from the current determination operation. The first metadata corresponding to the first determining operation is metadata of the start slice video, and the first metadata corresponding to the subsequent determining operation is the first metadata after the plurality of metadata corresponding to the last determining operation in the index file corresponding to the live video.
An initial target index file including a plurality of metadata is determined according to a target duration (preset target duration) and the size of a slice video. Specifically, the total duration of the slice video corresponding to the plurality of metadata included in the initial target index file should not exceed the preset target duration.
In this implementation manner, the execution main body may flexibly determine the amount of metadata included in the initial target index file by presetting the target duration and the playing time duration of the slice video, so as to control the terminal device to request the slice video according to the initial index file each time, thereby improving the flexibility of obtaining the time-shifted video.
In some optional implementations of this embodiment, for the review requirement, the executing main body may execute step 202 by: firstly, according to a specified time period in a time-shifting review request, determining an initial target index file corresponding to a review video from index files corresponding to live videos; then, based on a preset naming rule, the initial target index file is named as a target index file uniquely corresponding to the target user who issues the time-shift review request. The preset naming rule is explained in the above implementation manner, and is not described herein again.
The execution main body may compare the time information of the slice video with a specified time period, and add the metadata belonging to the time information within the specified time period to the initial target index file.
In the implementation mode, based on the HLS on-demand mode, the metadata of all the slice videos included in the review video can be conveniently and accurately determined according to the specified time period, and the information determination efficiency and accuracy are improved.
Step 203, determining and playing the time-shifted video or the review video according to the target index file.
In this embodiment, the execution main body may determine and play the time-shifted video or review the video according to the target index file.
For the time shift requirement, the execution main body may continuously obtain the slice video according to the target index file corresponding to the time shift video, and sequentially play the slice video represented by the metadata in the target index file.
For the review requirement, the execution main body may obtain all the slice videos corresponding to the review video according to the target index file corresponding to the time-shifted video, and sequentially play all the slice videos corresponding to the review video.
In some optional implementations of this embodiment, for a target index file corresponding to a time-shifted video, the executing main body may execute the step 203 by: firstly, sending a plurality of target index files to playing equipment corresponding to a target user; then, through the playing device, slice videos in the time-shifted videos are determined according to the plurality of target index files and are sequentially played.
In this implementation manner, the execution main body may send the plurality of target index files to the playing device corresponding to the target user according to the time sequence; after determining the target index file, the terminal device acquires the storage position of the slice video according to the metadata in the target index file, so that the slice video is downloaded according to the storage position, and all the slice videos corresponding to the plurality of target index files are played in sequence.
In some optional implementations of this embodiment, for a target index file corresponding to a review video, the executing main body may execute the step 203 in the following manner: firstly, sending a target index file to playing equipment corresponding to a target user; and determining and sequentially playing the slice videos in the review videos according to the target index file through the playing equipment.
After determining the target index file, the terminal device acquires the storage position of the slice video according to the metadata in the target index file, so that the slice video is downloaded according to the storage position, and all the slice videos corresponding to the target index file are played in sequence.
With continued reference to fig. 3, fig. 3 is a schematic diagram 300 of an application scenario of a time-shift review method of live video according to the present embodiment. In the application scenario of fig. 3, the server 301 first receives a time shift request issued by the user 302 via the terminal device 303 and a review request issued by the user 304 via the terminal device 305. The time shifting request is used for requesting a time shifting video after a specified time point in the live video, and the review request is used for reviewing a review video in a specified time period in the live video. Then, according to the time shifting request, determining a target index file corresponding to the time shifting video from the index files corresponding to the live video; and determining a target index file corresponding to the review video from the index files corresponding to the live video according to the review request. The index file represents metadata of a slice video corresponding to the live video. Finally, the server feeds back a target index file corresponding to the time-shifted video to the terminal device 303, so that the terminal device 303 determines and plays the time-shifted video according to the target index file; and feeds back the target index file corresponding to the review video to the terminal device 305, so that the terminal device 305 determines and plays the review video according to the target index file.
According to the method provided by the embodiment of the application, the time-shift review request for the live video is obtained, wherein the time-shift review request is used for requesting the time-shift video after a specified time point in the live video or requesting the review video in a specified time period in the live video; according to the time-shifting review request, determining a target index file corresponding to the time-shifting video or a target index file corresponding to the review video from index files corresponding to the live video, wherein the index files represent metadata of a slice video corresponding to the live video; and determining and playing the time-shifted video or the review video according to the target index file, so that the target index files corresponding to the time-shifted video and the review video are dynamically generated based on the index file corresponding to the live video, the time-shifted review function of the live video is realized, the controllability of the user on the live video is improved, and the experience of the user is improved.
In some optional implementations of this embodiment, before performing step 202, the executing main body may further perform the following operations: slicing the live video to obtain a plurality of sliced videos; and generating at least one index file corresponding to the live video by taking the preset time length as a unit based on the metadata corresponding to the plurality of slice videos, wherein the length of all the slice videos corresponding to each index file in the at least one index file is the preset time length.
The preset time length may be specifically set according to an actual situation, for example, the preset time length is one hour.
In this implementation manner, the execution main body starts slicing after receiving live streaming data, and generates a sliced video and metadata of the sliced video, where the metadata is used to describe TS information and a storage location of the sliced video; when the TS slices are closed, informing an uploading module of uploading tasks corresponding to the metadata of the slice videos; after receiving the notification, the upload module regularly pulls the upload task in the task queue, uploads the slice video to an Object Storage Service (OSS) Storage server, and meanwhile, the metadata of the slice video needs to be updated to the m3u8 file, and deletes the local TS file.
When the m3u8 file is updated according to the pre-policy rule, it is necessary to try to download the historical m3u8 file of the current hour (the index file described by the metadata of the slice video in the current hour by the current time point) from the storage server. If the historical m3u8 file of the current hour exists, the file needs to be analyzed, merged and packaged. The analysis comprises two parts, one part is the Content-Length in the http header, and the size of the index file is determined for checking the received chain; the other part is to parse the on-demand m3u8 data in the http body, and obtain the maximum slice length of the historical TS list (characterized by the parameter # EXT-X-TARGETDURATION) for updating in comparison with the current real-time TS slice length. Merging mainly refers to merging the analyzed historical TS list and the TS list of the current real-time slice, and in addition, merging the maximum slice duration (characterized by the parameter # EXT-X-target duration). The encapsulation refers to the combined encapsulation of the header chain, the m3u8 body chain and the m3u8 endlist chain of the index file.
In the process of uploading the TS file, an upload failure may occur. And adding the TS file which fails to be uploaded into the failed task queue for re-uploading until the uploading failure times reach a preset time threshold.
Wherein, the index file is named by the following mode:
generating an on-demand index file every hour, wherein the naming format adopts a mode of adding time postfix after the on-demand index file, and is index.m3u8.Yyyymmddhh, wherein the yyyymmddhh represents information of year, month, day and time;
if interruption exists in the live broadcasting process and the interruption is carried out for multiple times within the same hour, storing the slice information corresponding to the slice videos before and after the interruption into the same index file;
when live recording is carried out for the first TIME in the current hour, an 'EXT-X-PROGRAM-DATE-TIME' label needs to be added before metadata of a first slice video to identify the slice TIME;
when the current hour is not live broadcast recording for the first TIME, an 'EXT-X-PROGRAM-DATE-TIME' label is added before the first slice to identify the slice TIME;
when changes in file format, type and identifiers of tracks (track type and identifier), timestamp sequence, encoding parameters, encoding sequence and the like occur in the live broadcast process, a "# EXT-X-DISCONTINUITY" tag is added.
In some optional implementations of this embodiment, the execution main body may further perform the following operations: and determining metadata corresponding to the plurality of slice videos according to a preset custom tag.
By way of example, custom tags may include, for example: # EXT-JD-TS-LENGTH, which indicates the size of the slice video; # EXT-JD-TS-START-TIMESTAMP denotes the system TIMESTAMP of the sliced video; # EXT-JD-TS-decoder-TIMESTAMP denotes a decoding time stamp of the slice video. The custom tag can be specifically set according to actual conditions so as to facilitate time-shifting review processing.
In the implementation mode, the metadata of the slice video can be set based on the custom tag so as to conveniently determine the time-shifted video and the review video based on the metadata, and the flexibility and the convenience of the time-shifted review processing process are improved.
With continued reference to FIG. 4, a schematic flow chart 400 illustrating one embodiment of a method for remote plug-in development and release in accordance with the present application is shown and includes the following steps:
step 401, slicing the live video to obtain a plurality of sliced videos.
Step 402, determining metadata corresponding to each of the plurality of slice videos according to a preset custom tag.
Step 403, based on the metadata corresponding to each of the plurality of slice videos, generating at least one index file corresponding to the live video in units of a preset time length.
The length of all slice videos corresponding to each index file in at least one index file is a preset time length.
Step 404, a time-shifted review request for live video is obtained.
The time-shifting review request is used for requesting a time-shifting video after a specified time point in the live video or requesting a review video in a specified time period in the live video.
Step 405, according to the specified time point in the time-shifting review request, determining the metadata of the start slice video corresponding to the time-shifting video from the index file corresponding to the live video.
And step 406, starting from the metadata of the initial slice video, and gradually determining an initial target index file comprising a plurality of metadata from the index files corresponding to the live videos according to the time sequence of the slice video.
Step 407, based on a preset naming rule, naming each of the obtained plurality of initial target index files as a target index file uniquely corresponding to the target user who sent the time-shift review request.
And step 408, sending the plurality of target index files to the playing devices corresponding to the target users.
Step 409, determining and sequentially playing the slice video in the time-shifted video according to the plurality of target index files through the playing device.
Step 410, according to the specified time period in the time-shifting review request, determining an initial target index file corresponding to the review video from the index files corresponding to the live video.
Step 411, based on the preset naming rule, naming the initial target index file as the target index file uniquely corresponding to the target user who sent the time-shift look-back request.
Step 412, sending the target index file to the playing device corresponding to the target user.
And step 413, determining and sequentially playing the slice videos in the review videos according to the target index file through the playing device.
As can be seen from this embodiment, compared with the embodiment corresponding to fig. 2, the flow 400 of the time-shift review method for live videos in this embodiment specifically illustrates a generation process of an index file of a live video and an implementation process of a time-shift review function, where a time-shift review function for a live video is implemented by dynamically generating a time-shift video and a target index file corresponding to a review video based on an index file corresponding to a live video, and further improving user experience.
With continuing reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present application provides an embodiment of a time-shift review device for live video, where the embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device may be applied to various electronic devices in particular.
As shown in fig. 5, the time-shift review apparatus for live video includes: an obtaining unit 501 configured to obtain a time-shift review request for a live video, where the time-shift review request is used to request a time-shift video after a specified time point in the live video or request a review video within a specified time period in the live video; a first determining unit 502, configured to determine, according to the time-shift review request, a target index file corresponding to the time-shift video or a target index file corresponding to the review video from index files corresponding to the live video, where the index files represent metadata of a slice video corresponding to the live video; a second determining unit 503 configured to determine and play the time-shifted video or the review video according to the target index file.
In some optional implementations of the present embodiment, the first determining unit 502 is further configured to: according to the appointed time point in the time-shifting review request, determining metadata of the initial slice video corresponding to the time-shifting video from the index file corresponding to the live video; the method comprises the steps that an initial target index file comprising a plurality of metadata is gradually determined from an index file corresponding to a live video from metadata of an initial slice video according to the time sequence of the slice video; and naming each index file in the obtained plurality of initial target index files as a target index file which uniquely corresponds to the target user sending the time-shifting look-back request based on a preset naming rule.
In some optional implementations of this embodiment, the second determining unit 503 is further configured to: sending the plurality of target index files to playing equipment corresponding to a target user; and determining and sequentially playing the slice video in the time-shifted video according to the plurality of target index files through the playing device.
In some optional implementations of the present embodiment, the first determining unit 502 is further configured to: and circularly executing the following determination operations until the metadata of the last slice video corresponding to the live video: and determining an initial target index file comprising a plurality of metadata according to a preset target duration and the playing duration of a slice video corresponding to each metadata from the first metadata, wherein the first metadata corresponding to the first determination operation is the metadata of the initial slice video, and the first metadata corresponding to the subsequent determination operation is the first metadata after the plurality of metadata corresponding to the last determination operation in the index file corresponding to the live video.
In some optional implementations of this embodiment, the first determining unit 502 is further configured to: according to the specified time period in the time-shifting review request, determining an initial target index file corresponding to the review video from the index files corresponding to the live video; and naming the initial target index file as a target index file which only corresponds to the target user sending the time-shift look-back request based on a preset naming rule.
In some optional implementations of this embodiment, the second determining unit 503 is further configured to: sending the target index file to playing equipment corresponding to a target user; and determining and sequentially playing the slice videos in the review videos according to the target index file through the playing equipment.
In some optional implementations of this embodiment, the apparatus further includes: a slicing unit (not shown in the figure) configured to slice the live video to obtain a plurality of sliced videos; and a generating unit (not shown in the figure) configured to generate at least one index file corresponding to the live video in units of a preset time length based on the metadata corresponding to each of the plurality of slice videos, wherein the length of all the slice videos corresponding to each of the at least one index file is the preset time length.
In some optional implementations of this embodiment, the apparatus further includes: and a third determining unit (not shown in the figure) configured to determine metadata corresponding to each of the plurality of slice videos according to a preset custom tag.
In this embodiment, an obtaining unit in a time-shift review device for live videos obtains a time-shift review request for live videos, where the time-shift review request is used to request a time-shift video after a specified time point in the live videos or request a review video within a specified time period in the live videos; the first determining unit determines a target index file corresponding to the time-shifted video or a target index file corresponding to the review video from index files corresponding to the live video according to the time-shifted review request, wherein the index files represent metadata of a slice video corresponding to the live video; the second determining unit determines and plays the time-shifted video or the review video according to the target index file, so that the target index files corresponding to the time-shifted video and the review video are dynamically generated based on the index file corresponding to the live video, the time-shifted review function of the live video is realized, the controllability of a user on the live video is improved, and the experience of the user is improved.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing devices (e.g., devices 61, 102, 103, 105 shown in FIG. 1) of embodiments of the present application. The apparatus shown in fig. 6 is only an example, and should not bring any limitation to the function and use range of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a processor (e.g., CPU, central processing unit) 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM603, various programs and data necessary for the operation of the system 600 are also stored. The processor 601, the ROM602, and the RAM603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that the computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to embodiments of the present application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program, when executed by the processor 601, performs the above-described functions defined in the method of the present application.
Note that the computer readable medium of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the client computer, partly on the client computer, as a stand-alone software package, partly on the client computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the client computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, which may be described as: a processor includes an acquisition unit, a first determination unit, and a second determination unit. For example, the first determining unit may be further described as a unit that determines, according to the time-shift review request, a target index file corresponding to the time-shift video from index files corresponding to the live video, or determines a target index file corresponding to the review video, where the index files represent metadata of slice videos corresponding to the live video.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the computer device to: acquiring a time-shifting review request for a live video, wherein the time-shifting review request is used for requesting the time-shifting video after a specified time point in the live video or requesting the review video in a specified time period in the live video; according to the time-shifting review request, determining a target index file corresponding to the time-shifting video or a target index file corresponding to the review video from index files corresponding to the live video, wherein the index files represent metadata of a slice video corresponding to the live video; and determining and playing the time-shifted video or the review video according to the target index file.
The foregoing description is only exemplary of the preferred embodiments of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements in which any combination of the features described above or their equivalents does not depart from the spirit of the invention disclosed above. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (11)

1. A time-shifted review method of live video, comprising:
acquiring a time-shifted review request for a live video, wherein the time-shifted review request is used for requesting a time-shifted video after a specified time point in the live video or requesting a review video in a specified time period in the live video;
according to the time-shifting review request, determining a target index file corresponding to the time-shifting video or a target index file corresponding to the review video from index files corresponding to the live video, wherein the index files represent metadata of slice videos corresponding to the live video;
and determining and playing the time-shifted video or the review video according to the target index file.
2. The method according to claim 1, wherein the determining, according to the time-shift review request, a target index file corresponding to the time-shift video from index files corresponding to the live video includes:
according to the appointed time point in the time-shifting review request, determining metadata of the start slice video corresponding to the time-shifting video from the index file corresponding to the live video;
starting from metadata of the initial slice video, and gradually determining an initial target index file comprising a plurality of metadata from index files corresponding to the live video according to the time sequence of the slice video;
and naming each index file in the obtained plurality of initial target index files as a target index file which is uniquely corresponding to the target user sending the time-shifting look-back request based on a preset naming rule.
3. The method of claim 2, wherein said determining and playing said time-shifted video from said target index file comprises:
sending a plurality of target index files to playing equipment corresponding to the target user;
and determining and sequentially playing the slice videos in the time-shifted videos according to the plurality of target index files through the playing equipment.
4. The method of claim 2, wherein the step-by-step determining, starting from the metadata of the start slice video and in the time order of the slice video, an initial target index file comprising a plurality of metadata from the index file corresponding to the live video comprises:
circularly executing the following determination operations until the metadata of the last slice video corresponding to the live video:
and determining an initial target index file comprising a plurality of metadata according to a preset target duration and the playing duration of a slice video corresponding to each metadata starting from the first metadata, wherein the first metadata corresponding to the first determination operation is the metadata of the initial slice video, and the first metadata corresponding to the subsequent determination operation is the first metadata after the plurality of metadata corresponding to the last determination operation in the index file corresponding to the live video.
5. The method of claim 1, wherein the determining, according to the time-shifted review request, a target index file corresponding to the review video from index files corresponding to the live video comprises:
according to the specified time period in the time-shifting review request, determining an initial target index file corresponding to the review video from the index files corresponding to the live video;
naming the initial target index file as the target index file uniquely corresponding to the target user who issued the time-shifted look-back request based on a preset naming rule.
6. The method of claim 5, wherein said determining and playing said review video from said target index file comprises:
sending the target index file to playing equipment corresponding to the target user;
and determining and sequentially playing the slice videos in the review videos according to the target index file through the playing equipment.
7. The method according to claim 1, wherein before the determining, according to the time-shift review request, a target index file corresponding to the time-shift video or a target index file corresponding to the review video from index files corresponding to the live video, further comprising:
slicing the live video to obtain a plurality of sliced videos;
and generating at least one index file corresponding to the live video by taking a preset time length as a unit based on the metadata corresponding to the plurality of slice videos, wherein the length of all the slice videos corresponding to each index file in the at least one index file is the preset time length.
8. The method of claim 7, further comprising:
and determining metadata corresponding to the plurality of slice videos according to a preset custom tag.
9. A time-shifted review device of live video, comprising:
an acquisition unit configured to acquire a time-shift review request for a live video, wherein the time-shift review request is used for requesting a time-shift video after a specified time point in the live video or requesting a review video within a specified time period in the live video;
a first determining unit, configured to determine, according to the time-shift review request, a target index file corresponding to the time-shift video or a target index file corresponding to the review video from index files corresponding to the live video, where the index files represent metadata of slice videos corresponding to the live video;
a second determining unit configured to determine and play the time-shifted video or the review video according to the target index file.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-8.
11. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method recited in any of claims 1-8.
CN202211467466.3A 2022-11-22 2022-11-22 Time-shifting review method and device for live video Pending CN115802118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211467466.3A CN115802118A (en) 2022-11-22 2022-11-22 Time-shifting review method and device for live video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211467466.3A CN115802118A (en) 2022-11-22 2022-11-22 Time-shifting review method and device for live video

Publications (1)

Publication Number Publication Date
CN115802118A true CN115802118A (en) 2023-03-14

Family

ID=85440089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211467466.3A Pending CN115802118A (en) 2022-11-22 2022-11-22 Time-shifting review method and device for live video

Country Status (1)

Country Link
CN (1) CN115802118A (en)

Similar Documents

Publication Publication Date Title
US10798440B2 (en) Methods and systems for synchronizing data streams across multiple client devices
CN106572358B (en) Live broadcast time shifting method and client
US11356748B2 (en) Method, apparatus and system for slicing live streaming
US9973785B1 (en) Automatic failover for live video streaming
CN108391179B (en) Live broadcast data processing method and device, server, terminal and storage medium
CN108540868B (en) Processing method, device, server, terminal and the storage medium of HLS live streaming
US20160227258A1 (en) Method for playing back live video and device
US10114689B1 (en) Dynamic playlist generation
US9197944B2 (en) Systems and methods for high availability HTTP streaming
US20140143437A1 (en) Converting Live Streaming Content to Video-on-Demand Streaming Content
US10880353B2 (en) Systems and methods for cloud storage direct streaming
CN109587514B (en) Video playing method, medium and related device
CN107743708A (en) The system and method based on catalogue limitation for storage media section
US9292538B2 (en) System and method for improved data accessibility
CN103517157A (en) Method and system for achieving HLS channel time-shifting playing
US11006180B2 (en) Media clipper system
US11545185B1 (en) Method and apparatus for frame accurate high resolution video editing in cloud using live video streams
CN113301397A (en) CDN-based audio and video transmission, playing and delay detection method and device
CN109348240A (en) Video broadcasting method, apparatus and system, electronic equipment and storage medium
CN112243158B (en) Media file processing method and device, computer readable medium and electronic equipment
CN113742518A (en) Method, apparatus and computer program product for storing and providing video
CN113873288A (en) Method and device for generating playback in live broadcast process
CN113079386A (en) Video online playing method and device, electronic equipment and storage medium
CN115802118A (en) Time-shifting review method and device for live video
CN114760485B (en) Video carousel method, system and related equipment

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