CN115914670A - Live broadcast playback processing method and device and storage medium - Google Patents

Live broadcast playback processing method and device and storage medium Download PDF

Info

Publication number
CN115914670A
CN115914670A CN202310049735.2A CN202310049735A CN115914670A CN 115914670 A CN115914670 A CN 115914670A CN 202310049735 A CN202310049735 A CN 202310049735A CN 115914670 A CN115914670 A CN 115914670A
Authority
CN
China
Prior art keywords
live
playback
file
live broadcast
content
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.)
Granted
Application number
CN202310049735.2A
Other languages
Chinese (zh)
Other versions
CN115914670B (en
Inventor
朱基锋
康凯
郑伟雄
周辉
李静连
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Qianjun Network Technology Co ltd
Original Assignee
Guangzhou Qianjun Network 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 Guangzhou Qianjun Network Technology Co ltd filed Critical Guangzhou Qianjun Network Technology Co ltd
Priority to CN202310049735.2A priority Critical patent/CN115914670B/en
Publication of CN115914670A publication Critical patent/CN115914670A/en
Application granted granted Critical
Publication of CN115914670B publication Critical patent/CN115914670B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The application provides a live broadcast playback processing method, a live broadcast playback processing device and a storage medium, in the live broadcast process, a video recording instruction for live broadcast content is responded, the live broadcast content can be subjected to fragment recording according to a preset recording rule, corresponding video fragment files are pushed to transcoding equipment to be subjected to real-time transcoding processing, the live broadcast playback files of the live broadcast content are obtained, transcoding does not need to be started after the live broadcast is finished, the time of waiting for transcoding by a user after the live broadcast is finished is greatly shortened, live broadcast playback videos can be watched quickly, and user experience is improved.

Description

Live broadcast playback processing method and device and storage medium
Technical Field
The present application relates to the field of video processing, and in particular, to a live playback processing method and apparatus, and a storage medium.
Background
With the rapid development of internet technology, live webcasting has become one of the important modes in various aspects such as leisure, entertainment, learning and work, and users can select a live webcasting room according to actual requirements to watch live webcasting videos of anchor webcasts. In order to facilitate that a user can still watch the live content after live broadcast is finished, live broadcast playback video can be recorded in the live broadcast process, so that the user can watch the live broadcast content by playing the live broadcast playback video after the live broadcast is finished.
For live playback video, generally, after live playback is finished, a recorded video file is pushed to a transcoding server for transcoding, so as to obtain a live playback file which meets different network bandwidths, terminal processing capabilities and video playing requirements. However, the time spent in the video transcoding process is in a one-to-one relationship with the duration of the recorded video file, so that the user needs to wait for a long time to watch the live playback video, and the user experience is reduced.
Disclosure of Invention
In order to solve the above technical problem, an embodiment of the present application provides the following technical solutions:
the application provides a live playback processing method, which comprises the following steps:
obtaining a video recording instruction aiming at live broadcast content;
responding to the video recording instruction, and performing fragment recording on the live broadcast content according to a preset recording rule to obtain a corresponding video fragment file;
and in the fragment recording process, pushing each obtained video fragment file to transcoding equipment, and transcoding the video fragment file by the transcoding equipment to obtain a live playback file of the live content.
Optionally, the slicing and recording the live broadcast content according to a preset recording rule to obtain a corresponding video slicing file includes:
obtaining the fragment recording duration aiming at the live content;
and in the live broadcasting process, according to the fragment recording time length, performing fragment recording on the live broadcasting content to obtain a continuous video fragment file with the fragment recording time length.
Optionally, the method further includes:
determining to push the obtained last video fragment file to the transcoding device, and sending a live broadcast end notification to a storage device so that the storage device can push a live broadcast playback file for live broadcast content;
and the last video fragment file is obtained when the live broadcast of the live broadcast content is finished, and the storage device stores a live broadcast playback file from the transcoding device.
The application also provides a live playback processing method, which comprises the following steps:
obtaining any video fragment file aiming at live content; the video fragment file is pushed after the live content is subjected to fragment recording according to a preset recording rule in the live broadcasting process;
in the live broadcasting process, transcoding the obtained video fragment file to obtain a corresponding live broadcasting playback fragment file;
and obtaining a live playback file of the live content by utilizing a plurality of live playback slicing files aiming at the same live content.
Optionally, the obtaining, by using a plurality of live playback segment files for the same live content, a live playback file of the live content includes:
splicing a plurality of live broadcast playback slicing files aiming at the same live broadcast content according to a recording time sequence to obtain live broadcast playback files of the live broadcast content; alternatively, the first and second electrodes may be,
determining that the live playback fragment file is not a first live playback fragment file for the live content, and splicing the live playback fragment file to the end of a last live playback fragment file for the live content until a last live playback fragment file for the live content is successfully spliced; alternatively, the first and second liquid crystal display panels may be,
and sequencing a plurality of live playback slicing files aiming at the same live content obtained by the code according to the recording time sequence to obtain live playback files of the live content.
Optionally, the method further includes:
and pushing the live playback file to a storage device, so that the storage device can respond to a live playback instruction aiming at the live content and push the live playback file aiming at the live content to a terminal sending the live playback instruction.
Optionally, the pushing the live playback file to a storage device includes:
pushing the live broadcast playback fragment files obtained by each transcoding processing to a storage device, and storing a plurality of live broadcast playback fragment files aiming at the same live broadcast content by the storage device, or splicing a plurality of live broadcast playback fragment files aiming at the same live broadcast content to store the live broadcast playback files of the live broadcast content;
if the live playback file stored in the storage device is a plurality of live playback slicing files for corresponding live content, the method for pushing the live playback file for the live content to a terminal sending the live playback instruction includes:
and determining at least one live broadcast playback fragment file corresponding to the playback time contained in the live broadcast playback instruction, and pushing the determined at least one live broadcast playback fragment file to a terminal sending the live broadcast playback instruction, so that the terminal plays back live broadcast content according to the live broadcast playback fragment file and the playback time.
The application also provides a live playback processing apparatus, the apparatus includes:
the video recording instruction acquisition module is used for acquiring a video recording instruction aiming at live broadcast content;
the fragment recording module is used for responding to the video recording instruction and performing fragment recording on the live broadcast content according to a preset recording rule to obtain a corresponding video fragment file;
and the pushing module is used for pushing each obtained video fragment file to the transcoding equipment in the fragment recording process, and the transcoding equipment transcodes the video fragment file to obtain a live playback file of the live content.
The application also provides a live playback processing apparatus, the apparatus includes:
the video fragment file obtaining module is used for obtaining any video fragment file aiming at the live broadcast content; the video fragment file is pushed after the live content is subjected to fragment recording according to a preset recording rule in the live broadcasting process;
the transcoding processing module is used for transcoding the obtained video fragment file in the live broadcasting process to obtain a corresponding live broadcasting playback fragment file;
and the live broadcast playback file obtaining module is used for obtaining the live broadcast playback file of the live broadcast content by utilizing a plurality of live broadcast playback slicing files aiming at the same live broadcast content.
The present application also proposes a computer-readable storage medium, characterized in that a computer program is stored thereon, which is executed by a processor, implementing the live playback processing method as described above.
Based on the technical scheme, the application provides a live broadcast playback processing method, a live broadcast playback processing device and a storage medium, in the live broadcast process, a video recording instruction for live broadcast content is responded, the live broadcast content can be subjected to fragment recording according to a preset recording rule, corresponding video fragment files are pushed to transcoding equipment to be subjected to real-time transcoding processing, the live broadcast playback files of the live broadcast content are obtained, transcoding is not required to be started after the live broadcast is finished, the time of waiting for transcoding by a user after the live broadcast is finished is greatly shortened, the live broadcast playback video can be watched quickly, and user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an alternative example of a live playback processing system according to the present application;
fig. 2 is a flowchart illustrating an alternative example of a live playback processing method according to the present application;
fig. 3 is a flowchart illustrating an alternative example two of a live playback processing method proposed in the present application;
fig. 4 is a flowchart illustrating an alternative example three of a live playback processing method proposed in the present application;
fig. 5 is a flowchart illustrating an alternative example four of a live playback processing method proposed in the present application;
fig. 6 is a schematic structural diagram of an alternative example of a live playback processing apparatus proposed in the present application;
fig. 7 is a schematic structural diagram of yet another alternative example of the live playback processing apparatus proposed in the present application.
Detailed Description
For the description content in the background art section, in the live broadcast process, the live broadcast streaming end transmits VIDEO data to the streaming media center node through an RTMP (Real Time Messaging Protocol), and the VIDEO data may adopt an FLV (FLASH VIDEO) streaming media format. After a video recording function is started aiming at live broadcast content, recording scripts store recorded streaming media data into video files in a streaming copying mode, and after the live broadcast is finished, the recorded video files are FLV format files.
Wherein the video-on-demand format is usually MP4 format. Therefore, after the live broadcast is finished, the recorded video file generally needs to be re-encoded, the FLV format video file is transcoded into the MP4 format video file, and then the MP4 format video file is encoded to generate a new video file, so that the ratio of the video transcoding time length to the live broadcast video time length is a one-to-one relationship, the recorded video file time length determines the time length spent for generating the live broadcast playback file, the live broadcast playback file can be generated after the live broadcast is finished, and a user cannot timely play back and watch the target content in the live broadcast process.
In order to solve the above problems, it is proposed to repackage a file header of a recorded video file after a live broadcast technology, then divide the file into a plurality of fragmented files, and push the fragmented files to a storage device (e.g., a cloud storage server, which may be distributed to each terminal through a CDN (Content Delivery Network) server, etc.), so as to develop the file for a user to watch. Since it takes a relatively short time, e.g. 3-4 minutes, to repackage the headers, the user can play back the live content as soon as possible. However, once the header encapsulation of the recorded video file fails, transcoding processing needs to be performed according to the above-described method to ensure the consistency of the format of the video file in the later period, and thus, the live playback processing method based on the header encapsulation processing method is poor in reliability.
In order to further solve the problems and improve the efficiency and reliability of live broadcast playback processing, the method and the device can be used for transcoding the recorded video file in the live broadcast content recording process, so that the live broadcast playback file can be generated after live broadcast is finished, and a user can play back and watch live broadcast content in time. Specifically, in the live broadcasting process, the live broadcasting content can be recorded in a slicing mode according to a preset recording rule to obtain continuous video slicing files, in the slicing recording process, the obtained video slicing files are pushed to transcoding equipment (such as a transcoding server) to be transcoded, therefore, when the live broadcasting is finished, only the last video slicing file is pushed to the transcoding equipment to be transcoded, and the time of waiting for transcoding by a user is greatly shortened compared with the whole video file.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a schematic diagram of a system architecture of an optional application environment suitable for the live playback processing method provided in the present application is shown, where the system architecture may include a plurality of terminals 110, a live server 120, a transcoding device 130, and a storage device 140, where:
the terminal 110 may be configured with a client supporting any form of live webcasting, such as a live webcasting function of professional live webcasting software or some social software, so that a user can use the client to perform live webcasting or log in a live webcasting platform, enter other live webcasting rooms to watch live webcasting content, or select live webcasting content of a live webcasting room that has finished live webcasting to be played back and watched, so as to meet application requirements of users with different identities in different scenes, such as live webcasting or live webcasting content watching.
As such, the terminal 110 may include, but is not limited to, a smart phone, a tablet, a wearable device, a netbook, an Augmented Reality (AR) device, a Virtual Reality (VR) device, a vehicle-mounted device, a desktop computer, and the like. The electronic device shown in fig. 1 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application. Under different application scenarios, users with different identities can select the same or different terminals to realize live broadcast playback, and the application is not limited to this.
The live broadcast server 120 can support the service equipment of the live broadcast service, and can obtain live broadcast stream information containing live broadcast content generated by a terminal in the live broadcast process of the anchor, and push the live broadcast stream information to the terminal of each audience currently watching the live broadcast of the anchor to play so that each audience entering a live broadcast room of the anchor can synchronously watch the live broadcast content of the anchor.
In the embodiment of the application, in order to be able to play back live content after live broadcasting is finished, a live broadcasting server can configure a live broadcasting recording function, live broadcasting stream information sent by a live broadcasting terminal used by a main broadcast can be copied, a video file containing synchronous live broadcasting content is recorded, the video file is usually a flv format video file, then the live broadcasting stream information is pushed to transcoding equipment for transcoding processing, the implementation method of video recording of the live broadcasting content of each main broadcast by the live broadcasting server is not limited, corresponding live broadcasting identification can be configured in order to distinguish the live broadcasting content of each main broadcast, such as main broadcast account numbers and live broadcasting themes, the content of the unique live broadcasting identification is not limited by the application.
Optionally, in practical applications, because the live content of the anchor is live stream information acquired by a terminal (such as at least one live device with an audio and video acquisition function) used by the anchor, the live stream information is pushed to a live server, and the live stream information can also be fragmented and copied by the terminal, after a video fragment file containing part of the live content is obtained, the live stream information is pushed to a transcoding device directly or through the live server to be transcoded, and the like.
The transcoding device 130 may be a transcoding server, which supports a video transcoding technology, that is, converts a video code stream that has been compressed and encoded into another video code stream, for example, converts an FLV streaming media format into an MP4 format, so as to adapt to different network bandwidths, different terminal processing capabilities, and different user requirements, and the product type and the transcoding operation process of the transcoding device 130 are not described in detail in this application.
It should be understood that, in practical applications, on any live broadcast platform, a plurality of anchor broadcasts are generally live broadcast, if a plurality of live broadcast contents need to be recorded respectively, the live broadcast playback processing method provided by the present application is executed, a video fragment file for live broadcast contents of different anchor broadcasts is pushed to a transcoding device in real time, at this time, the video fragment file needs to carry a corresponding live broadcast identifier, so that all video fragment files of the same live broadcast content can be identified according to the live broadcast identifier in the following process, and the implementation process is not described in detail in the present application.
The storage device 140 may be a cloud storage server, and is configured to store a live playback file after successful transcoding, and may be multiple live playback fragment files for the same live content, or a complete live playback file obtained by splicing the multiple live playback fragment files end to end according to a recording time sequence, so that after live playback is finished, the live playback file that has been successfully transcoded is opened to a user. For example, a user may use a terminal to send a live playback request carrying a live content identifier to the storage device 140, pull a live playback file corresponding to the live content identifier in the storage device 140, and play back corresponding live content.
In practical applications, the storage device 140 may be an independent device node, or may be a cluster formed by multiple device nodes, such as a content distribution network with various structures, so as to meet content distribution requirements in various scenarios.
Optionally, the transcoding device and the storage device may be integrated in a live server providing live broadcast service, so that the live server may provide not only live broadcast service but also live broadcast playback service, and has processing functions of transcoding, distributing, and the like of a recorded video file.
It should be understood that the system architecture shown in fig. 1 does not constitute a limitation to the system architecture of the application environment in the embodiment of the present application, and in practical applications, the system may include more devices than those shown in fig. 1, which is not listed here.
Referring to fig. 2, a schematic flow diagram of an optional example one of a live playback processing method provided by the present application is shown, where the method may be applied to a computer device, where the computer device may be a live streaming server or a terminal used by an anchor broadcast for live broadcast, and in order to quickly obtain a live playback file after the end of live broadcast in a scene where the anchor broadcast uses the terminal for live broadcast, a generated live content needs to be recorded and transcoded into a video file in a playable format, for which the present application provides a live playback processing method shown in fig. 2, where the method may include:
step S21, obtaining a video recording instruction aiming at live broadcast content;
step S22, responding to the video recording instruction, and performing fragment recording on the live broadcast content according to a preset recording rule to obtain a corresponding video fragment file;
and S23, in the fragment recording process, pushing each obtained video fragment file to transcoding equipment, and transcoding the video fragment file by the transcoding equipment to obtain a live playback file of live content.
In the process that a user uses a terminal to carry out live broadcasting, if live broadcasting content needs to be recorded, the user or other users can watch the live broadcasting content after the live broadcasting is finished, a live broadcasting recording function on a live broadcasting interface can be triggered, or a screen recording function of the terminal is triggered, a video recording instruction for the current live broadcasting content is generated, a video recording function for the current live broadcasting content is triggered, and if the generated live broadcasting stream information (such as the terminal carries out audio and video acquisition on a main broadcast and generates), the generated video file is obtained by directly copying.
In order to fully utilize resources of computer equipment and reduce waiting time of a user watching live playback video, the method and the device adopt a fragment recording mode in a video recording process of responding to current live content, so that the video fragment file recorded before can be transcoded while recording subsequent live content, namely, the recorded video file is transcoded while recording the live content to obtain an MP4 format video file, the recorded complete video file is transcoded without waiting for the end of recording the live content, and therefore, after the live content is played, the user who wants to play back the live content to watch can obtain the live playback file without waiting for the live time.
Based on this, when the live content is recorded, the live content can be recorded in fragments according to preset recording rules configured in advance for the live content, or default preset recording rules and the like, so that a video file of the whole live content is divided into a plurality of video fragments, each video fragment file is obtained through recording, the video fragment files can be timely pushed to transcoding equipment to be transcoded, the live playback fragment files of the part of live content are obtained, and the last video fragment file is pushed to the transcoding equipment until live broadcasting is finished.
Based on this, if a certain user needs to play back live content immediately after live broadcasting is finished, according to the live broadcast playback processing method provided by the application, a complete live broadcast playback file can be obtained only by waiting for a short time. Of course, if the start time of playback selected by the user is earlier, that is, the user is located in the successfully transcoded live playback segment file, the live playback segment file corresponding to the start time can also be directly pulled to play, and playback of live content can be started without waiting for successful transcoding of all recorded video segment files.
In addition, because the method transcodes the recorded video segment file in the live broadcast process to obtain the video file which can be directly played back, namely the live broadcast playback segment file, before the live broadcast is finished, the historical live broadcast content, namely the live broadcast content before the playback can be selected to be watched, under the condition, at least a certain release starting time can be selected to be watched according to the method described above, the corresponding live broadcast playback segment file is pulled to be played accordingly, the corresponding historical live broadcast content is watched, and the watching requirements of users on the live broadcast content of different nodes are met.
Referring to fig. 3, a flowchart of an optional example two of the live playback processing method provided in the present application is schematically shown, where the method may be an optional detailed implementation method of the live playback processing method provided above, for example, an implementation process of implementing fragment recording of current live content based on an optional content of the preset recording rule is described, and as shown in fig. 3, the method may include:
step S31, obtaining a video recording instruction aiming at live broadcast content;
step S32, responding to the video recording instruction, and obtaining the fragment recording duration aiming at the live content;
step S33, in the live broadcast process, according to the fragment recording time length, performing fragment recording on the live broadcast content to obtain a continuous video fragment file with the fragment recording time length;
in the embodiment of the application, the whole video file of the live content can be divided according to a certain time length to generate a continuous video fragment file. For the time length, the anchor is known with the live broadcast content and the live broadcast time length thereof, so that the anchor can flexibly configure the live broadcast content to be live broadcast to obtain the corresponding fragment recording time length. Optionally, in combination with the above description of the preset recording rule, the fragment recording time length may also be a default time length, and the configuration mode and the value of the fragment recording time length are not limited in the present application.
Based on the above analysis, in this embodiment, timing may be started from responding to a video recording instruction, that is, timing is started from video recording of live content (for example, copying live stream information generated by a live terminal), the timing time reaches a fragment recording duration, a video file recorded in the time period is used as a video fragment file, and then, according to this manner, a video fragment file recorded in a next fragment recording duration may be obtained, and these video fragment files may be sequentially recorded as 001.flv, 002.flv, 003.flv, and the like, so that a plurality of video fragment files with continuous recording time may be obtained, and a complete recording file of the live content may be formed.
In still other embodiments, after the segment recording duration is obtained, the whole live content may also be divided into a plurality of time segments according to the live content duration recorded in advance for the live content, and the time of the division point is recorded, so that in the process of synchronously recording the live content, whether the current live time reaches the time of any division point is detected, and thus a video segment file and the like are formed by the live stream recorded between two adjacent division point times.
Step S34, in the fragment recording process, pushing each obtained video fragment file to transcoding equipment for real-time transcoding processing to obtain a corresponding live broadcast playback fragment file;
as described above in relation to the technical solution of the present application, each video segment file obtained by recording can be directly pushed to a transcoding device to perform real-time transcoding processing, so as to obtain a corresponding live playback segment file, thus, live content is recorded in real time while anchor live, and meanwhile, the video segment file obtained by recording segments is pushed to the transcoding device to perform real-time transcoding processing, that is, in a live broadcasting process, live content that has been live can be recorded and transcoded into a live playback file in a video stream format that can be played back, after the live broadcasting is finished, there is no need to wait for the live broadcasting time, and a complete live playback file can be obtained quickly.
Illustratively, a live broadcast is started at a main broadcast using terminal, a live broadcast stream is pushed successfully, a recorded live broadcast stream script can be started at the same time, a video file (such as copied live broadcast stream information) is cut and recorded according to the time length of 5 minutes, a video fragment file with the time length of 5 minutes is generated, then a video fragment file to be recorded later is not needed, the video fragment file to be recorded next 5 minutes can be directly pushed to transcoding equipment for transcoding processing, the video fragment file to be transcoded successfully can be stored in storage equipment such as a cloud storage server, and the video fragment file can also be pushed to a Content Distribution Network (CDN) for a user to watch live broadcast playback video.
And step S35, determining to push the obtained last video fragment file to the transcoding device, and sending a live broadcast ending notification to the storage device, so that the storage device can push a live broadcast playback file aiming at the live broadcast content.
In order to ensure the integrity of live playback video, after receiving a plurality of video fragment files aiming at the same live content, if receiving a second video fragment file of the live content, the transcoding device can splice the video contents of the plurality of video fragment files end to end according to the morning and evening sequence of recording time/transcoding push time, that is, the starting recording position of the video fragment file of the later received live content is spliced to the tail position of the video fragment file of the live content received earlier (the application refers to the adjacent receiving), the processing is advanced, after the terminal pushes the generated last video fragment file to the transcoding device for transcoding after the live content is finished, the transcoding device can splice the last video fragment file to the tail position of the live playback file spliced before, the video playback file of the complete live playback video can be obtained, and the detailed description of the process is omitted.
Optionally, after transcoding each video segment file successfully according to the transcoding processing method described above, the transcoding device may send the video segment file to a storage device (such as a cloud storage server) for storage, for example, a list mode is adopted, and a plurality of live playback files for each live content are recorded according to a recording time sequence, so that a corresponding live playback video is subsequently pulled and played. Or, the transcoding device may also send the live playback file of each live content after the splicing processing to the storage device for storage, and the storage implementation manner of the live playback segment file/live playback file is not limited in this application.
In addition, after determining that the live broadcast of a certain live broadcast room for video recording is finished, and sending the corresponding last video fragment file to the transcoding device, a corresponding live broadcast finish notification can be sent to the storage device, so that after receiving the live broadcast finish notification, the storage device can push a live broadcast playback file for live broadcast content of the live broadcast room, such as a plurality of live broadcast playback fragment files, or after determining that the complete video of the live broadcast content is received (such as whether the complete video is determined by comparing live broadcast time with recording time, and the like), push the live broadcast playback file, specifically, push of the live broadcast playback file can be realized through a content distribution network, and details are not given in the implementation process.
Based on the above analysis, for the live broadcast room in which the video recording function is started in the live broadcast process, live broadcast recording prompt information/playback watching prompt information, such as preset prompt icons or text descriptions, can be output on a live broadcast interface, and after the live broadcast is finished, a live broadcast playback file of live broadcast content is quickly obtained according to the above-described method, and then the output state of corresponding prompt information is adjusted to show that the finished live broadcast content of the current live broadcast room can be played back and watched, and a user can trigger watching of a live broadcast playback video, but not limited to this implementation manner of prompting watching of playback live broadcast content.
Optionally, in order to improve the viewing times of the live content, the anchor broadcast may also perform video recording on the live content according to, but not limited to, the method described above, and at the same time, quickly convert the recorded video file into a live playback file that can be played, after the live broadcast is finished, the content distribution network may push the live playback file of each live content to a live account of the corresponding anchor broadcast in time, and output a prompt message indicating that the live content can be played back at a live address corresponding to the live account, so that the user may directly click and view the recorded live content without waiting for transcoding; certainly, the audience can also set that the live playback video is watched after the live broadcast is finished, so that the corresponding live playback file can be quickly obtained according to the method for playing after the corresponding anchor live broadcast is finished, and the user experience is improved.
Referring to fig. 4, a flowchart of an optional example three of the live playback processing method provided in the present application is schematically shown, where the method may be applied to a transcoding device, such as the above-mentioned transcoding server, and as shown in fig. 4, a live playback processing method executed by the transcoding device may include:
step S41, any video slicing file aiming at live content is obtained; the video fragment file is pushed after the live content is subjected to fragment recording according to a preset recording rule in the live broadcasting process;
in the live broadcast playback processing method described above in connection with the computer device side, in the live broadcast process of any anchor, after the recording function of live broadcast content is started, the live broadcast stream information in the live broadcast room is copied in a fragment recording manner, and each time a video fragment file is obtained by copying, the live broadcast stream information can be pushed to the transcoding device in real time for transcoding processing, and pushing is not required to be performed after the complete live broadcast stream information is copied (for example, a live broadcast terminal does not send live broadcast stream information generated by anchor live broadcast any more), and with regard to the acquisition process of the video fragment file, reference can be made to the description of the corresponding part in the above embodiment, which is not described in detail in this embodiment.
Step S42, in the live broadcast process, transcoding the obtained video fragment files to obtain corresponding live broadcast playback fragment files;
and S43, obtaining the live playback file of the live content by utilizing a plurality of live playback slicing files aiming at the same live content.
After receiving each video fragment file pushed by computer equipment such as a live broadcast terminal or a live broadcast server and the like executing a live broadcast content recording function, the transcoding equipment can directly transcode the video fragment file without waiting to obtain an MP4 video file, record the video fragment file as a corresponding live broadcast playback fragment file, and then send the video fragment file to the storage equipment for storage.
Optionally, the transcoding device may also send all live playback segment files for the same live content to the storage device for storage after obtaining the live playback segment files, or send the live playback segment files to the storage device for storage after performing splicing processing, and the like, which is not limited in the present application.
It should be understood that, because the transcoding device may obtain video segment files of live content for different live rooms at the same time, in order to distinguish the live playback segment files obtained by transcoding, a live identifier corresponding to the live content/the live room may be configured, so that the live identifier and the live playback segment files are carried and sent to the storage device for storage, so that when the storage device pushes the live playback file, the live playback file corresponding to the live content required to be played back by the terminal may be selected according to the live identifier, and details are not given in the implementation process of the present application.
As can be seen from the above analysis, the live playback file of any live content obtained by the transcoding device may include a plurality of live playback segment files of the live content, and may also include a video file or the like spliced from the plurality of live playback segment files, which is not limited in this application.
In conclusion, the live content recording side adopts a fragment recording mode, in the live broadcasting process, each recorded video fragment file is pushed to the transcoding equipment in real time, the transcoding equipment can transcode the received video fragment file in real time to obtain the corresponding live playback fragment file, and therefore after the live broadcasting is finished, the transcoding equipment only needs to spend a short time to transcode the last video fragment file to obtain the live playback file with complete live content, the time for waiting for transcoding by a user after the live broadcasting is finished is greatly shortened, and the user experience is improved.
Referring to fig. 5, which is a flowchart of an optional example four of the live playback processing method provided in the present application, this embodiment may describe an optional detailed implementation manner of the live playback processing method from a transcoding device side, and as shown in fig. 5, the method may include:
step S51, any video slicing file aiming at live broadcast content is obtained; the video fragment file is pushed after the live content is subjected to fragment recording according to a preset recording rule in the live broadcasting process;
step S52, in the live broadcasting process, transcoding the obtained video fragment file to obtain a corresponding live broadcasting playback fragment file;
regarding the implementation processes of step S51 and step S52, reference may be made to the description of the corresponding parts in the above embodiments, which is not described in detail in this embodiment.
And S53, pushing the live broadcast playback segment files to a storage device, and sequencing and storing a plurality of live broadcast playback segment files of the same live broadcast content by the storage device according to the recording time sequence.
In the embodiment of the application, after receiving any video fragment file, the transcoding device can transcode the received video fragment file into a live playback fragment file with a preset video format (such as an MP4 video stream format), and after transcoding is successful, the live playback fragment file can be sent to the storage device to be stored, so that loss is avoided. As described in the corresponding parts above, the storage device may store each received live playback segment file in a table manner after associating it with the live identifier of the live content, so that a plurality of live playback segment files of the same live identifier may be sorted and stored according to the recording time sequence/transcoding time sequence.
In some embodiments, the transcoding device may also perform splicing processing on a plurality of live playback segment files for the same live content according to the recording time sequence after transcoding all video segment files of the same live content successfully, so as to obtain a live playback file of the live content, and then send the live playback file to the storage device for storage.
In still other embodiments, the transcoding device may splice the obtained live playback segment file with a previously successfully transcoded live playback segment file of the same live content each time the transcoding is successfully performed by one video segment file, that is, after the transcoding is successfully performed by the first video segment file of a certain live content, it is determined that the live playback segment file obtained by the current transcoding is not the first live playback segment file of the live content, the live playback segment file may be spliced to the end of the last live playback segment file of the live content until the last live playback segment file of the live content is successfully spliced, and compared with a case where all video segment files of the same live content are spliced after waiting for the successful transcoding, the splicing latency time is reduced by the implementation manner in which the two processes of the transcoding process and the splicing process are simultaneously performed.
Optionally, after transcoding is successful each time, the transcoding device may also push the live playback segment file obtained by transcoding each time to the storage device, store a plurality of live playback segment files for the same live content by the storage device, or splice a plurality of live playback segment files for the same live content, and store the live playback file for the live content.
In still other embodiments, as described above, the transcoding device may also not splice multiple live playback segment files of the same live content, sequence the multiple live playback segment files of the same live content obtained through transcoding directly according to the recording time sequence, obtain a live playback file of the live content, and send the live playback file including the multiple live playback segment files to the storage device for storage.
Certainly, the transcoding device may also send the video file of the spliced live content and all live playback segment files of the live content that are not spliced to the storage device for storage, so as to meet different subsequent viewing/processing requirements.
In the live playback processing method described in the foregoing embodiments, after a storage device obtains a live playback file of any live content, when a user needs to watch a live playback video, a live playback file pull request/live playback instruction including a corresponding live identifier may be sent, and the storage device obtains the live playback instruction, or in a case where a live playback instruction for the live content having the live identifier is generated based on the live playback file pull request, a live playback file associated with the live identifier may be selected and pushed to a terminal that sends the live playback instruction, and the live playback file is output by the terminal, and the live playback video is played.
Under the condition that the live playback files stored in the storage device are a plurality of live playback fragment files aiming at corresponding live content, the storage device can determine at least one live playback fragment file corresponding to the playback time contained in the live playback instruction, and then push the determined at least one live playback fragment file to a terminal sending the live playback instruction, so that the terminal can carry out live content playback according to the live playback fragment files and the playback time, therefore, under the condition that a user only needs to watch live playback video in a certain time period, the storage device does not need to distribute the complete live playback file of the live content to the terminal, the waste of transmission resources is reduced, and the live playback efficiency and accuracy are improved.
Referring to fig. 6, a schematic structural diagram of an optional example of a live playback processing apparatus provided in the present application, where the apparatus may deploy a computer device supporting a live content recording function, such as a live server or a terminal, and as shown in fig. 6, the apparatus may include:
a video recording instruction obtaining module 61, configured to obtain a video recording instruction for live content;
the segment recording module 62 is configured to respond to the video recording instruction, and perform segment recording on the live broadcast content according to a preset recording rule to obtain a corresponding video segment file;
and the pushing module 63 is used for pushing each obtained video fragment file to the transcoding equipment in the fragment recording process, and the transcoding equipment transcodes the video fragment file to obtain a live playback file of the live content.
Optionally, the segment recording module 62 may include:
a segment recording duration obtaining unit, configured to obtain a segment recording duration for the live broadcast content;
and the fragment recording unit is used for recording the fragments of the live broadcast content according to the fragment recording time length in the live broadcast process to obtain a continuous video fragment file with the fragment recording time length.
In some embodiments, the apparatus may further include:
a live broadcast ending notification sending module, configured to determine that the obtained last video segment file is pushed to the transcoding device, and send a live broadcast ending notification to a storage device, so that the storage device can push a live broadcast playback file for the live broadcast content;
and the last video fragment file is obtained when the live broadcast of the live broadcast content is finished, and the storage device stores a live broadcast playback file from the transcoding device.
Referring to fig. 7, a schematic structural diagram of yet another alternative example of a live playback processing apparatus proposed in the present application, which may be deployed in a transcoding device, such as a transcoding server, as shown in fig. 7, may include:
a video segment file obtaining module 71, configured to obtain any video segment file for live content; the video fragment file is pushed after the live content is subjected to fragment recording according to a preset recording rule in the live broadcasting process;
a transcoding processing module 72, configured to perform transcoding processing on the obtained video segment file in the live broadcast process to obtain a corresponding live broadcast playback segment file;
a live playback file obtaining module 73, configured to obtain a live playback file of the live content by using multiple live playback segment files for the same live content
Optionally, the live playback file obtaining module 73 may include:
the first splicing processing unit is used for splicing a plurality of live broadcast playback slicing files aiming at the same live broadcast content according to a recording time sequence to obtain live broadcast playback files of the live broadcast content; alternatively, the first and second electrodes may be,
the second splicing processing unit is used for determining that the live playback fragment file is not the first live playback fragment file aiming at the live content, splicing the live playback fragment file to the tail of the last live playback fragment file aiming at the live content until the last live playback fragment file aiming at the live content is successfully spliced; alternatively, the first and second electrodes may be,
and the sequencing unit is used for sequencing a plurality of live playback slicing files aiming at the same live content and obtained by the code according to the recording time sequence to obtain the live playback files of the live content.
Based on the analysis, the apparatus may further include:
and the live playback file pushing module is used for pushing the live playback file to the storage device so that the storage device can respond to a live playback instruction aiming at the live content and push the live playback file aiming at the live content to a terminal sending the live playback instruction.
Optionally, the live playback file pushing module may include:
the live broadcast playback slicing file pushing unit is used for pushing the live broadcast playback slicing files obtained by transcoding processing each time to a storage device, storing a plurality of live broadcast playback slicing files aiming at the same live broadcast content by the storage device, or splicing the plurality of live broadcast playback slicing files aiming at the same live broadcast content and storing the live broadcast playback files of the live broadcast content;
if the live playback file stored in the storage device is a plurality of live playback segment files for corresponding live content, the storage device may include:
the determining unit is used for determining at least one live broadcast playback slicing file corresponding to the playback time contained in the live broadcast playback instruction;
and the pushing unit is used for pushing the determined at least one live broadcast playback fragment file to a terminal sending the live broadcast playback instruction so that the terminal can play back live broadcast content according to the live broadcast playback fragment file and the playback time.
It should be noted that, various modules, units, and the like in the embodiments of the foregoing apparatuses may be stored as program modules in a memory of a corresponding device (such as a computer device or a transcoding device), a processor in the device may execute the program modules stored in the memory to implement corresponding functions, or a combination of the program modules and hardware may be implemented, and as to the functions implemented by the program modules and the combination thereof and the achieved technical effects, reference may be made to the description of corresponding parts in the embodiments of the foregoing methods, which is not described in detail in this embodiment.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and the computer program is loaded and executed by a processor to implement the steps of the live playback processing method on the corresponding device side, where specific implementation processes may refer to descriptions of corresponding parts in the above embodiments, and details are not repeated in this embodiment.
The present application further provides a computer device, such as the live broadcast server or the transcoding device, where the computer device may include a memory and a processor, where the memory may be used to store a program for implementing a live broadcast playback processing method on a corresponding side, and the processor may execute the program to implement the live broadcast playback processing method on the corresponding side.
Finally, it should be noted that, with respect to the above embodiments, unless the context clearly dictates otherwise, the words "a", "an" and/or "the" do not denote a singular number, but may include a plurality. In general, the terms "comprises" and "comprising" are intended to cover only the explicitly identified steps or elements as not constituting an exclusive list and that the method or apparatus may comprise further steps or elements. An element defined by the phrase "comprising a component of ' 8230 ' \8230; ' does not exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.
In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
In addition, in the present specification, the embodiments are described in a progressive or parallel manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. The device and the equipment disclosed by the embodiment correspond to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether these functions are performed in hardware or software depends on the specific application of the solution and design pre-set conditions. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A live playback processing method, the method comprising:
acquiring a video recording instruction aiming at live content;
responding to the video recording instruction, and performing fragment recording on the live broadcast content according to a preset recording rule to obtain a corresponding video fragment file;
and in the fragment recording process, pushing each obtained video fragment file to transcoding equipment, and transcoding the video fragment file by the transcoding equipment to obtain a live playback file of the live content.
2. The method according to claim 1, wherein the segment recording the live content according to a preset recording rule to obtain a corresponding video segment file comprises:
acquiring the fragment recording duration aiming at the live content;
and in the live broadcasting process, according to the fragment recording time length, performing fragment recording on the live broadcasting content to obtain a continuous video fragment file with the fragment recording time length.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
determining to push the obtained last video fragment file to the transcoding device, and sending a live broadcast end notification to a storage device so that the storage device can push a live broadcast playback file for live broadcast content;
and the last video fragment file is obtained when the live broadcast of the live broadcast content is finished, and the storage device stores a live broadcast playback file from the transcoding device.
4. A live playback processing method, the method comprising:
obtaining any video fragment file aiming at live content; the video fragment file is pushed after the live content is subjected to fragment recording according to a preset recording rule in the live broadcasting process;
in the live broadcasting process, transcoding the obtained video fragment file to obtain a corresponding live broadcasting playback fragment file;
and obtaining the live broadcast playback file of the live broadcast content by utilizing a plurality of live broadcast playback slicing files aiming at the same live broadcast content.
5. The method according to claim 4, wherein the obtaining the live playback file of the live content by using a plurality of live playback slicing files for the same live content comprises:
splicing a plurality of live broadcast playback slicing files aiming at the same live broadcast content according to a recording time sequence to obtain live broadcast playback files of the live broadcast content; alternatively, the first and second electrodes may be,
determining that the live playback fragment file is not a first live playback fragment file for the live content, and splicing the live playback fragment file to the end of a last live playback fragment file for the live content until a last live playback fragment file for the live content is successfully spliced; alternatively, the first and second liquid crystal display panels may be,
and sequencing a plurality of live broadcast playback slicing files aiming at the same live broadcast content, which are obtained by the code according to the recording time sequence, so as to obtain the live broadcast playback files of the live broadcast content.
6. The method of claim 5, further comprising:
and pushing the live playback file to a storage device, so that the storage device can respond to a live playback instruction aiming at the live content and push the live playback file aiming at the live content to a terminal sending the live playback instruction.
7. The method of claim 6, wherein pushing the live playback file to a storage device comprises:
pushing the live broadcast playback fragment files obtained by each transcoding processing to a storage device, and storing a plurality of live broadcast playback fragment files aiming at the same live broadcast content by the storage device, or splicing a plurality of live broadcast playback fragment files aiming at the same live broadcast content to store the live broadcast playback files of the live broadcast content;
if the live playback file stored in the storage device is a plurality of live playback fragment files for corresponding live content, the live playback file for the live content is pushed to a terminal sending the live playback instruction, and the method includes the following steps:
and determining at least one live broadcast playback fragment file corresponding to the playback time contained in the live broadcast playback instruction, and pushing the determined at least one live broadcast playback fragment file to a terminal sending the live broadcast playback instruction, so that the terminal plays back live broadcast content according to the live broadcast playback fragment file and the playback time.
8. A live playback processing apparatus, characterized in that the apparatus comprises:
the video recording instruction acquisition module is used for acquiring a video recording instruction aiming at live broadcast content;
the fragment recording module is used for responding to the video recording instruction and carrying out fragment recording on the live broadcast content according to a preset recording rule to obtain a corresponding video fragment file;
and the pushing module is used for pushing each obtained video fragment file to transcoding equipment in the fragment recording process, and the transcoding equipment transcodes the video fragment files to obtain the live playback files of the live content.
9. A live playback processing apparatus, characterized in that the apparatus comprises:
the video fragment file obtaining module is used for obtaining any video fragment file aiming at the live broadcast content; the video fragment file is pushed after the live content is subjected to fragment recording according to a preset recording rule in the live broadcasting process;
the transcoding processing module is used for transcoding the obtained video fragment file in the live broadcasting process to obtain a corresponding live broadcasting playback fragment file;
and the live broadcast playback file obtaining module is used for obtaining the live broadcast playback file of the live broadcast content by utilizing a plurality of live broadcast playback slicing files aiming at the same live broadcast content.
10. A computer-readable storage medium, having stored thereon a computer program for execution by a processor to implement the live playback processing method of any one of claims 1-7.
CN202310049735.2A 2023-02-01 2023-02-01 Live broadcast playback processing method, device and storage medium Active CN115914670B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310049735.2A CN115914670B (en) 2023-02-01 2023-02-01 Live broadcast playback processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310049735.2A CN115914670B (en) 2023-02-01 2023-02-01 Live broadcast playback processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN115914670A true CN115914670A (en) 2023-04-04
CN115914670B CN115914670B (en) 2023-06-16

Family

ID=86491597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310049735.2A Active CN115914670B (en) 2023-02-01 2023-02-01 Live broadcast playback processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN115914670B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101951512A (en) * 2010-08-24 2011-01-19 中国科学院深圳先进技术研究院 Fragmentation transcoding method and system of live video and real-time video
CN104469401A (en) * 2014-12-25 2015-03-25 武汉市烽视威科技有限公司 HLS based on-demand playing system and method
CN105721811A (en) * 2015-05-15 2016-06-29 乐视云计算有限公司 Live video recording method and system
CN107948669A (en) * 2017-12-22 2018-04-20 成都华栖云科技有限公司 Based on CDN fast video production methods
CN108966008A (en) * 2018-08-02 2018-12-07 腾讯科技(深圳)有限公司 Live video back method and device
CN109561351A (en) * 2018-12-03 2019-04-02 网易(杭州)网络有限公司 Network direct broadcasting back method, device and storage medium
CN111901620A (en) * 2020-07-24 2020-11-06 北京达佳互联信息技术有限公司 Live broadcast playback generation method and device, electronic equipment and storage medium
CN113873288A (en) * 2021-12-02 2021-12-31 北京微吼时代科技有限公司 Method and device for generating playback in live broadcast process
CN114401430A (en) * 2022-01-21 2022-04-26 广州虎牙科技有限公司 Video playback method, device, server, system and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101951512A (en) * 2010-08-24 2011-01-19 中国科学院深圳先进技术研究院 Fragmentation transcoding method and system of live video and real-time video
CN104469401A (en) * 2014-12-25 2015-03-25 武汉市烽视威科技有限公司 HLS based on-demand playing system and method
CN105721811A (en) * 2015-05-15 2016-06-29 乐视云计算有限公司 Live video recording method and system
CN107948669A (en) * 2017-12-22 2018-04-20 成都华栖云科技有限公司 Based on CDN fast video production methods
CN108966008A (en) * 2018-08-02 2018-12-07 腾讯科技(深圳)有限公司 Live video back method and device
CN109561351A (en) * 2018-12-03 2019-04-02 网易(杭州)网络有限公司 Network direct broadcasting back method, device and storage medium
CN111901620A (en) * 2020-07-24 2020-11-06 北京达佳互联信息技术有限公司 Live broadcast playback generation method and device, electronic equipment and storage medium
CN113873288A (en) * 2021-12-02 2021-12-31 北京微吼时代科技有限公司 Method and device for generating playback in live broadcast process
CN114401430A (en) * 2022-01-21 2022-04-26 广州虎牙科技有限公司 Video playback method, device, server, system and storage medium

Also Published As

Publication number Publication date
CN115914670B (en) 2023-06-16

Similar Documents

Publication Publication Date Title
CN113099258B (en) Cloud guide system, live broadcast processing method and device, and computer readable storage medium
EP3706424A1 (en) Video live broadcast method and apparatus
CN111010614A (en) Method, device, server and medium for displaying live caption
JP2017108389A (en) Method and system for providing time machine function in live program
US11259063B2 (en) Method and system for setting video cover
CN105100954A (en) Interactive response system and method based on Internet communication and streaming media live broadcast
WO2019134293A1 (en) Live streaming method, device, server and medium
CN112839238B (en) Screen projection playing method and device and storage medium
CN110740386B (en) Live broadcast switching method and device and storage medium
CN107920258B (en) Data processing method and device
US11115706B2 (en) Method, client, and terminal device for screen recording
CN111432284A (en) Bullet screen interaction method of multimedia terminal and multimedia terminal
CN114040232A (en) Screen projection system, method, electronic device and storage medium
CN113630618B (en) Video processing method, device and system
CN111083504B (en) Interaction method, device and equipment
WO2015035934A1 (en) Methods and systems for facilitating video preview sessions
US8386632B2 (en) Method, device, and system for controlling streaming media play
CN111107387B (en) Video transcoding method and device and computer storage medium
CN112243136B (en) Content playing method, video storage method and device
CN113473165A (en) Live broadcast control system, live broadcast control method, device, medium and equipment
CN113132194A (en) Information transfer method, device, equipment, server and storage medium
CN115914670B (en) Live broadcast playback processing method, device and storage medium
CN108668140B (en) Audio and video interaction state synchronization method and device
CN113055636B (en) Data processing method and conference system
CN112532719B (en) Information stream pushing method, device, equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant