CN114827755A - Video playing method, system, device and storage medium - Google Patents

Video playing method, system, device and storage medium Download PDF

Info

Publication number
CN114827755A
CN114827755A CN202210397119.1A CN202210397119A CN114827755A CN 114827755 A CN114827755 A CN 114827755A CN 202210397119 A CN202210397119 A CN 202210397119A CN 114827755 A CN114827755 A CN 114827755A
Authority
CN
China
Prior art keywords
playing
slice
video
file
audio
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
CN202210397119.1A
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.)
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Culture 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 China Mobile Communications Group Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210397119.1A priority Critical patent/CN114827755A/en
Publication of CN114827755A publication Critical patent/CN114827755A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting

Abstract

The application discloses a video playing method, a system, equipment and a storage medium, wherein the method comprises the steps of acquiring a live stream and a slice file corresponding to the live stream; through playing the live stream and playing the technical scheme of the slice file on the same display interface, the problem of live interruption when a video is stripped is solved, and the smoothness of live viewing is improved through the technical scheme of the application.

Description

Video playing method, system, device and storage medium
Technical Field
The present application relates to the field of video processing technologies, and in particular, to a video playing method, system, device, and storage medium.
Background
With the rapid development of the internet, short video contents have become one of the main ways to flood people's lives and to acquire information. How to rapidly strip off to generate a short highlight video and then distribute the short highlight video out in the first time is very important for content producers and aggregators. The video splitting is realized by carrying out secondary processing on the traditional television media program according to the requirements of an internet video and a new media short video content platform, and splitting the original complete program content into a plurality of videos according to certain logic thinking or specific requirements. Currently, a player is used for both live broadcast and preview of a video clip split by a user. When the video clip needs to be previewed, the user jumps to enter a video clip previewing interface, and at the moment, the live broadcast is interrupted, so that the live broadcast watching fluency is influenced.
Disclosure of Invention
The embodiment of the application aims to solve the problem of live broadcast interruption when a video is stripped by providing a video playing method, a video playing system, a video playing device and a storage medium.
The embodiment of the application provides a video playing method, which comprises the following steps:
acquiring a live stream and a slice file corresponding to the live stream;
and playing the live stream and the slice file on the same display interface.
In an embodiment, the step of obtaining the slice file corresponding to the live stream includes:
acquiring a current play mode;
when the playing mode is a live mode, determining a strip-splitting duration according to the specified starting time and the specified ending time on a strip-splitting time axis;
and acquiring the slice files from all the slice files which are split in advance based on the splitting duration.
In an embodiment, before the step of obtaining the slice file corresponding to the live stream, the method includes:
and splitting the live stream into slice files with preset slice duration to obtain all split slice files.
In one embodiment, the step of playing the slice file comprises:
judging whether the audio and video data of the slice file is stored or not;
if so, playing the stored audio and video data;
if not, when the browser supports a media source expansion interface, acquiring an m3u8 file corresponding to a slice file, analyzing the m3u8 file to obtain a slice address, acquiring audio and video data of the slice file from the slice address, and playing the acquired audio and video data.
In an embodiment, the step of playing the stored audio-video data includes:
converting the stored data format of the audio and video data into a target format;
synthesizing audio and video data in a target format through the media source expansion interface to obtain a media resource file;
and playing the media resource file.
In an embodiment, the video playing method further includes:
displaying a progress bar on a drill-breaking player;
and when the current playing time reaches the termination time of the progress bar, pausing the playing.
In addition, to achieve the above object, the present application further provides a video playing system, including:
the acquisition module is used for acquiring a live stream and a slice file corresponding to the live stream;
and the playing module is used for playing the live stream and playing the slice file on the same display interface.
In an embodiment, the video playing system further includes a splitting module, where the splitting module includes three layers, where the bottom layer is a web player, the middle layer is a media player for the web player to mount audio and video data of a slice file, and the upper layer is a splitting playing control layer for synchronously responding to and controlling a splitting playing head of a splitting timeline.
In addition, to achieve the above object, the present application also provides an electronic device including: the video playing method comprises a memory, a processor and a video playing program which is stored on the memory and can run on the processor, wherein the video playing program realizes the steps of the video playing method when being executed by the processor.
In addition, to achieve the above object, the present application further provides a computer readable storage medium, on which a video playing program is stored, and the video playing program, when executed by a processor, implements the steps of the video playing method described above.
According to the technical scheme of the video playing method, the system, the equipment and the storage medium, a live stream and a slice file corresponding to the live stream are acquired; through the technical scheme of playing the live stream and the slice file on the same display interface, the live player and the strip disassembly player are simultaneously created and displayed on the same interface, so that the live play is not influenced when the strips are disassembled, the problem of live broadcast interruption when the strips are disassembled is solved, and the fluency of video watching is improved.
Drawings
Fig. 1 is a schematic structural diagram of a hardware operating environment of an electronic device according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a video playing method according to a first embodiment of the present application;
FIG. 3 is a schematic view illustrating an overall flow of a pull-stream playing of a web player according to the video playing method of the present application;
FIG. 4 is a block diagram of a hierarchy of a drill player of the present application;
fig. 5 is a functional block diagram of a video playback system according to the present application.
The objects, features, and advantages of the present application are further described in connection with the embodiments, with reference to the accompanying drawings, which are a single embodiment and are not intended to be a complete description of the invention.
Detailed Description
The method and the device solve the problem that live broadcast interruption occurs when a player is adopted to carry out live broadcast watching of videos and strip preview removal. The application provides a video playing method, which is characterized in that a live stream and a slice file corresponding to the live stream are obtained, and the live stream and the slice file are played on the same display interface. Because the two players, namely the live player and the strip splitting player, are created and displayed on the same interface at the same time, when the live player plays the live stream, the strip splitting is carried out according to the slice file formed by the live stream, and a strip splitting video is generated. And previewing the slice file by adopting a strip splitting player, so that live broadcast and strip splitting preview are not influenced mutually, and previewing and editing of a strip splitting video and a live video are supported.
For a better understanding of the above technical solutions, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present application.
Fig. 1 may be a schematic structural diagram of a hardware operating environment of an electronic device.
As shown in fig. 1, the electronic device may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the electronic device configuration shown in fig. 1 is not meant to be limiting of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is one type of electronic device, may include therein an operating system, a network communication module, a user interface module, and a video playback program. Among them, the operating system is a program that manages and controls hardware and software resources of the electronic device, a video playback program, and the execution of other software or programs.
In the electronic device shown in fig. 1, the user interface 1003 is mainly used for connecting a terminal and performing data communication with the terminal; the network interface 1004 is mainly used for the background server and performs data communication with the background server; the processor 1001 may be used to invoke a video playback program stored in the memory 1005.
In this embodiment, the electronic device includes: a memory 1005, a processor 1001 and a video playback program stored on the memory and executable on the processor, wherein:
when the processor 1001 calls the video playback program stored in the memory 1005, the following operations are performed:
acquiring a live stream and a slice file corresponding to the live stream;
and playing the live stream and the slice file on the same display interface.
When the processor 1001 calls the video playing program stored in the memory 1005, the following operations are also performed:
acquiring a current play mode;
when the playing mode is a live mode, determining a strip-splitting duration according to the specified starting time and the specified ending time on a strip-splitting time axis;
and acquiring the slice files from all the slice files which are split in advance based on the splitting duration.
When the processor 1001 calls the video playing program stored in the memory 1005, the following operations are also performed:
and splitting the live stream into slice files with preset slice duration to obtain all split slice files.
When the processor 1001 calls the video playing program stored in the memory 1005, the following operations are also performed:
judging whether the audio and video data of the slice file is stored or not;
if so, playing the stored audio and video data;
if not, when the browser supports a media source expansion interface, acquiring an m3u8 file corresponding to a slice file, analyzing the m3u8 file to obtain a slice address, acquiring audio and video data of the slice file from the slice address, and playing the acquired audio and video data.
When the processor 1001 calls the video playing program stored in the memory 1005, the following operations are also performed:
converting the stored data format of the audio and video data into a target format;
synthesizing audio and video data in a target format through the media source expansion interface to obtain a media resource file;
and playing the media resource file.
When the processor 1001 calls the video playing program stored in the memory 1005, the following operations are also performed:
displaying a progress bar on a drill-breaking player;
and when the current playing time reaches the termination time of the progress bar, pausing the playing.
The technical solution of the present application will be described below by way of specific examples.
As shown in fig. 2, in a first embodiment of the present application, a video playing method of the present application includes the following steps:
step S110, acquiring a live stream and a slice file corresponding to the live stream.
In this embodiment, when the live player plays a live stream, the live stream is split into slice files based on a preset slice duration. While watching the live video, the live stream can be split. For example, when a user starts a live player to play a live video, a live stream is acquired. Meanwhile, the background can automatically slice the video stream to obtain a slice file. Alternatively, after the slice file is obtained, the slice file may be stored in a resource cache of the browser, may be stored in a local database, and the like.
And step S120, playing the live stream and playing the slice file on the same display interface.
According to the technical scheme, the live stream and the slice file corresponding to the live stream are obtained; through the technical scheme of playing the live stream and the slice file on the same display interface, the live player and the strip disassembly player are simultaneously created and displayed on the same interface, so that the live play is not influenced when the strips are disassembled, the problem of live broadcast interruption when the strips are disassembled is solved, and the fluency of video watching is improved.
The hierarchical structure diagram of the strip splitting player refers to fig. 4, the player is divided into three layers, the upper layer is a webpage player, the middle layer is a multimedia player with the webpage player mounting data and used for displaying a video interface and providing an interface to the outside, and the upper layer is a strip splitting service playing control layer and synchronously responds to and controls a strip splitting playing head of a track. When the strip splitting preview is carried out while the live stream is played, the live stream can be played through a live player displayed on the same display interface, and the strip splitting player plays the slice file to carry out the strip splitting preview.
In an embodiment, before the live stream is played, configuration is required, and the configuration process mainly includes the following parts:
first, configure the live broadcast task. In the process, the live stream address and the recording time are mainly configured. And after the live broadcast task is submitted, the video server receives the stream and executes processing on the live broadcast stream. The live stream is sliced to generate an m3u8 file. And distributing the generated m3u8 file to a storage.
And secondly, the browser end user starts to strip in the live broadcast task configuration point and enters a live broadcast strip stripping tool page.
And thirdly, creating a live player and a drill breaking player, wherein the live player is used for live stream playing, and the drill breaking player is used for drill breaking segment playing. The web player instance is initialized, the m3u8 file is loaded from storage, and the audio player and the video player are mounted under the live player and the drill player, respectively. The flow of the web player pull stream playing refers to fig. 3.
After the live broadcast task configuration is completed, when the live broadcast stream is played and the strip splitting preview is carried out, the live broadcast stream is obtained and the slice file corresponding to the live broadcast stream is obtained. Before acquiring the slice file corresponding to the live stream, the corresponding slice file needs to be generated according to the live stream.
In an embodiment, before the obtaining of the slice file corresponding to the live stream, splitting the live stream obtained in real time into slice files with preset slice duration to obtain all the split slice files. Wherein, the preset slicing time duration can be set according to the actual situation. For example, when the preset slicing duration is 10S, and the live stream is played in real time, the live stream may be split into one slice file every 10S, and the slice files are sorted based on the splitting order, so as to generate the corresponding m3u8 file.
In an embodiment, the obtaining of the slice file corresponding to the live stream specifically includes the following steps:
step S111, acquiring a current play mode;
step S112, when the playing mode is the live mode, determining a strip-splitting duration according to the specified starting time and the specified ending time on the strip-splitting time axis;
and step S113, acquiring the slice files from all the slice files which are split in advance based on the splitting duration.
In this embodiment, a current play mode is obtained, where the current play mode includes a live mode and an editing mode. And when the play mode is the live play mode, the live play head moves on a time axis along with the play time. And clicking a starting dotting button, and determining the strip splitting duration according to the specified starting time and the specified ending time on the strip splitting time axis. And acquiring the slice files from all the slice files which are split in advance based on the splitting duration. For example, a temporary bar splitting block with a default time length, namely a preset time length, is created at the position of the playing head by taking the current playing time as the starting time, the left handle and the right handle of the bar splitting block are dragged, and the starting time or the ending time of the temporary bar splitting is calculated and recorded according to the dragging distance. And clicking a finishing dotting button, writing the audio and video data corresponding to the temporary dismounting bar into the dismounting bar list, and emptying the temporary dismounting bar. The segmented video data that has been striped is presented in a striped list. When the page quits, the data of the strip splitting list is submitted to the server for storage, and the next continuous editing is facilitated. The user-generated split bar is not already actually split into short videos, but is submitted to server production at export or distribution time.
In one embodiment, the edit mode is to facilitate striping of video within a pulled stream duration without affecting live viewing. In the editing mode, if the current live broadcast position is required to be clicked, a live broadcast button can be clicked to return to the live broadcast mode, and the time axis is scrolled to the position of a live broadcast head. Specifically, when a video strip splitting request is received, a current play mode is obtained; and when the play mode is an editing mode, scrolling a time line representing the time length from 0 to the video time length, then clicking a certain moment of a time axis, displaying a drill breaking play head at a click position, and entering the editing mode. Meanwhile, the time corresponding to the drill breaking playing head can be converted according to the pixel distance of the offset of the drill breaking playing head from the beginning of the time axis, and the drill breaking playing device finds the time to display a preview picture.
In the technical scheme of the embodiment, a live mode and an editing mode exist, and the video strip splitting effect of splitting while playing is achieved.
In an embodiment, playing the slice file specifically includes the following steps:
step S121, judging whether the audio and video data of the slice file is stored or not;
if yes, executing step S122, and playing the stored audio and video data;
if not, executing the step S123, when the browser supports the media source expansion interface, acquiring an m3u8 file corresponding to the slice file, analyzing the m3u8 file to obtain a slice address, acquiring audio and video data of the slice file from the slice address, and playing the acquired audio and video data.
In this embodiment, the audio and video data of the slice file after the splitting of the live stream is stored in the storage. Therefore, when playing the slice file, the audio and video data of the slice file is acquired from the storage for playing. For example, when the audio/video data of the split slice file is stored in the resource cache region, the audio/video data of the slice file is loaded from the resource cache region for playing. And when the audio and video data of the split slice file is stored in the local database, loading the audio and video data of the slice file from the local database for playing.
In the process, whether the audio and video data of the slice file is stored in the storage is detected. And if so, directly playing the audio and video data of the slice file stored in the storage. If not, whether the browser supports the media source extension interface should be checked first. When the browser supports the media source extension interface, the browser requests to acquire an m3u8 file corresponding to the slice file. And analyzing the m3u8 file to obtain a slice address of the slice file, acquiring audio and video data of the slice file from the slice address, and further playing the acquired audio and video data. Wherein, the M3u8 file refers to M3U file in UTF-8 encoding format; the M3U file records an index plain text file, when the index plain text file is opened, the playing software does not play the index plain text file, but finds out the network address of the corresponding audio/video file according to the index of the index plain text file for online playing, namely, the M3u8 file stores the slice address of the audio/video data of each slice file, and the audio/video data of the slice file is obtained by analyzing the M3u8 file.
In the technical solution of this embodiment, when a video playing instruction is received, an m3u8 file is obtained, and then a slice file that can be used for subsequent playing can be obtained according to the m3u8 file.
In an embodiment, playing the stored audio/video data specifically includes the following steps:
step S1221, converting the stored data format of the audio and video data into a target format;
step S1222, synthesizing audio and video data in a target format through the media source expansion interface to obtain a media resource file;
step S1223, playing the media resource file.
In this embodiment, the data format of the slice file can be obtained while obtaining the slice address of the slice file by analyzing the m3u8 file. And requesting the slice file according to the analysis sequence, and analyzing the slice file to obtain the audio and video data corresponding to the slice file. And mixing the data format of the audio and video data corresponding to the slice file obtained by analysis into a target format, wherein the audio and video data in the target format is a format which can be played by a browser. And adding the audio and video data into the storage. And merging the stored audio and video data into a playable media resource file by adopting a media resource expansion interface. And mounting the media resource file on an audio or video player of the browser end for playing.
According to the technical scheme, the data format of the audio and video data is converted into the target format, and then the media resource file which can be used for playing is synthesized, so that the media resource file can be played in the drill player.
In an embodiment, the video playing method further includes the following steps:
step S210, displaying a progress bar on a drill splitting player;
step S220, when the current playing time reaches the termination time of the progress bar, the playing is paused.
In this embodiment, playing recorded broadcast and playing strip breaking is realized through live stream, and first, a strip breaking player needs to be initialized. The drill player has three input parameters: video playing address, starting time and strip splitting duration. The three parameters are input into the drill removal player when a drill removal play button is clicked, a display picture of the start time of the drill removal corresponds to a display picture of the appointed start time when the drill removal is carried out, and a display picture of the end time of the drill removal corresponds to a display picture of the appointed end time when the drill removal is carried out. The tear-bar duration is equal to the specified end time-the specified start time. If the web player is not initialized, performing initialization: and downloading the m3u8 file to a resource cache region, and analyzing information such as a slice list, the total duration and the like. And mounting the multimedia player for controlling the playing pause as an input target of the video stream to a webpage player for controlling the loading and storage of the video slices. Setting the current time of the multimedia player as the playing starting time, monitoring the change of the current time, downloading the slice corresponding to the time by the webpage player, then carrying out demultiplexing- > decryption- > audio and video decoding, then converging to create a media resource file and sending the media resource file to the multimedia player, and playing the media resource file.
In the present embodiment, the time length of the tear bar player and the display of the progress bar are set according to the start time and the tear bar time length. And controlling the playing time to be within the range of [ starting time, starting time + bar-dismantling duration ] during playing, wherein the corresponding display of the progress bar is also within the range. When the current time of the play is equal to the termination time of the progress bar, the play is paused.
Alternatively, after the playback is paused, the currently displayed screen freezes the corresponding screen at the specified termination time. Optionally, after pausing the play, returning to the specified start time. Optionally, after pausing the play, the drill-down player is closed, the preview of the slice file is ended, etc.
In the technical scheme of this embodiment, the effect of playing, recording and playing and breaking the segments is realized through the live stream.
In one embodiment, in order to avoid missing the highlight by not interrupting the live broadcasting when the bar is removed, the following scheme is adopted:
first, a live player and a drill player are used. And respectively indicating or adjusting the current playing time of the two players by using the live playing head and the strip splitting playing head so as to preview a frame of picture or set the playing starting time. The user clicks on the track timeline, which is on the time scale from 0 to the current maximum duration of the video. The initial live frames of the two players are the same, and from 0, the time axis is clicked to set the time for previewing by the drill-down player. And displaying and moving the drill breaking playing head according to the clicking position, acquiring the time of the track, calling a playing interface to set the current time, monitoring the change of the current time by the player, requesting a slice file corresponding to the time, analyzing the audio and video data, and adding the audio and video data to be stored and provided for the drill breaking player to play. Otherwise, the current playing time can be set when the drill breaking player progress bar is clicked, and the display position of the drill breaking playing head on the track is influenced.
Secondly, besides the pause of the live broadcast by the user, the live broadcast can be played all the time without being paused, and the position of a live broadcast playing head on the track is refreshed along with the updating of the playing time. Stripping can be performed in two modes: a live mode and an editing mode. The method comprises the steps that a strip splitting playing head appears when a track timeline is clicked or a strip splitting segment is selected, at the moment, a track is rolled to the position of the strip splitting playing head, an editing mode is entered, and if only one frame is previewed, the strip splitting playing head sets the current time as the time of the playing head; if the preview splitting segment is played, setting the starting time of the splitting player as the splitting starting time, and also setting the designated starting time and the playing time length as the splitting time length. The strip is disassembled by recording an in-point and an out-point and dragging the starting and ending handles of the generated strip disassembling block to adjust the in-out point time. The dotting strip splitting segment is marked with the starting and ending time, the time and the duration of the entry point are transmitted to the strip splitting player during previewing, and the strip splitting player monitors parameter changes and can find the position of the starting time. The current time displayed by the tear-bar player is the current time of the video stream minus the tear-bar start time. When the current time displayed by the drill player is larger than the playing time length, ending and resetting the player to the starting state.
In an embodiment, when splitting a live stream, the method inputs a live stream, initializes and parses the live stream only once, loads and parses a slice file of the live stream, and outputs the slice file to a plurality of multimedia players, including:
firstly, after the strip is opened and the entry page is opened, the data source is loaded to initialize the play of m3u 8. Initializing a webpage player according to a live broadcast or recorded broadcast address, downloading and analyzing m3u8 files, and analyzing slice addresses and slice durations corresponding to all the slice files.
Secondly, mounting a plurality of multimedia players to a webpage player, namely using the plurality of multimedia players as input targets for decoding audio and video data;
and thirdly, loading the slice file when the slice file is initialized or played by a multimedia player, if the slice file is stored in the storage, loading the slice file from the storage, otherwise, downloading the slice file with the slice duration to the storage through a slice address. And after the slice file is read, analyzing, and obtaining audio and video data through demultiplexing- > decrypting- > audio and video decoding. N storages are created by the N players and used for storing data which can be output to the corresponding drill splitting player for playing after the mixed flow is decoded. And after the data in the resource buffer area is updated, the data is used as a data source and mounted on a target player for playing.
Because two players are adopted, one path of live stream is input to support multi-path playing, live playing is not interrupted when the bar is detached, and the fluency of video playing is improved.
While the embodiments of the present application provide an embodiment of a video playing method, it should be noted that, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here.
As shown in fig. 5, the present application provides a video playing system, which includes:
the acquisition module 10 is configured to acquire a live stream and a slice file corresponding to the live stream. In an embodiment, the obtaining module 10 is further configured to obtain a current play mode; when the playing mode is a live mode, determining a strip-splitting duration according to the specified starting time and the specified ending time on a strip-splitting time axis; and acquiring the slice files from all the slice files which are split in advance based on the splitting duration. In an embodiment, before the obtaining module 10, a module is further included to split the live stream into slice files with preset slice duration, so as to obtain all split slice files.
And the playing module 20 is configured to play the live stream and play the slice file on the same display interface. In an embodiment, the playing module 20 is further configured to determine whether audio/video data of the slice file has been stored; if so, playing the stored audio and video data; if not, when the browser supports a media source expansion interface, acquiring an m3u8 file corresponding to a slice file, analyzing the m3u8 file to obtain a slice address, acquiring audio and video data of the slice file from the slice address, and playing the acquired audio and video data. In an embodiment, the playing module 20 is further configured to convert the stored data format of the audio/video data into a target format; synthesizing audio and video data in a target format through the media source expansion interface to obtain a media resource file; and playing the media resource file.
In an embodiment, the video playing system further includes a splitting module, as shown in fig. 4, the splitting module includes three layers, where the bottom layer is a web player, the middle layer is a media player for the web player to mount data, and is used to display a playing interface and provide an interface to the outside, and the upper layer is a splitting service playing control layer, and a splitting playing head for synchronously responding to and controlling a track.
In one embodiment, the playing module 20 further includes a drill splitting playing module, and the drill splitting playing module is configured to display a progress bar on the drill splitting player; and when the current playing time reaches the termination time of the progress bar, pausing the playing.
The specific implementation of the video playing system of the present application is substantially the same as the embodiments of the video playing method, and is not described herein again.
Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, where a video playing program is stored in the computer-readable storage medium, and when the video playing program is executed by a processor, the video playing method realizes the steps of the video playing method, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
Since the computer-readable storage medium provided in the embodiments of the present application is a computer-readable storage medium used for implementing the method in the embodiments of the present application, based on the method described in the embodiments of the present application, those skilled in the art can understand the specific structure and modification of the computer-readable storage medium, and thus details are not described herein. Any computer readable storage medium that can be used in the method of the embodiments of the present application is intended to be protected by the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A video playing method is characterized by comprising the following steps:
acquiring a live stream and a slice file corresponding to the live stream;
and playing the live stream and the slice file on the same display interface.
2. The video playing method according to claim 1, wherein the step of obtaining the slice file corresponding to the live stream comprises:
acquiring a current play mode;
when the playing mode is a live mode, determining a strip-splitting duration according to the specified starting time and the specified ending time on a strip-splitting time axis;
and acquiring the slice files from all the slice files which are split in advance based on the splitting duration.
3. The video playing method according to claim 2, wherein the step of obtaining the slice file corresponding to the live stream is preceded by:
and splitting the live stream into slice files with preset slice duration to obtain all split slice files.
4. The video playback method of claim 1, wherein the step of playing back the slice file comprises:
judging whether the audio and video data of the slice file is stored or not;
if so, playing the stored audio and video data;
if not, when the browser supports a media source expansion interface, acquiring an m3u8 file corresponding to a slice file, analyzing the m3u8 file to obtain a slice address, acquiring audio and video data of the slice file from the slice address, and playing the acquired audio and video data.
5. The video playback method of claim 4, wherein the step of playing back the stored audio-visual data comprises:
converting the stored data format of the audio and video data into a target format;
synthesizing audio and video data in a target format through the media source expansion interface to obtain a media resource file;
and playing the media resource file.
6. The video playback method of claim 2, wherein the video playback method further comprises:
displaying a progress bar on a drill-breaking player;
and when the current playing time reaches the termination time of the progress bar, pausing the playing.
7. A video playback system, comprising:
the acquisition module is used for acquiring a live stream and a slice file corresponding to the live stream;
and the playing module is used for playing the live stream and playing the slice file on the same display interface.
8. The video playback system of claim 7, further comprising a striping module, wherein the striping module comprises three layers, wherein the bottom layer is a web player, the middle layer is a media player for mounting audio/video data of a slice file, and the upper layer is a striping playback control layer for synchronously responding to and controlling a striping playback header of a striping timeline.
9. An electronic device, characterized in that the electronic device comprises: memory, processor and a video playback program stored on the memory and executable on the processor, the video playback program when executed by the processor implementing the steps of the video playback method as claimed in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that the storage medium stores a video playback program, which when executed by a processor implements the steps of the video playback method of any one of claims 1-6.
CN202210397119.1A 2022-04-15 2022-04-15 Video playing method, system, device and storage medium Pending CN114827755A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210397119.1A CN114827755A (en) 2022-04-15 2022-04-15 Video playing method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210397119.1A CN114827755A (en) 2022-04-15 2022-04-15 Video playing method, system, device and storage medium

Publications (1)

Publication Number Publication Date
CN114827755A true CN114827755A (en) 2022-07-29

Family

ID=82537380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210397119.1A Pending CN114827755A (en) 2022-04-15 2022-04-15 Video playing method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN114827755A (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546813A (en) * 2013-08-16 2014-01-29 Tcl集团股份有限公司 Android platform based video preview method and smart television
CN103607657A (en) * 2013-11-20 2014-02-26 乐视网信息技术(北京)股份有限公司 Method and device for realizing picture-in-picture playing function
CN104902145A (en) * 2015-06-03 2015-09-09 无锡天脉聚源传媒科技有限公司 Method and device for playing live streaming video
CN106131700A (en) * 2016-07-04 2016-11-16 天脉聚源(北京)传媒科技有限公司 A kind of sharing files method and device during net cast
CN107948669A (en) * 2017-12-22 2018-04-20 成都华栖云科技有限公司 Based on CDN fast video production methods
CN108540854A (en) * 2018-03-29 2018-09-14 努比亚技术有限公司 Live video clipping method, terminal and computer readable storage medium
CN109348240A (en) * 2018-10-25 2019-02-15 网易(杭州)网络有限公司 Video broadcasting method, apparatus and system, electronic equipment and storage medium
CN110149524A (en) * 2018-02-11 2019-08-20 腾讯科技(深圳)有限公司 Live stream slice systems, live stream dicing method, device and readable medium
CN110784735A (en) * 2019-11-12 2020-02-11 广州虎牙科技有限公司 Live broadcast method and device, mobile terminal, computer equipment and storage medium
CN111107415A (en) * 2018-10-26 2020-05-05 武汉斗鱼网络科技有限公司 Live broadcast room picture-in-picture playing method, storage medium, electronic equipment and system
CN112135181A (en) * 2020-09-22 2020-12-25 维沃移动通信有限公司 Video preview method and device and electronic equipment
CN112470482A (en) * 2020-10-28 2021-03-09 百果园技术(新加坡)有限公司 Video playing method, device, terminal and storage medium
CN113329267A (en) * 2021-05-27 2021-08-31 北京奇艺世纪科技有限公司 Video playing method and device, terminal equipment and storage medium
CN113923502A (en) * 2021-11-04 2022-01-11 上海哔哩哔哩科技有限公司 Live video playing method and device

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546813A (en) * 2013-08-16 2014-01-29 Tcl集团股份有限公司 Android platform based video preview method and smart television
CN103607657A (en) * 2013-11-20 2014-02-26 乐视网信息技术(北京)股份有限公司 Method and device for realizing picture-in-picture playing function
CN104902145A (en) * 2015-06-03 2015-09-09 无锡天脉聚源传媒科技有限公司 Method and device for playing live streaming video
CN106131700A (en) * 2016-07-04 2016-11-16 天脉聚源(北京)传媒科技有限公司 A kind of sharing files method and device during net cast
CN107948669A (en) * 2017-12-22 2018-04-20 成都华栖云科技有限公司 Based on CDN fast video production methods
CN110149524A (en) * 2018-02-11 2019-08-20 腾讯科技(深圳)有限公司 Live stream slice systems, live stream dicing method, device and readable medium
CN108540854A (en) * 2018-03-29 2018-09-14 努比亚技术有限公司 Live video clipping method, terminal and computer readable storage medium
CN109348240A (en) * 2018-10-25 2019-02-15 网易(杭州)网络有限公司 Video broadcasting method, apparatus and system, electronic equipment and storage medium
CN111107415A (en) * 2018-10-26 2020-05-05 武汉斗鱼网络科技有限公司 Live broadcast room picture-in-picture playing method, storage medium, electronic equipment and system
CN110784735A (en) * 2019-11-12 2020-02-11 广州虎牙科技有限公司 Live broadcast method and device, mobile terminal, computer equipment and storage medium
CN112135181A (en) * 2020-09-22 2020-12-25 维沃移动通信有限公司 Video preview method and device and electronic equipment
CN112470482A (en) * 2020-10-28 2021-03-09 百果园技术(新加坡)有限公司 Video playing method, device, terminal and storage medium
CN113329267A (en) * 2021-05-27 2021-08-31 北京奇艺世纪科技有限公司 Video playing method and device, terminal equipment and storage medium
CN113923502A (en) * 2021-11-04 2022-01-11 上海哔哩哔哩科技有限公司 Live video playing method and device

Similar Documents

Publication Publication Date Title
JP5499331B2 (en) Streaming media trick play
US9530452B2 (en) Video preview creation with link
US10200748B2 (en) System and method for commercial detection in digital media environments
US11284170B1 (en) Video preview mechanism
EP2702768B1 (en) Creation of video bookmarks via scripted interactivity in advanced digital television
JP7284142B2 (en) Systems and methods for stitching advertisements into streaming content
US9787627B2 (en) Viewer interface for broadcast image content
US9736432B2 (en) Identifying popular network video segments
CN101345853B (en) Method and system for acquiring video resource cutting time point
CA2943975C (en) Method for associating media files with additional content
US20170168697A1 (en) Systems and methods for playing videos
CN113424553B (en) Method and system for playback of media items
US10445762B1 (en) Online video system, method, and medium for A/B testing of video content
CN112333536A (en) Audio and video editing method, equipment and computer readable storage medium
US11778286B2 (en) Systems and methods for summarizing missed portions of storylines
US20210004131A1 (en) Highlights video player
US11545185B1 (en) Method and apparatus for frame accurate high resolution video editing in cloud using live video streams
JP2008053824A (en) Information processing terminal, server and program
CN113655930B (en) Information publishing method, information display method and device, electronic equipment and medium
CN114827755A (en) Video playing method, system, device and storage medium
JP2017098706A (en) Receiving device, segment acquisition method and program
CN107820111B (en) Information equipment
KR102659489B1 (en) Information processing devices, information processing devices and programs
CN115767190A (en) Multimedia playing progress bar generation method and device
CN114025201A (en) Video playing method, device, equipment and 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