CN114302254A - Method and device for transcoding and slicing live video, storage medium and electronic equipment - Google Patents

Method and device for transcoding and slicing live video, storage medium and electronic equipment Download PDF

Info

Publication number
CN114302254A
CN114302254A CN202111626990.6A CN202111626990A CN114302254A CN 114302254 A CN114302254 A CN 114302254A CN 202111626990 A CN202111626990 A CN 202111626990A CN 114302254 A CN114302254 A CN 114302254A
Authority
CN
China
Prior art keywords
live video
clip
segment
live
transcoding
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
CN202111626990.6A
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.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud 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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202111626990.6A priority Critical patent/CN114302254A/en
Publication of CN114302254A publication Critical patent/CN114302254A/en
Pending legal-status Critical Current

Links

Images

Abstract

The disclosure provides a method and a device for transcoding and slicing a live video, electronic equipment and a storage medium, and relates to the technical field of computers. The method comprises the following steps: determining the preset unit live video clip duration; according to the unit live video segment duration, the live video to be transcoded is segmented to generate a plurality of continuous live video segments; naming live video clips according to the live video ending time of each live video clip and the unit live video clip duration; the segment names stored in the host and the standby are the same for the live video which completes transcoding and slicing; and/or, for live video that completes transcoded slices, the segment names stored in different content centers are the same. By the method, when the host computer has faults or other conditions needing to switch the servers, the servers can be directly switched among other servers storing the same live video clip according to the clip name in the main server, and the difficulty in maintaining the clip name is reduced.

Description

Method and device for transcoding and slicing live video, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for transcoding a slice of a live video, a storage medium, and an electronic device.
Background
When a live tv is watched through a network tv using the internet, there may be a scenario of active/standby switching.
In the related art, seamless switching between a main live broadcast transcoding slice server and a standby live broadcast transcoding slice server cannot be achieved, and specifically, when the main server is switched to the standby server due to a fault, a frame skipping phenomenon or a screen splash phenomenon often occurs, so that user experience is affected.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure aims to provide a method, an apparatus, an electronic device, and a storage medium for transcoding and slicing a live video, so as to solve the technical problem in the prior art that different segment name lists need to be maintained according to a host and a standby host, and when a host has a fault or other conditions that a server needs to be switched, a live video has frame skipping and mosaics.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a method of transcoding a slice of a video, comprising: determining the preset unit live video clip duration; according to the unit live video segment duration, the live video to be transcoded is segmented to generate a plurality of continuous live video segments; naming the live video clip according to the live video ending time of each live video clip and the unit live video clip duration; the segment names stored in the host and the standby are the same for the live video which completes transcoding and slicing; and/or, for live video that completes transcoded slices, the segment names stored in different content centers are the same.
In one embodiment of the present disclosure, the method for transcoding a slice of a video further includes: and calculating the start time and the end time of the live video clip according to the Unix time.
In one embodiment of the present disclosure, the method for transcoding a slice of a live video further includes: for each live video clip, the start time of the live video clip is integral multiple of the duration of the unit live video clip; the end time of the live video clip is the sum of the start time and the unit live video clip duration.
In an embodiment of the present disclosure, naming a live video segment according to a live video end time of each live video segment and a unit live video segment duration includes: determining the quotient of the end time of the live video and the unit live video segment duration as the segment name of the live video segment; or, determining the product of the end time of the live video and the unit live video clip duration as the clip name of the live video clip; or, determining the sum of the end time of the live video and the unit live video clip duration as the clip name of the live video clip.
In one embodiment of the present disclosure, the method further includes: determining a list of segment names of live video segments of each live video to be played as a play list; wherein, the segment names in the play list are orderly arranged from small to big.
According to an aspect of the present disclosure, there is provided a method of video playing corresponding to the method of video transcoding slice, including: determining a first live video segment corresponding to the starting time of the target live video; the method comprises the steps that live video clips are sequentially obtained from a first live video clip to achieve playing of a target live video; the method comprises the steps that a live video clip of a target live video is stored in a first edge storage node; when the first edge storage node has a fault, determining a first current segment name corresponding to a live video segment played when the fault occurs; searching a live video clip corresponding to a clip name subsequent to the first current clip name in the second edge storage node to continue playing of the target live video; when the first edge storage node has overload, determining a second current segment name corresponding to the live video clip which is played completely; searching for a live video clip corresponding to a clip name subsequent to the second current clip name in other content centers in which the target live video is stored so as to continue playing the target live video; the transcoding and slicing modes of the stored target live video are the same, and the naming modes of the live video clips are the same in the first edge storage node, the second edge storage node and the content center.
According to another aspect of the present disclosure, there is provided an apparatus for transcoding a slice of a video, including: the time length determining module is used for determining the preset unit live video clip time length; the slicing module is used for slicing the live video to be transcoded according to the unit live video segment duration to generate a plurality of continuous live video segments; the naming module is used for naming the live video clips according to the live video ending time of each live video clip and the unit live video clip duration; the segment names stored in the host and the standby are the same for the live video which completes transcoding and slicing; and/or, for video that completes transcoded slices, the segment names stored in different content centers are the same.
According to another aspect of the present disclosure, there is provided an apparatus for live video playback corresponding to the apparatus for live video transcoding slice, including: the playing module is used for determining a first live video clip corresponding to the starting time of the target live video; the method comprises the steps that live video clips are sequentially obtained from a first live video clip to achieve playing of a target live video; the method comprises the steps that a live video clip of a target live video is stored in a first edge storage node; the fault processing module is used for determining a first current segment name corresponding to a live video segment played when a fault occurs when the first edge storage node has the fault; searching a live video clip corresponding to a clip name subsequent to the first current clip name in the second edge storage node to continue playing of the target live video; the overload processing module is used for determining a second current segment name corresponding to the played live video clip when the first edge storage node has overload; searching for a live video clip corresponding to a clip name subsequent to the second current clip name in other content centers in which the target live video is stored so as to continue playing the target live video; the transcoding slicing mode of the stored target live video is the same, and the naming mode of the live video clips is the same for the first edge storage node, the second edge storage node and other content centers.
According to yet another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the above-mentioned method for transcoding a slice of live video or method for playing live video.
According to still another aspect of the present disclosure, there is provided an electronic device including: a processor; and a memory for storing executable instructions for the processor; wherein the processor is configured to execute the method of transcoding a slice of live video or the method of playing live video via execution of executable instructions.
The method for transcoding and slicing the video, provided by the embodiment of the disclosure, can solve the technical problems that the main and standby machines maintain different segment name lists and frame skipping and mosaic exist during switching of the main and standby machines in the prior art, so that the technical effect of directly switching in other servers storing the same video segment according to the segment name in the main server can be achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which a method of transcoding slices of live video of an embodiment of the present disclosure may be applied;
fig. 2 shows a flow diagram of a method of transcoding a slice of live video of one embodiment of the present disclosure;
fig. 3 is a schematic diagram of a live transcoding slice in an embodiment of the present disclosure;
fig. 4 is a schematic diagram of main-standby switching in the embodiment of the present disclosure;
FIG. 5 is a comparison of an alternative embodiment of the present disclosure with a prior art generation of segment names for live video segments;
fig. 6 shows a flowchart of a method for live video playback corresponding to the method for transcoding a slice of live video according to an embodiment of the present disclosure;
fig. 7 shows a block diagram of an apparatus for transcoding slices of live video according to an embodiment of the present disclosure;
fig. 8 is a block diagram of a live video playback apparatus corresponding to the live video transcoding slice apparatus according to an embodiment of the present disclosure;
fig. 9 shows a block diagram of a computer device for transcoding a slice of a live video in an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present disclosure, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
In view of the above technical problems in the related art, the embodiments of the present disclosure provide a method for transcoding a slice of a video, so as to solve at least one or all of the above technical problems.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which a method of transcoding slices of live video of an embodiment of the present disclosure may be applied; as shown in fig. 1:
the system architecture may include a server 101, a network 102, and a client 103. Network 102 serves as a medium for providing communication links between clients 103 and server 101. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The server 101 may be a server providing various services, and the steps of transcoding slices for live video of the present disclosure are mainly performed on the server side. A background management server that provides support for devices operated by users with the client 203. The background management server may perform processing such as unified reception of the abnormal data sent by the service system, generation of a processing instruction based on the abnormal data, and the like, and feed back a processing result to the client 103.
The network 102, which may be but is not limited to a content delivery network (CDN network), may deliver and accelerate content. The adopted transmission protocol can be UDP/IP and HTTP transmission protocol, and live video service is provided for the client through the transmission protocol. The technical scheme of transcoding the slice of the live video can be used for live scenes. When the CDN is adopted to distribute the content to the edge cache nodes, the request of the user can be dispatched to the nearest CDN edge cache node by the CDN, so that the live broadcast video data is distributed, and the user can obtain a faster response.
The client 103 may be a mobile terminal such as a mobile phone, a game console, a tablet computer, an electronic book reader, smart glasses, a smart home device, an AR (Augmented Reality) device, a VR (Virtual Reality) device, or the client 103 may also be a personal computer such as a laptop computer, a desktop computer, and the like.
In the optional embodiment of the present disclosure, the client 103 may be an access device of a network television, and is responsible for receiving download and display of a live video, and a user may select a program through a television program list, request an audio/live video content from a network television terminal, and decode and play the audio/live video content.
In some alternative embodiments, since the server is unreliable, the solution that the host server 10111 and the standby servers 10112 and 10113 store the same data is usually adopted to realize high availability of the service, and when the host server is unavailable, the standby server is automatically switched to provide the service. To further increase the availability of the system, it is also possible to implement load balancing backup between different content centers by building multiple content centers, such as content center 1011 and content center 1012. In the drawings of the present embodiment, the number of standby servers is two as an example, and in practical application, the number of standby servers may be changed according to practical situations.
The existing technology can not realize seamless switching of the main live broadcast transcoding slice server and the standby live broadcast transcoding slice server, and when a host server is switched to the standby server due to a fault, the names of the video segments output by the main live broadcast transcoding slice server and the video segments output by the main live broadcast transcoding slice server are inconsistent, and the video segments output by the main live broadcast transcoding slice server and the standby live broadcast transcoding slice server are not aligned, so that serious frame skipping and mosaic phenomena can occur to the switched live broadcast. In addition, since the active/standby live broadcast transcoding slice servers need to maintain a sequence number for the playlist, the sequence numbers of the active/standby playlist cannot be guaranteed to be consistent. The problem of switching between a main live broadcast transcoding slice server and a standby live broadcast transcoding slice server also exists in the switching between different content centers.
It should be understood that the number of the clients, the networks, and the servers in fig. 1 is only illustrative, and the server 101 may be a physical server, a server cluster formed by a plurality of servers, a plurality of server clusters, and a cloud server, and may have any number of clients, networks, and servers according to actual needs.
In the following, the steps of the live video transcoding slicing method in the exemplary embodiment of the present disclosure will be described in more detail with reference to the drawings and the embodiments.
Fig. 2 shows a flowchart of a method of transcoding a slice for live video according to an embodiment of the present disclosure. The method provided by the embodiment of the present disclosure may be executed by a server or a client as shown in fig. 1, but the present disclosure is not limited thereto.
In the following description, the server cluster 101 is used as an execution subject for illustration.
As shown in fig. 2, a method for transcoding a slice for a live video provided by an embodiment of the present disclosure may include the following steps:
step S201, determining the preset unit live video clip duration;
step S202, slicing a live video to be transcoded according to the duration of a unit live video segment to generate multiple continuous live video segments;
step S203, naming the live video clip according to the live video ending time of each live video clip and the unit live video clip duration;
the segment names stored in the host and the standby are the same for the live video which completes transcoding and slicing; and/or, for live video that completes transcoded slices, the segment names stored in different content centers are the same.
Because the segment names stored in the host computer and the standby computer or between different content centers are the same, the technical problem that different segment name lists need to be maintained according to the host computer and the standby computer in the prior art is solved, and further, when the host computer has a fault or other conditions that the servers need to be switched, the server can be directly switched in other servers storing the same live video segments according to the segment names in the host server.
In a specific live broadcast scene, live broadcast video data to be live broadcast is stored in a first edge storage node, live broadcast is realized by distributing data of the first edge storage node, and the live broadcast data is stored in the first edge storage node and can be synchronously backed up in other storage nodes, such as a second edge storage node. When the first edge storage node fails, the segment name of the live video segment corresponding to the failure is obtained, and service is provided for the client according to the live video data of the segment name in the second edge storage node.
Similarly, the live broadcast data can be stored in other content centers, and the purpose of the live broadcast data is mainly to prevent the first content center from being down due to overlarge load pressure by reading the data of the other content centers when the first content center has a large load. Because the segment names and the slicing modes adopted by different content centers for storing the live video data are the same, the live video data can be directly jumped to the edge storage node to be switched to provide service for the client during switching.
In one embodiment of the present disclosure, the start time and the end time of a live video segment may be calculated from the Unix time.
In the present embodiment, Unix time is used to calculate the start time and the end time, but in other embodiments, other calculation methods may be used to determine the start time and the end time of the live video. Wherein the manner of calculating the start time and the end time is the same at different storage nodes or content centers.
In one embodiment of the present disclosure, for each live video segment, the start time of the live video segment is an integral multiple of the duration of the unit live video segment; the end time of the live video clip is the sum of the start time and the unit live video clip duration.
The method according to the present disclosure is illustrated below in a specific example. Fig. 3 is a schematic diagram of a live transcoding slice in an embodiment of the present disclosure, as shown in fig. 3:
the preset unit live video clip time length is 5 seconds, and the time for live video transcoding slice reference is Unix time.
Assuming that a live transcoding slice starts to work from 0 second of Unix time, a live video clip is generated every time of integral multiple of 5 seconds, the name of the live video clip is a quotient of the end time of the live video clip and 5, as shown in FIG. 3, a live video clip is output in 5 seconds of Unix time, and the name of the live video clip is 1. ts;
at Unix time 1504156320 seconds (Thu Aug 3113: 12:00CST 2017) the 300831264(1504156320/5) th live video clip, named 300831264.ts, is output.
Fig. 4 is a schematic diagram of main-standby switching in the embodiment of the present disclosure. As shown in fig. 4, the first behavior edge stores the mapping relationship between the segment name and the time segment of the node a; the second behavior edge stores the mapping relation between the node B segment name and the time period; the third row is the mapping relation between the segment name of the edge storage node C and the time segment; the fourth row is the mapping relation of the segment names of the edge storage nodes D and the time periods.
Where the edge storage node A, B names the slices and segments of the live video following an alternative embodiment of the present disclosure. Since the live video segments output by the live transcoding slicing service are all time aligned with Unix, the start time of a live video segment is an integral multiple of the duration of the live video segment, and the duration of the live video segment shown in fig. 4 is 5 seconds. The main live broadcast transcoding slice server and the standby live broadcast transcoding slice server follow the rule, and live broadcast transcoding slice servers of different content centers follow the rule, so live broadcast video segments output by the main live broadcast transcoding slice server and the standby live broadcast transcoding slice server are aligned, live broadcast video segments output by different content centers are aligned, and frame skipping and mosaic caused by live broadcast are avoided when the main live broadcast transcoding slice server and the standby live broadcast transcoding slice server are switched and the content centers are switched. The edge storage nodes C and D are not transcoding and fragmenting according to the optional embodiment of the present disclosure, and further have a technical defect in the prior art, that is, a technical defect of generating frame skipping and mosaic during active/standby switching.
In an embodiment of the present disclosure, step S203 may further include: determining the quotient of the end time of the live video and the unit live video segment duration as the segment name of the live video segment; or, determining the product of the end time of the live video and the unit live video clip duration as the clip name of the live video clip; or, determining the sum of the end time of the live video and the unit live video clip duration as the clip name of the live video clip.
By the method, the occurrence time of the live video and the segment names of the live video can be in one-to-one correspondence, and the segment names corresponding to the live video segments can be obtained when the start time or the end time of the live video segments is obtained.
Fig. 5 is a comparison between the alternative embodiment of the present disclosure and the prior art for generating the segment names of the live video segments, and as shown in fig. 5, the name of the live video segment output by the live transcoding slicing server is the quotient of the live video segment end time and the preset live video segment duration, and is a continuously increasing positive integer. Therefore, the names of the live video segments are related to Unix time, are not related to the main live transcoding slicing server and the standby live transcoding slicing server, are not related to different content centers, and the names of the live video segments output by the main live transcoding slicing server and the standby live transcoding slicing server are consistent with the names of the live video segments output by the different content centers. When the switching of the main live broadcast transcoding slice server and the standby live broadcast transcoding slice server occurs or the switching between the content centers occurs, the playing frame skipping and the mosaic cannot be caused.
In one embodiment of the present disclosure, the method further includes: determining a list of segment names of live video segments of each live video to be played as a play list; wherein, the segment names in the play list are orderly arranged from small to big.
Furthermore, the sequence number of the live broadcast playlist adopts the first live video clip segment name in the playlist, and the live video clip segment name is a monotonically increasing positive integer and can be used for clip sequencing. The segment names are directly used for the sequence numbers, on one hand, the maintenance is simple, and on the other hand, the consistency of the sequence numbers of the live broadcast playlists between the main live broadcast transcoding slice server and the different content centers is also ensured.
In conclusion, the present disclosure has the following technical effects:
the start time for generating the live video segments is aligned with the integral multiple of the preset live video segment duration, so that the live video segments generated by the main live transcoding slicing server and the standby live transcoding slicing server and different content centers are aligned, and the error can be controlled to be in the millisecond level. The serious frame skipping and mosaic of live broadcasting after the main-standby switching or the content center switching are avoided.
The segment name of the first live video segment in the live play list is used as the sequence number, so that the live play list is more convenient to maintain, and the sequence numbers of the live play lists between the main live broadcast transcoding slice and the standby live broadcast transcoding slice and between the content centers can be ensured to be consistent.
Fig. 6 shows a flowchart of a method for playing live video corresponding to the method for transcoding a slice of live video in an embodiment of the present disclosure. The method provided by the embodiment of the present disclosure may be executed by a server or a client as shown in fig. 1, but the present disclosure is not limited thereto.
In the following description, the server cluster 101 is used as an execution subject for illustration.
As shown in fig. 6, a method for playing a live video provided by an embodiment of the present disclosure may include the following steps:
s601, determining a first live video clip corresponding to the starting time of the target live video; the method comprises the steps that live video clips are sequentially obtained from a first live video clip to achieve playing of a target live video; the method comprises the steps that a live video clip of a target live video is stored in a first edge storage node;
step S602, when a first edge storage node has a fault, determining a first current segment name corresponding to a live video segment played when the fault occurs; searching a live video clip corresponding to a clip name subsequent to the first current clip name in the second edge storage node to continue playing of the target live video;
step S603, when the first edge storage node has overload, determining a second current segment name corresponding to the live video segment which has finished playing; searching for a live video clip corresponding to a clip name subsequent to the second current clip name in other content centers in which the target live video is stored so as to continue playing the target live video;
the transcoding and slicing modes of the stored target live video are the same, and the naming modes of the live video clips are the same in the first edge storage node, the second edge storage node and the content center.
In this embodiment, the execution sequence of step S602 and step S603 is not limited, step S602 may be executed first and then step S603 is executed, step S603 may be executed first and then step S602 is executed, or step S602 and step S603 may be executed simultaneously.
It is to be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to an exemplary embodiment of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it will also be readily appreciated that these processes may be performed synchronously or asynchronously in multiple modules.
Fig. 7 shows a block diagram of an apparatus 700 for transcoding a slice of live video according to an embodiment of the present disclosure; as shown in fig. 7, includes:
a duration determining module 701, configured to determine a duration of a preset unit live video segment;
the slicing module 702 is configured to slice a to-be-transcoded live video according to a unit live video segment duration to generate multiple continuous live video segments;
the naming module 703 is configured to name the live video clip according to the live video end time of each live video clip and the unit live video clip duration;
the segment names stored in the host and the standby are the same for the live video which completes transcoding and slicing; and/or, for video that completes transcoded slices, the segment names stored in different content centers are the same.
Other aspects of the embodiment of fig. 7 may be found in relation to other embodiments described above.
Fig. 8 is a block diagram illustrating an apparatus 800 for live video playback corresponding to the apparatus for transcoding slices from live video according to an embodiment of the present disclosure; as shown in fig. 8, includes:
a playing module 801, configured to determine a first live video segment corresponding to a start time of a target live video; the method comprises the steps that live video clips are sequentially obtained from a first live video clip to achieve playing of a target live video; the method comprises the steps that a live video clip of a target live video is stored in a first edge storage node;
a failure processing module 802, configured to determine, when a failure occurs in a first edge storage node, a first current segment name corresponding to a live video segment that is played when the failure occurs; searching a live video clip corresponding to a clip name subsequent to the first current clip name in the second edge storage node to continue playing of the target live video;
an overload processing module 803, configured to determine, when there is an overload on the first edge storage node, a second current segment name corresponding to the live video segment that has already been played; searching for a live video clip corresponding to a clip name subsequent to the second current clip name in other content centers in which the target live video is stored so as to continue playing the target live video;
the transcoding slicing mode of the stored target live video is the same, and the naming mode of the live video clips is the same for the first edge storage node, the second edge storage node and other content centers.
Other aspects of the embodiment of fig. 8 may be found in relation to other embodiments described above.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
Fig. 9 shows a block diagram of a computer device for transcoding a slice of live video in an embodiment of the present disclosure. It should be noted that the illustrated electronic device is only an example, and should not bring any limitation to the functions and the scope of the embodiments of the present invention.
An electronic device 900 according to this embodiment of the invention is described below with reference to fig. 9. The electronic device 900 shown in fig. 9 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one memory unit 920, and a bus 930 that couples various system components including the memory unit 920 and the processing unit 910.
Wherein the storage unit stores program code that is executable by the processing unit 910 to cause the processing unit 910 to perform steps according to various exemplary embodiments of the present invention described in the above section "exemplary methods" of the present specification. For example, the processing unit 910 may perform a method as shown in fig. 2.
The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM)9201 and/or a cache memory unit 9202, and may further include a read only memory unit (ROM) 9203.
Storage unit 920 may also include a program/utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 930 can be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 900 may also communicate with one or more external devices 1000 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 900, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 900 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interface 950. Also, the electronic device 900 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 960. As shown, the network adapter 960 communicates with the other modules of the electronic device 900 via the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
According to the program product for implementing the method, the portable compact disc read only memory (CD-ROM) can be adopted, the program code is included, and the program product can be operated on terminal equipment, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in the present disclosure, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A 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 (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, 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.
A computer readable signal medium may include a propagated data signal with 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 readable signal medium may also be any readable medium that is not a 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 readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, 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 user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A method for transcoding a slice of a live video, comprising:
determining the preset unit live video clip duration;
according to the unit live video clip duration, the live video to be transcoded is sliced to generate a plurality of continuous live video clips;
naming the live video clips according to the live video ending time of each live video clip and the unit live video clip duration;
the segment names stored in the host and the standby are the same for the live video which completes transcoding and slicing; and/or, for live video that completes transcoded slices, the segment names stored in different content centers are the same.
2. The method of claim 1, further comprising: and calculating the start time and the end time of the live video clip according to the Unix time.
3. The method of claim 1, further comprising:
for each section of the live video clip, the start time of the live video clip is integral multiple of the duration of the unit live video clip;
and the end time of the live video clip is the sum of the start time and the unit live video clip duration.
4. The method as claimed in any one of claims 1 to 3, wherein naming the live video segment according to the live video end time of each live video segment and the unit live video segment duration comprises:
determining the quotient of the live video ending time and the unit live video segment duration as the segment name of the live video segment;
or, determining the product of the end time of the live video and the unit live video clip duration as the clip name of the live video clip;
or, determining the sum of the live video ending time and the unit live video segment duration as the segment name of the live video segment.
5. The method of claim 4, further comprising:
determining a list of segment names of live video segments of each live video to be played as a play list; the clip names in the playlist are sequentially arranged from small to large.
6. A method of live video playback corresponding to the method of live video transcoding slicing as claimed in any of claims 1-5, comprising:
determining a first live video segment corresponding to the starting time of the target live video;
sequentially acquiring live broadcast video clips from the first live broadcast video clip to realize the playing of the target live broadcast video; the live video clip of the target live video is stored in a first edge storage node;
when the first edge storage node has a fault, determining a first current segment name corresponding to a live video clip played when the fault occurs; searching a live video clip corresponding to a clip name subsequent to the first current clip name in a second edge storage node to continue playing the target live video;
when the first edge storage node has overload, determining a second current segment name corresponding to the live video clip which is played completely; searching for a live video clip corresponding to a clip name subsequent to the second current clip name in other content centers in which the target live video is stored, so as to continue playing the target live video;
and in the first edge storage node, the second edge storage node and the content center, the transcoding and slicing modes for storing the target live video are the same, and the naming modes for storing the live video clips are the same.
7. An apparatus for transcoding a slice of live video, comprising:
the time length determining module is used for determining the preset unit live video clip time length;
the slicing module is used for slicing the live video to be transcoded according to the unit live video segment duration to generate a plurality of continuous live video segments;
the naming module is used for naming the live video clips according to the live video end time of each live video clip and the unit live video clip duration;
the segment names stored in the host and the standby are the same for the live video which completes transcoding and slicing; and/or, for video that completes transcoded slices, the segment names stored in different content centers are the same.
8. An apparatus for live video playback corresponding to the apparatus for transcoding a slice of live video of claim 7, comprising:
the playing module is used for determining a first live video clip corresponding to the starting time of the target live video; sequentially acquiring live broadcast video clips from the first live broadcast video clip to realize the playing of the target live broadcast video; the live video clip of the target live video is stored in a first edge storage node;
the fault processing module is used for determining a first current segment name corresponding to a live video segment played when a fault occurs when the first edge storage node has the fault; searching a live video clip corresponding to a clip name subsequent to the first current clip name in a second edge storage node to continue playing the target live video;
the overload processing module is used for determining a second current segment name corresponding to the played live video clip when the first edge storage node has overload; searching for a live video clip corresponding to a clip name subsequent to the second current clip name in other content centers in which the target live video is stored, so as to continue playing the target live video;
the first edge storage node, the second edge storage node and the other content centers store the target live broadcast video in the same transcoding and slicing mode and in the same naming mode of the live broadcast video clips.
9. A computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method of transcoding a live video as claimed in any of claims 1 to 5 or a method of live video playback as claimed in claim 6.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs that when executed by the one or more processors cause the one or more processors to implement the method of transcoding a slice of live video as claimed in any one of claims 1 to 5 or the method of live video playback as claimed in claim 6.
CN202111626990.6A 2021-12-28 2021-12-28 Method and device for transcoding and slicing live video, storage medium and electronic equipment Pending CN114302254A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111626990.6A CN114302254A (en) 2021-12-28 2021-12-28 Method and device for transcoding and slicing live video, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111626990.6A CN114302254A (en) 2021-12-28 2021-12-28 Method and device for transcoding and slicing live video, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN114302254A true CN114302254A (en) 2022-04-08

Family

ID=80971137

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111626990.6A Pending CN114302254A (en) 2021-12-28 2021-12-28 Method and device for transcoding and slicing live video, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114302254A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174578A (en) * 2022-07-25 2022-10-11 上海网达软件股份有限公司 Kubernetes-based on-demand parallel transcoding method and device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006333398A (en) * 2005-05-30 2006-12-07 Nippon Telegr & Teleph Corp <Ntt> Method and system for video distribution, and program
US20090094250A1 (en) * 2007-10-09 2009-04-09 Greg Dhuse Ensuring data integrity on a dispersed storage grid
CN202111743U (en) * 2011-05-31 2012-01-11 电子科技大学 Seamless switching system capable of continuously playing audios/videos
CN103686455A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 Video playing method and device based on HLS protocol
CN109618208A (en) * 2018-12-25 2019-04-12 湖南快乐阳光互动娱乐传媒有限公司 A kind of live stream distribution slice synchronous method and device
CN109640106A (en) * 2018-12-10 2019-04-16 网宿科技股份有限公司 A kind of method and device of the multi-source station switching of live broadcast system
CN113285947A (en) * 2021-05-21 2021-08-20 烽火通信科技股份有限公司 HLS live broadcast and multicast live broadcast connection method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006333398A (en) * 2005-05-30 2006-12-07 Nippon Telegr & Teleph Corp <Ntt> Method and system for video distribution, and program
US20090094250A1 (en) * 2007-10-09 2009-04-09 Greg Dhuse Ensuring data integrity on a dispersed storage grid
CN202111743U (en) * 2011-05-31 2012-01-11 电子科技大学 Seamless switching system capable of continuously playing audios/videos
CN103686455A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 Video playing method and device based on HLS protocol
CN109640106A (en) * 2018-12-10 2019-04-16 网宿科技股份有限公司 A kind of method and device of the multi-source station switching of live broadcast system
CN109618208A (en) * 2018-12-25 2019-04-12 湖南快乐阳光互动娱乐传媒有限公司 A kind of live stream distribution slice synchronous method and device
CN113285947A (en) * 2021-05-21 2021-08-20 烽火通信科技股份有限公司 HLS live broadcast and multicast live broadcast connection method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174578A (en) * 2022-07-25 2022-10-11 上海网达软件股份有限公司 Kubernetes-based on-demand parallel transcoding method and device and storage medium
CN115174578B (en) * 2022-07-25 2023-10-20 上海网达软件股份有限公司 Kubernetes-based on-demand parallel transcoding method, device and storage medium

Similar Documents

Publication Publication Date Title
US10405048B2 (en) Methods and apparatus for supporting VOD requests in a system with hierarchical content stores
US6058424A (en) System and method for transferring a session from one application server to another without losing existing resources
WO2019206296A1 (en) Fault handling method and device for gateway server
CN108965907B (en) Method, device and system for playing video
US11259063B2 (en) Method and system for setting video cover
WO2021159770A1 (en) Video playback method, device, apparatus, and storage medium
CN104539977A (en) Live broadcast previewing method and device
CN102918594A (en) Cache control for adaptive stream player
US11533543B1 (en) Community boosting of stream visibility
CN107665141B (en) Database configuration method and equipment thereof
US8499055B2 (en) File decoding system and method
CN112044078A (en) Access method, device, equipment and storage medium for virtual scene application
CN114302254A (en) Method and device for transcoding and slicing live video, storage medium and electronic equipment
US11445246B1 (en) Activity-based selection of replacement content
CN109948082B (en) Live broadcast information processing method and device, electronic equipment and storage medium
US11025695B2 (en) Techniques for modifying a rules engine in a highly-scaled computing environment
CN104737550A (en) Multimedia redirection method, server and client
US11930094B2 (en) Mitigating network resource contention
CN112887786B (en) Video playing method and device and computer readable medium
US11910044B1 (en) Systems and methods for switching the processing of a live content stream to another datacenter
US11070436B2 (en) Communication control apparatus, communication apparatus, control methods thereof, and system
US11323499B2 (en) Bandwidth efficient streaming and synching multimedia content at a desired quality of experience
US11838562B1 (en) Activity-based streaming video replacement
US20220417299A1 (en) Meeting management engine for a meeting management system
US11496803B2 (en) Video stream switching service

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