CN110740342A - Storage medium, streaming media transmission and playing method, and slicing method and device - Google Patents

Storage medium, streaming media transmission and playing method, and slicing method and device Download PDF

Info

Publication number
CN110740342A
CN110740342A CN201910844044.5A CN201910844044A CN110740342A CN 110740342 A CN110740342 A CN 110740342A CN 201910844044 A CN201910844044 A CN 201910844044A CN 110740342 A CN110740342 A CN 110740342A
Authority
CN
China
Prior art keywords
streaming media
last
duration
fragments
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910844044.5A
Other languages
Chinese (zh)
Other versions
CN110740342B (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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN201910844044.5A priority Critical patent/CN110740342B/en
Publication of CN110740342A publication Critical patent/CN110740342A/en
Application granted granted Critical
Publication of CN110740342B publication Critical patent/CN110740342B/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/234Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs
    • H04N21/23418Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics
    • 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
    • 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, manipulating MPEG-4 scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams, manipulating MPEG-4 scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • 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/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44008Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving operations for analysing video streams, e.g. detecting features or characteristics in the video stream
    • 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/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • 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

Abstract

The application discloses a streaming media transmission method which comprises the steps of obtaining fragment information of streaming media, carrying out fragment processing on the streaming media into a plurality of streaming media fragments according to the indication of the fragment information, and sending or receiving the streaming media fragments according to the sequence indicated by the fragment information, wherein the streaming media subjected to fragment processing comprises the last streaming media fragments and a plurality of non-last streaming media fragments, and the time duration of the last streaming media fragments is longer than that of the non-last streaming media fragments.

Description

Storage medium, streaming media transmission and playing method, and slicing method and device
Technical Field
The present invention relates to the technical field of streaming media playing, and in particular, to types of computer-readable storage media, a streaming media transmission method, a fragmentation information generation method, a streaming media playing method and an apparatus.
Background
Hls (http Live streaming) is a streaming media network transport protocol based on http protocols (Hypertext transfer protocols), which has the advantages of simplicity, self-adaptation, and capability of realizing plug-in-free playing, and is , which is the most widely used network transport protocol in the world at present, and is particularly suitable for the field of mobile internet streaming.
When the HLS Protocol is used in a scenario where an on-demand stream source is an RTSP (Real Time Streaming Protocol) or RTMP (Real Time Messaging Protocol), the current scheme cannot accurately generate an M3U8 list, and the number of actual slices and the number of slices described by the M3U8 list that have been returned to the client are not , which causes that a fragment of a play terminal cannot be requested completely, thereby causing a problem that the play of the play terminal is abnormal.
Disclosure of Invention
The technical problem mainly solved by the application is to provide computer-readable storage media, a streaming media transmission method, a fragment information generation method, a streaming media playing method and a streaming media playing device, which can reduce the time delay when a video is live broadcast.
To solve the technical problem, technical solutions adopted in the embodiments of the present application are to provide a transmission method of streaming media, where the transmission method includes acquiring fragmentation information of the streaming media, fragmenting the streaming media into multiple streaming media fragments according to an indication of the fragmentation information, and transmitting or receiving the streaming media fragments according to an order indicated by the fragmentation information, where the streaming media after fragmentation processing includes the last streaming media fragments and multiple non-last streaming media fragments, and the duration of the last streaming media fragments is greater than the duration of the non-last streaming media fragments.
Wherein, the time lengths of a plurality of non-last streaming media segments are equal.
Wherein, the time lengths of a plurality of non-last stream media fragments all satisfy the following formula that t is n multiplied by tgopWherein t is the duration of the non-last streaming media segments, n is a positive integer, and tgopIs the key frame time interval of the streaming media.
Wherein, the time length of the last streaming media fragments satisfies the following formula:tlast=N×tgop+ T% T; wherein, tlastIs the duration of the last streaming media segments, N is a positive integer and N is>n and T are the total duration of the streaming media.
Wherein n is more than or equal to 1 and less than or equal to 3.
Before the step of obtaining the fragmentation information of the streaming media, the method comprises the following steps: receiving a streaming media playing request of a terminal; sending a request for information on the streaming media to the source station; receiving information of streaming media fed back by a source station; analyzing the duration of the streaming media from the streaming media information; the step of acquiring the fragmentation information of the streaming media comprises the following steps: and acquiring the fragment information of the streaming media according to the duration of the streaming media.
Wherein t is less than or equal to 10 secondslastLess than or equal to 60 seconds.
After the step of fragmenting the streaming media into a plurality of streaming media fragments according to the indication of the fragmentation information, the method comprises the following steps: and sending the fragment information to the terminal to allow the terminal to download and play the plurality of streaming media fragments according to the sequence indicated by the fragment information.
In order to solve the technical problem, another technical solutions adopted in the embodiments of the present application are to provide a method for generating pieces of fragmentation information, where the method includes obtaining related information of a streaming media, generating fragmentation information of the streaming media according to the related information of the streaming media and a preset fragmentation algorithm, and storing the fragmentation information, where the preset fragmentation algorithm is configured to divide the streaming media into a plurality of streaming media fragments including the last streaming media fragments and a plurality of non-last streaming media fragments, the time duration of the last streaming media fragments is greater than the time duration of the non-last streaming media fragments, and the fragmentation information is used to fragment the streaming media into the plurality of streaming media fragments, and is used to indicate the sequence of transmitting, receiving, or playing the plurality of streaming media fragments, and is used to indicate the time duration of each streaming media fragment.
The preset fragmentation algorithm comprises that the time lengths of a plurality of non-last streaming media fragments are equal.
Wherein, the related information of the streaming media comprises the key frame time interval of the streaming media;
the preset slicing algorithm comprises the following steps: t is n × tgop
Wherein t is the duration of the non-last streaming media segments, n is a positive integer, tgopIs the key frame time interval of the streaming media.
Wherein, the related information of the streaming media comprises the total duration of the streaming media;
the preset slicing algorithm comprises the following steps: t is tlast=N×tgop+T%t;
Wherein, tlastIs the duration of the last streaming media segments, N is a positive integer and N is>n and T are the total duration of the streaming media.
In order to solve the technical problem, another technical solutions adopted in the embodiments of the present application are to provide a method for playing streaming media, where the method for playing streaming media includes receiving fragmentation information of the streaming media, where the fragmentation information is used to fragment the streaming media into multiple streaming media fragments, indicate a sequence of transmitting, receiving, or playing the multiple streaming media fragments, and indicate a duration of each streaming media fragment, and downloading and playing the multiple streaming media fragments according to the sequence indicated by the fragmentation information, where the streaming media after fragmentation processing includes the last streaming media fragments and multiple non-last streaming media fragments, and a duration of the last streaming media fragments is longer than a duration of the non-last streaming media fragments.
Wherein, the time lengths of a plurality of non-last streaming media segments are equal.
Wherein, the time lengths of a plurality of non-last stream media fragments all satisfy the following formula that t is n multiplied by tgop
Wherein t is the duration of the non-last streaming media segments, n is a positive integer, tgopIs the key frame time interval of the streaming media.
Wherein, the time length of the last streaming media fragments satisfies the following formula tlast=N×tgop+T%t;
Wherein, tlastIs the duration of the last streaming media segments, N is a positive integer and N is>n and T are the total duration of the streaming media.
In order to solve the above technical problems, another technical solutions adopted by the embodiments of the present application are to provide a streaming media transmission device, where the streaming media transmission device includes a processor and a memory electrically connected to the processor, the memory is used for storing a computer program, and the processor is used for calling the computer program to execute the above method.
In order to solve the technical problem, another technical solutions adopted by the embodiments of the present application are to provide computer-readable storage media for storing a computer program, where the computer program can be called to execute the above method.
The method and the device for processing the streaming media fragment acquire the fragment information of the streaming media, fragment the streaming media into a plurality of streaming media fragments according to the indication of the fragment information, and send or receive the streaming media fragments according to the sequence indicated by the fragment information, wherein the streaming media subjected to fragment processing comprises the last streaming media fragments and a plurality of non-last streaming media fragments, the duration of the last streaming media fragments is longer than that of the non-last streaming media fragments, and the problem of abnormal playing caused by the fact that the last fragment of a playing terminal cannot be requested due to the fact that the number of fragments actually cut and list information which is informed to the playing terminal are not due to the fact that the key frame interval of an actual code stream is not uniform can be reduced to the greatest probability.
Drawings
Fig. 1 is a schematic flow chart of a streaming media transmission method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for generating fragmentation information according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a playing method of streaming media according to an embodiment of the present application;
fig. 4 is a schematic hardware structure diagram of a streaming media transmission device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Further, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a series of steps or elements is not limited to the listed steps or elements, but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least embodiments of the application.
Referring to fig. 1, fig. 1 is a schematic flow chart illustrating a streaming media transmission method according to an embodiment of the present application.
In this embodiment, the streaming media transmission method may include the following steps:
step S101: and acquiring the fragment information of the streaming media.
In this embodiment, the execution subject of the streaming media transmission method may be a server. Such as HLS servers. The step of obtaining the fragmentation information of the streaming media may include: the server receives a streaming media playing request of the terminal; the server sends a request for information of the streaming media to the source station; the server receives the information of the streaming media fed back by the source station; and analyzing the time length T of the streaming media from the streaming media information.
In cases, when the terminal requests the HLS server to request a certain streaming media, the HLS server first sends an RTSP request to the source station to obtain SDP (Session Description Protocol) information, or sends an RTMP request to obtain Metadata information (Metadata), then parses the SDP information or the Metadata information to obtain a playing time T of the streaming media, and generates an M3U8 list (containing fragment information) of the streaming media according to the playing time T and a predetermined slicing rule and returns the M3U8 list to the terminal.
The terminal may be an electronic device with a playing function, such as a smart phone, a tablet computer, a desktop computer, a notebook computer, and so on.
The streaming media may be audio or video.
The time length of the last streaming media fragments is set to be relatively longer, so that the deviation problem of actual slicing caused by uneven key frame interval of an actual code stream can be buffered, the actual number of fragments and described by an M3U8 list fed back to a playing terminal are ensured at the maximum probability, and the terminal can normally order the streaming media resource.
Optionally, the predetermined slicing rule further satisfies that the time lengths of a plurality of non-last streaming media slices after the slicing processing are equal, so that the HLS on-demand dragging accuracy can be ensured.
In embodiments, the time durations of the non-last streaming media segments satisfy the following formulagopWherein t is the duration of the non-last streaming media segments, n is a positive integer, and tgopIs a key frame (i.e., I-frame) time interval of the streaming media.
In embodiments, the duration of the last streaming media segments satisfies the following formula tlast=N×tgop+ T% T; wherein, tlastIs the duration of the last streaming media segments, N is a positive integer and N is>n and T are the total duration of the streaming media.
Alternatively, 1 ≦ n ≦ 3. In this embodiment, the duration of each slice is not suitable for too long, and each slice has 1-3 key frame time intervals (t)gop) The time length is long, so that the HLS on-demand dragging precision can be ensured.
Alternatively, 10 seconds ≦ tlastLess than or equal to 60 seconds, thereby ensuring HLS on-demand dragging precision.
The slicing information further includes the total slicing number, i.e. the total number of the streaming media sliceslast)/t+1。
Optionally, 1 ≦ N-N ≦ 5, where N takes values slightly larger than N, so as to ensure HLS on-demand dragging precision.
Step S102: and carrying out fragmentation processing on the streaming media into a plurality of streaming media fragments according to the indication of the fragmentation information.
And S103, transmitting or receiving the streaming media fragments according to the sequence indicated by the fragment information, wherein the streaming media after fragment processing comprises the last streaming media fragments and a plurality of non-last streaming media fragments, and the duration of the last streaming media fragments is greater than the duration of the non-last streaming media fragments.
After the step of fragmenting the streaming media into a plurality of streaming media fragments according to the indication of the fragmentation information, the method may include the following steps:
sending the fragment information to the terminal to allow the terminal to download and play the plurality of streaming media fragments according to the sequence indicated by the fragment information
In application examples, it is assumed that the playing time T of a streaming media resource is 31 seconds, and the key frame interval time T of a streaming media code streamgopFor 2 seconds, N in this embodiment is 1, N is 5, i.e. duration t of non-last pieces of streaming medialastThe duration t of the last slices is taken as gops with the duration t being 1 × 2 ═ 2 secondslastIf the total number of the slices num is (31-11)/2+1 is 11 slices, the actual slice can be cut into 11 slices according to the slice rule, and the duration of the last slices is 6 seconds, so that the deviation problem existing in the actual slice of the actual code stream due to the uneven key frame interval can be buffered, and the maximum probability ensures that the actual number of the slices is equal to described in the M3U8 list fed back to the playing terminal, so that the terminal can normally play the stream media resource.
, the present application further provides a method for generating types of fragmentation information, please refer to fig. 2, and fig. 2 is a schematic flow chart of a method for generating fragmentation information according to an embodiment of the present application.
In this embodiment, the method for generating the fragmentation information may include:
step S201: and acquiring related information of the streaming media.
Step S202: and generating the fragmentation information of the streaming media according to the related information of the streaming media and a preset fragmentation algorithm, and storing the fragmentation information.
The preset fragmentation algorithm is configured to divide the streaming media into the last streaming media fragments and a plurality of non-last streaming media fragments, and the duration of the last streaming media fragments is greater than the duration of the non-last streaming media fragments.
The fragment information is used for processing the streaming media into a plurality of streaming media fragments, indicating the sequence of transmitting, receiving or playing the streaming media fragments, and indicating the duration of each streaming media fragment.
The pre-slicing algorithm includes that the time durations of a plurality of non-last streaming media slices are equal.
The related information of the streaming media includes a key frame time interval of the streaming media.
The preset slicing algorithm comprises the following steps: t is n × tgop
Wherein t is the duration of the non-last streaming media segments, n is a positive integer, tgopIs the key frame time interval of the streaming media.
The related information of the streaming media includes a total duration of the streaming media.
The preset slicing algorithm comprises the following steps: t is tlast=N×tgop+T%t。
Wherein, tlastIs the duration of the last streaming media segments, N is a positive integer and N is>n and T are the total duration of the streaming media.
, the present application further provides a method for playing streaming media, please refer to fig. 3, and fig. 3 is a schematic flow chart of a method for playing streaming media according to an embodiment of the present application.
In this embodiment, the method for playing streaming media may include:
step S301: receiving the slicing information of the streaming media.
The fragment information is used for fragmenting the streaming media into a plurality of streaming media fragments, indicating the sequence of transmitting, receiving or playing the streaming media fragments, and indicating the duration of each streaming media fragment.
Step S302: and downloading and playing the plurality of streaming media fragments according to the sequence indicated by the fragment information.
The fragmented streaming media comprises the last streaming media fragments and a plurality of non-last streaming media fragments, and the duration of the last streaming media fragments is greater than the duration of the non-last streaming media fragments.
Wherein, the time lengths of a plurality of non-last streaming media segments are equal.
The time lengths of the plurality of non-last streaming media segments all satisfy the following formula that t is n multiplied by tgop
Wherein t is the duration of the non-last streaming media segments, n is a positive integer, tgopIs the key frame time interval of the streaming media.
The time length of the last streaming media fragments satisfies the following formula tlast=N×tgop+T%t。
Wherein, tlastIs the duration of the last streaming media segments, N is a positive integer and N is>n and T are the total duration of the streaming media.
Referring to fig. 4, fig. 4 is a schematic diagram of a hardware structure of a streaming media transmission device according to an embodiment of the present application.
In this embodiment, the streaming media transmission device may at least include a processor 21 and a memory 22 electrically connected to the processor 21, where the memory 22 is used for executing a computer program, and the processor 21 is used for calling the computer program to execute the method of any embodiments described above.
In the embodiment of the present application, the streaming media transmission device may be a server, and for example, may be an HLS server. In other embodiments, other transmission devices may be used, and a transmission device that slices the transport stream media by using the method of the present application is within the scope of the present application.
For example, the above-described embodiments of the apparatus are merely illustrative, e.g., the modules or units may be divided into logical functional divisions, and other divisions may be possible in practice, e.g., multiple units or components may be combined or integrated into another systems, or features may be omitted or not performed.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in places, or may also be distributed on multiple network units.
In addition, the functional units in the embodiments of the present invention may be integrated into processing units, or each unit may exist alone physically, or two or more units are integrated into units.
It is understood that, the computer program stored in the readable storage medium in this embodiment is similar to the method provided in the foregoing embodiment, and the principle and steps thereof are the same, and thus are not described herein again.
The storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, which can store program codes.
The method and the device for processing the streaming media fragment acquire the fragment information of the streaming media, fragment the streaming media into a plurality of streaming media fragments according to the indication of the fragment information, and send or receive the streaming media fragments according to the sequence indicated by the fragment information, wherein the streaming media subjected to fragment processing comprises the last streaming media fragments and a plurality of non-last streaming media fragments, the duration of the last streaming media fragments is longer than that of the non-last streaming media fragments, and the problem of abnormal playing caused by the fact that the last fragment of a playing terminal cannot be requested due to the fact that the number of fragments actually cut and list information which is informed to the playing terminal are not due to the fact that the key frame interval of an actual code stream is not uniform can be reduced to the greatest probability.
The above embodiments are merely examples and are not intended to limit the scope of the present disclosure, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present disclosure or those directly or indirectly applied to other related technical fields are intended to be included in the scope of the present disclosure.

Claims (18)

1, streaming media transmission method, characterized in that, the transmission method includes:
acquiring fragmentation information of the streaming media;
according to the indication of the fragmentation information, the streaming media is fragmented into a plurality of streaming media fragments;
transmitting or receiving the streaming media fragments according to the sequence indicated by the fragment information;
the streaming media after fragmentation processing comprises the last streaming media fragments and a plurality of non-last streaming media fragments, and the duration of the last streaming media fragments is greater than the duration of the non-last streaming media fragments.
2. The transmission method according to claim 1, wherein the plurality of non-last streaming media segments are equal in duration.
3. The transmission method according to claim 2, wherein the time durations of the plurality of non-last segments satisfy the following formulagop
Wherein t is the duration of the non-last streaming media segments, n is a positive integer, and t isgopIs a key frame time interval of the streaming media.
4. The transmission method according to claim 3, wherein the duration of the last segments satisfies the following formula tlast=N×tgop+T%t;
Wherein, tlastThe duration of the last streaming media segments, where N is a positive integer and N is>n and T are the total duration of the streaming media.
5. The transmission method according to claim 3, characterized in that 1. ltoreq. n.ltoreq.3.
6. The transmission method according to claim 1, wherein the step of obtaining the fragmentation information of the streaming media is preceded by:
receiving a playing request of the streaming media from a terminal;
sending a request for information of the streaming media to a source station;
receiving the information of the streaming media fed back by the source station;
analyzing the duration of the streaming media from the streaming media information;
the step of acquiring the fragmentation information of the streaming media comprises the following steps:
and acquiring the fragment information of the streaming media according to the duration of the streaming media.
7. Transmission method according to claim 3, characterised in that 10 seconds ≦ tlastLess than or equal to 60 seconds.
8. The transmission method according to claim 6, wherein the step of fragmenting the streaming media into a plurality of streaming media fragments according to the indication of the fragmentation information is followed by:
and sending the fragment information to the terminal to allow the terminal to download and play the plurality of streaming media fragments according to the sequence indicated by the fragment information.
9, slicing information generation method, characterized in that, the generation method includes:
acquiring related information of streaming media;
generating fragmentation information of the streaming media according to the related information of the streaming media and a preset fragmentation algorithm, and storing the fragmentation information;
wherein the preset fragmentation algorithm is configured to divide the streaming media into a last streaming media fragments and a plurality of non-last streaming media fragments, and the duration of the last streaming media fragments is greater than the duration of the non-last streaming media fragments;
the fragment information is used for carrying out fragment processing on the streaming media into a plurality of streaming media fragments, indicating the sequence of sending, receiving or playing the streaming media fragments, and indicating the duration of each streaming media fragment.
10. The method of claim 9, wherein the pre-determined slicing algorithm comprises that the non-last segments of the streaming media are equal in duration.
11. The generation method according to claim 10, wherein the related information of the streaming media includes a key frame time interval of the streaming media;
the preset fragmentation algorithm comprises the following steps: t is n × tgop
Wherein t is the duration of the non-last streaming media segments, n is a positive integer, and t isgopIs a key frame time interval of the streaming media.
12. The generation method according to claim 11, wherein the information about the streaming media includes a total duration of the streaming media;
the preset fragmentation algorithm comprises the following steps: t is tlast=N×tgop+T%t;
Wherein, tlastThe duration of the last streaming media segments, where N is a positive integer and N is>n and T are the total duration of the streaming media.
The method for playing streaming media in , wherein the method for playing streaming media comprises:
receiving fragmentation information of a streaming media, wherein the fragmentation information is used for fragmenting the streaming media into a plurality of streaming media fragments, indicating the sequence of sending, receiving or playing the streaming media fragments, and indicating the duration of each streaming media fragment;
downloading and playing the plurality of streaming media fragments according to the sequence indicated by the fragment information;
the streaming media after fragmentation processing comprises the last streaming media fragments and a plurality of non-last streaming media fragments, and the duration of the last streaming media fragments is greater than the duration of the non-last streaming media fragments.
14. The playback method as claimed in claim 13, wherein the non-last pieces of the streaming media are equal in duration.
15. The playback method as claimed in claim 14, wherein the non-last streaming media are recorded in the recording mediumThe time length of the fragmentation satisfies the following formula: t is n × tgop
Wherein t is the duration of the non-last streaming media segments, n is a positive integer, and t isgopIs a key frame time interval of the streaming media.
16. The playback method as claimed in claim 15, wherein the duration of the last segments satisfies the following formula tlast=N×tgop+T%t;
Wherein, tlastThe duration of the last streaming media segments, where N is a positive integer and N is>n and T are the total duration of the streaming media.
A transport apparatus for streaming media of the kind 17, , the transport apparatus comprising a processor and a memory electrically connected to the processor, the memory for storing a computer program, the processor for invoking the computer program to perform the method of any of claims 1-16 to .
Storage medium 18, , characterized in that the storage medium stores a computer program that can be executed to implement the method of any of claims 1-16 .
CN201910844044.5A 2019-09-06 2019-09-06 Storage medium, streaming media transmission and playing method, and slicing method and device Active CN110740342B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910844044.5A CN110740342B (en) 2019-09-06 2019-09-06 Storage medium, streaming media transmission and playing method, and slicing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910844044.5A CN110740342B (en) 2019-09-06 2019-09-06 Storage medium, streaming media transmission and playing method, and slicing method and device

Publications (2)

Publication Number Publication Date
CN110740342A true CN110740342A (en) 2020-01-31
CN110740342B CN110740342B (en) 2022-02-18

Family

ID=69267528

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910844044.5A Active CN110740342B (en) 2019-09-06 2019-09-06 Storage medium, streaming media transmission and playing method, and slicing method and device

Country Status (1)

Country Link
CN (1) CN110740342B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102232298A (en) * 2011-04-07 2011-11-02 华为技术有限公司 Method, device and system for transmitting and processing media content
CN102843351A (en) * 2012-03-31 2012-12-26 华为技术有限公司 Streaming media service processing method, streaming media server and system
CN104602138A (en) * 2015-01-30 2015-05-06 青岛海信电器股份有限公司 Method and device for supporting HLS protocol by streaming media server
WO2017035783A1 (en) * 2015-09-01 2017-03-09 深圳好视网络科技有限公司 Streaming media transmission and play method, and transmission and play device
US20170280193A1 (en) * 2016-03-28 2017-09-28 Le Holdings(Beijing)Co., Ltd. Method and device for processing a streaming media file
US9979926B1 (en) * 2015-06-09 2018-05-22 The Directv Group, Inc. Dynamic segment slicing for faster video playback
CN108260024A (en) * 2018-04-12 2018-07-06 腾讯科技(深圳)有限公司 Live data processing method, device, computer equipment and storage medium
WO2019056929A1 (en) * 2017-09-22 2019-03-28 烽火通信科技股份有限公司 Hls protocol-based time shift optimization method and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102232298A (en) * 2011-04-07 2011-11-02 华为技术有限公司 Method, device and system for transmitting and processing media content
CN102843351A (en) * 2012-03-31 2012-12-26 华为技术有限公司 Streaming media service processing method, streaming media server and system
CN104602138A (en) * 2015-01-30 2015-05-06 青岛海信电器股份有限公司 Method and device for supporting HLS protocol by streaming media server
US9979926B1 (en) * 2015-06-09 2018-05-22 The Directv Group, Inc. Dynamic segment slicing for faster video playback
WO2017035783A1 (en) * 2015-09-01 2017-03-09 深圳好视网络科技有限公司 Streaming media transmission and play method, and transmission and play device
US20170280193A1 (en) * 2016-03-28 2017-09-28 Le Holdings(Beijing)Co., Ltd. Method and device for processing a streaming media file
WO2019056929A1 (en) * 2017-09-22 2019-03-28 烽火通信科技股份有限公司 Hls protocol-based time shift optimization method and system
CN108260024A (en) * 2018-04-12 2018-07-06 腾讯科技(深圳)有限公司 Live data processing method, device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐辉: "基于传输层的视频卡顿实时检测", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Also Published As

Publication number Publication date
CN110740342B (en) 2022-02-18

Similar Documents

Publication Publication Date Title
US20200296151A1 (en) Downloading Media Objects
US10616301B2 (en) Request-based encoding for streaming content portions
CN106572358B (en) Live broadcast time shifting method and client
KR101633769B1 (en) System and method for secure asynchronous event notification for adaptive streaming based on iso base media file format
CN109474854B (en) Video playing method, playlist generating method and related equipment
CN108540868A (en) Processing method, device, server, terminal and the storage medium of HLS live streamings
US10623823B2 (en) Method, system, and website server for playing website video
CN110072122B (en) Video playing method and related equipment
CN110324680B (en) Video pushing method and device, server, client and storage medium
CN108063769B (en) Method and device for realizing content service and content distribution network node
CN108810657B (en) Method and system for setting video cover
CN108933764B (en) Method and device for realizing quick broadcast starting
EP3001692A1 (en) Streaming media processing method, apparatus and system
WO2017080428A1 (en) Streaming media channel recording, reviewing method, device, server and storage medium
CN110557689B (en) Video playing method and device
CN112468839B (en) Playback method, system, device and readable storage medium of live content
CN116346794A (en) Method, apparatus and non-volatile computer readable storage medium for receiving media data
CN111064969B (en) Streaming media data transmission method, equipment, device and computer storage medium
CN113242437A (en) RTSP (real time streaming protocol) video plug-in-free playing method, system, device and storage medium
CN109587517B (en) Multimedia file playing method and device, server and storage medium
CN110740342B (en) Storage medium, streaming media transmission and playing method, and slicing method and device
CN114417055A (en) Video playing method and device, computer equipment and storage medium
CN113079386A (en) Video online playing method and device, electronic equipment and storage medium
JP6378631B2 (en) Video distribution system and video distribution method
EP3005176A2 (en) Defragmentation of adaptive streaming segment files in a content delivery network

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