CN111356028A - Method and device for realizing file sequence on demand by streaming media service - Google Patents

Method and device for realizing file sequence on demand by streaming media service Download PDF

Info

Publication number
CN111356028A
CN111356028A CN202010181707.2A CN202010181707A CN111356028A CN 111356028 A CN111356028 A CN 111356028A CN 202010181707 A CN202010181707 A CN 202010181707A CN 111356028 A CN111356028 A CN 111356028A
Authority
CN
China
Prior art keywords
file
sequence
media
request
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010181707.2A
Other languages
Chinese (zh)
Inventor
王卫
梁晓锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Jusha Display Technology Co Ltd
Nanjing Jusha Medical Technology Co Ltd
Original Assignee
Nanjing Jusha Display Technology Co Ltd
Nanjing Jusha Medical 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 Nanjing Jusha Display Technology Co Ltd, Nanjing Jusha Medical Technology Co Ltd filed Critical Nanjing Jusha Display Technology Co Ltd
Priority to CN202010181707.2A priority Critical patent/CN111356028A/en
Publication of CN111356028A publication Critical patent/CN111356028A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]
    • 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/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/85406Content authoring involving a specific file format, e.g. MP4 format
    • 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/85Assembly of content; Generation of multimedia applications
    • H04N21/858Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot
    • H04N21/8586Linking data to content, e.g. by linking an URL to a video object, by creating a hotspot by using a URL

Abstract

The invention discloses a method and a device for realizing file sequence on demand by a streaming media service. The method comprises the steps that firstly, after a streaming media server receives a request for ordering a file sequence, the file sequence is sequenced according to a file serial number, the files are analyzed in sequence, a virtual logic file is established, and data information of each subfile of the file sequence is recorded in the virtual logic file and information integration is carried out; and acquiring media data by using the virtual logic file and formatting the media data into a media protocol packet for transmission. The invention realizes that one protocol requests to complete the playing of the file sequence, and the middle of the sub-files is excessively smooth and has no pause during playing.

Description

Method and device for realizing file sequence on demand by streaming media service
Technical Field
The invention belongs to the technical field of streaming media, and particularly relates to a method and a device for realizing file sequence on demand by a streaming media service.
Background
With the development of modern streaming media technology, the stronger the demands of various industries on the storage and use of video data, the larger the size of video data becomes. This presents problems for the storage of video material. For files up to tens and hundreds of G, a common approach is to split the files into multiple small file stores. However, the streaming media on-demand also causes problems, and a standard streaming media protocol such as RTSP requests one file at a time, and the file split into a file sequence needs to be requested for many times to complete on-demand of a large file, which seriously affects user experience and work efficiency. For example, in a hospital operating room, the video quality of the used operation video recording equipment is generally high, and the video recording of 10 minutes of a one-way endoscope signal is about 1.5G. The current recording devices on the market generally segment files within 2G of the file size, that is, record an MP4 video file in about 10 minutes, which has the advantage of preventing problems during the recording process, resulting in the previous recording being unusable, and preventing the file from being too large to be stored easily. For a 3 hour or so operation, a single channel signal will generate about 20 MP4 video files, about 30G. When the video of the operation is requested, a single request of a standard streaming media protocol, such as rtsp://192.168.2.3:554/vod/xxxxxvideo. MP4, can only be made for one file request. If the video recording request of the endoscope of the operation is finished for 20 times. Thus, for the upper layer application, such an operation causes an interval between the switching of the files, and the user experience is not good.
Disclosure of Invention
The invention aims to solve the problems and achieve the purposes of playing a plurality of files and seamlessly switching the files by a single request.
In order to achieve the purpose of the invention, the invention adopts the technical scheme that:
one aspect provides a method for realizing file sequence on demand by a streaming media service, which comprises the following steps:
the streaming media responds to a received media protocol request for a file sequence, the file sequence in the file sequence is obtained according to the file cluster ID, each file is loaded according to the file sequence and each parameter in the file sequence is obtained by analyzing each file, a file object is generated, and the media protocol request for the file sequence is added with the unique file cluster ID of the file sequence and an identifier indicating that the request is directed at the file sequence;
establishing a virtual logic file according to the generated file object;
and acquiring media data according to the media protocol request and the established virtual logic file, formatting the media data into a media protocol data packet and transmitting the media protocol data packet.
Further, a suffix to the request URL by the media protocol indicates that the request is for a sequence of files.
Further, the file object contains a trackbox list of each file in the file sequence, and all types of boxes nested in each trackbox, media information of the file, a media play duration and encoding parameters, wherein the encoding parameters include an encoding level, a resolution, a color gamut, a code rate, an encoding format, a frame rate and/or a bit depth.
Further, the method for creating the virtual logic file comprises the following steps:
establishing a mapping relation between the relative playing time of each file and the file object; the duration of the virtual logic files is the sum of the relative playing duration of each file.
Still further, the specific method for establishing the mapping relationship between the relative playing time length of each file and the file object comprises the following steps:
and sequentially recording the mapping relation of each file into a mapping table, and commanding the following steps:
the first file: put (0, MP4Array [0]),
the second file: put (rd _1+1, MP4Array [1]),
the nth file: put (rd _1+ … + rd _ (n-1) +1, MP4Array [ n-1]),
wherein rd _1 is the duration of the first file, and the relative start time of the first file in the virtual logic file is 0 second;
rd _2 is the duration of the second file, and the relative starting time of the second file in the virtual logic file is rd _1+1 second;
rd _ (n) is the duration of the nth file, and the relative start time of the nth file in the virtual logical file is rd _1+ … + rd _ (n-1) +1, where the duration MP4Map is a mapping table and the MP4Array is an Array storing file objects.
Still further, before formatting into media protocol data packets, the method further comprises the steps of:
obtaining the relative start time of the request in the media protocol request, and determining the requested file object in the mapping table of the virtual logic file;
traversing the mapping table of the virtual logic file, and comparing the relative start time of the request with the relative start time key of the file object in the virtual logic file;
if the request starting time is more than or equal to the key, comparing whether the request starting time is less than the sum of the key and the playing time of the file object, and if the request starting time is less than the sum, determining the file object as the file object requested to start; after the file object is requested to be started, the relative time of the file starting time in the file object is searched, namely the relative time in the file object is obtained by subtracting the key from the request starting time; after the relative time in the file object is calculated, the file object can be operated by using the relative time as the start time, the standard file streaming process is started, and the data packaging is completed.
The file object playing time expression is as follows: rd = duration/time scale, where duration is the media play duration in the file sequence, and time scale is obtained for parsing the file.
Further, after the virtual logic file obtains the standard media protocol data packet, the timestamp of the media protocol data packet needs to be converted from the relative time of the file object to the relative time of the pseudo-logic file, which is expressed as: the relative time of the virtual logical file = timestamp + (key × time scale) of the media protocol data packet, where key is the relative start time of the file object in the virtual logical file, and time scale is obtained for parsing the file.
On the other hand, the invention provides a device for realizing file sequence on demand by streaming media service, which is characterized by comprising:
the file object generation module is used for responding to a received media protocol request for a file sequence by the streaming media, obtaining a file sequence in the file sequence according to a file cluster ID, loading each file according to the file sequence and analyzing each file to obtain each parameter in the file sequence, and generating a file object, wherein the unique file cluster ID of the file sequence and the representation request are identifiers aiming at the file sequence are added in the media protocol request for the file sequence;
the virtual logic file establishing module is used for establishing a virtual logic file according to the generated file object;
and the media data packet sending module is used for acquiring media data according to the media protocol request and the established virtual logic file, formatting the media data into a media protocol data packet and sending the media protocol data packet.
The beneficial technical effects are as follows:
the method comprises the steps of sequencing a file sequence according to a unique file cluster ID (identification) of the file sequence, namely a file sequence number, and then loading file information according to the sequence to generate a virtual logic file; when a virtual logic file is established after a user request is received, calculating parameters such as duration, time scale and the like of the virtual logic file according to information parameters of each subfile, and then calculating sample information and streaming media package information of the assembled virtual file according to a file sequence number, sample information and hit track information of each subfile, thereby completing the establishment of the virtual logic file and completing the preparation before the streaming of a file sequence; when the streaming media sends data, the parameters recalculated by the virtual logic file are used to generate a streaming media data packet (such as RTP). The media service can send a media request (such as RTSP) to complete the processing of the file sequence and support the playing control of setting progress, fast forwarding and the like, so that the client can complete the on-demand of a plurality of subfiles of the file sequence only by sending the media request of the file sequence once by adopting the invention, and the middle of the subfiles is excessively smooth and has no pause during playing; and in the on-demand process, the operations of pausing, setting progress, fast forwarding and the like can be carried out on the file sequence, and transparent jumping among the subfiles can be realized when a user plays the files.
Drawings
Fig. 1 is a flowchart illustrating a method for implementing file sequence on demand by a streaming media service according to an embodiment of the present invention.
Detailed Description
The invention is further described with reference to the following figures and examples.
Referring to fig. 1, a specific embodiment 1 of a method for implementing a file sequence on demand by a streaming media service according to the present invention implements a streaming media service of an RTSP protocol, and this embodiment implements an MP4 file sequence on demand. The method comprises the following steps:
step 1, when a user sends an on-demand request to a streaming media service, a URL of the request is specially defined in order to distinguish a plurality of files or a single file when the request is made. The request of the single file in this embodiment follows the standard RTSP protocol, such as RTSP://192.168.2.3:554/vod/xxx.MP4, where xxx represents the file name. Multi-file, i.e. a request for a sequence of files, special tags are added to the URL, such as rtsp://192.168.2.3:554/vod/xxx.JSS, where xxx represents the unique identification of a sequence of files called a file cluster ID, such as: 3000.js is a file cluster ID, which distinguishes between the request suffix and MP4, and the server uses this suffix to distinguish whether it is a single file play or a file sequence play. From this file cluster ID, the server can obtain detailed information of the file sequence from a database or other means, including an ordered list of relative paths (e.g.: 20191218/video _1.MP4,/20191218/video _2.MP 4) of all files in the file sequence stored on the media server, i.e., a MP4 file list.
When the streaming media service receives a request of a user for requesting, judging that the request is a file sequence request through a suffix JSS of the request, then analyzing a file cluster ID before the suffix, and obtaining file sequence information in a database by using the file cluster ID.
And 2, taking out the MP4 file list from the file sequence information obtained in the step 1, then loading in the list sequence and analyzing each MP4 file by using the prior art, after the analysis is finished, generating MP4 file objects and storing the file objects in an object Array in sequence, wherein the object Array is named as MP4 Array. The MP4 file object contains a trackbox list of MP4 files, media information of MP4 files, media playable time length (duration), encoding level, resolution, color gamut, bitrate, frame rate, bit depth, etc., and all types of boxes nested in each trackbox.
And 3, generating a virtual logic file object according to the Mp4 file object Array Mp4Array obtained in the step 2. The virtual logical file class is an abstraction of the ordered Mp4 file sequence and is responsible for handling operations such as switching between Mp4 files during playing, seek of the file sequence, and RTP packet processing. The virtual logic file object is called a virtual logic file for short.
The core attributes in the virtual logic file include duration, relative time, and mapping table naming duration MP4Map of the file object (Map structure, key is relative start time of the file object in the virtual file, value is the file object), last sequence number table fpreviousfilelastsequence number of the previous file (Map structure, mapping relationship between track id and last sequence number of the recording file), and MP4 media information (resolution, code rate, encoding format, etc.).
Since the sequence of the MP4 file is generally recorded by the same video recording device, if the sequence is not recorded by the same video recording device, it is necessary to ensure that the resolution, the bit rate and the encoding format of the MP4 file are the same. Therefore, the time scale, resolution, bitrate, and encoding format of each file are the same, so that the time scale, resolution, bitrate, and encoding format parameters of the virtual logic file can be obtained from any Mp4 file object, and these parameters are used to generate the response content in the SDP format in the DESCRIBE request phase of the RTSP protocol, and the player decodes and plays the response according to these parameters after receiving the response.
Creating a virtual logical file comprising:
firstly, a mapping relation between relative time and a file object is established. If the duration of the first file is rd _1 seconds, the relative start time in the virtual logical file is 0 seconds. The second file is rd _2 seconds and the relative start time in the virtual logical file is rd _1+1 seconds. The nth file has a duration rd _ (n) seconds and a relative start time rd _1+ … + rd _ (n-1) + 1. Then the mapping relationship of the first file is taken into the mapping table, i.e., duration MP4map.put (0, MP4Array [0]), the second file is duration MP4map.put (rd _1+1, MP4Array [1]), and the nth file duration MP4map.put (rd _1+ … + rd _ (n-1) +1, MP4Array [ n-1 ]). This establishes a mapping relationship with the file object with respect to time.
Then, the duration of the virtual logical file is the sum of the durations of all file objects, i.e., rd _1+ rd _2+ … + rd _ (n) seconds.
And 4, after the virtual logic file obtained in the step 3 is used for completing the handshake process of the streaming media protocol request, generating a streaming media data packet such as an RTP packet of the audio and video data by using the virtual logic file.
When a request comes, the relative start time of the request is obtained in the Rang header of the Play request phase of the RTSP protocol, and the file object from which the request starts is found in the duration mp4Map of the virtual logical file.
The searching mode is to traverse the duration mp4Map of the virtual logic file, compare the relative start time of the request with the key (the relative start time of the stored file object in the virtual logic file), when the request start time is greater than or equal to the key, compare whether the request start time is less than the key + the playing duration of the file object (unit transformation calculation formula duration/time), if so, the file object is the file object requested to start.
Since the duration of the MP4 file is relative time, the relative time of the first frame of each file is 0, the playing duration of the file corresponds to the duration attribute of the file object, the unit is converted into seconds, and the calculation formula duration/time scale is named rd.
After finding the requested start file object, the relative time of the start time of the file in the file object is searched, that is: request start time-key = relative time in the file object.
After the relative time in the file object is calculated, the file object can be operated by using the relative time as the start time, the standard file streaming process is started, and the RTP data packing is completed.
After the virtual logic file obtains the standard RTP data packet, the timestamp of the RTP packet needs to be converted from the relative time of the file object to the relative time of the virtual logic file, where the conversion mode is the timestamp + of the RTP packet. In addition, the sequence number of each RTP packet, i.e. the sequence number, needs to be kept incremented in the Track of the whole virtual logic file, i.e. sequence number + last sequence number of the last file. For example: the virtual logic file obtains an RTP packet and records the RTP packet as rtpPacket, the key of the current file object in the duration MP4Map is recorded as the startTime, the timestamp of the rtpPacket is recorded as the packetTime, and the sequence number of the rtpPacket is recorded as the packetSequenceNumber. The last sequence number of the previous file object of Track where rtpPacket is located is denoted as the LastSequenceNumber (which can be obtained from the fPreviousFileLastSequenceNumber attribute of the virtual logical file). The timestamp of rtpPacket = (the starttime time scale) + packetTime, and the sequence number of rtpPacket = packetsequence number + the lastsequencenumber. When reading of a file is completed, the last sequence number of each Track of the file is recorded before the file is switched to the fPrevious FileLastSequencenumber attribute of the virtual logic file, so that the file can be used when the next file object packs data. And when reading of one file object is completed, acquiring the next file object according to the duration MP4Map of the virtual logic file, and completing file switching.
And 5, the streaming media server obtains the RTP packet from the step 4 and sends the RTP packet to the terminal. And completing the audio and video stream transmission process, wherein the process is a standard RTSP protocol flow.
And 6, after the steps 1 to 5 are completed, repeating the steps 3 to 5 to complete resetting of the playing progress after the PLAY command is received again.
When the user resumes the playing after pausing the playing, the resuming point should be the whole file sequence range and use the virtual logic file to search and locate.
When the user sets the playing position, the starting point should be the whole file sequence range, and the virtual logic file is used for searching and positioning.
When the user plays, the virtual logic file is used for carrying out data streaming packaging, and transparent jumping among the subfiles is achieved.
The embodiment of the invention discloses a method for realizing file sequence on demand by a streaming media service, which comprises the steps of firstly judging whether a file sequence is requested or not after a streaming media server receives a demand request, if the file sequence is the file sequence, sequencing the file sequence according to a file sequence number, analyzing MP4 files in sequence, establishing a virtual logic file, recording data information of each subfile of the file sequence in the virtual logic file, and integrating information. When the stream media receives the file sequence playing request, the logic file is used for acquiring the media data and formatting the media data into a media protocol packet for sending. The method and the device realize that one protocol requests to complete the playing of the file sequence.
Based on the same technical concept, an embodiment of the present invention further provides a device for implementing file sequence on demand by streaming media service, including:
the file object generation module is used for responding to a received media protocol request for a file sequence by the streaming media, obtaining a file sequence in the file sequence according to a file cluster ID, loading each file according to the file sequence and analyzing each file to obtain each parameter in the file sequence, and generating a file object, wherein the unique file cluster ID of the file sequence and the representation request are identifiers aiming at the file sequence are added in the media protocol request for the file sequence;
the virtual logic file establishing module is used for establishing a virtual logic file according to the generated file object;
and the media data packet sending module is used for acquiring media data according to the media protocol request and the established virtual logic file, formatting the media data into a media protocol data packet and sending the media protocol data packet.
Optionally, a suffix of the URL requested by the media protocol indicates that the request is for a sequence of files.
Optionally, the file object includes a trackbox list of each file in the file sequence, and all types of boxes nested in each trackbox, media information of the file, a media play duration and encoding parameters, where the encoding parameters include an encoding level, a resolution, a color gamut, a code rate, an encoding format, a frame rate, and/or a bit depth.
Optionally, the method for creating a virtual logic file includes:
establishing a mapping relation between the relative playing time of each file and the file object; the duration of the virtual logic files is the sum of the relative playing duration of each file.
Optionally, the specific method for establishing the mapping relationship between the relative playing time of each file and the file object includes the following steps: and sequentially recording the mapping relation of each file into a mapping table, and commanding the following steps:
the first file: put (0, MP4Array [0]),
the second file: put (rd _1+1, MP4Array [1]),
the nth file:
durationMp4Map.put(rd_1+…+rd_(n-1)+1,MP4Array[n-1]),
wherein rd _1 is the duration of the first file, and the relative start time of the first file in the virtual logic file is 0 second; rd _2 is the duration of the second file, and the relative starting time of the second file in the virtual logic file is rd _1+1 second;
rd _ (n) is the duration of the nth file, and the relative start time of the nth file in the virtual logical file is rd _1+ … + rd _ (n-1) + 1.
Optionally, before formatting the media protocol data packet, the following steps are further included:
obtaining the relative start time of the request in the media protocol request, and determining the requested file object in the mapping table of the virtual logic file;
traversing the mapping table of the virtual logic file, and comparing the relative start time of the request with the relative start time key of the file object in the virtual logic file;
if the request starting time is more than or equal to the key, comparing whether the request starting time is less than the sum of the key and the playing time of the file object, and if the request starting time is less than the sum, determining the file object as the file object requested to start; after the file object is requested to be started, the relative time of the file starting time in the file object is searched, namely the relative time in the file object is obtained by subtracting the key from the request starting time; after the relative time in the file object is calculated, the file object can be operated by using the relative time as the start time, the standard file streaming process is started, and the data packaging is completed.
The file object playing time expression is as follows: rd = duration/time scale, where duration is the media play duration in the file sequence, and time scale is obtained for parsing the file.
Optionally, after the virtual logic file obtains the standard media protocol data packet, the timestamp of the media protocol data packet needs to be converted from the relative time of the file object to the relative time of the virtual logic file.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. A method for realizing file sequence on demand by streaming media service is characterized by comprising the following steps:
the streaming media responds to a received media protocol request for a file sequence, the file sequence in the file sequence is obtained according to the file cluster ID, each file is loaded according to the file sequence and each parameter in the file sequence is obtained by analyzing each file, a file object is generated, and the media protocol request for the file sequence is added with the unique file cluster ID of the file sequence and an identifier indicating that the request is directed at the file sequence;
establishing a virtual logic file according to the generated file object;
and acquiring media data according to the media protocol request and the established virtual logic file, formatting the media data into a media protocol data packet and transmitting the media protocol data packet.
2. The method of claim 1, wherein the suffix of the media protocol request URL indicates that the request is for a file sequence.
3. The method for realizing file sequence on demand by using streaming media service as claimed in claim 1, wherein the file object contains a trackbox list of each file in the file sequence and all types of boxes nested in each trackbox, media information of the file, a media play duration and encoding parameters, and the encoding parameters include an encoding level, a resolution, a color gamut, a code rate, an encoding format, a frame rate and/or a bit depth.
4. The method for realizing file sequence on demand by the streaming media service as claimed in claim 1, wherein the method for creating the virtual logic file comprises:
establishing a mapping relation between the relative playing time of each file and the file object; the duration of the virtual logic files is the sum of the relative playing duration of each file.
5. The method as claimed in claim 4, wherein the specific method for establishing the mapping relationship between the relative playing duration of each file and the file object comprises the following steps:
and sequentially recording the mapping relation of each file into a mapping table, and commanding the following steps:
the first file: put (0, MP4Array [0]),
the second file: put (rd _1+1, MP4Array [1]),
the nth file:
durationMp4Map.put(rd_1+…+rd_(n-1)+1,MP4Array[n-1]),
wherein rd _1 is the duration of the first file, and the relative start time of the first file in the virtual logic file is 0 second; rd _2 is the duration of the second file, and the relative starting time of the second file in the virtual logic file is rd _1+1 second; rd _ (n) is the duration of the nth file, the relative start time of the nth file in the virtual logical file being
rd _1+ … + rd _ (n-1) +1 second, where the duration MP4Map is the mapping table and the MP4Array is the Array storing the file objects.
6. The method of claim 5, wherein the formatting into media protocol data packets further comprises the following steps:
obtaining the relative start time of the request in the media protocol request, and determining the requested file object in the mapping table of the virtual logic file;
traversing the mapping table of the virtual logic file, and comparing the relative start time of the request with the relative start time key of the file object in the virtual logic file;
if the request starting time is more than or equal to the key, comparing whether the request starting time is less than the sum of the key and the playing time of the file object, and if the request starting time is less than the sum, determining the file object as the file object requested to start; after the file object is requested to be started, the relative time of the file starting time in the file object is searched, namely the relative time in the file object is obtained by subtracting the key from the request starting time; after the relative time in the file object is calculated, the file object can be operated by using the relative time as the starting time, a standard file fluidization process is started, and data packaging is finished;
the file object playing time expression is as follows:
rd=duration/time scale,
wherein duration is the media playing duration in the file sequence, and time scale is obtained by parsing the file.
7. The method as claimed in claim 1, wherein after the virtual logic file gets the standard media protocol data packet, the timestamp of the media protocol data packet needs to be converted from the relative time of the file object to the relative time of the virtual logic file.
8. A device for realizing file sequence on demand by streaming media service, comprising:
the file object generation module is used for responding to a received media protocol request for a file sequence by the streaming media, obtaining a file sequence in the file sequence according to a file cluster ID, loading each file according to the file sequence and analyzing each file to obtain each parameter in the file sequence, and generating a file object, wherein the unique file cluster ID of the file sequence and the representation request are identifiers aiming at the file sequence are added in the media protocol request for the file sequence;
the virtual logic file establishing module is used for establishing a virtual logic file according to the generated file object;
and the media data packet sending module is used for acquiring media data according to the media protocol request and the established virtual logic file, formatting the media data into a media protocol data packet and sending the media protocol data packet.
CN202010181707.2A 2020-03-16 2020-03-16 Method and device for realizing file sequence on demand by streaming media service Pending CN111356028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010181707.2A CN111356028A (en) 2020-03-16 2020-03-16 Method and device for realizing file sequence on demand by streaming media service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010181707.2A CN111356028A (en) 2020-03-16 2020-03-16 Method and device for realizing file sequence on demand by streaming media service

Publications (1)

Publication Number Publication Date
CN111356028A true CN111356028A (en) 2020-06-30

Family

ID=71197617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010181707.2A Pending CN111356028A (en) 2020-03-16 2020-03-16 Method and device for realizing file sequence on demand by streaming media service

Country Status (1)

Country Link
CN (1) CN111356028A (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102625140A (en) * 2012-03-19 2012-08-01 烽火通信科技股份有限公司 Method for frame-granularity real-time downloading and play of streaming media server
CN103533395A (en) * 2013-09-27 2014-01-22 武汉市烽视威科技有限公司 Method and system for realizing playback of hyper text transfer protocol (HTTP) live streaming (HLS) channel
CN105208440A (en) * 2015-09-22 2015-12-30 北京暴风科技股份有限公司 Online playing method and system for MP4-format video
CN105611395A (en) * 2015-09-22 2016-05-25 北京暴风科技股份有限公司 MP4 format video online play method and system thereof
CN106375873A (en) * 2016-08-31 2017-02-01 杭州当虹科技有限公司 HLS video file downloading, storing and playing method
CN107277081A (en) * 2016-04-06 2017-10-20 北京优朋普乐科技有限公司 Section method for down loading and device, the stream media system of stream medium data
CN107707937A (en) * 2017-09-22 2018-02-16 烽火通信科技股份有限公司 Time shift optimization method and system based on HLS protocol
CN107801051A (en) * 2017-10-27 2018-03-13 广东省南方数字电视无线传播有限公司 Virtual sliced sheet information transferring method and device, video server
US20180124147A1 (en) * 2012-11-20 2018-05-03 Google Technology Holdings LLC Method and apparatus for streaming media content to client devices
CN108156478A (en) * 2016-12-06 2018-06-12 创盛视联数码科技(北京)有限公司 Mp4 formatted files turn the video on-demand system and method for hls forms

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102625140A (en) * 2012-03-19 2012-08-01 烽火通信科技股份有限公司 Method for frame-granularity real-time downloading and play of streaming media server
US20180124147A1 (en) * 2012-11-20 2018-05-03 Google Technology Holdings LLC Method and apparatus for streaming media content to client devices
CN103533395A (en) * 2013-09-27 2014-01-22 武汉市烽视威科技有限公司 Method and system for realizing playback of hyper text transfer protocol (HTTP) live streaming (HLS) channel
CN105208440A (en) * 2015-09-22 2015-12-30 北京暴风科技股份有限公司 Online playing method and system for MP4-format video
CN105611395A (en) * 2015-09-22 2016-05-25 北京暴风科技股份有限公司 MP4 format video online play method and system thereof
CN107277081A (en) * 2016-04-06 2017-10-20 北京优朋普乐科技有限公司 Section method for down loading and device, the stream media system of stream medium data
CN106375873A (en) * 2016-08-31 2017-02-01 杭州当虹科技有限公司 HLS video file downloading, storing and playing method
CN108156478A (en) * 2016-12-06 2018-06-12 创盛视联数码科技(北京)有限公司 Mp4 formatted files turn the video on-demand system and method for hls forms
CN107707937A (en) * 2017-09-22 2018-02-16 烽火通信科技股份有限公司 Time shift optimization method and system based on HLS protocol
CN107801051A (en) * 2017-10-27 2018-03-13 广东省南方数字电视无线传播有限公司 Virtual sliced sheet information transferring method and device, video server

Similar Documents

Publication Publication Date Title
JP5781179B2 (en) File transmission method and apparatus in server and file reproduction method and apparatus in terminal
EP2666288B1 (en) Apparatus and method for storing and playing content in a multimedia streaming system
EP2490445B1 (en) Method, terminal and server for implementing trickplay
JP4944484B2 (en) Playback apparatus, playback method, and program
CA2674189C (en) Video recording and playing apparatus, and file management method
US8886896B2 (en) Storage format for media streams
WO2017092327A1 (en) Playing method and apparatus
JP2013038766A (en) Transmitter, transmitter control method, control program, and recording medium
EP3465460B1 (en) Systems and methods for providing audio content during trick-play playback
KR20110101051A (en) Method and apparatus for generating bookmark information
WO2015169172A1 (en) Network video playing method and device
CN111866603B (en) Video file production method based on SRS, background server and system
JP2015023574A (en) Storage method, reproduction method, storage device, and reproducer
WO2012009825A1 (en) Method for content presentation during trick mode operations
CN110198494B (en) Video playing method, device, equipment and storage medium
CN103491427A (en) Method and device for processing video
US20080240670A1 (en) Picture recording system and picture recording and reproducing method
CN104918108A (en) Video accurate positioning device and method based on HLS (HTTP Live Streaming) protocol
US20140115626A1 (en) Method and system for enhancing redistributed audio/video content
CN110290396B (en) Video processing method, device, system, equipment and storage medium
US9332421B2 (en) Method and apparatus for random access to multimedia content in wireless communication system
CN105979297B (en) One kind watching duration statistical method and system
CN111356028A (en) Method and device for realizing file sequence on demand by streaming media service
CN101340570B (en) Method for realizing redirection when playing stream media
EP3193508B1 (en) Distribution device and information device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200630

RJ01 Rejection of invention patent application after publication