[go: up one dir, main page]

WO2012146098A1 - Method and corresponding system for storing and playing streaming media - Google Patents

Method and corresponding system for storing and playing streaming media Download PDF

Info

Publication number
WO2012146098A1
WO2012146098A1 PCT/CN2012/072606 CN2012072606W WO2012146098A1 WO 2012146098 A1 WO2012146098 A1 WO 2012146098A1 CN 2012072606 W CN2012072606 W CN 2012072606W WO 2012146098 A1 WO2012146098 A1 WO 2012146098A1
Authority
WO
WIPO (PCT)
Prior art keywords
sub
segment
data frame
information
sample
Prior art date
Application number
PCT/CN2012/072606
Other languages
French (fr)
Chinese (zh)
Inventor
赵宇
刘继年
孙健
王芳
陈光亮
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2012146098A1 publication Critical patent/WO2012146098A1/en

Links

Classifications

    • 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/613Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for the control of the source by the destination
    • 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/611Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast
    • 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/70Media network packetisation

Definitions

  • the invention relates to the field of multimedia, in particular to a streaming media storage and playing method and a corresponding system. Background technique
  • the traditional streaming service is based on RTSP (Real Time Streaming Protocol) / Real Time Transport Protocol (RTP).
  • HTTP HyperText Transfer Protocol
  • MPEG Motion Picture Experts Group
  • DASH Dynamic Adaptive Streaming over HTTP
  • MPEG2-TS MPEG2 Transport Stream
  • MPEG2-TS MPEG2 Transport Stream
  • the HTTP protocol is essentially a text transfer protocol, it is not suitable for real-time streaming media transmission.
  • the program content is usually physically or logically divided into a number of small segments, as described in FIG.
  • the media presentation description (MPD, Media Presentation Description, or program index table) information such as the index of the program index table, the segment of the body segment, and the like, each time one or more segments of the media file are downloaded for playback, and then the downloaded The data is decoded and played.
  • the usual method is to download the corresponding segment according to the MPD, and then find the corresponding frame to play in the segment file. In this way, the client will download a lot of redundant data, which seriously affects the smoothness of playback and the network bandwidth.
  • a common practice is to define a segment index atom.
  • the client proceeds according to the address information of the key frame recorded in the segment index. Access keyframes for fast forward results.
  • a fatal flaw in this method is that the fast forward multiple does not match the actual situation, especially in the case where the key frames are sparse, the fast forward effect and the desired effect will have a large gap.
  • a new D VB Tier framework (Digital Video Broadcasting Tier framework) is defined in Appendix D of the European Telecommunications Standards Institute 101 154.
  • each data frame is divided into multiple tiers according to the dependency, and the tier high data frame depends on the tier low data frame.
  • DVB Tier how to play the trick mode related to the tier architecture has not been defined.
  • the technical problem to be solved by the present invention is to provide a streaming media storage and playing method and a corresponding system, which realizes storage and playback of streaming media based on DVB Tier, so that the user can obtain the same effect as expected when performing playback related to the trick mode. .
  • the present invention provides a streaming media storage method, including: a streaming media server, when saving media content, segmenting the media content, each segment including one or more sub-segments,
  • the streaming media server generates a sub-segment index atom for each sub-segment, and saves the sub-segment index atom, where the sub-segment index atom includes: a sample number information, a sample offset information, a sample length Information and sample time information.
  • the number of pieces of data indicates the number of data frames indexed by each level in the current sub-segment
  • the sample offset information indicates an offset of a storage start address of each indexed data frame in the current sub-segment with respect to the current sub-segment first address;
  • the sample length information indicates a storage length of each indexed data frame in the current sub-segment
  • the sample time information represents a time offset of each indexed data frame in the current sub-segment relative to the first sample data frame in the current sub-segment.
  • the sub-segment index atom further includes bit number identification information indicating the current required number of bits of the sample offset information and the sample length information.
  • the present invention also provides a streaming media playing method, including:
  • the terminal downloads a data frame according to the content of the sub-segment index atom downloaded from the streaming server, and plays the downloaded data frame: a scene entering the trick mode from the normal play mode, from the trick mode
  • the sub-segment index atom includes: the number of pieces of information, the sample offset information, the length information of the sample, and the time information of the sample.
  • the step of the terminal downloading the data frame according to the content of the sub-segment index atom downloaded from the streaming server includes:
  • the terminal After receiving the command to enter the trick mode, the terminal determines the starting data frame
  • MPD media representation description
  • the starting data frame is the first data frame after the current data frame and having the lowest level.
  • the step of the terminal downloading the data frame according to the content of the sub-segment index atom downloaded from the streaming server includes:
  • the terminal After receiving the command to exit the trick mode, the terminal searches for the lowest indexed data frame after the current data frame in the sub-segment index atom, according to the recorded in the sub-segment index atom.
  • the sampled offset information and the sample length information of the indexed data frame are requested to be downloaded to the streaming server for downloading the data frame and subsequent data frames.
  • the step of downloading the data frame by the terminal according to the content of the sub-segment index atom downloaded from the streaming server includes:
  • the terminal After receiving the command to enter the time shifting on-demand mode, the terminal determines the sub-segment corresponding to the time according to the time-shifted on-demand time, and sends the address information of the segment index according to the pre-downloaded media representation description (MPD) to the streaming server.
  • MPD media representation description
  • MPD media representation description
  • the present invention also provides a streaming media storage system, including a segmentation device and a sub-segment index atom generating device, wherein:
  • the segmentation device is configured to: when the media content is saved, segment the media content, each segment includes one or more sub-segments;
  • the sub-segment index atom generating means is configured to: generate a sub-segment index atom for each sub-segment, and save the sub-segment index atom, the sub-segment index atom includes: a number of pieces of information, ⁇ Sample offset information, sample length information, and sample time information, where:
  • the number of pieces of data indicates the number of data frames indexed by each level in the current sub-segment
  • the sample offset information indicates an offset of a storage start address of each indexed data frame in the current sub-segment with respect to the current sub-segment first address;
  • the sample length information indicates a storage length of each indexed data frame in the current sub-segment
  • the sample time information represents a time offset of each indexed data frame in the current sub-segment relative to the first sample data frame in the current sub-segment.
  • the sub-segment index atom further includes bit number identification information indicating the current required number of bits of the sample offset information and the sample length information.
  • the present invention further provides a streaming media playing system, which is located on the terminal side, and includes a downloading device and a playback device, wherein:
  • the downloading device is configured to: download a sub-segment index atom from the streaming media server, and when the terminal is in any one of the following scenarios, download the data frame according to the content of the downloaded sub-segment index atom:
  • the scene enters the scene of the trick mode, the scene from the trick mode into the normal play mode, and the scene that enters the time shift positioning on-demand mode;
  • the sub-segment index atom includes: the number of pieces of information, the offset information of the sample, the length of the sample Information and sample time information;
  • the playback device is configured to: and play the downloaded data frame.
  • the downloading device includes a determining start data frame module, a first sub-segment index atom acquisition module, and a download data frame module, where:
  • the determining the start data frame module is configured to: when the terminal is in a scene that enters the trick mode from the normal play mode, after receiving the command to enter the trick mode, determining a start data frame; the first sub-segment
  • the index atom acquisition module is configured to: request, according to the address information of the segment index in the pre-downloaded media representation description (MPD), the streaming media server to download the segment index of the segment to which the sub-segment in which the start data frame belongs, from Obtaining, in the segment index, a sub-segment index atom of the sub-segment;
  • the download data frame module is configured to: determine a highest level of a data frame to be played in the sub-segment in the current trick mode, traverse the sub-segment index atom, and find the level after the start data frame, and The indexed data frames that are smaller than the highest level are indexed, and the searched indexed data frames are sequentially downloaded in accordance with the sampled time information of the found indexed data frames.
  • the starting data frame is the first data frame after the current data frame and having the lowest level.
  • the downloading device includes a searching module and a first downloading module, where:
  • the searching module is configured to: when the terminal is in a scene from the trick mode to the normal play mode, after receiving the command to exit the trick mode, searching for the lowest level after the current data frame in the sub-segment index atom Indexed data frame of the index;
  • the first downloading module is configured to: request, according to the sample offset information and the sample length information of the indexed data frame recorded in the sub-segment index atom, to download the search to the streaming server The indexed data frame and the subsequent data frames.
  • the downloading device includes a second sub-segment index atom acquisition module and a second download module, where:
  • the second sub-segment index atom acquisition module is configured to: when the terminal is in the time-shifted on-demand mode, after receiving the command to enter the time-shift positioning on-demand mode, determine the time according to the time-shift on-demand time Corresponding sub-segment, requesting, by the streaming media server, to download the segment index of the segment according to the address information of the segment index in the pre-downloaded media representation description (MPD),
  • the second download module is configured to: traverse the sub-segment index atom, and find the lowest-level indexed data frame after the time-shifted on-demand time, according to the record recorded in the sub-segment index atom
  • the sample offset information and the sample length information of the sample data frame are requested to the streaming server to download the data frame and the subsequent data frame.
  • the entire segment of the file is not downloaded, and only the data frame to be played is downloaded, that is, the data frame can be quickly located.
  • the data frame that needs to be played it not only saves network traffic, but also greatly reduces the waiting time during user playback, and does not affect between various trick modes, and between normal mode and trick mode. Smooth switching greatly enhances the user experience.
  • Figure 1 is a schematic diagram of fast-forward frame fetching in the tier frame
  • FIG. 2 is a flow chart of realizing fast forward using ssix atoms defined by the present invention in an embodiment of the present invention
  • FIG. 3 is a flowchart of realizing fast forward and normal play using ssix atoms defined by the present invention in an embodiment of the present invention
  • FIG. 4 is a flow diagram of time shift positioning playback using the ssix atom defined by the present invention in accordance with an embodiment of the present invention.
  • the present invention defines a sub-segment index atom, including: sample number information, sample offset information, sample length information, and sample time information, where:
  • sampling offset information used to indicate an offset of a storage start address of each indexed data frame in the current sub-segment with respect to a current sub-segment first address
  • sample length information used to indicate the storage length of each indexed data frame in the current sub-segment
  • Sample time information used to indicate the time offset of each indexed data frame in the current sub-segment relative to the first sample data frame in the current sub-segment.
  • the streaming server can set an index for each frame or one frame every few frames.
  • the implementation is flexible, especially when the index is several frames, the overhead can be reduced, for example, a 24 s, 144 A minute movie, a full trick mode index (ie index of all frames) has an overhead of 1.6 Mbytes, and if one frame is indexed every 4 frames, the overhead of 406 Kb will be reduced.
  • the sub-segment index atom may further include bit number identification information, which is used to indicate the current required number of bits of the sample offset information and the sample length information.
  • the bit identification information can conveniently control the number of bits (16-bit or 32-bit) occupied by the sample offset and the sample length, which can further reduce the network bandwidth.
  • the streaming media server segments the media content when saving the media content, each segment includes one or more sub-segments, and the streaming media server generates a sub-segment index atom for each sub-segment, and
  • the sub-segment index atom is saved, and the sub-segment index atom includes: sample number information, sample offset information, sample length information, and sample time information.
  • the sub-segment index atoms may further include bit number identification information.
  • the above media content is provided by the content provider to the streaming server.
  • the terminal downloads the data frame according to the content of the sub-segment index atom downloaded from the streaming server, and plays the downloaded Data frame: The scene that enters the trick mode from the normal play mode, the scene that enters the normal play mode from the trick mode, and the scene that enters the time shift positioning on-demand mode.
  • the terminal After receiving the command to enter the trick mode (for example, fast forward or rewind), the terminal determines the start data frame;
  • the terminal requests, according to the address information (for example, URL information) of the segment index in the pre-downloaded media representation description (MPD), to download, by the streaming server, the sub-segment in which the start data frame is located.
  • the starting data frame is preferably the first data frame after the current data frame and having the lowest level, since the lowest level data frame does not depend on any other data frame.
  • the terminal determines a highest level of the data frame to be played in the sub-segment in the current trick mode, and traverses the sub-segment index atom, and searches after the start data frame, and the level is smaller than
  • the highest-level indexed data frame downloads the searched indexed data frame in the order of the searched time information of the indexed data frame that is searched.
  • Determining the highest level of the data frame to be played is determined according to the parameters of the current trick mode. Specifically, the highest level of the frame to be played in the sub-segment is determined according to the multiple of fast forward or fast reverse.
  • the terminal After receiving the command to exit the trick mode, the terminal searches for the lowest indexed data frame after the current data frame in the sub-segment index atom, according to the recorded in the sub-segment index atom.
  • the sampled offset information and the sample length information of the indexed data frame are requested to be downloaded to the streaming server for downloading the data frame and subsequent data frames.
  • the current data frame is the data frame that is played when the exit of the trick mode command is received.
  • the above sub-segment index atom is downloaded when the terminal is in the trick mode.
  • the terminal can continue the current trick mode play during the search process, that is, maintain the fast forward or fast reverse state.
  • the terminal determines, according to the time shift on-demand time, the sub-segment corresponding to the time point, according to the address information of the segment index in the pre-downloaded media representation description (MPD)
  • MPD media representation description
  • Determining the segment corresponding to the time point according to the time shift on-demand time comprises: calculating a presentation time (relative time) of the time-shifted on-demand time, and searching for the sub-segment in which the presentation time is located according to the MPD.
  • the MPEG2-TS is used as a media file storage format on the streaming media server as an example.
  • the streaming media server logically segments the media file, and each media segment corresponds to a segment index, media segmentation, and
  • the segmentation index has a URL in the MPD, that is, each segment and its segmentation index can be accessed through the MPD.
  • the segmentation index contains sidx box (segmented index atom) and ssixbox (subsegmented index atom).
  • the definition of the ssix atom is as follows:
  • SubsegmentlndexBox extends FullBox ( ssix ' , version, flags ) ⁇ unsigned int (32 ) subseg_count;
  • Num— samples that is, the number of pieces of information indicating the number of indexed data frames belonging to level j;
  • Bytes—in— unit: The number of bits of the identification information, indicating whether the offset and length are expressed in 16 bits or 32 bits. The value is units of bytes. In this implementation, when units of bytes 0, the offset and The length is represented by 32 bits; Preferably, the number of bits occupied by the sample_offset_sic can be extended by the bytes-in-unit, which can be calculated by using units of bytes, that is, the number of bits occupied by the offset information is equal to sample_offset- Short*bytes—in— unit; Similarly, the number of bits occupied by the offset length information is equal to sample—size—shor*bytes—in—unit.
  • Sample-offset indicates the offset from the stored start address of the indexed data frame S[i, k] relative to the first address of the sub-segment using the offset information represented by 32 bits;
  • Sample_ size The length information of the sampled data frame S[i , k] indicated by the 32 bits indicates the storage size of the sampled data frame.
  • Sample—offset— short The offset information of 16 bits is used to indicate the offset of the storage start address of the indexed data frame S[i , k] relative to the first address of the sub-segment i.
  • Sample_ time the time information of the sample, indicating the time offset of the indexed data frame S[i , k] relative to the first data frame in the sub-segment j, the time offset is stored in the sidx
  • the unit of timebase in the atom is the same.
  • This embodiment is an example of entering the trick mode from the normal play mode, and the trick mode is described as fast forward. As shown in Figure 2, it includes:
  • Step 201 The terminal receives the command to enter the fast forward mode, and determines the highest level of all the data frames to be played according to the fast forward multiple;
  • the highest level in the data frame to be played can be determined according to the fast forward multiple.
  • Step 202 Continue normal play until the lowest level data frame S1 is played, and obtain the segment to which the sub-segment in which the S1 frame belongs;
  • Step 203 Download a segment index corresponding to the segment, and parse the index to obtain a sub-segment index primitive;
  • Step 204 it is determined whether all the data frames smaller than the highest level after the S1 frame in the sub-segment are downloaded to the terminal, and if yes, step 208 is performed, otherwise step 205 is performed; Step 205: Obtain offset information and length information of the next frame data according to a sequence of sampling times.
  • Step 206 Request the frame from the streaming server according to the obtained offset information and length information terminal;
  • Step 207 the terminal decodes and displays the frame, and returns to step 204;
  • Step 208 moving to the next segment that meets the fast forward multiple, and returning to step 203.
  • This embodiment is an example of transitioning from the trick mode to the normal play mode, and the trick mode is described as fast forward. As shown in Figure 3, it includes:
  • Step 301 Receive a command of fast forward to normal play
  • Step 302 Obtain a last data frame when fast forwarding
  • Step 303 determining whether the level of the frame is 1, if yes, then jump to 305, otherwise, jump to step 304;
  • Step 304 obtaining information of the next indexed data frame in the sub-segment index atom, returning to step 303;
  • Step 305 Obtain offset information and length information of the frame in the sub-segment index atom.
  • Step 306 Request, to the streaming media server, all data frames of the segment after the frame (including the frame);
  • Step 307 The terminal normally plays the downloaded data frame.
  • Step 308 downloading all segmentation data when the next segment is used
  • Step 309 normal play. Current process.
  • Example 4 This embodiment is an example of entering the time shift positioning on-demand mode. As shown in Figure 4.
  • the live stream in this example has only a video stream, that is, there is only one track in the stream.
  • Step 401 After receiving the command to enter the time shift positioning on-demand mode, obtain the time shift on-demand time; Step 402, determine whether the time-shifted on-demand time is UTC (World Standard Time), and if yes, skip to step 404, otherwise skip to Step 403;
  • UTC World Standard Time
  • Step 403 Convert the time shift on-demand time to the UTC time.
  • Step 404 obtaining a start UTS of the TS file from the MPD
  • Step 405 Calculate a presentation time of the time shift on-demand time, that is, a time offset
  • Step 406 traversing the initial sampling time of each segment recorded in the MPD, and calculating which segment the playback point falls in;
  • Step 407 Obtain a URL of a segment index corresponding to the segment from the MPD, and download the segment index, and obtain a sub-segment index atom from the segment index;
  • Step 408 traversing the sub-segment index atom, and finding a data frame with a level of 1 and a play time greater than or equal to a time-shifted on-demand time;
  • Step 409 Obtain offset information and length information of the frame in the sub-segment index atom, and download all data frames after the frame (including the frame);
  • Step 410 Normally play the downloaded data.
  • Step 411 the next segment downloads the entire segment data into a normal playback process. Current process.
  • the invention is suitable for various scenes such as local play, on-demand multimedia files for multi-branch playback and the like.
  • the entire segment of the file is not downloaded, and only the data frame to be played is downloaded, that is, the data frame can be quickly located.
  • the data frame that needs to be played it not only saves network traffic, but also greatly reduces the waiting time during user playback, and does not affect between various trick modes, and between normal mode and trick mode. Smooth switching greatly enhances the user experience.

Landscapes

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

Abstract

A method and corresponding system for storing and playing streaming media, realizing the storage and playing of streaming media based on a Digital Video Broadcasting Tier (DVB Tier), enabling users to achieve the expected consistent effect when the playing relevant to trick mode is performed. The method for storing comprises: a streaming media server segments the media content when the latter is stored; each segment includes one or more subsegments; the streaming media server generates a subsegment index atom for each subsegment, and the subsegment index atom includes: the sampling number information, the sampling offset information, the sampling length information and the sampling time information. The storage system includes a segmenting device and a subsegment index atom generation device. This invention can quickly locate the starting and ending position of the data frame which is needed to be played, save the network traffic, reduce the user's waiting time during the playing, and improve user experience.

Description

一种流媒体存储、 播放方法及相应系统  Stream media storage, playing method and corresponding system
技术领域 Technical field
本发明涉及多媒体领域, 特别是一种流媒体存储、播放方法及相应系统。 背景技术  The invention relates to the field of multimedia, in particular to a streaming media storage and playing method and a corresponding system. Background technique
传统的流媒体服务是基于 RTSP ( Real Time Streaming Protocol, 实时流传 输协议) /RTP ( Real-time Transport Protocol, 实时传输协议) 的。 但是由于 RTSP/RTP 在穿越防火墙存在问题等缺点, 近两年发展出基于 HTTP ( HyperText Transfer Protocol ,超文本传输协议)来提供流媒体服务,即 HTTP Streaming (流)业务。 在 MPEG ( Moving Pictures Experts Group, 动态图像专 家组)标准组织中称之为 DASH(Dynamic Adaptive Streaming over HTTP, 基 于超文本传输协议的动态自适应流)。 近年来, 广播业务和移动业务开始渐渐 融合,不同的多媒体内容和业务在不同的网络上传输。用于广播的 MPEG2-TS ( MPEG2传输流)在互联网上应用也较为广泛。 同样, MPEG2-TS也应用在 DASH业务上。  The traditional streaming service is based on RTSP (Real Time Streaming Protocol) / Real Time Transport Protocol (RTP). However, due to the shortcomings of RTSP/RTP in crossing the firewall, the HyperText Transfer Protocol (HTTP) has been developed in the past two years to provide streaming services, namely HTTP Streaming (streaming) services. In the MPEG (Moving Pictures Experts Group) standards organization, it is called DASH (Dynamic Adaptive Streaming over HTTP), which is based on hypertext transfer protocol. In recent years, the broadcasting service and the mobile service have gradually merged, and different multimedia contents and services are transmitted on different networks. MPEG2-TS (MPEG2 Transport Stream) for broadcasting is also widely used on the Internet. Similarly, MPEG2-TS is also used in DASH services.
由于 HTTP协议本质上属于文本传输协议,并不适合实时的流媒体传输。 为了便于实现直播回放(针对时移业务)和边下载边看的功能, 通常将节目 内容在物理或逻辑上分成很多的小分段, 如图 1所述。媒体表示描述(MPD, Media Presentation Description ,或称节目索引表)该节目索引表包^ 某体分段 的索引等信息, 每次下载媒体文件的一个或多个分段进行播放, 然后对已下 载的数据进行解码播放。但对于快进快退功能,通常的做法是根据 MPD下载 相应的分段, 然后再到分段文件中找到相应的帧进行播放。 这样客户端将会 下载很多多余的数据, 严重影响播放的流畅性及占用网络带宽。 发明内容  Since the HTTP protocol is essentially a text transfer protocol, it is not suitable for real-time streaming media transmission. In order to facilitate the functions of live playback (for time-shifted services) and viewing while downloading, the program content is usually physically or logically divided into a number of small segments, as described in FIG. The media presentation description (MPD, Media Presentation Description, or program index table) information such as the index of the program index table, the segment of the body segment, and the like, each time one or more segments of the media file are downloaded for playback, and then the downloaded The data is decoded and played. However, for the fast forward and rewind function, the usual method is to download the corresponding segment according to the MPD, and then find the corresponding frame to play in the segment file. In this way, the client will download a lot of redundant data, which seriously affects the smoothness of playback and the network bandwidth. Summary of the invention
在目前的技术中, 常用的做法是定义分段索引原子, 在做特技模式的时 候, 例如在快进的时候, 客户端根据分段索引里记录的关键帧的地址信息去 访问关键帧, 从而达到快进的效果。 但是这种方法存在一个致命的缺陷就是 快进倍数与实际不符, 尤其是在关键帧比较稀疏的情况下, 快进效果与期望 效果会有比较大的差距。 In the current technology, a common practice is to define a segment index atom. When performing a trick mode, for example, during fast forward, the client proceeds according to the address information of the key frame recorded in the segment index. Access keyframes for fast forward results. However, a fatal flaw in this method is that the fast forward multiple does not match the actual situation, especially in the case where the key frames are sparse, the fast forward effect and the desired effect will have a large gap.
欧洲电信标准协会 101 154附录 D中定义了一种新的 D VB Tier framework ( Digital Video Broadcasting Tier framework, 数字视频广播级别框架)。 在视 频编码的时候将各个数据帧根据依赖情况分成多个 tier (级别) , tier高的数 据帧依赖 tier低的数据帧。 但在 DVB Tier的框架下, 如何根据 tier架构进行 与特技模式相关的播放还没有定义。  A new D VB Tier framework (Digital Video Broadcasting Tier framework) is defined in Appendix D of the European Telecommunications Standards Institute 101 154. In the video coding, each data frame is divided into multiple tiers according to the dependency, and the tier high data frame depends on the tier low data frame. However, under the framework of DVB Tier, how to play the trick mode related to the tier architecture has not been defined.
本发明要解决的技术问题是提供一种流媒体存储、播放方法及相应系统, 基于 DVB Tier实现流媒体的存储和播放,使用户在进行与特技模式相关的播 放时可以获得与期望一致的效果。  The technical problem to be solved by the present invention is to provide a streaming media storage and playing method and a corresponding system, which realizes storage and playback of streaming media based on DVB Tier, so that the user can obtain the same effect as expected when performing playback related to the trick mode. .
为解决上述技术问题, 本发明提供了一种流媒体存储方法, 包括: 流媒体服务器在保存媒体内容时, 对所述媒体内容进行分段, 每个分段 包括一个或多个子分段, 所述流媒体服务器为每个子分段生成子分段索引原 子, 并保存所述子分段索引原子, 所述子分段索引原子包括: 釆样个数信息、 釆样偏移信息、 釆样长度信息以及釆样时间信息。  To solve the above technical problem, the present invention provides a streaming media storage method, including: a streaming media server, when saving media content, segmenting the media content, each segment including one or more sub-segments, The streaming media server generates a sub-segment index atom for each sub-segment, and saves the sub-segment index atom, where the sub-segment index atom includes: a sample number information, a sample offset information, a sample length Information and sample time information.
优选地, 所述子分段索引原子中:  Preferably, in the sub-segment index atom:
所述釆样个数信息表示当前子分段中各级别被索引的釆样数据帧的个 数;  The number of pieces of data indicates the number of data frames indexed by each level in the current sub-segment;
所述釆样偏移信息表示当前子分段中每个被索引的釆样数据帧的存储起 始地址相对于所述当前子分段首地址的偏移;  The sample offset information indicates an offset of a storage start address of each indexed data frame in the current sub-segment with respect to the current sub-segment first address;
所述釆样长度信息表示当前子分段中每个被索引的釆样数据帧的存储长 度;  The sample length information indicates a storage length of each indexed data frame in the current sub-segment;
所述釆样时间信息表示当前子分段中每个被索引的釆样数据帧相对于所 述当前子分段中首个釆样数据帧的时间偏移。  The sample time information represents a time offset of each indexed data frame in the current sub-segment relative to the first sample data frame in the current sub-segment.
优选地, 所述子分段索引原子中还包括位数标识信息, 表示釆样偏移信 息和釆样长度信息当前的所需的位数。  Preferably, the sub-segment index atom further includes bit number identification information indicating the current required number of bits of the sample offset information and the sample length information.
为解决上述技术问题, 本发明还提供了一种流媒体播放方法, 包括: 在以下场景中的任意一种中时, 终端根据从流媒体服务器下载的子分段 索引原子的内容下载数据帧, 并播放下载的数据帧: 从正常播放模式进入特 技模式的场景、 从特技模式进入正常播放模式的场景、 进入时移定位点播模 式的场景; 所述子分段索引原子包括: 釆样个数信息、 釆样偏移信息、 釆样 长度信息以及釆样时间信息。 To solve the above technical problem, the present invention also provides a streaming media playing method, including: In any of the following scenarios, the terminal downloads a data frame according to the content of the sub-segment index atom downloaded from the streaming server, and plays the downloaded data frame: a scene entering the trick mode from the normal play mode, from the trick mode The scenario of entering the normal play mode and the scene of the time shifting on-demand mode; the sub-segment index atom includes: the number of pieces of information, the sample offset information, the length information of the sample, and the time information of the sample.
优选地, 所述终端在从正常播放模式进入特技模式中时, 所述终端根据 从流媒体服务器下载的子分段索引原子的内容下载数据帧的步骤包括:  Preferably, when the terminal enters the trick mode from the normal play mode, the step of the terminal downloading the data frame according to the content of the sub-segment index atom downloaded from the streaming server includes:
终端接收到进入特技模式的命令后, 确定起始数据帧;  After receiving the command to enter the trick mode, the terminal determines the starting data frame;
所述终端根据预先下载的媒体表示描述(MPD ) 中分段索引的地址信息 向所述流媒体服务器请求下载所述起始数据帧所在的子分段所属分段的分段 所述终端确定当前特技模式下所述子分段中待播放数据帧的最高级别, 遍历所述子分段索引原子, 查找在所述起始数据帧之后的, 且级别小于所述 最高级别的被索引的釆样数据帧, 按照查找到的被索引的釆样数据帧的釆样 时间信息顺序下载所述查找到的被索引的釆样数据帧。  Determining, by the terminal, the segment information of the segment index according to the segmentation index in the pre-downloaded media representation description (MPD) to the streaming media server to download the segment to which the sub-segment of the start data frame belongs The highest level of the data frame to be played in the sub-segment in the trick mode, traversing the sub-segment index atom, searching for the index after the starting data frame, and the level is less than the highest level of the indexed The data frame downloads the searched indexed data frame in the order of the searched time information of the indexed data frame that is searched.
优选地,所述起始数据帧为当前数据帧之后的且级别最低的首个数据帧。 优选地, 所述终端在从特技模式进入正常播放模式中时, 所述终端根据 从流媒体服务器下载的子分段索引原子的内容下载数据帧的步骤包括:  Preferably, the starting data frame is the first data frame after the current data frame and having the lowest level. Preferably, when the terminal enters the normal play mode from the trick mode, the step of the terminal downloading the data frame according to the content of the sub-segment index atom downloaded from the streaming server includes:
所述终端接收到退出特技模式的命令后, 在子分段索引原子中查找当前 数据帧之后的级别最低的被索引的釆样数据帧, 根据所述子分段索引原子中 记录的所述被索引的釆样数据帧的釆样偏移信息和釆样长度信息, 向流媒体 服务器请求下载该数据帧及其之后的数据帧。  After receiving the command to exit the trick mode, the terminal searches for the lowest indexed data frame after the current data frame in the sub-segment index atom, according to the recorded in the sub-segment index atom. The sampled offset information and the sample length information of the indexed data frame are requested to be downloaded to the streaming server for downloading the data frame and subsequent data frames.
优选地, 所述终端在进入时移定位点播模式的场景中时, 所述终端才艮据 从流媒体服务器下载的子分段索引原子的内容下载数据帧的步骤包括:  Preferably, when the terminal enters the time-shifted location-on-demand mode, the step of downloading the data frame by the terminal according to the content of the sub-segment index atom downloaded from the streaming server includes:
终端接收到进入时移定位点播模式的命令后, 根据时移点播时间确定该 时间对应的子分段, 根据预先下载的媒体表示描述(MPD ) 中分段索引的地 址信息向所述流媒体服务器请求下载所述分段的分段索引, 从所述分段索引 中获取所述子分段的子分段索引原子; 遍历所述子分段索引原子, 查找所述时移点播时间之后的且级别最低的 被索引的釆样数据帧, 根据所述子分段索引原子中记录的该釆样数据帧的釆 样偏移信息和釆样长度信息, 向所述流媒体服务器请求下载该釆样数据帧及 其之后的数据帧。 After receiving the command to enter the time shifting on-demand mode, the terminal determines the sub-segment corresponding to the time according to the time-shifted on-demand time, and sends the address information of the segment index according to the pre-downloaded media representation description (MPD) to the streaming server. Requesting to download a segment index of the segment, and obtaining a sub-segment index atom of the sub-segment from the segment index; Traversing the sub-segment index atom, searching for the lowest-level indexed data frame after the time-shifted on-demand time, according to the sample-like data frame recorded in the sub-segment index atom Transmitting information and sample length information, requesting the streaming server to download the sample data frame and subsequent data frames.
为解决上述技术问题, 本发明还提供了一种流媒体存储系统, 包括分段 装置以及子分段索引原子生成装置, 其中:  In order to solve the above technical problem, the present invention also provides a streaming media storage system, including a segmentation device and a sub-segment index atom generating device, wherein:
所述分段装置设置为: 在保存媒体内容时, 对所述媒体内容进行分段, 每个分段包括一个或多个子分段;  The segmentation device is configured to: when the media content is saved, segment the media content, each segment includes one or more sub-segments;
所述子分段索引原子生成装置设置为: 为每个子分段生成子分段索引原 子, 并保存所述子分段索引原子, 所述子分段索引原子包括: 釆样个数信息、 釆样偏移信息、 釆样长度信息以及釆样时间信息, 其中:  The sub-segment index atom generating means is configured to: generate a sub-segment index atom for each sub-segment, and save the sub-segment index atom, the sub-segment index atom includes: a number of pieces of information, 釆Sample offset information, sample length information, and sample time information, where:
所述釆样个数信息表示当前子分段中各级别被索引的釆样数据帧的个 数;  The number of pieces of data indicates the number of data frames indexed by each level in the current sub-segment;
所述釆样偏移信息表示当前子分段中每个被索引的釆样数据帧的存储起 始地址相对于所述当前子分段首地址的偏移;  The sample offset information indicates an offset of a storage start address of each indexed data frame in the current sub-segment with respect to the current sub-segment first address;
所述釆样长度信息表示当前子分段中每个被索引的釆样数据帧的存储长 度;  The sample length information indicates a storage length of each indexed data frame in the current sub-segment;
所述釆样时间信息表示当前子分段中每个被索引的釆样数据帧相对于所 述当前子分段中首个釆样数据帧的时间偏移。  The sample time information represents a time offset of each indexed data frame in the current sub-segment relative to the first sample data frame in the current sub-segment.
优选地, 所述子分段索引原子中还包括位数标识信息, 表示釆样偏移信 息和釆样长度信息当前的所需的位数。  Preferably, the sub-segment index atom further includes bit number identification information indicating the current required number of bits of the sample offset information and the sample length information.
为解决上述技术问题, 本发明还提供了一种流媒体播放系统, 位于终端 侧, 包括下载装置和播放装置, 其中:  In order to solve the above technical problem, the present invention further provides a streaming media playing system, which is located on the terminal side, and includes a downloading device and a playback device, wherein:
所述下载装置设置为: 从流媒体服务器下载子分段索引原子, 以及所述 终端处于以下场景中的任意一种中时, 根据下载的子分段索引原子的内容下 载数据帧: 从正常播放模式进入特技模式的场景、 从特技模式进入正常播放 模式的场景、 进入时移定位点播模式的场景; 所述子分段索引原子包括: 釆 样个数信息、 釆样偏移信息、 釆样长度信息以及釆样时间信息; 所述播放装置设置为: 并播放下载的数据帧。 The downloading device is configured to: download a sub-segment index atom from the streaming media server, and when the terminal is in any one of the following scenarios, download the data frame according to the content of the downloaded sub-segment index atom: The scene enters the scene of the trick mode, the scene from the trick mode into the normal play mode, and the scene that enters the time shift positioning on-demand mode; the sub-segment index atom includes: the number of pieces of information, the offset information of the sample, the length of the sample Information and sample time information; The playback device is configured to: and play the downloaded data frame.
优选地, 所述下载装置包括确定起始数据帧模块、 第一子分段索引原子 获取模块以及下载数据帧模块, 其中:  Preferably, the downloading device includes a determining start data frame module, a first sub-segment index atom acquisition module, and a download data frame module, where:
所述确定起始数据帧模块设置为: 在所述终端处于从正常播放模式进入 特技模式的场景时, 在接收到进入特技模式的命令后, 确定起始数据帧; 所述第一子分段索引原子获取模块设置为: 根据预先下载的媒体表示描 述(MPD ) 中分段索引的地址信息向流媒体服务器请求下载所述起始数据帧 所在的子分段所属分段的分段索引, 从所述分段索引中获取所述子分段的子 分段索引原子;  The determining the start data frame module is configured to: when the terminal is in a scene that enters the trick mode from the normal play mode, after receiving the command to enter the trick mode, determining a start data frame; the first sub-segment The index atom acquisition module is configured to: request, according to the address information of the segment index in the pre-downloaded media representation description (MPD), the streaming media server to download the segment index of the segment to which the sub-segment in which the start data frame belongs, from Obtaining, in the segment index, a sub-segment index atom of the sub-segment;
所述下载数据帧模块设置为: 确定当前特技模式下所述子分段中待播放 数据帧的最高级别, 遍历所述子分段索引原子, 查找在所述起始数据帧之后 的, 且级别小于所述最高级别的被索引的釆样数据帧, 以及按照查找到的被 索引的釆样数据帧的釆样时间信息顺序下载所述查找到的被索引的釆样数据 帧。  The download data frame module is configured to: determine a highest level of a data frame to be played in the sub-segment in the current trick mode, traverse the sub-segment index atom, and find the level after the start data frame, and The indexed data frames that are smaller than the highest level are indexed, and the searched indexed data frames are sequentially downloaded in accordance with the sampled time information of the found indexed data frames.
优选地,所述起始数据帧为当前数据帧之后的且级别最低的首个数据帧。 优选地, 所述下载装置包括查找模块、 第一下载模块, 其中:  Preferably, the starting data frame is the first data frame after the current data frame and having the lowest level. Preferably, the downloading device includes a searching module and a first downloading module, where:
所述查找模块设置为: 在所述终端处于从特技模式进入正常播放模式的 场景时, 在接收到退出特技模式的命令后, 在子分段索引原子中查找当前数 据帧之后的级别最低的被索引的釆样数据帧;  The searching module is configured to: when the terminal is in a scene from the trick mode to the normal play mode, after receiving the command to exit the trick mode, searching for the lowest level after the current data frame in the sub-segment index atom Indexed data frame of the index;
所述第一下载模块设置为: 根据所述子分段索引原子中记录的所述被索 引的釆样数据帧的釆样偏移信息和釆样长度信息, 向流媒体服务器请求下载 该查找到的被索引的釆样数据帧及其之后的数据帧。  The first downloading module is configured to: request, according to the sample offset information and the sample length information of the indexed data frame recorded in the sub-segment index atom, to download the search to the streaming server The indexed data frame and the subsequent data frames.
优选地, 所述下载装置包括第二子分段索引原子获取模块、 第二下载模 块, 其中:  Preferably, the downloading device includes a second sub-segment index atom acquisition module and a second download module, where:
所述第二子分段索引原子获取模块设置为: 在所述终端处于时移定位点 播模式的场景中时, 在接收到进入时移定位点播模式的命令后, 根据时移点 播时间确定该时间对应的子分段, 根据预先下载的媒体表示描述(MPD ) 中 分段索引的地址信息向所述流媒体服务器请求下载所述分段的分段索引, 从 第二下载模块设置为: 遍历所述子分段索引原子, 查找所述时移点播时 间之后的且级别最低的被索引的釆样数据帧, 根据所述子分段索引原子中记 录的该釆样数据帧的釆样偏移信息和釆样长度信息, 向所述流媒体服务器请 求下载该釆样数据帧及其之后的数据帧。 The second sub-segment index atom acquisition module is configured to: when the terminal is in the time-shifted on-demand mode, after receiving the command to enter the time-shift positioning on-demand mode, determine the time according to the time-shift on-demand time Corresponding sub-segment, requesting, by the streaming media server, to download the segment index of the segment according to the address information of the segment index in the pre-downloaded media representation description (MPD), The second download module is configured to: traverse the sub-segment index atom, and find the lowest-level indexed data frame after the time-shifted on-demand time, according to the record recorded in the sub-segment index atom The sample offset information and the sample length information of the sample data frame are requested to the streaming server to download the data frame and the subsequent data frame.
釆用本发明实施例所述方法, 对于 DASH场景下 TS (传输流)文件的快 进、 快退等操作, 无需下载文件的整个分段, 而仅下载需要播放的数据帧, 即能够快速定位到需要播放的数据帧起始和结束位置, 既节省了网络流量, 又大大减小用户播放过程中的等待时间, 同时也不影响各种特技模式之间, 以及正常模式与特技模式之间的平滑切换, 大大提升了用户的体验。 By using the method in the embodiment of the present invention, for the fast forward and fast rewind operations of the TS (Transport Stream) file in the DASH scenario, the entire segment of the file is not downloaded, and only the data frame to be played is downloaded, that is, the data frame can be quickly located. To the start and end of the data frame that needs to be played, it not only saves network traffic, but also greatly reduces the waiting time during user playback, and does not affect between various trick modes, and between normal mode and trick mode. Smooth switching greatly enhances the user experience.
附图概述 BRIEF abstract
图 1为 tier框架下快进的取帧示意图;  Figure 1 is a schematic diagram of fast-forward frame fetching in the tier frame;
图 2为本发明实施例中使用本发明定义的 ssix原子实现快进的流程图; 图 3为本发明实施例使用本发明定义的 ssix原子实现快进转正常播放的 流程图;  2 is a flow chart of realizing fast forward using ssix atoms defined by the present invention in an embodiment of the present invention; FIG. 3 is a flowchart of realizing fast forward and normal play using ssix atoms defined by the present invention in an embodiment of the present invention;
图 4为本发明实施例使用本发明定义的 ssix原子实现时移定位播放的流 程图。  4 is a flow diagram of time shift positioning playback using the ssix atom defined by the present invention in accordance with an embodiment of the present invention.
本发明的较佳实施方式 Preferred embodiment of the invention
为了解决上述技术问题, 本发明定义了子分段索引原子, 包括: 釆样个 数信息、 釆样偏移信息、 釆样长度信息以及釆样时间信息, 其中:  In order to solve the above technical problem, the present invention defines a sub-segment index atom, including: sample number information, sample offset information, sample length information, and sample time information, where:
1 )釆样个数信息, 用于表示当前子分段中各级别被索引的釆样数据帧的 个数;  1) a number of pieces of information, used to indicate the number of data frames indexed by each level in the current sub-segment;
2 )釆样偏移信息, 用于表示当前子分段中每个被索引的釆样数据帧的存 储起始地址相对于当前子分段首地址的偏移; 3 )釆样长度信息, 用于表示当前子分段中每个被索引的釆样数据帧的存 储长度; 2) sampling offset information, used to indicate an offset of a storage start address of each indexed data frame in the current sub-segment with respect to a current sub-segment first address; 3) sample length information, used to indicate the storage length of each indexed data frame in the current sub-segment;
4 )釆样时间信息, 用于表示当前子分段中每个被索引的釆样数据帧相对 于当前子分段中首个釆样数据帧的时间偏移。  4) Sample time information, used to indicate the time offset of each indexed data frame in the current sub-segment relative to the first sample data frame in the current sub-segment.
通过提供釆样个数信息, 流媒体服务器可以为每帧设置索引也可以每隔 几帧索引一帧, 实施较为灵活, 特别是在几帧一索引时, 可以减少开销, 例 如一个 24 s、 144分钟的电影, 一个完整的特技模式索引(即所有帧的索引) 开销为 1.6Mbytes, 如果每 4帧索引一帧, 将减少 406Kb的开销。  By providing the number of pieces of information, the streaming server can set an index for each frame or one frame every few frames. The implementation is flexible, especially when the index is several frames, the overhead can be reduced, for example, a 24 s, 144 A minute movie, a full trick mode index (ie index of all frames) has an overhead of 1.6 Mbytes, and if one frame is indexed every 4 frames, the overhead of 406 Kb will be reduced.
除了上述四个信息外, 该子分段索引原子中还可以包括位数标识信息, 该标识信息用于表示釆样偏移信息和釆样长度信息当前的所需的位数。 该位 数标识信息可以方便地控制釆样偏移和釆样长度所占用的比特数( 16位或 32 位) , 可以进一步减少网络带宽。  In addition to the above four pieces of information, the sub-segment index atom may further include bit number identification information, which is used to indicate the current required number of bits of the sample offset information and the sample length information. The bit identification information can conveniently control the number of bits (16-bit or 32-bit) occupied by the sample offset and the sample length, which can further reduce the network bandwidth.
通常, 流媒体服务器在保存媒体内容时, 对所述媒体内容进行分段, 每 个分段包括一个或多个子分段, 所述流媒体服务器为每个子分段生成子分段 索引原子, 并保存该子分段索引原子, 该子分段索引原子包括: 釆样个数信 息、 釆样偏移信息、 釆样长度信息以及釆样时间信息。 优选地, 该子分段索 引原子中还可包括位数标识信息。  Generally, the streaming media server segments the media content when saving the media content, each segment includes one or more sub-segments, and the streaming media server generates a sub-segment index atom for each sub-segment, and The sub-segment index atom is saved, and the sub-segment index atom includes: sample number information, sample offset information, sample length information, and sample time information. Preferably, the sub-segment index atoms may further include bit number identification information.
上述媒体内容是由内容提供商提供给流媒体服务器的。  The above media content is provided by the content provider to the streaming server.
流媒体服务器生成并保存媒体内容的子分段索引原子后, 在以下场景中 的任意一种中时, 终端根据从流媒体服务器下载的子分段索引原子的内容下 载数据帧, 并播放下载的数据帧: 从正常播放模式进入特技模式的场景、 从 特技模式进入正常播放模式的场景、 进入时移定位点播模式的场景。  After the streaming server generates and saves the sub-segment index atom of the media content, in any of the following scenarios, the terminal downloads the data frame according to the content of the sub-segment index atom downloaded from the streaming server, and plays the downloaded Data frame: The scene that enters the trick mode from the normal play mode, the scene that enters the normal play mode from the trick mode, and the scene that enters the time shift positioning on-demand mode.
•终端从正常播放模式进入特技模式中时 , 具体包括:  • When the terminal enters the trick mode from the normal play mode, it specifically includes:
A1 , 终端接收到进入特技模式的命令(如: 快进或快退)后, 确定起始 数据帧;  A1. After receiving the command to enter the trick mode (for example, fast forward or rewind), the terminal determines the start data frame;
A2, 终端根据预先下载的媒体表示描述(MPD )中分段索引的地址信息 (例如 URL信息)向所述流媒体服务器请求下载所述起始数据帧所在子分段 起始数据帧优选为当前数据帧之后的且级别最低的首个数据帧, 因为级 别最低的数据帧不依赖任何其他的数据帧。 A2. The terminal requests, according to the address information (for example, URL information) of the segment index in the pre-downloaded media representation description (MPD), to download, by the streaming server, the sub-segment in which the start data frame is located. The starting data frame is preferably the first data frame after the current data frame and having the lowest level, since the lowest level data frame does not depend on any other data frame.
A3 , 所述终端确定当前特技模式下所述子分段中待播放数据帧的最高级 另' J , 遍历所述子分段索引原子, 查找在所述起始数据帧之后的, 且级别小于 所述最高级别的被索引的釆样数据帧, 按照查找到的被索引的釆样数据帧的 釆样时间信息顺序下载所述查找到的被索引的釆样数据帧。  A3, the terminal determines a highest level of the data frame to be played in the sub-segment in the current trick mode, and traverses the sub-segment index atom, and searches after the start data frame, and the level is smaller than The highest-level indexed data frame downloads the searched indexed data frame in the order of the searched time information of the indexed data frame that is searched.
确定待播放数据帧的最高级别时,是根据当前特技模式的参数来确定的, 具体地, 根据快进或快退的倍数确定子分段中待播放帧的最高级别。  Determining the highest level of the data frame to be played is determined according to the parameters of the current trick mode. Specifically, the highest level of the frame to be played in the sub-segment is determined according to the multiple of fast forward or fast reverse.
•终端从特技模式进入正常播放模式中时 , 具体包括:  • When the terminal enters the normal play mode from the trick mode, it specifically includes:
所述终端接收到退出特技模式的命令后, 在子分段索引原子中查找当前 数据帧之后的级别最低的被索引的釆样数据帧, 根据所述子分段索引原子中 记录的所述被索引的釆样数据帧的釆样偏移信息和釆样长度信息, 向流媒体 服务器请求下载该数据帧及其之后的数据帧。  After receiving the command to exit the trick mode, the terminal searches for the lowest indexed data frame after the current data frame in the sub-segment index atom, according to the recorded in the sub-segment index atom. The sampled offset information and the sample length information of the indexed data frame are requested to be downloaded to the streaming server for downloading the data frame and subsequent data frames.
当前数据帧是指收到退出特技模式命令时播放的数据帧。  The current data frame is the data frame that is played when the exit of the trick mode command is received.
上述子分段索引原子是所述终端在特技模式时下载的。  The above sub-segment index atom is downloaded when the terminal is in the trick mode.
优选地, 终端在查找过程中还可以继续当前的特技模式播放, 即保持快 进或快退状态。  Preferably, the terminal can continue the current trick mode play during the search process, that is, maintain the fast forward or fast reverse state.
•终端进入时移定位点播模式中时, 具体包括:  • When the terminal enters the time-shifted positioning in-demand mode, it specifically includes:
C1 , 终端接收到进入时移定位点播模式的命令后, 根据时移点播时间确 定该时间点对应的子分段, 根据预先下载的媒体表示描述(MPD ) 中分段索 引的地址信息向所述流媒体服务器请求下载所述子分段所在分段的分段索  C1, after receiving the command to enter the time shift positioning on-demand mode, the terminal determines, according to the time shift on-demand time, the sub-segment corresponding to the time point, according to the address information of the segment index in the pre-downloaded media representation description (MPD) The streaming server requests to download the segmentation line of the segment where the sub-segment is located
根据时移点播时间确定该时间点对应的分段包括: 计算该时移点播时间 的展现时间 (相对时间) , 根据 MPD寻找该展现时间所在的子分段。 Determining the segment corresponding to the time point according to the time shift on-demand time comprises: calculating a presentation time (relative time) of the time-shifted on-demand time, and searching for the sub-segment in which the presentation time is located according to the MPD.
C2, 遍历所述子分段索引原子, 查找所述时移点播时间之后的且级别最 低的被索引的釆样数据帧, 根据所述子分段索引原子中记录的该釆样数据帧 的釆样偏移信息和釆样长度信息, 向所述流媒体服务器请求下载该釆样数据 帧及其之后的数据帧。 为使本发明的目的、 技术方案和优点更加清楚, 下面将结合附图及具体 实施例对本发明进行详细描述。 C2, traversing the sub-segment index atom, searching for the lowest-level indexed data frame after the time-shifting on-demand time, according to the 数据 data frame recorded in the sub-segment index atom The sample offset information and the sample length information are requested to be downloaded to the streaming server for downloading the data frame and subsequent data frames. The present invention will be described in detail below with reference to the drawings and specific embodiments.
实施例 1  Example 1
本实施例以釆用 MPEG2-TS作为流媒体服务器上的媒体文件存储格式为 例进行说明, 流媒体服务器对媒体文件进行逻辑分段, 每个媒体分段对应一 个分段索引,媒体分段和分段索引在 MPD中都有 URL, 即能够通过 MPD访 问到每个分段及其分段索引。 分段索引中包含 sidx box (分段索引原子)和 ssixbox (子分段索引原子) 。  In this embodiment, the MPEG2-TS is used as a media file storage format on the streaming media server as an example. The streaming media server logically segments the media file, and each media segment corresponds to a segment index, media segmentation, and The segmentation index has a URL in the MPD, that is, each segment and its segmentation index can be accessed through the MPD. The segmentation index contains sidx box (segmented index atom) and ssixbox (subsegmented index atom).
在本实施例中, ssix原子的定义如下:  In this embodiment, the definition of the ssix atom is as follows:
aligned ( 8 ) class SubsegmentlndexBox extends FullBox ( ssix ' , version, flags ) { unsigned int (32 ) subseg_count; Aligned ( 8 ) class SubsegmentlndexBox extends FullBox ( ssix ' , version, flags ) { unsigned int (32 ) subseg_count;
unsigned int (8) subseg_level_count;  Unsigned int (8) subseg_level_count;
for ( i=l; i <= subseg_count; i++)  For ( i=l; i <= subseg_count; i++)
for ( j =1; j <= subseg_level_count; j ++) {  For ( j =1; j <= subseg_level_count; j ++) {
unsigned int (32 ) accumulated_level_size;  Unsigned int (32 ) accumulated_level_size;
if ( accumulated— level— size == 0 ) {  If ( accumulated— level — size == 0 ) {
unsigned int (24) num_samples;  Unsigned int (24) num_samples;
unsigned int (8) bytes— in— unit  Unsigned int (8) bytes—in— unit
for ( k=l; k <= num_samples; k++ ) {  For ( k=l; k <= num_samples; k++ ) {
if ( bytes— in— unit == 0 ) {  If ( bytes— in— unit == 0 ) {
unsigned int (32) sample— of f set  Unsigned int (32) sample— of f set
unsigned int (32) sample— size  Unsigned int (32) sample— size
} else {  } else {
unsigned int (16) sample— of f set— short 7 unsigned int (16) sample— size— short  Unsigned int (16) sample— of f set— short 7 unsigned int (16) sample— size— short
}  }
if ( flags & 0x01 ) {  If ( flags & 0x01 ) {
unsigned int (32) sample— time  Unsigned int (32) sample— time
}  }
}  }
}  }
}  }
}:  }:
其中, 粗体部分为新增内容, 新增字段的语义解释如下:  Among them, the bold part is new content, and the semantics of the newly added field are explained as follows:
num— samples : 即釆样个数信息,指出属于级别 j的被索引的釆样数据帧 的个数;  Num— samples : that is, the number of pieces of information indicating the number of indexed data frames belonging to level j;
bytes— in— unit : 即位数标识信息, 指出偏移和长度是用 16位表示还是用 32位表示, 其值为 units of bytes, 本实施中, 当 units of bytes= 0时, 表示偏 移和长度用 32位表示; 优选地,通过 bytes— in— unit还可以扩展该 sample— offset— short占用的位数, 可通过以 units of bytes为单位进行计算得到, 即釆样偏移信息占用的位数等 于 sample— offset— short*bytes— in— unit; 同理, 釆样偏移长度信息占用的位数等 于 sample— size— short*bytes— in— unit。 Bytes—in— unit: The number of bits of the identification information, indicating whether the offset and length are expressed in 16 bits or 32 bits. The value is units of bytes. In this implementation, when units of bytes= 0, the offset and The length is represented by 32 bits; Preferably, the number of bits occupied by the sample_offset_sic can be extended by the bytes-in-unit, which can be calculated by using units of bytes, that is, the number of bits occupied by the offset information is equal to sample_offset- Short*bytes—in— unit; Similarly, the number of bits occupied by the offset length information is equal to sample—size—shor*bytes—in—unit.
sample— offset: 用 32位表示的釆样偏移信息, 指出从被索引的釆样数据 帧 S[i ,k]的存储起始地址相对于子分段首地址的偏移;  Sample-offset: indicates the offset from the stored start address of the indexed data frame S[i, k] relative to the first address of the sub-segment using the offset information represented by 32 bits;
sample— size : 用 32位表示的釆样长度信息, 指出被索引的釆样数据帧 S[i ,k]的存储长度, 即该釆样数据帧内容所占的大小。  Sample_ size : The length information of the sampled data frame S[i , k] indicated by the 32 bits indicates the storage size of the sampled data frame.
sample— offset— short : 用 16位表示的釆样偏移信息, 指出被索引的釆样 数据帧 S[i ,k]的存储起始地址相对于子分段 i首地址的偏移  Sample—offset— short : The offset information of 16 bits is used to indicate the offset of the storage start address of the indexed data frame S[i , k] relative to the first address of the sub-segment i.
sample— size— short: 用 16位表示的釆样长度信息, 指出被索引的釆样数 据帧 S[i ,k]的存储长度;  Sample— size—shorter: The length information of the 16-bit representation indicates the storage length of the indexed data frame S[i , k];
sample— time: 即釆样时间信息, 指出被索引的釆样数据帧 S[i ,k]相对于 子分段 j中首个釆样数据帧的时间偏移, 该时间偏移与存储在 sidx原子中的 timebase的单位一致。  Sample_ time: the time information of the sample, indicating the time offset of the indexed data frame S[i , k] relative to the first data frame in the sub-segment j, the time offset is stored in the sidx The unit of timebase in the atom is the same.
实施例 2  Example 2
本实施例为从正常播放模式进入特技模式中的示例, 以特技模式为快进 进行说明。 如图 2所述, 包括:  This embodiment is an example of entering the trick mode from the normal play mode, and the trick mode is described as fast forward. As shown in Figure 2, it includes:
步骤 201 , 终端接收到进入快进模式的命令, 根据快进倍数确定所有待 播放数据帧的最高级别;  Step 201: The terminal receives the command to enter the fast forward mode, and determines the highest level of all the data frames to be played according to the fast forward multiple;
参见图 1 , 可根据快进倍数确定待播放数据帧中的最高级别。  Referring to Figure 1, the highest level in the data frame to be played can be determined according to the fast forward multiple.
步骤 202 , 继续正常播放直到播放到最低级别的数据帧 S1 , 获取该 S1 帧所在的子分段所属的分段;  Step 202: Continue normal play until the lowest level data frame S1 is played, and obtain the segment to which the sub-segment in which the S1 frame belongs;
步骤 203 , 下载该分段对应的分段索引, 解析该索引得到子分段索引原 子;  Step 203: Download a segment index corresponding to the segment, and parse the index to obtain a sub-segment index primitive;
步骤 204, 判断该子分段中 S1帧以后的所有小于最高级别的数据帧是否 都下载到终端, 如果是, 则执行步骤 208, 否则执行步骤 205; 步骤 205, 根据釆样时间的先后顺序获取下一帧数据的偏移信息和长度 信息; Step 204, it is determined whether all the data frames smaller than the highest level after the S1 frame in the sub-segment are downloaded to the terminal, and if yes, step 208 is performed, otherwise step 205 is performed; Step 205: Obtain offset information and length information of the next frame data according to a sequence of sampling times.
步骤 206, 根据获取的偏移信息和长度信息终端向流媒体服务器请求该 帧;  Step 206: Request the frame from the streaming server according to the obtained offset information and length information terminal;
步骤 207, 终端解码并显示该帧, 返回步骤 204;  Step 207, the terminal decodes and displays the frame, and returns to step 204;
步骤 208, 移到下一个符合快进倍数的分段, 返回步骤 203。  Step 208, moving to the next segment that meets the fast forward multiple, and returning to step 203.
釆用上述方法可以加速对数据帧的查找。 上述流程仅为一种举例, 本领 域技术人员可根据本发明构思给出其他实现流程。  釆 Use the above method to speed up the search for data frames. The above process is merely an example, and other implementations may be presented by those skilled in the art in accordance with the inventive concept.
实施例 3  Example 3
本实施例为从特技模式进入正常播放模式中的示例, 以特技模式为快进 进行说明。 如图 3所述, 包括:  This embodiment is an example of transitioning from the trick mode to the normal play mode, and the trick mode is described as fast forward. As shown in Figure 3, it includes:
步骤 301、 接收到快进转正常播放的命令;  Step 301: Receive a command of fast forward to normal play;
步骤 302、 获取快进时的最后一个数据帧;  Step 302: Obtain a last data frame when fast forwarding;
步骤 303、 判断该帧的级别是否为 1, 如果是, 则跳转到 305, 否则, 跳 转到步骤 304;  Step 303, determining whether the level of the frame is 1, if yes, then jump to 305, otherwise, jump to step 304;
步骤 304, 在子分段索引原子中获取下一被索引的釆样数据帧的信息, 返回步骤 303;  Step 304, obtaining information of the next indexed data frame in the sub-segment index atom, returning to step 303;
步骤 305, 在子分段索引原子中获取该帧的偏移信息和长度信息; 步骤 306, 向流媒体服务器请求该帧以后 (包含该帧) 的该分段的所有 数据帧;  Step 305: Obtain offset information and length information of the frame in the sub-segment index atom. Step 306: Request, to the streaming media server, all data frames of the segment after the frame (including the frame);
步骤 307, 终端正常播放下载下来的数据帧;  Step 307: The terminal normally plays the downloaded data frame.
步骤 308, 下一个分段时, 下载所有的分段数据;  Step 308, downloading all segmentation data when the next segment is used;
步骤 309, 正常播放。 现流程。  Step 309, normal play. Current process.
实施例 4 本实施例为进入时移定位点播模式中的示例。 如图 4所述。 本实例中的 直播只有视频流, 即码流中只有一个轨道。 包括: Example 4 This embodiment is an example of entering the time shift positioning on-demand mode. As shown in Figure 4. The live stream in this example has only a video stream, that is, there is only one track in the stream. include:
步骤 401、 接收到进入时移定位点播模式的命令后, 获取时移点播时间; 步骤 402、 判断时移点播时间是否为 UTC (世界标准时间) , 如果是, 则跳到步骤 404, 否则跳到步骤 403;  Step 401: After receiving the command to enter the time shift positioning on-demand mode, obtain the time shift on-demand time; Step 402, determine whether the time-shifted on-demand time is UTC (World Standard Time), and if yes, skip to step 404, otherwise skip to Step 403;
步骤 403、 将时移点播时间转为 UTC时间;  Step 403: Convert the time shift on-demand time to the UTC time.
步骤 404 , 从 MPD中获取 TS文件的开始 UTC;  Step 404, obtaining a start UTS of the TS file from the MPD;
步骤 405 , 计算出时移点播时间的展现时间, 即时间偏移;  Step 405: Calculate a presentation time of the time shift on-demand time, that is, a time offset;
步骤 406, 遍历 MPD中记录的每个分段的起始釆样时间, 计算出该播放 点落在哪个分段中;  Step 406, traversing the initial sampling time of each segment recorded in the MPD, and calculating which segment the playback point falls in;
步骤 407 ,从 MPD中获取该分段对应的分段索引的 URL,并下载该分段 索引, 从分段索引中获取子分段索引原子;  Step 407: Obtain a URL of a segment index corresponding to the segment from the MPD, and download the segment index, and obtain a sub-segment index atom from the segment index;
步骤 408, 遍历子分段索引原子, 找到级别为 1 并且播放时间大于等于 时移点播时间的数据帧;  Step 408, traversing the sub-segment index atom, and finding a data frame with a level of 1 and a play time greater than or equal to a time-shifted on-demand time;
步骤 409 , 在子分段索引原子中获取该帧的偏移信息和长度信息, 下载 该帧以后 (包含该帧)所有的数据帧;  Step 409: Obtain offset information and length information of the frame in the sub-segment index atom, and download all data frames after the frame (including the frame);
步骤 410, 正常播放下载的数据;  Step 410: Normally play the downloaded data.
步骤 411 , 下一个分段下载整个分段数据转为正常播放流程。 现流程。  Step 411, the next segment downloads the entire segment data into a normal playback process. Current process.
本发明适用于本地播放、 网上点播多媒体文件进行多分支播放等各种场 景。  The invention is suitable for various scenes such as local play, on-demand multimedia files for multi-branch playback and the like.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。 One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct the associated hardware, such as a read only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiment may be implemented in the form of hardware, or may be implemented in the form of a software function module. The invention is not limited to any What is the combination of specific forms of hardware and software.
当然, 本发明还可有其他多种实施例, 在不背离本发明精神及其实质的 但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。  It is a matter of course that the invention may be embodied in various other forms and modifications without departing from the spirit and scope of the invention.
工业实用性 Industrial applicability
釆用本发明实施例所述方法, 对于 DASH场景下 TS (传输流 )文件的快 进、 快退等操作, 无需下载文件的整个分段, 而仅下载需要播放的数据帧, 即能够快速定位到需要播放的数据帧起始和结束位置, 既节省了网络流量, 又大大减小用户播放过程中的等待时间, 同时也不影响各种特技模式之间, 以及正常模式与特技模式之间的平滑切换, 大大提升了用户的体验。  By using the method in the embodiment of the present invention, for the fast forward and fast rewind operations of the TS (Transport Stream) file in the DASH scenario, the entire segment of the file is not downloaded, and only the data frame to be played is downloaded, that is, the data frame can be quickly located. To the start and end of the data frame that needs to be played, it not only saves network traffic, but also greatly reduces the waiting time during user playback, and does not affect between various trick modes, and between normal mode and trick mode. Smooth switching greatly enhances the user experience.

Claims

权 利 要 求 书 Claim
1、 一种流媒体存储方法, 包括:  1. A streaming media storage method, comprising:
流媒体服务器在保存媒体内容时, 对所述媒体内容进行分段, 每个分段 包括一个或多个子分段, 所述流媒体服务器为每个子分段生成子分段索引原 子, 并保存所述子分段索引原子, 所述子分段索引原子包括: 釆样个数信息、 釆样偏移信息、 釆样长度信息以及釆样时间信息。  The streaming media server segments the media content when saving the media content, each segment includes one or more sub-segments, and the streaming media server generates a sub-segment index atom for each sub-segment, and saves the The sub-segment index atom includes: a sample number information, a sample offset information, a sample length information, and sample time information.
2、 如权利要求 1所述的方法, 其中,  2. The method of claim 1 wherein
所述子分段索引原子中:  In the sub-segment index atom:
所述釆样个数信息表示当前子分段中各级别被索引的釆样数据帧的个 数;  The number of pieces of data indicates the number of data frames indexed by each level in the current sub-segment;
所述釆样偏移信息表示当前子分段中每个被索引的釆样数据帧的存储起 始地址相对于所述当前子分段首地址的偏移;  The sample offset information indicates an offset of a storage start address of each indexed data frame in the current sub-segment with respect to the current sub-segment first address;
所述釆样长度信息表示当前子分段中每个被索引的釆样数据帧的存储长 度;  The sample length information indicates a storage length of each indexed data frame in the current sub-segment;
所述釆样时间信息表示当前子分段中每个被索引的釆样数据帧相对于所 述当前子分段中首个釆样数据帧的时间偏移。  The sample time information represents a time offset of each indexed data frame in the current sub-segment relative to the first sample data frame in the current sub-segment.
3、 如权利要求 1或 2所述的方法, 其中,  3. The method according to claim 1 or 2, wherein
所述子分段索引原子中还包括位数标识信息, 表示釆样偏移信息和釆样 长度信息当前的所需的位数。  The sub-segment index atom further includes bit number identification information indicating the current required number of bits of the sample offset information and the sample length information.
4、 一种流媒体播放方法, 包括:  4. A streaming media playing method, comprising:
在以下场景中的任意一种中时, 终端根据从流媒体服务器下载的子分段 索引原子的内容下载数据帧, 并播放下载的数据帧: 从正常播放模式进入特 技模式的场景、 从特技模式进入正常播放模式的场景、 进入时移定位点播模 式的场景; 所述子分段索引原子包括: 釆样个数信息、 釆样偏移信息、 釆样 长度信息以及釆样时间信息。  In any of the following scenarios, the terminal downloads a data frame according to the content of the sub-segment index atom downloaded from the streaming server, and plays the downloaded data frame: a scene entering the trick mode from the normal play mode, from the trick mode The scenario of entering the normal play mode and the scene of the time shifting on-demand mode; the sub-segment index atom includes: the number of pieces of information, the sample offset information, the length information of the sample, and the time information of the sample.
5、 如权利要求 4所述的方法, 其中,  5. The method of claim 4, wherein
所述终端在从正常播放模式进入特技模式中时, 所述终端根据从流媒体 服务器下载的子分段索引原子的内容下载数据帧的步骤包括: When the terminal enters the trick mode from the normal play mode, the terminal according to the streaming media The steps of downloading the data frame of the content of the sub-segment index atom downloaded by the server include:
终端接收到进入特技模式的命令后, 确定起始数据帧;  After receiving the command to enter the trick mode, the terminal determines the starting data frame;
所述终端根据预先下载的媒体表示描述(MPD ) 中分段索引的地址信息 向所述流媒体服务器请求下载所述起始数据帧所在的子分段所属分段的分段 所述终端确定当前特技模式下所述子分段中待播放数据帧的最高级别, 遍历所述子分段索引原子, 查找在所述起始数据帧之后的, 且级别小于所述 最高级别的被索引的釆样数据帧, 按照查找到的被索引的釆样数据帧的釆样 时间信息顺序下载所述查找到的被索引的釆样数据帧。  Determining, by the terminal, the segment information of the segment index according to the segmentation index in the pre-downloaded media representation description (MPD) to the streaming media server to download the segment to which the sub-segment of the start data frame belongs The highest level of the data frame to be played in the sub-segment in the trick mode, traversing the sub-segment index atom, searching for the index after the starting data frame, and the level is less than the highest level of the indexed The data frame downloads the searched indexed data frame in the order of the searched time information of the indexed data frame that is searched.
6、 如权利要求 5所述的方法, 其中,  6. The method of claim 5, wherein
所述起始数据帧为当前数据帧之后的且级别最低的首个数据帧。  The starting data frame is the first data frame after the current data frame and having the lowest level.
7、 如权利要求 4所述的方法, 其中,  7. The method of claim 4, wherein
所述终端在从特技模式进入正常播放模式中时, 所述终端根据从流媒体 服务器下载的子分段索引原子的内容下载数据帧的步骤包括:  When the terminal enters the normal play mode from the trick mode, the step of the terminal downloading the data frame according to the content of the sub-segment index atom downloaded from the streaming server includes:
所述终端接收到退出特技模式的命令后, 在子分段索引原子中查找当前 数据帧之后的级别最低的被索引的釆样数据帧, 根据所述子分段索引原子中 记录的所述被索引的釆样数据帧的釆样偏移信息和釆样长度信息, 向流媒体 服务器请求下载该数据帧及之后的数据帧。  After receiving the command to exit the trick mode, the terminal searches for the lowest indexed data frame after the current data frame in the sub-segment index atom, according to the recorded in the sub-segment index atom. The sampled offset information and the sample length information of the indexed data frame are requested to be downloaded to the streaming server for downloading the data frame and subsequent data frames.
8、 如权利要求 4所述的方法, 其中,  8. The method of claim 4, wherein
所述终端在进入时移定位点播模式的场景中时, 所述终端根据从流媒体 服务器下载的子分段索引原子的内容下载数据帧的步骤包括:  When the terminal enters the time-shifted location-on-demand mode, the step of the terminal downloading the data frame according to the content of the sub-segment index atom downloaded from the streaming media server includes:
终端接收到进入时移定位点播模式的命令后, 根据时移点播时间确定该 时间对应的子分段, 根据预先下载的媒体表示描述(MPD ) 中分段索引的地 址信息向所述流媒体服务器请求下载所述分段的分段索引, 从所述分段索引 中获取所述子分段的子分段索引原子;  After receiving the command to enter the time shifting on-demand mode, the terminal determines the sub-segment corresponding to the time according to the time-shifted on-demand time, and sends the address information of the segment index according to the pre-downloaded media representation description (MPD) to the streaming server. Requesting to download a segment index of the segment, and obtaining a sub-segment index atom of the sub-segment from the segment index;
遍历所述子分段索引原子, 查找所述时移点播时间之后的且级别最低的 被索引的釆样数据帧, 根据所述子分段索引原子中记录的该釆样数据帧的釆 样偏移信息和釆样长度信息, 向所述流媒体服务器请求下载该釆样数据帧及 之后的数据帧。 Traversing the sub-segment index atom, searching for the lowest-level indexed data frame after the time-shifted on-demand time, according to the sample-like data frame recorded in the sub-segment index atom Transmitting the information and the length information, requesting the streaming server to download the data frame and After the data frame.
9、 一种流媒体存储系统, 包括分段装置以及子分段索引原子生成装置, 其中:  9. A streaming media storage system comprising a segmentation device and a sub-segment index atom generating device, wherein:
所述分段装置设置为: 在保存媒体内容时, 对所述媒体内容进行分段, 每个分段包括一个或多个子分段;  The segmentation device is configured to: when the media content is saved, segment the media content, each segment includes one or more sub-segments;
所述子分段索引原子生成装置设置为: 为每个子分段生成子分段索引原 子, 并保存所述子分段索引原子, 所述子分段索引原子包括: 釆样个数信息、 釆样偏移信息、 釆样长度信息以及釆样时间信息, 其中:  The sub-segment index atom generating means is configured to: generate a sub-segment index atom for each sub-segment, and save the sub-segment index atom, the sub-segment index atom includes: a number of pieces of information, 釆Sample offset information, sample length information, and sample time information, where:
所述釆样个数信息表示当前子分段中各级别被索引的釆样数据帧的个 数;  The number of pieces of data indicates the number of data frames indexed by each level in the current sub-segment;
所述釆样偏移信息表示当前子分段中每个被索引的釆样数据帧的存储起 始地址相对于所述当前子分段首地址的偏移;  The sample offset information indicates an offset of a storage start address of each indexed data frame in the current sub-segment with respect to the current sub-segment first address;
所述釆样长度信息表示当前子分段中每个被索引的釆样数据帧的存储长 度;  The sample length information indicates a storage length of each indexed data frame in the current sub-segment;
所述釆样时间信息表示当前子分段中每个被索引的釆样数据帧相对于所 述当前子分段中首个釆样数据帧的时间偏移。  The sample time information represents a time offset of each indexed data frame in the current sub-segment relative to the first sample data frame in the current sub-segment.
10、 如权利要求 9所述的系统, 其中,  10. The system of claim 9, wherein
所述子分段索引原子中还包括位数标识信息, 表示釆样偏移信息和釆样 长度信息当前的所需的位数。  The sub-segment index atom further includes bit number identification information indicating the current required number of bits of the sample offset information and the sample length information.
11、 一种流媒体播放系统, 位于终端侧, 包括下载装置和播放装置, 其 中:  11. A streaming media playback system, located on the terminal side, comprising a downloading device and a playback device, wherein:
所述下载装置设置为: 从流媒体服务器下载子分段索引原子, 以及所述 终端处于以下场景中的任意一种中时, 根据下载的子分段索引原子的内容下 载数据帧: 从正常播放模式进入特技模式的场景、 从特技模式进入正常播放 模式的场景、 进入时移定位点播模式的场景; 所述子分段索引原子包括: 釆 样个数信息、 釆样偏移信息、 釆样长度信息以及釆样时间信息;  The downloading device is configured to: download a sub-segment index atom from the streaming media server, and when the terminal is in any one of the following scenarios, download the data frame according to the content of the downloaded sub-segment index atom: The scene enters the scene of the trick mode, the scene from the trick mode into the normal play mode, and the scene that enters the time shift positioning on-demand mode; the sub-segment index atom includes: the number of pieces of information, the offset information of the sample, the length of the sample Information and sample time information;
所述播放装置设置为: 并播放下载的数据帧。 The playback device is configured to: and play the downloaded data frame.
12、 如权利要求 11所述的系统, 其中, 12. The system of claim 11 wherein:
所述下载装置包括确定起始数据帧模块、 第一子分段索引原子获取模块 以及下载数据帧模块, 其中:  The downloading device includes a determination start data frame module, a first sub-segment index atom acquisition module, and a download data frame module, wherein:
所述确定起始数据帧模块设置为: 在所述终端处于从正常播放模式进入 特技模式的场景时, 在接收到进入特技模式的命令后, 确定起始数据帧; 所述第一子分段索引原子获取模块设置为: 根据预先下载的媒体表示描 述(MPD ) 中分段索引的地址信息向流媒体服务器请求下载所述起始数据帧 所在的子分段所属分段的分段索引, 从所述分段索引中获取所述子分段的子 分段索引原子;  The determining the start data frame module is configured to: when the terminal is in a scene that enters the trick mode from the normal play mode, after receiving the command to enter the trick mode, determining a start data frame; the first sub-segment The index atom acquisition module is configured to: request, according to the address information of the segment index in the pre-downloaded media representation description (MPD), the streaming media server to download the segment index of the segment to which the sub-segment in which the start data frame belongs, from Obtaining, in the segment index, a sub-segment index atom of the sub-segment;
所述下载数据帧模块设置为: 确定当前特技模式下所述子分段中待播放 数据帧的最高级别, 遍历所述子分段索引原子, 查找在所述起始数据帧之后 的, 且级别小于所述最高级别的被索引的釆样数据帧, 以及按照查找到的被 索引的釆样数据帧的釆样时间信息顺序下载所述查找到的被索引的釆样数据 帧。  The download data frame module is configured to: determine a highest level of a data frame to be played in the sub-segment in the current trick mode, traverse the sub-segment index atom, and find the level after the start data frame, and The indexed data frames that are smaller than the highest level are indexed, and the searched indexed data frames are sequentially downloaded in accordance with the sampled time information of the found indexed data frames.
13、 如权利要求 11所述的系统, 其中,  13. The system of claim 11 wherein:
所述起始数据帧为当前数据帧之后的且级别最低的首个数据帧。  The starting data frame is the first data frame after the current data frame and having the lowest level.
14、 如权利要求 11所述的系统, 其中,  14. The system of claim 11 wherein:
所述下载装置包括查找模块、 第一下载模块, 其中:  The downloading device includes a searching module and a first downloading module, where:
所述查找模块设置为: 在所述终端处于从特技模式进入正常播放模式的 场景时, 在接收到退出特技模式的命令后, 在子分段索引原子中查找当前数 据帧之后的级别最低的被索引的釆样数据帧;  The searching module is configured to: when the terminal is in a scene from the trick mode to the normal play mode, after receiving the command to exit the trick mode, searching for the lowest level after the current data frame in the sub-segment index atom Indexed data frame of the index;
所述第一下载模块设置为: 根据所述子分段索引原子中记录的所述被索 引的釆样数据帧的釆样偏移信息和釆样长度信息, 向流媒体服务器请求下载 该查找到的被索引的釆样数据帧及之后的数据帧。  The first downloading module is configured to: request, according to the sample offset information and the sample length information of the indexed data frame recorded in the sub-segment index atom, to download the search to the streaming server The indexed data frame and the subsequent data frame.
15、 如权利要求 11所述的系统, 其中,  15. The system of claim 11 wherein
所述下载装置包括第二子分段索引原子获取模块、 第二下载模块, 其中: 所述第二子分段索引原子获取模块设置为: 在所述终端处于时移定位点 播模式的场景中时, 在接收到进入时移定位点播模式的命令后, 根据时移点 播时间确定该时间对应的子分段, 根据预先下载的媒体表示描述(MPD ) 中 分段索引的地址信息向所述流媒体服务器请求下载所述分段的分段索引, 从 The downloading device includes a second sub-segment index atom acquisition module and a second download module, where: the second sub-segment index atom acquisition module is configured to: In the scenario of the broadcast mode, after receiving the command to enter the time shift positioning on-demand mode, the sub-segment corresponding to the time is determined according to the time-shifted on-demand time, according to the address of the segment index in the pre-downloaded media representation description (MPD) Information requesting the streaming server to download the segmentation index of the segment, from
第二下载模块设置为: 遍历所述子分段索引原子, 查找所述时移点播时 间之后的且级别最低的被索引的釆样数据帧, 根据所述子分段索引原子中记 录的该釆样数据帧的釆样偏移信息和釆样长度信息, 向所述流媒体服务器请 求下载该釆样数据帧及之后的数据帧。 The second download module is configured to: traverse the sub-segment index atom, and find the lowest-level indexed data frame after the time-shifted on-demand time, according to the record recorded in the sub-segment index atom The sample offset information and the sample length information of the sample data frame are requested to be downloaded to the streaming media server to download the sample data frame and the subsequent data frame.
PCT/CN2012/072606 2011-04-27 2012-03-20 Method and corresponding system for storing and playing streaming media WO2012146098A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110107459.8A CN102761524B (en) 2011-04-27 2011-04-27 A kind of Streaming Media storage, player method and corresponding system
CN201110107459.8 2011-04-27

Publications (1)

Publication Number Publication Date
WO2012146098A1 true WO2012146098A1 (en) 2012-11-01

Family

ID=47055846

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/072606 WO2012146098A1 (en) 2011-04-27 2012-03-20 Method and corresponding system for storing and playing streaming media

Country Status (2)

Country Link
CN (1) CN102761524B (en)
WO (1) WO2012146098A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220060532A1 (en) * 2020-01-17 2022-02-24 Beijing Dajia Internet Information Technology Co., Ltd. Method for transmitting resources and electronic device
CN114363304A (en) * 2021-12-27 2022-04-15 浪潮通信技术有限公司 RTP video stream storage and playing method and device

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942216B (en) * 2013-01-21 2017-12-29 中国科学院声学研究所 A kind of index information storage, querying method and storage system based on sparse parsing
CN104424236B (en) * 2013-08-26 2018-12-07 腾讯科技(深圳)有限公司 Storage method and device in data acquisition
CN103974147A (en) * 2014-03-07 2014-08-06 北京邮电大学 MPEG (moving picture experts group)-DASH protocol based online video playing control system with code rate switch control and static abstract technology
CN106612462B (en) * 2015-10-26 2021-02-19 中兴通讯股份有限公司 Fast forward and fast backward processing method and terminal
CN106658045A (en) * 2015-10-29 2017-05-10 阿里巴巴集团控股有限公司 Cloud storage and cloud download methods for multimedia data and related devices
CN106686036A (en) * 2015-11-10 2017-05-17 中兴通讯股份有限公司 Multimedia data download method, client, server and system
CN110971978B (en) * 2018-09-28 2021-12-28 浙江宇视科技有限公司 Video playing method and device
JP7373581B2 (en) 2019-03-14 2023-11-02 ノキア テクノロジーズ オサケユイチア Method and apparatus for late binding in media content
CN114189490B (en) * 2021-11-26 2023-03-31 广州市百果园信息技术有限公司 User list processing method, system, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101193273A (en) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 A storage and playing method for real time multimedia image information
CN101388909A (en) * 2008-10-14 2009-03-18 中兴通讯股份有限公司 P2P play-on-demand system and service method
CN101621386A (en) * 2008-07-01 2010-01-06 华为技术有限公司 Method, system and equipment for saving bandwidth of content network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101193273A (en) * 2006-11-20 2008-06-04 中兴通讯股份有限公司 A storage and playing method for real time multimedia image information
CN101621386A (en) * 2008-07-01 2010-01-06 华为技术有限公司 Method, system and equipment for saving bandwidth of content network
CN101388909A (en) * 2008-10-14 2009-03-18 中兴通讯股份有限公司 P2P play-on-demand system and service method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220060532A1 (en) * 2020-01-17 2022-02-24 Beijing Dajia Internet Information Technology Co., Ltd. Method for transmitting resources and electronic device
CN114363304A (en) * 2021-12-27 2022-04-15 浪潮通信技术有限公司 RTP video stream storage and playing method and device
CN114363304B (en) * 2021-12-27 2024-04-19 浪潮通信技术有限公司 RTP video stream storage and playing method and device

Also Published As

Publication number Publication date
CN102761524B (en) 2017-06-23
CN102761524A (en) 2012-10-31

Similar Documents

Publication Publication Date Title
WO2012146098A1 (en) Method and corresponding system for storing and playing streaming media
KR100492567B1 (en) Http-based video streaming apparatus and method for a mobile communication system
CN108600784B (en) Method, apparatus and storage medium for streaming media content to client device
CN101636726B (en) Video distribution system including continuous playback
CN107071511B (en) Method and computer system for providing rewinding of broadcast video stream received by client
CN103858440B (en) Handover signaling method providing improved switching between representations for adaptive HTTP streams
US20070088844A1 (en) System for and method of extracting a time-based portion of media and serving it over the Web
CN110933517B (en) Rate switching method, client and computer-readable storage medium
CN105228001B (en) A kind of method and system that FLV format videos play online
EP2486705A2 (en) Low latency cacheable media streaming
CN102487458A (en) Method for broadcasting and processing TS (Transport Stream) document and device thereof
CN113141522B (en) Resource transmission method, device, computer equipment and storage medium
CN105979373A (en) Play method and device
US20210021655A1 (en) System and method for streaming music on mobile devices
WO2015081893A1 (en) Media fragment rotation method, client and system
US11750882B2 (en) Trick play and trick rate support for HLS
JP2025120286A (en) Server-Side Ad Insertion (SSAI) with Additional Metadata and Client Functionality
JP5278059B2 (en) Information processing apparatus and method, program, and information processing system
CN103414918B (en) The delay broadcasting of live streaming media and contents controlling method and streaming media server
CN102340705A (en) A system and method for obtaining key frames
CN102594773B (en) A kind of method and system for realizing data acquisition
JP4165134B2 (en) Information reproducing apparatus, information reproducing method, and information reproducing system
WO2015117291A1 (en) Method and device for switching network television program, and television system
WO2015018119A1 (en) Multimedia file generation method and multimedia device
US20130124699A1 (en) Apparatus and method for transceiving a streaming service

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12776596

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12776596

Country of ref document: EP

Kind code of ref document: A1