Nothing Special   »   [go: up one dir, main page]

CN109587514B - Video playing method, medium and related device - Google Patents

Video playing method, medium and related device Download PDF

Info

Publication number
CN109587514B
CN109587514B CN201710900035.4A CN201710900035A CN109587514B CN 109587514 B CN109587514 B CN 109587514B CN 201710900035 A CN201710900035 A CN 201710900035A CN 109587514 B CN109587514 B CN 109587514B
Authority
CN
China
Prior art keywords
video
request
index file
demand
live broadcast
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710900035.4A
Other languages
Chinese (zh)
Other versions
CN109587514A (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.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
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, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710900035.4A priority Critical patent/CN109587514B/en
Publication of CN109587514A publication Critical patent/CN109587514A/en
Application granted granted Critical
Publication of CN109587514B publication Critical patent/CN109587514B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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/233Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/612Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/762Media network packet handling at the source 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • 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/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4383Accessing a communication channel
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a video playing method, a medium and a related device, which are used for realizing on-demand and live broadcast switching and time-shifted watching of an HLS video in the process of live broadcast streaming transmission of the HLS video. In the video live broadcasting process, a live broadcasting index file and an on-demand index file are generated simultaneously; the method comprises the following steps: when a video playing request is received, judging whether the video playing request is a video live broadcast request or a video on demand request; if the request is a video live broadcast request, acquiring the live broadcast index file and sending the live broadcast index file to a requesting party; and if the request is a video on demand request, acquiring the on demand index file, and supplementing an end field in the acquired on demand index file and then sending the on demand index file to the requesting party.

Description

Video playing method, medium and related device
Technical Field
The present invention relates to the field of multimedia technologies, and in particular, to a video playing method, medium, and related apparatus.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
Hls (http Live streaming) is a dynamic rate adaptation technique. The method is mainly used for audio and video services of the terminal. Includes an index file of m3u (8), a TS (transport stream) media slice file, and a key encryption string file.
When HLS is used, there are 2 ways of on-demand and live broadcasting. In which a return visit is made to the video content that has just been live, which is generally referred to as time-shifted live. Therefore, to realize on-demand or Live broadcast of HTTP Live Streaming, the main steps include:
1. collecting original data of a video source and an audio source;
2. carrying out H264 coding and AAC coding on original data;
3. packing the video and audio data into MPEG-TS packets;
HLS segmentation generation strategy and m3u (8) index file;
HTTP transport protocol.
Compared with common Streaming Media live broadcast protocols, such as an RTMP (Real Time Messaging Protocol) Protocol, an RTSP (Real Time Streaming Protocol) Protocol, an MMS (Microsoft Media Server Protocol) Protocol, etc., the HLS live broadcast is the most different in that a live broadcast client acquires not a complete data stream. The HLS protocol stores the live data stream as continuous media files (MPEG-TS format) with short time at the server end, and the client end continuously downloads and plays the small files, because the server end always generates the latest live data into new small files, the client end only needs to continuously play the files acquired from the server in sequence, thereby realizing live broadcast. It follows that basically HLS can be considered as enabling live broadcast in an on-demand technology. Because the data is transmitted by the HTTP protocol, the problems of a firewall or an agent are not considered at all, the time length of the segmented file is short, and the client can select and switch the code rate quickly to adapt to the playing under different bandwidth conditions. However, the technical characteristics of HLS determine that its latency is generally always higher than that of the normal streaming live protocol.
According to the rules of the HLS protocol, the old index file needs to be deleted in real time during the live streaming. Therefore, if the user terminal wants to see the video at the past moment in the process of live streaming, the server cannot perform audio/video push.
Therefore, the conventional HLS video processing method and system have the problems that on-demand and live broadcast switching cannot be conveniently supported, and time-shift watching cannot be realized.
Disclosure of Invention
The embodiment of the invention provides a video playing method, a medium and a related device, which are used for realizing on-demand and live broadcast switching and time-shift watching of an HLS video in the process of live broadcast streaming of the HLS video.
The embodiment of the invention provides a video playing method, wherein in the process of video live broadcast, a live broadcast index file and an on-demand index file are generated simultaneously;
the method comprises the following steps:
when a video playing request is received, judging whether the video playing request is a video live broadcast request or a video on demand request;
if the request is a video live broadcast request, acquiring the live broadcast index file and sending the live broadcast index file to a requesting party;
and if the request is a video on demand request, acquiring the on demand index file, and supplementing an end field in the acquired on demand index file and then sending the on demand index file to the requesting party.
Optionally, in the video live broadcast process, the live broadcast index file and the on-demand index file are generated simultaneously according to the following method:
in the video live broadcast process, receiving original data and processing parameters of a video source and an audio source, wherein the processing parameters comprise the slice length and the number of a hypertext transfer protocol live broadcast stream (HLS) and encoding parameters;
coding the original data according to the coding parameters to obtain video coding data and audio coding data;
packaging the video coding data and the audio coding data into a data packet with a preset format;
segmenting the data packet according to the HLS slice length and the number to obtain TS slice files with corresponding number; and are
And generating a live broadcast index file and an on-demand index file, wherein the live broadcast index file comprises the TS slice file obtained this time, and the on-demand index comprises all the TS slice files.
Optionally, generating the on-demand index file specifically includes:
and supplementing the TS slice file obtained this time into the on-demand index file.
Optionally, the determining whether the video playing request is a video live broadcast request or a video on demand request specifically includes:
judging whether the video playing request is a video live broadcasting request or a video on demand request according to the time point of receiving the video playing request; or
And judging whether the video playing request is a video live broadcasting request or a video on demand request according to the access path or the access interface of the received video playing request.
An embodiment of the present invention provides a video playing device, including:
the generating unit is used for simultaneously generating a live broadcast index file and an on-demand index file in the video live broadcast process;
the device comprises a judging unit, a video playing unit and a video playing unit, wherein the judging unit is used for judging whether a video playing request is a live video request or a video on demand request when the video playing request is received;
the response unit is used for acquiring the live broadcast index file and sending the live broadcast index file to a requester if the judgment unit judges that the request is a video live broadcast request; and if the judging unit judges that the request is a video on demand request, acquiring the on demand index file, supplementing an end field in the acquired on demand index file, and then sending the end field to the requesting party.
Optionally, the generating unit specifically includes:
the receiving subunit is used for receiving original data and processing parameters of a video source and an audio source in a video live broadcast process, wherein the processing parameters comprise the slice length and the number of a hypertext transfer protocol live broadcast stream HLS and encoding parameters;
the encoding subunit is used for encoding the original data according to the encoding parameters to obtain video encoding data and audio encoding data;
the packaging subunit is used for packaging the video coding data and the audio coding data into a data packet with a preset format;
the slicing subunit is used for segmenting the data packet according to the HLS slicing length and the number to obtain TS slicing files with corresponding number;
and the generation subunit is used for generating a live broadcast index file and an on-demand index file, wherein the live broadcast index file comprises the TS slice file obtained this time, and the on-demand index comprises all the TS slice files.
Optionally, the generating subunit is configured to supplement the currently obtained TS slice file to the on-demand index file.
Optionally, the determining unit is specifically configured to determine, according to a time point at which the video playing request is received, whether the video playing request is a live video request or a video-on-demand request; or judging whether the video playing request is a video live broadcast request or a video on demand request according to the access path or the access interface of the received video playing request.
An embodiment of the present invention provides a computing apparatus, including at least one processing unit and at least one storage unit, where the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit is enabled to execute the steps of any of the video playing methods described above.
An embodiment of the present invention provides a computer-readable medium, which stores a computer program executable by a computing device, and when the program runs on the computing device, the computer program causes the computing device to execute the steps of any of the video playing methods described above.
The video playing method, the media and the related device provided by the embodiment of the invention generate the on-demand index file for the user to call when on-demand while generating the live index file, so that the on-demand and live can be switched randomly while live broadcasting is carried out, and a time-shifting watching function is supported.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a diagram illustrating an on-demand index file according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a live index file according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating a process of a server generating an on-demand index file and a live index file according to an embodiment of the present invention;
FIG. 4 is a schematic view illustrating an implementation flow of a video playing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a possible video playback system according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a video playback device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a computing device according to an embodiment of the invention.
Detailed Description
In order to support random switching between on-demand and live broadcasting in the process of live video broadcasting and realize time-shift watching, the embodiment of the invention provides a video playing method, a medium and a related device.
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention, and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
The inventor finds that an old index file needs to be deleted in real time in the existing live video streaming process based on the HLS protocol, so that if a user wants to see videos at past moments in the live video streaming process, a server cannot perform corresponding audio and video pushing, that is, the existing HLS protocol does not support any switching between on-demand and live video in the live video streaming process, the user can perform on-demand watching only after the server generates an on-demand index file at the end of live video, and therefore the existing HLS protocol does not support time-shifting watching.
In view of this, an embodiment of the present invention provides a video playing method, in a video live broadcasting process, an on-demand index file that has played a video is generated while a live broadcast index file is generated, and is invoked when the on-demand index file is shared with a user for on-demand broadcasting, so that an arbitrary switch between on-demand broadcasting and live broadcasting is realized, and a time-shift watching function is realized.
Fig. 1 is a schematic diagram of an on-demand index file, and fig. 2 is a schematic diagram of a live index file. After receiving a video playing request, a video player or a browser first judges whether the request is an on-demand request or a live broadcast request, and performs subsequent processing. If the request is on-demand, the playing of the TS video in the index file is finished, and jumping is supported in the playing. If the request is a live broadcast request, TS videos in the index file are sequentially played from the beginning, the index file is requested again after the playing is finished, the playing is performed sequentially, and skipping cannot be performed. Therefore, the conventional HLS playing technology cannot satisfy the switching between on-demand and live broadcasting, and the time-shift viewing function.
In the embodiment of the invention, in order to meet the time-shifting watching requirement in the live video broadcasting process, the video playing method and the video playing system compatible with the HLS technology are provided, the random switching between on-demand broadcasting and live broadcasting is realized, and the time-shifting watching function is supported, so that the existing video player or browser can meet the time-shifting watching requirement without redevelopment.
In specific implementation, in the video live broadcasting process, the video playing method provided in the embodiment of the present invention generates the live broadcast index file and the on-demand index file of the played video at the same time, and specifically, the live broadcast index file and the on-demand index file may be generated according to the flow shown in fig. 3:
and S31, receiving the original data and processing parameters of the video source and the audio source in the video live broadcast process.
Wherein the processing parameters comprise the slice length and number of the HTTP Live Streaming (HLS) and the encoding parameters.
In this step, the video transcoder in the server receives the video stream input, which includes the original data of the video source and the audio source, such as RTSP, RTMP, UDP, etc.; in specific implementation, the processing parameters of the video processor are also input, including the length of the HLS slice, for example, 3 seconds, 5 seconds, or 10 seconds; the number of HLS slices, e.g., 3 or 5; and coding parameters of the video, such as 3 seconds, 5 seconds, or 10 seconds; number of HLS slices, e.g. 3 or 5; coding parameters of the video, such as code rate, frame rate, resolution; coding parameters of the audio, such as code rate, channel; other parameters such as subtitles, picture overlays, etc.
And S32, coding the original data according to the coding parameters to obtain video coding data and audio coding data.
In a specific implementation, the video transcoder may perform H264 coding, AAC coding, and the like on the original data, which is not limited in this embodiment of the present invention.
And S33, packaging the video coded data and the audio coded data into a data packet with a preset format.
For example, a video transcoder may encapsulate video encoded data and audio encoded data into MPEG-TS packets.
And S34, segmenting the data packet to obtain TS slice files with corresponding quantity according to the HLS slice length and quantity.
And S35, generating a live broadcast index file and an on-demand index file, wherein the live broadcast index file comprises the TS slice file obtained this time, and the on-demand index comprises all the TS slice files.
In this step, the video transcoder may perform slicing and live index generation conforming to the HLS protocol on the input video stream, and perform the supplementation of the on-demand index file at the same time. The live index includes n slices generated this time, for example, n may be 3 or 5; the on-demand index contains all the slices, and the TS slice file obtained at this time is supplemented into the on-demand index file after each new slice is generated.
In specific implementation, the video server updates the received HLS index file and the received slice file in real time and responds to a request of a user. Based on this, an embodiment of the present invention provides a video playing method, as shown in fig. 4, which is a schematic implementation flow diagram of the video playing method provided in the embodiment of the present invention, and the method may include the following steps:
s41, when receiving the video playing request, judging whether the video playing request is a video live broadcast request or a video on demand request, if the video live broadcast request is the video live broadcast request, executing the step S42, and if the video on demand request is the video on demand request, executing the step S43.
In the step, the video server can judge whether the video playing request is a live video request or a video on demand request according to the time point of receiving the video playing request; or judging whether the video playing request is a video live broadcast request or a video on demand request according to the access path or the access interface of the received video playing request.
Specifically, the video server may determine whether the request is a live broadcast request or an on-demand broadcast request according to a time point of a broadcast request sent by a user. The video server can also provide different access paths and access interfaces for the outside to distinguish the live request from the on-demand request.
And S42, acquiring the live index file and sending the live index file to a requester, and ending the process.
In this step, if the request sent by the user is a live broadcast request, the live broadcast index file generated by the video transcoder is read and returned to the user.
And S43, acquiring the on-demand index file, and sending the on-demand index file to the requester after supplementing an end field in the acquired on-demand index file.
In this step, if the request sent by the user is a video-on-demand request, the current on-demand index file is read first, and then the end field "# EXT-X-ENDLIST" is supplemented to the on-demand index file, and then returned to the user.
Finally, when the live broadcasting is finished, the video transcoder deletes the live broadcasting index file, and then supplements an end field "# EXT-X-ENDLIST" at the bottom of the live broadcasting index file to generate a complete click-to-dial index file.
In the video playing method provided by the embodiment of the invention, the on-demand index file is generated while the video is live broadcast, so that the random switching between on-demand and live broadcast can be supported, the time-shifted viewing is realized, and the minimum time interval of the time-shifted viewing is the length of one TS slice.
It should be noted that, in this embodiment of the present invention, the video transcoder and the video storage device, for example, a video storage server, may be independently deployed, and in this embodiment, as shown in fig. 5, it is a schematic structural diagram of a system in which the video transcoder and the video storage device may be independently deployed. In a specific implementation, the video transcoder and the video storage device may also be disposed in the video server, which is not limited in this embodiment of the present invention.
When the video transcoder and the video storage device are independently deployed, the video transcoder completes the conversion from the video stream input to the HLS video stream, such as RTSP, RTMP, UDP, etc.; and generating a live index file and an on-demand index file, the input parameters of the video processor further including the length of the HLS slice, for example, 3 seconds, 5 seconds, or 10 seconds; number of HLS slices, e.g. 3 or 5; coding parameters of the video, such as code rate, frame rate, resolution; coding parameters of the audio, such as code rate, channel; other parameters such as subtitles, picture overlays, etc. The video storage server stores TS slice files, live broadcast index files and on-demand index files of HLS videos. The video server finishes the processing of a user request, and if a video playing request sent by the user is a video live broadcast request, a live broadcast index file generated by the video transcoder is read from the video storage server and returned to the user; if the video playing request sent by the user is a video-on-demand request, reading the current on-demand index file, then supplementing an ending field "# EXT-X-ENDLIST" to the on-demand index file, and then returning to the user. And the video player sends a video live broadcast request or a video on demand request to the video server according to the operation of the user.
Based on the same inventive concept, the embodiment of the present invention further provides a video playing apparatus, and as the principle of the apparatus for solving the problem is similar to the video playing method, the implementation of the apparatus can refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 6, which is a schematic structural diagram of a video playing apparatus according to an embodiment of the present invention, the video playing apparatus includes:
the generating unit 61 is used for simultaneously generating a live broadcast index file and an on-demand index file in the video live broadcast process;
the judging unit 62 is configured to, when receiving a video playing request, judge whether the video playing request is a live video request or a video-on-demand request;
a response unit 63, configured to, if the determining unit 62 determines that the request is a video live broadcast request, obtain the live broadcast index file and send the live broadcast index file to a requestor; if the determining unit 62 determines that the request is a video-on-demand request, the on-demand index file is obtained, and the obtained on-demand index file is supplemented with an end field and then sent to the requesting party.
The generating unit 61 specifically includes:
the receiving subunit is used for receiving original data and processing parameters of a video source and an audio source in a video live broadcast process, wherein the processing parameters comprise the slice length and the number of a hypertext transfer protocol live broadcast stream HLS and encoding parameters;
the encoding subunit is used for encoding the original data according to the encoding parameters to obtain video encoding data and audio encoding data;
the packaging subunit is used for packaging the video coding data and the audio coding data into a data packet with a preset format;
the slicing subunit is used for segmenting the data packet according to the HLS slicing length and the number to obtain TS slicing files with corresponding number;
and the generation subunit is used for generating a live broadcast index file and an on-demand index file, wherein the live broadcast index file comprises the TS slice file obtained this time, and the on-demand index comprises all the TS slice files.
Preferably, the generating subunit is configured to supplement the currently obtained TS slice file to the on-demand index file.
In specific implementation, the determining unit 62 is specifically configured to determine, according to a time point at which the video playing request is received, whether the video playing request is a live video request or a video-on-demand request; or judging whether the video playing request is a video live broadcast request or a video on demand request according to the access path or the access interface of the received video playing request.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same or in multiple pieces of software or hardware in practicing the invention.
Having described the video playback method and apparatus according to an exemplary embodiment of the present invention, a computing apparatus according to another exemplary embodiment of the present invention is described next.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible embodiments, a computing device according to the present invention may comprise at least one processing unit, and at least one memory unit. Wherein the storage unit stores program code, which, when executed by the processing unit, causes the processing unit to perform the steps of the video playing method according to various exemplary embodiments of the present invention described above in this specification. For example, the processing unit may execute step S41 shown in fig. 4, determine whether the video playing request is a live video request or a video on demand request when the video playing request is received, execute step S42 if the video playing request is a live video request, execute step S43 if the video on demand request is a video on demand request, and execute step S42, acquire the live index file and send to the requestor, where the process ends, and execute step S43, acquire the on demand index file, and send to the requestor after an end field is supplemented in the acquired on demand index file.
The computing device 70 according to this embodiment of the invention is described below with reference to fig. 7. The computing device 70 shown in fig. 7 is only an example and should not impose any limitations on the functionality or scope of use of embodiments of the present invention.
As shown in fig. 7, the computing apparatus 70 is embodied in the form of a general purpose computing device. Components of computing device 70 may include, but are not limited to: the at least one processing unit 71, the at least one memory unit 72, and a bus 73 connecting the various system components (including the memory unit 72 and the processing unit 71).
Bus 73 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The storage unit 72 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)721 and/or cache memory 722, and may further include Read Only Memory (ROM) 723.
The memory unit 72 may also include a program/utility 725 having a set (at least one) of program modules 724, such program modules 724 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Computing device 70 may also communicate with one or more external devices 74 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with computing device 70, and/or with any devices (e.g., router, modem, etc.) that enable computing device 70 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 75. Also, computing device 70 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) through network adapter 76. As shown, network adapter 76 communicates with other modules for computing device 70 over bus 73. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computing device 70, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, the aspects of the video playing method provided by the present invention may also be implemented as a program product, which includes program code, when the program product runs on a computer device, the program code is configured to enable the computer device to execute the steps in the video playing method according to various exemplary embodiments of the present invention described above in this specification, for example, the computer device may execute step S41 shown in fig. 4, when receiving a video playing request, determine whether the video playing request is a video live request or a video on demand request, execute step S42 if the video playing request is received, execute step S43 if the video on demand request is received, and execute step S42, obtain the live index file to send to a requesting party, end the process, and obtain the on demand index file in step S43, and sending the obtained on-demand index file to the requesting party after supplementing an end field.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for video playback of embodiments of the present invention may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units described above may be embodied in one unit, according to embodiments of the invention. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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.
While preferred embodiments of the present invention 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 such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (8)

1. A video playing method is characterized in that in the process of video live broadcast, a live broadcast index file and an on-demand index file of played video are generated at the same time;
the method comprises the following steps:
when a video playing request is received, judging whether the video playing request is a video live broadcast request or a video on demand request;
if the request is a video live broadcast request, acquiring the live broadcast index file and sending the live broadcast index file to a requesting party;
if the request is a video on demand request, acquiring the on demand index file, and supplementing an end field in the acquired on demand index file and then sending the end field to the requesting party;
in the video live broadcast process, a live broadcast index file and an on-demand index file are simultaneously generated according to the following methods:
in the video live broadcast process, receiving original data and processing parameters of a video source and an audio source, wherein the processing parameters comprise the slice length and the number of a hypertext transfer protocol live broadcast stream (HLS) and encoding parameters;
coding the original data according to the coding parameters to obtain video coding data and audio coding data;
packaging the video coding data and the audio coding data into a data packet with a preset format;
segmenting the data packet according to the HLS slice length and the number to obtain TS slice files with corresponding number; and are
And generating a live broadcast index file and an on-demand index file, wherein the live broadcast index file comprises the TS slice file obtained this time, and the on-demand index comprises all the TS slice files.
2. The method of claim 1, wherein generating the on-demand index file specifically comprises:
and supplementing the TS slice file obtained this time into the on-demand index file.
3. The method of claim 1 or 2, wherein determining whether the video playing request is a live video request or a video-on-demand request specifically comprises:
judging whether the video playing request is a video live broadcasting request or a video on demand request according to the time point of receiving the video playing request; or
And judging whether the video playing request is a video live broadcasting request or a video on demand request according to the access path or the access interface of the received video playing request.
4. A video playback apparatus, comprising:
the generating unit is used for simultaneously generating a live broadcast index file and an on-demand index file of a played video in the video live broadcast process;
the device comprises a judging unit, a video playing unit and a video playing unit, wherein the judging unit is used for judging whether a video playing request is a live video request or a video on demand request when the video playing request is received;
the response unit is used for acquiring the live broadcast index file and sending the live broadcast index file to a requester if the judgment unit judges that the request is a video live broadcast request; if the judging unit judges that the request is a video on demand request, the on demand index file is obtained, and an end field is supplemented in the obtained on demand index file and then the obtained on demand index file is sent to the requesting party;
the generating unit specifically includes:
the receiving subunit is used for receiving original data and processing parameters of a video source and an audio source in a video live broadcast process, wherein the processing parameters comprise the slice length and the number of a hypertext transfer protocol live broadcast stream HLS and encoding parameters;
the encoding subunit is used for encoding the original data according to the encoding parameters to obtain video encoding data and audio encoding data;
the packaging subunit is used for packaging the video coding data and the audio coding data into a data packet with a preset format;
the slicing subunit is used for segmenting the data packet according to the HLS slicing length and the number to obtain TS slicing files with corresponding number;
and the generation subunit is used for generating a live broadcast index file and an on-demand index file, wherein the live broadcast index file comprises the TS slice file obtained this time, and the on-demand index comprises all the TS slice files.
5. The apparatus of claim 4,
and the generating subunit is configured to supplement the currently obtained TS slice file to the on-demand index file.
6. The apparatus of claim 4 or 5,
the judging unit is specifically configured to judge whether the video playing request is a live video request or a video-on-demand request according to a time point at which the video playing request is received; or judging whether the video playing request is a video live broadcast request or a video on demand request according to the access path or the access interface of the received video playing request.
7. A computing device comprising at least one processing unit and at least one memory unit, wherein the memory unit stores a computer program that, when executed by the processing unit, causes the processing unit to perform the steps of the method of any of claims 1 to 3.
8. A computer-readable medium, in which a computer program is stored which is executable by a computing device, the program, when run on the computing device, causing the computing device to perform the steps of the method of any one of claims 1 to 3.
CN201710900035.4A 2017-09-28 2017-09-28 Video playing method, medium and related device Active CN109587514B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710900035.4A CN109587514B (en) 2017-09-28 2017-09-28 Video playing method, medium and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710900035.4A CN109587514B (en) 2017-09-28 2017-09-28 Video playing method, medium and related device

Publications (2)

Publication Number Publication Date
CN109587514A CN109587514A (en) 2019-04-05
CN109587514B true CN109587514B (en) 2021-08-06

Family

ID=65914375

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710900035.4A Active CN109587514B (en) 2017-09-28 2017-09-28 Video playing method, medium and related device

Country Status (1)

Country Link
CN (1) CN109587514B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112243159B (en) * 2019-07-19 2023-05-05 武汉佳世创科技有限公司 DVB-based data processing and reading method, server, terminal and system
CN111787404B (en) * 2020-07-26 2022-05-06 易视腾科技股份有限公司 Live stream playing method and device
CN112565906A (en) * 2020-11-05 2021-03-26 深圳市麦谷科技有限公司 On-demand video processing method and system
CN112866730B (en) * 2020-12-31 2022-09-13 广州博冠信息科技有限公司 Streaming media data transmission method, device, system, electronic equipment and storage medium
CN115225916B (en) * 2021-04-15 2024-04-23 北京字节跳动网络技术有限公司 Video processing method, device and equipment
CN113438503B (en) * 2021-05-28 2023-04-21 曙光网络科技有限公司 Video file restoring method, device, computer equipment and storage medium
CN115623237B (en) * 2022-10-20 2024-03-29 杭州雅顾科技有限公司 List live broadcast method, device, equipment and computer readable storage medium
CN115802118A (en) * 2022-11-22 2023-03-14 京东科技信息技术有限公司 Time-shifting review method and device for live video

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572555A (en) * 2012-01-16 2012-07-11 深圳市同洲视讯传媒有限公司 Method and system for realizing live video playback at HTTP live streaming (HLS) client
CN103686245A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 Video-on-demand and live broadcasting switching method and device based on HLS protocol
CN103716662A (en) * 2013-12-05 2014-04-09 乐视网信息技术(北京)股份有限公司 Mixed transmission method and server

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9038116B1 (en) * 2009-12-28 2015-05-19 Akamai Technologies, Inc. Method and system for recording streams
CN104581230A (en) * 2015-01-20 2015-04-29 卡内基投资科技有限公司 Method capable of continuously playing different video clips without regeneration
WO2016200078A1 (en) * 2015-06-11 2016-12-15 삼성전자 주식회사 Method and device for sharing multimedia content
US10356146B2 (en) * 2015-07-08 2019-07-16 International Business Machines Corporation Processing of streamed multimedia data
US20170171574A1 (en) * 2015-12-15 2017-06-15 Le Holdings (Beijing) Co., Ltd. Method and system for switching video live broadcasting to on-demand broadcasting

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102572555A (en) * 2012-01-16 2012-07-11 深圳市同洲视讯传媒有限公司 Method and system for realizing live video playback at HTTP live streaming (HLS) client
CN103686245A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 Video-on-demand and live broadcasting switching method and device based on HLS protocol
CN103716662A (en) * 2013-12-05 2014-04-09 乐视网信息技术(北京)股份有限公司 Mixed transmission method and server

Also Published As

Publication number Publication date
CN109587514A (en) 2019-04-05

Similar Documents

Publication Publication Date Title
CN109587514B (en) Video playing method, medium and related device
US10230958B2 (en) Audio splitting with codec-enforced frame sizes
US11537562B2 (en) Auxiliary manifest file to provide timed metadata
CN107743708B (en) Method, apparatus and node for participating in an ABR streaming session via DASH
CN102055717B (en) Quick playing method, terminal and server
US9247317B2 (en) Content streaming with client device trick play index
US20140247887A1 (en) Just-in-time (jit) encoding for streaming media content
US20150256600A1 (en) Systems and methods for media format substitution
US10602240B2 (en) Decoding method switching for preview image processing using a bundle of preview images
EP2779658A2 (en) Segmented content delivery
WO2014193996A2 (en) Network video streaming with trick play based on separate trick play files
CN111182322B (en) Director control method and device, electronic equipment and storage medium
Durak et al. Evaluating the performance of Apple’s low-latency HLS
WO2015192683A1 (en) Content distribution method, device and system based on adaptive streaming technology
CN105228001A (en) The method and system that a kind of FLV format video is play online
KR102085192B1 (en) Rendering time control
CN106789976A (en) The player method of media file, service end, client and system
CN105592369B (en) A kind of video frequency abstract processing method and processing device
US20170142179A1 (en) Delivery of media content segments in a content delivery network
US20190158898A1 (en) Hybrid transmission protocol
KR20160036924A (en) System for device independent live streaming
WO2017114393A1 (en) Http streaming media transmission method and device
KR101568317B1 (en) System for supporting hls protocol in ip cameras and the method thereof
CN115150675B (en) Reverse order playing method, system and reverse order slicing method
CN113364728A (en) Media content receiving method, device, storage medium and computer equipment

Legal Events

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