WO2008095387A1 - Procédé de lecture avant et arrière rapide de données vidéo et serveur multimédia en flux - Google Patents

Procédé de lecture avant et arrière rapide de données vidéo et serveur multimédia en flux Download PDF

Info

Publication number
WO2008095387A1
WO2008095387A1 PCT/CN2007/070685 CN2007070685W WO2008095387A1 WO 2008095387 A1 WO2008095387 A1 WO 2008095387A1 CN 2007070685 W CN2007070685 W CN 2007070685W WO 2008095387 A1 WO2008095387 A1 WO 2008095387A1
Authority
WO
WIPO (PCT)
Prior art keywords
fast forward
rewind
sequence
fast
frame
Prior art date
Application number
PCT/CN2007/070685
Other languages
English (en)
French (fr)
Inventor
Jiying Dui
Yaohui Li
Yandong Cao
Original Assignee
Huawei Technologies 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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Priority to EP07801093A priority Critical patent/EP2031876A4/en
Publication of WO2008095387A1 publication Critical patent/WO2008095387A1/zh
Priority to US12/336,372 priority patent/US8311399B2/en

Links

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/65Transmission of management data between client and server
    • H04N21/658Transmission by the client directed to the server
    • H04N21/6587Control parameters, e.g. trick play commands, viewpoint selection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47202End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8455Structuring of content, e.g. decomposing content into time segments involving pointers to the content, e.g. pointers to the I-frames of the video stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/16Analogue secrecy systems; Analogue subscription systems
    • H04N7/173Analogue secrecy systems; Analogue subscription systems with two-way working, e.g. subscriber sending a programme selection signal
    • H04N7/17309Transmission or handling of upstream communications
    • H04N7/17336Handling of requests in head-ends

Definitions

  • the present invention relates to video data playing technology, and in particular to a method for fast forward and backward playback of video data and a streaming server. Background of the invention
  • the streaming server After receiving the user's play request, the streaming server reads the streaming media data, including video and audio data, from the media file and transmits it to the client continuously and in real time.
  • the client In a video on demand (VOD, Video On Demand) application, the client can also issue a fast forward or backward instruction to the streaming server to view the content before or after the current picture.
  • VOD Video On Demand
  • I frame do not need to refer to other frames.
  • P frames require about half of the data of I frames
  • B frames the amount of data required for B frames is about 1/4 of I frames.
  • P frame and the B frame need to refer to other frames, once the media data is lost during transmission, the error continues, and the picture cannot be recovered. Therefore, in streaming media data transmission, an I frame needs to be sent at intervals to recover from an error. There are usually 12 to 15 P frames or B frames between every two I frames.
  • the streaming media application does not speed up the sending of the streaming media data when processing the fast forward and rewind playback requests, but minimizes the sending flow while satisfying the user experience.
  • Media data Even with a variety of compression techniques, the media files are still large, so the reading of the media files It takes a long time to take and send streaming media data.
  • the streaming media application does not speed up the sending of the streaming media data when processing the fast forward and rewind playback requests, but minimizes the sending flow while satisfying the user experience.
  • the I frame in the original media file is extracted, and one or more frames are added according to the size of the I frame at different times between adjacent I frames.
  • ZP Zero Frame
  • the type of ZP is P frame, and the picture content is exactly the same as the previous I frame.
  • the purpose of inserting ZP is to ensure that the video stream output bit rate is the same as that during normal playback when fast forward and rewind.
  • the streaming media server After receiving the fast forward or fast reverse play request, the streaming media server first determines the first I frame to be sent according to the command type of the play request and the currently transmitting picture, and then according to the sequence number of the first I frame to be sent. Positioning the first I frame from the index file, determining the number of ZPs to be inserted according to the size of the first I frame, and transmitting the first I frame and the inserted ZP to the network through the streaming media generator, and then following the above The step continues to send subsequent I frames and ZPs.
  • the streaming server first extracts all the I frames in the obtained original media file to form an I frame sequence.
  • the streaming server determines the standard according to how many frames per second, the network transmission rate (TBR) and the video bit rate (VBR) of the playback device play.
  • TBR network transmission rate
  • VBR video bit rate
  • the size of the I frame changes the input I frame ⁇ ⁇ to the size of the standard I frame, and the modified I frame is called the frame.
  • One or more ⁇ or ⁇ frames are added between two adjacent ⁇ frames, and the ⁇ or ⁇ frames are identical in content to the adjacent I frames, so as to make the picture smoother during playback.
  • the streaming server directly forms a media file for fast forwarding using the generated frame sequence, and the time stamp in the frame sequence is modified to form a media file for fast rewind, and at the same time, an index file is generated.
  • the streaming server finds the index file according to the next I frame to be sent in the original media file, and finds the I frame.
  • the inventor has found that the above two technical solutions can enable the streaming server to output video data according to the code rate in the normal play mode when fast forward and rewind. Because all I frames are extracted and stored as separate fast forward and rewind media files, multiple I frame data can be read at one time during reading, which improves the reading efficiency of I frames to some extent. However, when the two schemes do not consider the fast forward and rewind double speed increase, it is not necessary to send all I frame data. Usually fast forward The rewind speed can be 2x, 4x, 8x, 16x and 32x. When the double speed ⁇ ⁇ is high, such as 32 times speed, the reading efficiency of fast forward and rewind playback using the prior art schemes is only 6.25 %.
  • a method for fast forward and backward playback of video data is provided, and on the other hand, a streaming media server is provided to improve video data reading efficiency of the streaming media server.
  • a method for fast forward and rewind playback of video data including: The video data required for fast forward and rewind playback at different speeds is obtained from the original media file, and the fast forward and rewind sequence files are generated by using the obtained video data to generate a fast forward and rewind sequence index file;
  • the streaming server When receiving the fast forward and rewind playback request from the client, the streaming server obtains the fast forward rewind index information that satisfies the play request from the fast forward rewind sequence index file, according to the obtained index information, from the The video data that satisfies the play request is obtained in the fast forward and rewind sequence file, and is sent to the client through the network.
  • a streaming media server comprising: a streaming media generator, a storage unit, a fast forward rewind sequence parser, a fast forward rewind sequence generator, wherein
  • the storage unit is configured to store an original media file, a fast forward rewind sequence file from the fast forward rewind sequence generator, and a fast forward rewind sequence index file;
  • the fast forward rewind sequence generator obtains video data required for fast forward and rewind playback at different speeds from the original media file, and generates the fast forward rewind sequence file and the fast forward rewind sequence index a file, saved to the storage unit;
  • the streaming media generator receives a fast forward and rewind playback request from the client, instructs the fast forward rewind sequence parser to execute the fast forward rewind playback request, and sends the received video data to the Client
  • the fast forward and rewind sequence parser receives an instruction from the media generator, and obtains fast forward rewind sequence index information that satisfies the play request from the fast forward rewind sequence index file, according to the obtained index And acquiring, from the fast forward and rewind sequence file, video data that meets the play request, and sending the video data to the streaming media generator.
  • the method for fast-forwarding and rewinding playing video data and the streaming media server provided by the embodiments of the present invention obtain the video data required for fast forward and rewind playback at different speeds by using the original media file.
  • the incoming video data generates a fast forward and rewind sequence file. Because this fast forward and rewind sequence file takes into account the need for different speeds to fast forward and rewind playback.
  • the problem of different video data improves the video data reading efficiency of the streaming media server.
  • FIG. 1 is a schematic structural diagram of a hybrid fast-forward and rewind sequence unit according to an embodiment of the present invention
  • FIG. 2 is a flowchart 1 of fast forward and rewind playback video data according to an embodiment of the present invention
  • FIG. 3 is a fast forward and rewind according to an embodiment of the present invention
  • FIG. 4 is a structural diagram of a streaming media server according to an embodiment of the present invention. Mode for carrying out the invention
  • the method for fast-forwarding and rewinding playing video data includes: generating fast-forward rewind sequence by using the obtained video data by acquiring video data required for fast forward and backward playback at different speeds from the original media file. File, and generate a fast forward and rewind sequence index file; when the streaming server receives the fast forward and rewind playback request from the client, obtain fast forward and rewind from the fast forward and rewind sequence index file to satisfy the received play request.
  • the index information according to the obtained index information, obtains video data that satisfies the received play request from the fast forward and rewind sequence file, and sends the video data to the client through the network.
  • the streaming server obtains the video data that satisfies the received playback request, including:
  • the fast forward and backward rewind sequence index file is searched, and the index information of the I frame to be sent is obtained, according to the obtained index.
  • Information locate and read the I frame to be sent from the fast forward and rewind sequence file, and send it to the client; if the last I frame that has been sent is the I frame that is fast forwarded and rewinded at the specific double speed, then it is determined Whether the I frame to be sent has been read into the buffer. If yes, locate and read the corresponding I frame to be sent from the buffer and send it to the client; otherwise, find the fast forward and rewind sequence index file. Obtain the index information of the I frame to be sent, and locate and read the I frame to be sent from the fast forward and rewind sequence file according to the obtained index information, and send it to the client.
  • the streaming media server When the streaming media server receives the play request for switching the initial double speed to the target double speed during the fast forward and rewind playback, the streaming server obtains the video data that satisfies the received play request, including:
  • the video data currently read into the buffer contains the I frame to be sent. If it contains, locate and read the I frame to be sent from the buffer and send it to the client. If it does not, find the fast forward. retrieve the index file to obtain the index information of the I frame to be sent. According to the obtained index information, the I frame to be sent is located and read from the fast forward and rewind sequence file, and sent to the client.
  • the first implementation manner of generating a fast forward and rewind sequence file by using the obtained video data, and generating a fast forward and rewind sequence index file includes:
  • each mixed fast forward and rewind sequence unit can be set by the buffer size.
  • Each hybrid fast forward sequence unit includes: a standard double speed fast forward sequence, at least one high speed fast A back compensation sequence and at least one high speed fast forward compensation sequence.
  • the start position of each high-speed fast-forward compensation sequence is determined by the end position of the standard double-speed fast-forward rewind sequence; the end position of each high-speed rewind compensation sequence is from the start position of the standard double-speed fast-forward rewind sequence determine.
  • the step of generating a fast forward rewind sequence index file includes: generating an index file of the hybrid fast forward sequence unit, the index file including feature information of the hybrid fast forward sequence unit, and hybrid fast forward Position information of the fast-rewind sequence unit in the fast forward and rewind sequence index file, and corresponding position information of each high-speed fast-forward rewind sequence index;
  • index file includes feature information of each I frame in the standard double-speed fast-forward rewind sequence and position information of each I frame in the fast-forward and rewind sequence index file;
  • each high-speed fast-forward rewind sequence index of each hybrid fast-forward rewind sequence unit includes all corresponding high-speeds included in the corresponding hybrid fast-forward rewind sequence unit
  • the feature information of the I frame and the position information in the fast forward and rewind sequence index file includes all corresponding high-speeds included in the corresponding hybrid fast-forward rewind sequence unit
  • streaming media servers support fast forward and fast reverse speeds, which usually include 2x, 4x, and 8x. Some streaming servers also support 16x and 32x.
  • the method for selecting at least two times of speed according to step A is more than 4 types, which can be all the multiple speeds supported by the selection system, such as: 2, 4, 8, 16, 32 times, and then the 2x speed is selected as the standard double speed.
  • the maximum fast forward rewind speed supported by the streaming server is 32 times. Select 2, 4, 8 times as low speed, 16 speed and 32 speed as high speed, 2 speed as standard speed, 16 speed as high speed compensation
  • the required video data includes:
  • I frames when fast forwarded at 2x speed.
  • These I frames are numbered according to the order of normal playback. The number of the first playback is small, and the number of the subsequent playback is large.
  • These I frames are ⁇ , l 2 I n , called 2x I frame, lasts for m seconds. Then the duration of playing this video at 4x speed is reduced by half to m/2 seconds.
  • these I frames can only extract half of them, ie send ⁇ , 1 3 , ..., I n is called a 4x I frame.
  • 1/4 of the 2x speed I frame is extracted, and the corresponding I frame is called 8x I frame, 16x and 32x and so on.
  • the video data sequence required for the standard double speed fast forward and rewind is the 2x speed I frame
  • the video data sequence required for the high double speed compensation sequence double speed is the 16x speed I frame.
  • the I frame numbers are all set in the manner described above.
  • the steps of generating a fast forward and rewind sequence file using the acquired video data include:
  • the received 2x speed I frame and 16x speed I frame are sequentially mixed to generate a plurality of set size mixed fast forward sequence units, and each mixed fast forward sequence unit includes: standard double speed Fast forward and rewind sequence, high speed fast forward compensation sequence and high speed fast reverse compensation sequence.
  • the start position of the high-speed fast-forward compensation sequence is determined by the end position of the standard double-speed fast-forward rewind sequence; the end position of the high-speed fast-reverse compensation sequence is determined by the starting position of the standard double-speed fast-forward rewind sequence.
  • each of the fast forward and rewind sequence units in the fast forward and rewind sequence file is set by the buffer size.
  • the 2x-speed I frame is extracted from the standard double-speed fast-forward rewind sequence of the mixed fast-forward and rewind sequence unit in sequence, when the double-speed I is stored in a mixed fast-forward and rewind sequence unit.
  • the 2x speed I frame is stopped, and the subsequent 2x speed I frame is stored in the next mixed fast forward rewind sequence unit; when the extracted 2x speed I frame is not filled with the predetermined ratio , the insufficient part is filled with 0.
  • a 2x-speed I frame will only exist in a mixed fast forward/reverse sequence unit, and different mixed fast forward/reverse sequence units will not repeat the same 2x speed I frame.
  • the high-speed rewind compensation sequence stores 16x I frames. Assume that the I frame number in the original media file corresponding to the first I frame of the standard fast forward/rewind sequence of the current unit is, and the streaming media server starts the reverse traversal of the original media file to find the previous 16 for 16
  • the I frame of the double speed rewinding is sequentially put into the hybrid fast forward and rewind sequence unit, and when the proportion of the predetermined high speed rewind compensation sequence is reached, the 16 times speed I frame before the storage is stopped, and the subsequent 16 times speed I frame is continued.
  • the next hybrid fast-forward rewind sequence unit when the extracted 16-time-speed I frame is not filled with the proportion of the predetermined high-speed rewind compensation sequence, the insufficient portion is filled with 0.
  • the I frame in the high-speed rewind compensation sequence may exist in multiple mixed fast-forward and rewind sequence units, because a high-speed I frame is a high-speed rewind compensation I frame in the hybrid fast-forward rewind sequence unit. At the same time, it is the high-speed fast-forward compensation I frame of the previous hybrid fast-forward and rewind sequence unit.
  • the high-speed fast-forward compensation sequence stores I frames used for 16-time fast forward. Assume that in the current hybrid fast forward sequence unit, the I frame number in the original media file corresponding to the last I frame of the standard fast forward fast forward sequence is I k , then the streaming media server starts from I k to the original media file. The traversal is performed to find that the I frame for the 16x fast forward after I k is sequentially put into the mixed fast forward and rewind sequence unit, and when the predetermined ratio of the high speed rewind compensation sequence is reached, the I k is stopped after the storage.
  • 16x speed I frame, 16x speed I frame after subsequent I k is stored to the next In the hybrid fast-forward and rewind sequence unit; when the 16-time-speed I frame after the extracted I k is not filled with the proportion of the predetermined high-speed rewind compensation sequence, the insufficient portion is filled with 0.
  • the I frame in the high-speed fast-forward compensation sequence may exist in multiple mixed fast-forward rewind sequence units because a high-speed I frame is a high-speed fast-forward compensation I frame in the hybrid fast-forward rewind sequence unit. At the same time, it is the high-speed fast-reverse compensation I frame of the next hybrid fast-forward and rewind sequence unit.
  • the ratio of each different part of the hybrid fast forward sequence unit can be selected according to the frequency of use of the corresponding fast forward and reverse multiple speeds.
  • a preferred ratio is: standard double speed fast forward rewind sequence takes up half space, high speed fast forward compensation sequence and high speed fast retreat compensation sequence Take up 1/4 space respectively.
  • FIG. 1 is a schematic structural diagram of a hybrid fast forward and rewind sequence unit according to an embodiment of the present invention.
  • the standard double speed fast forward sequence includes 15 to 18 four I frames, and then traverses the I frame in the original media file from 1 5 to select 16 times speed playback. I frame at the time, in this case only 1 1 is saved in the current high-speed rewind sequence. 1 1 The remaining space is padded with 0, which takes up a quarter of the space; traversing the original from 1 8 I frame in the media file, select the I frame required for 16x speed playback, in this case including 1 9 and 1 17 , assuming that the two I frames occupy exactly 1/4 space, then in the high speed fast forward sequence filling
  • the fast forward rewind index file generated at the same time is used to locate the position of the I frame of each video data in the fast forward and rewind sequence file.
  • a preferred implementation may include the following steps:
  • the index file includes identification information of the mixed fast forward rewind sequence unit, position information of the hybrid fast forward rewind sequence unit in the fast forward rewind sequence index file, and mixing The position information of the index index of the high-speed fast-forward rewind sequence corresponding to the fast-forward and rewind sequence unit. Specifically, all the hybrid fast forwards can be recorded in the index file.
  • Identification information set for the hybrid fast forward sequence unit such as serial number; the starting position of the hybrid fast forward sequence unit in the hybrid fast forward sequence file, the size of the hybrid fast forward sequence unit, and the fast forward.
  • a standard double-speed fast-forward and fast-rewind sequence index file is generated.
  • the index file includes identification information of each I frame in the standard double-speed fast-forward and fast-rewind sequence, and may be a sequence number and position information in the fast forward/reverse sequence index file. Specifically, it can be recorded in the index file: all selected standard double speeds, such as 2 times speed, the serial number of the fast forward and rewind I frame, the serial number of the mixed fast forward and rewind sequence unit, and the mixed fast forward and rewind sequence unit. The starting position, and the size of the I frame.
  • each high-speed fast-forward rewind sequence index file includes all high-speed I frames included in the corresponding hybrid fast-forward rewind sequence unit
  • the identification information and the position information of all high-speed I frames in the fast forward and rewind sequence index file may be the sequence number of the high-speed I frame.
  • the high-speed fast-forward rewind sequence index is divided by the mixed fast-forward rewind sequence unit.
  • Each hybrid fast forward sequence unit has a separate high speed fast forward sequence index. All high-speed I frames are selected from each mixed fast-forward and rewind sequence unit, including high-speed I frames in the standard sequence and high-speed I frames in the compensation sequence, and the following information of these I frames is recorded: I frame number, The serial number of the hybrid fast forward sequence unit, the start position in the mixed fast forward sequence unit, and the size of the I frame.
  • FIG. 2 is a flowchart 1 of fast forward and rewind playback video data according to an embodiment of the present invention.
  • This process shows the flow of the streaming media server switching from normal playback to fast forward or fast reverse playback.
  • the speed of the fast forward and reverse playback is n times, which can be 2, 4, 8, 16 or 32 times.
  • the transmitted I frame is 1 frame, and the serial number of the fast forward/rewind sequence unit where the I x frame is located is u x .
  • the process includes the following steps:
  • Step 201 Determine the sequence number of the last video data I frame sent during normal play, set it to I start , calculate the first n-times I frame after the 1 ⁇ frame or before, and assign it to the I frame to be sent. : I x frame.
  • Step 202 Find a fast forward and rewind sequence index file, determine a sequence number of the hybrid fast forward sequence unit where the I x frame is located, and position information of the hybrid fast forward sequence unit in the fast forward and rewind sequence file.
  • the position information of the fast forward/rewind sequence unit in the fast forward/reverse sequence file may be the start position information of the fast forward/reverse sequence unit in the fast forward/reverse sequence file and the hybrid fast forward sequence.
  • the size of the unit is represented.
  • Step 203 Find a fast forward rewind sequence index file, and determine location information of the I x frame in the determined hybrid fast forward sequence unit.
  • I x frames in the determined mixing fast forward and rewind position information unit sequence I x can be mixed in the determined frame fast forward and rewind the starting position and the size of a sequence unit I x-frame representation.
  • Step 202 and step 203 are merged together to locate the location information of the ⁇ frame to be transmitted in the fast forward and rewind sequence file.
  • Step 204 the hybrid frame where I x fast forward and rewind of the mixing unit sequence position corresponding to fast forward and rewind sequence reads into the buffer unit; I x-frame in accordance with the fast forward and rewind the determined mixing unit sequence Location and size, locate and read the I x frame from the buffer, and send it to the client;
  • Step 205 Calculate a first n-times I frame after or before the last I frame that has been sent, and assign the calculated I frame to the I x frame.
  • Step 206 Find a fast forward and rewind sequence index file, and locate the I x frame where the fast forward fast If the unit has been read into the buffer, the corresponding I x frame is directly located and read from the buffer, and sent to the client, and returns to step 205; otherwise, the process returns to step 203.
  • the search for the fast forward and rewind sequence index file is as follows:: Find the fast forward and rewind sequence index file. Standard double speed fast forward and rewind sequence index;
  • the search for the fast forward and rewind sequence index file is as follows:: Find the fast forward and rewind sequence index file. High-speed fast forward or fast reverse sequence index.
  • the streaming media server When the streaming media server receives the instruction to change the current playing mode, if the command is: playing the streaming media file normally, the streaming media server calculates the starting position of the normal playing streaming media file according to the serial number of the last I frame currently sent, according to The determined starting position is obtained from the original media file, and the obtained streaming media data is sent to the client.
  • FIG. 3 is a second flowchart of fast forward and rewind playback video data according to an embodiment of the present invention. This flow shows the flow of the streaming server switching from n-speed fast forward or fast reverse playback to m-speed fast forward or fast reverse playback, n and m. The process includes the following steps:
  • Step 301 Calculate the sequence number of the last video data I frame sent before the handover, set it to Istart, calculate the first m-time-speed I frame after or before the I start frame, and assign it to the next I frame to be sent. : I x frame;
  • Step 302 Check whether the Ix frame is included in the mixed fast forward sequence unit currently read into the buffer. If yes, go to step 303; otherwise, go to step 304.
  • the specific implementation process of this step includes: If m is a preset low speed, the standard double speed fast forward and rewind index file of the fast forward and rewind sequence index file is searched, and the location of the I x frame is located. Mix fast forward and rewind sequence units.
  • the positioning method may be: positioning the starting position and size of the fast forward/reverse sequence unit of the I x frame in the fast forward and rewind sequence file, and checking whether the unit is the same as the unit that has been read into the buffer;
  • m is a preset high-speed, find the high-speed fast-forward and rewind index file of the fast-forward and rewind sequence index file, and obtain all the high-speed I in the mixed fast-forward and rewind sequence unit that has been read into the buffer. Frame, check if it contains an I x frame.
  • Step 303 The video data corresponding to the I x frame is located and read from the buffer, and sent to the client, and then step 306 is performed.
  • Step 304 Find a fast forward rewind sequence index file, determine a starting position of the I x frame in the mixed fast forward rewind sequence unit, and a size of the I x frame.
  • Step 305 Read the corresponding hybrid fast-forward and rewind sequence unit into the buffer according to the position of the mixed fast-forward and rewind sequence unit where the I x frame is located; according to the I x frame in the hybrid fast-forward and rewind sequence unit Start position and size, locate and read the I x frame from the buffer, and send it to the client; Step 306, calculate the first m times I frame after or before the current 1 frame, assign it to the I x frame, and return Step 302.
  • the method when the streaming media server receives an instruction to change the current playing mode, and the command is:
  • the method when the streaming media file is played normally, the method further includes:
  • the streaming media server calculates a starting position of the normal playing streaming media file according to the sequence number of the last I frame currently sent, obtains corresponding streaming media data from the original media file according to the calculated starting position, and sends the obtained streaming media data to the Client.
  • the reading efficiency of the fast forward and rewind video data playing method provided by the embodiment shown in Fig. 2 and Fig. 3 is analyzed below, and compared with the reading efficiency of the prior art two schemes.
  • the measurement of video data read efficiency at a specific double speed fast forward and rewind is: Continuously read a set of I frame sequences, and calculate the proportion of I frames available in the current fast forward fast reverse multiple speed.
  • the minimum value is taken as the fast forward and rewind video data reading efficiency of the streaming server.
  • the system supports 2, 4, 8, 16 and 32 fast forward and rewind speed as an example for comparative analysis.
  • the read speeds of the fast forward and rewind video data of various double speeds are respectively: 2x speed: the read I frame sequence can be used for 2x fast forward and rewind, so the proportion is 100%; 4x speed: half of the read I frame sequence can be used for 4x fast forward and rewind, so the proportion is 50%; 8x speed: 1/4 of the read I frame sequence can be used for 8x speed Fast forward and rewind, so the proportion is 25%; 16 times speed: 1/8 of the read I frame sequence can be used for 16x fast forward and rewind, so the proportion is 12.5%; 32x speed: read The 1/16 of the I frame sequence can be used for 32x fast forward and rewind, so the proportion is 6.25%.
  • the 32x speed reading efficiency is the lowest, so the streaming media server's fast forward and fast rewind reading efficiency is 32 times faster reading efficiency, which is 6.25%.
  • the standard fast forward rewind sequence is a 2x fast forward rewind sequence, which occupies 1/2 space of the hybrid fast forward rewind sequence unit; the high double speed fast retreat compensation sequence is 16 times faster.
  • the back-compensation sequence accounts for 1/4 of the space of the fast-forward and fast-rewind sequence unit;
  • the high-speed fast-forward compensation sequence is a 16-times fast-forward compensation sequence, which accounts for 1/4 of the space of the fast-forward and fast-rewind sequence unit.
  • the fast reading and rewinding video data reading efficiencies of each double speed are:
  • Standard fast forward and rewind sequences can be used for 2x fast forward and rewind, so the proportion is 50%;
  • 4x speed half of the standard fast forward rewind sequence can be used for 4x fast forward and rewind, so the proportion is 25%;
  • 8x speed 1/4 of the standard fast forward rewind sequence can be used for 8x fast forward and rewind, so the proportion is 12.5%;
  • 16x speed At least a high-speed rewind compensation sequence or a high-speed fast-forward compensation sequence is available, so the proportion is at least 25%;
  • 32x speed At least half of the high-speed rewind compensation sequence or the high-speed fast-forward compensation sequence is available, so the proportion is 12.5%;
  • the 8x speed and the 32x speed have the lowest reading efficiency. Therefore, the fast forward and backward video data reading efficiency of the streaming server of the technical solution is 8 times or 32 times, that is, 12.5%. Therefore, when the video data is fast forwarded and rewinded by the method provided by the embodiment of FIG. 2 and FIG. 3, the fast forward and fast rewinding read efficiency of the streaming media server is twice that of the prior art.
  • the method for generating a fast forward rewind sequence file and a fast forward rewind sequence index file by using the obtained video data includes:
  • the received video data is sequentially generated into different speed fast forward and rewind sequence files, and all the different speed fast forward and rewind sequence files form a fast forward and rewind sequence file;
  • the step of obtaining the fast forward and rewind sequence index information that satisfies the play request from the fast forward and rewind sequence index file is: obtaining the bow from the corresponding double speed fast reverse sequence index file according to the playback double speed specified by the received play request Information;
  • the step of obtaining the video data that satisfies the play request from the fast forward/reverse sequence file is: acquiring the video data that satisfies the received play request from the corresponding double speed fast forward sequence file according to the obtained index information.
  • the second implementation scheme is used to switch between normal playback to fast forward and fast reverse playback of video data, or to achieve switching between different fast forward and fast reverse multiple speeds, and the flow is shown in FIG. 2 and FIG.
  • the difference in the process is only in the process of locating the I x frame to be sent.
  • the media server after determining the I x frame to be sent, the media server searches for the corresponding fast forward rewind sequence index file according to the current double speed to be switched, and locates the I x frame to be transmitted at the corresponding double speed.
  • fast forward and rewind the file location information sequence start position information may include the size of I x and the frame to be transmitted in the fast forward and rewind speed file corresponding sequence in the frame I x.
  • the embodiment of the present invention simultaneously provides a device for fast forward and backward playback of video data, that is, a streaming media server, as shown in FIG.
  • the streaming server includes: a streaming media generator, a storage unit, a fast forward rewind sequence parser, and a fast forward rewind sequence generator. among them
  • a storage unit configured to store the original media file and the fast forward and rewind sequence file and the fast forward and rewind sequence index file
  • the fast forward and rewind sequence generator is configured to obtain video data required for fast forward and rewind playback at different speeds from the original media file, and generate a fast forward and rewind sequence file and a fast forward and rewind sequence index file;
  • a streaming media generator configured to receive a fast forward and rewind playback request from the client; and send the video data that satisfies the playback request to the client through the network;
  • the fast forward and rewind sequence parser is configured to obtain the fast forward and rewind sequence index information that satisfies the play request from the fast forward and rewind sequence index file, and obtain the video that satisfies the play request from the fast forward and rewind sequence files according to the index information. data.
  • the implementation of the video data that satisfies the play request may be: the fast forward and rewind sequence parser implements the above function according to the play request by calling a play request in the streaming media generator, and obtains the function that satisfies the play request.
  • the video data may also be: After receiving the play request, the streaming media generator sends an instruction for carrying the play request to the fast forward and rewind sequence parser, and the instruction fast forward and rewind sequence parser implements the above function to obtain the video satisfying the play request.
  • the fast forward and rewind sequence generator may be composed of a first video data acquiring unit and a hybrid fast forward and rewind sequence file generating unit.
  • a first video data acquiring unit configured to obtain, from the original media file, video data required to fast forward and rewind the playback according to the selected standard double speed and high double speed compensation double speed;
  • the mixed fast forward and rewind sequence file generating unit is configured to sequentially mix the video data in a selected ratio to generate a plurality of set size mixed fast forward sequence units, and generate a fast forward and rewind sequence index file.
  • the fast forward rewind sequence generator is composed of a second video data acquiring unit and different double speed fast forward and rewind sequence file generating units.
  • a second video data acquiring unit configured to obtain, from the original media file, video data required for each of the multiple speed fast forward and rewind playbacks supported by the current system
  • Different double-speed fast forward and rewind sequence file generating units are used for sequentially indexing video data in the same order as fast forward and backward.
  • the streaming media generator in the streaming media server comprises: a fast forward and rewind playback request processing unit and a normal play request processing unit, the streaming media server further comprising: a media parser.
  • the fast forward and rewind play request processing unit is configured to receive a fast forward rewind play request from the client, and send the received video data to the client through the network.
  • a normal play request processing unit configured to receive a normal play request from the client; and send the received streaming media data to the client through the network.
  • the media parser is configured to parse the obtained streaming media data from the original media file according to the normal play request, and send the obtained streaming media data to the normal play request processing unit.
  • the media parser in the streaming server includes: a play location determining unit and a media file parsing unit.
  • a play position determining unit configured to parse from the fast forward rewind sequence according to the normal play request Obtaining feature information of the currently transmitted video data, and determining a starting position of normal play according to the acquired feature information;
  • the media file parsing unit is configured to parse the obtained streaming media data from the original media file according to the starting position of the normal playing determined by the playing position determining unit, and send the obtained streaming media data to the normal play request processing unit.
  • the method for fast-forwarding and rewinding video data and the streaming server provided by the embodiment of the present invention can improve the reading efficiency of the fast forward and rewind playback video data of the streaming media server.
  • the higher the efficiency of the fast forward and rewind media data reading of the streaming media server the more the I frame that is read before the switch can be used for the fast forward and rewind video data after the switch, so the embodiment of the present invention is provided.
  • the technical solution can have more read data for fast forward and rewind playback after switching at the double speed switching, thereby transmitting the switched data to the client more quickly, and shortening the average response time of the double speed switching.
  • Media file reading is one of the bottlenecks of streaming media servers, and its throughput rate often determines the maximum number of concurrent users that a streaming server can support.
  • the calculated number of concurrent users is true, otherwise, at full load, once Some users play differently and need to use more media files to read resources, which can easily lead to system overload, which affects the experience of all online users.
  • the maximum number of concurrent users that the streaming server can support is an important measure of server performance. It reduces the media file reading resources required for high-speed fast forward and rewind, and improves the number of concurrent users that the streaming server can support. On the other hand, in the case where the hardware and software configurations are the same, the more concurrent users are supported, the lower the average stream server cost per user is. Therefore, the method and apparatus provided by the embodiments of the present invention can significantly reduce the average. Streaming server cost per user.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Television Signal Processing For Recording (AREA)
  • Information Transfer Between Computers (AREA)

Description

一种快进快退播放视频数据的方法和流媒体服务器
技术领域
本发明涉及视频数据播放技术, 特别涉及一种快进快退播放视频数 据的方法和流媒体服务器。 发明背景
随着宽带网络基础设施的改善, 流媒体的应用越来越广泛。 在流媒 体应用中, 流媒体服务器收到用户的播放请求后, 从媒体文件中读出流 媒体数据, 包括视频和音频数据, 向客户端连续、 实时地传送。 在视频 点播(VOD, Video On Demand )应用中, 客户端还可以向流媒体服务 器发出快进或后退的指令, 观看当前画面之前或之后的内容。
媒体文件通常都很大, 因此需要对媒体文件进行压缩, 减少保存媒 体文件时存储设备的开销以及传输流媒体数据时对传输带宽的要求。 目 前, 对媒体文件进行压缩的方法有 3种。 这三种压缩方法为本领域公知 技术, 这里不再赘述。
不同的压缩方法压缩效果不同, 利用现有的 3种方法进行媒体文件 压缩时, 分别生成 3种不同的视频数据帧: I帧、 P帧和 B帧。 I帧不需 要参考其它帧, 与 P帧和 B帧相比, I帧需要大量数据; P帧需要的数 据量大致为 I帧的一半, B帧需要的数据量大约为 I帧的 1/4。另一方面, 因为 P帧和 B帧需要参考其它帧, 所以一旦传输时有媒体数据丢失, 错 误就会一直延续下去, 导致画面无法恢复。 因此在流媒体数据传输中需 要每隔一段时间发送一个 I帧, 用于出错时的恢复, 每 2个 I帧之间通 常会有 12到 15个 P帧或 B帧。
即使采用了多种压缩技术, 媒体文件仍然很大, 因此媒体文件的读 取以及流媒体数据的发送都需要花费较长时间。 为了尽量减少流媒体数 据的读取和发送时间, 流媒体应用在处理快进快退播放请求时, 并不是 筒单地加速发送流媒体数据, 而是在满足用户体验的情况下尽量少发送 流媒体数据。
现有技术第一种快进快退播放视频文件的方案中, 将原始媒体文件 中的 I帧抽取出来,并在相邻的 I帧之间根据不同时刻 I帧的大小增加 1 个或者多个 ZP ( Zero Frame ), 形成一个新的 I帧文件, 同时生成 I帧的 索引文件。 ZP的类型为 P帧, 画面内容和之前的 I帧完全相同, 插入 ZP的目的是保证快进快退时视频流输出码率和正常播放时相同。
当流媒体服务器收到快进或快退播放请求后, 首先根据播放请求的 命令类型以及当前正在发送的画面确定第 1个要发送的 I帧, 之后根据 第 1个要发送的 I帧的序号从索引文件中定位第 1个 I帧,根据第 1个 I 帧的大小确定需要插入的 ZP的个数,将第 1个 I帧以及插入的 ZP通过 流媒体生成器发送到网络,之后按照上述步骤继续发送后续的 I帧及 ZP。
现有技术第二种快进快退播放视频数据的方案中, 流媒体服务器首 先将获取的原始媒体文件中的所有 I帧抽取出来, 形成 I帧序列。 为了 在快进快退时还可以按照正常播放模式下的码率输出视频数据, 流媒体 服务器根据播放设备每秒播放多少帧画面、 网络传输速率 (TBR ) 以及 视频比特率( VBR ), 确定标准 I帧的大小, 将输入的 I帧^ ίι爹改成为标准 I帧的大小, 将修改后的 I帧称为 Τ帧。 两个相邻的 Τ帧之间增加一个 或者多个 Β帧或 Ρ帧, 这些 Β帧或 Ρ帧和相邻的 I帧画面内容相同, 目 的是使播放时画面更加平滑。 流媒体服务器使用生成的 Τ帧序列直接形 成用于快进的媒体文件, 修改 Τ帧序列中的时间戳形成用于快退的媒体 文件, 同时, 生成索引文件。 当从正常播放切换到快进时, 流媒体服务 器根据原始媒体文件中下一个要发送的 I帧查找索引文件, 找到 I帧所 对应的快进媒体文件中的 T帧,之后从快进媒体文件中读取 T帧及其之 后的视频数据进行发送; 当从快进转换到正常播放时, 流媒体服务器根 据快进媒体文件中下一个要发送的 T帧查找索引文件,找到 T帧所对应 的原始媒体文件中的 I帧, 之后从原始媒体文件中读取 I帧及其之后的 视频数据进行发送。 快退处理采用同样的方法, 不同之处是使用快退媒 体文件。
发明人发现采用上述两种技术方案可以使流媒体服务器在快进快退 时, 仍然按照正常播放模式下的码率输出视频数据。 因为所有 I帧都被 抽取出来存放为单独的快进快退媒体文件, 所以读取时可以一次性读出 多个 I帧数据, 在一定程度上提高了 I帧的读取效率。 但是这两种方案 没有考虑快进快退倍速增加时, 并不需要发送所有 I帧数据。 通常快进 快退倍速可以是 2倍速、 4倍速、 8倍速、 16倍速和 32倍速。 当倍速 ^艮 高时, 如 32倍速时, 采用现有技术两种方案进行快进快退播放的读取 效率只有 6.25 %。 并且, 在高倍速快进快退时读取和发送所有 I帧数据, 很可能会超出硬盘读取能力、 网络传输带宽以及客户端的接收能力。 因 此在高倍速快进快退时, 需要按照时间间隔丢弃部分 I帧, 这样一来从 快进快退媒体文件中读取出来的数据大部分需要丢弃, 浪费了硬盘处理 能力, 使得系统所能支持的并发快进快退用户数降低, 增大了分摊到每 用户的流媒体服务器成本。 发明内容
有鉴于此, 一方面提供了一种快进快退播放视频数据的方法, 另一 方面提供了一种流媒体服务器, 提高流媒体服务器的视频数据读取效 率。
一种快进快退播放视频数据的方法, 包括: 从原始媒体文件中获取按不同倍速快进快退播放时, 所需的视频数 据, 利用获取到的视频数据生成快进快退序列文件, 生成快进快退序列 索引文件;
流媒体服务器接收到来自客户端的快进快退播放请求时, 从所述快 进快退序列索引文件中获取满足所述播放请求的快进快退索引信息, 根 据获取的索引信息, 从所述快进快退序列文件中获取满足所述播放请求 的视频数据, 通过网络发送至所述客户端。
一种流媒体服务器, 包括: 流媒体生成器、 存储单元, 快进快退序 列解析器、 快进快退序列生成器, 其中
所述存储单元, 用于存储原始媒体文件、 以及来自所述快进快退序 列生成器的快进快退序列文件以及快进快退序列索引文件;
所述快进快退序列生成器, 从所述原始媒体文件中获取按不同倍速 快进快退播放时, 所需的视频数据, 生成所述快进快退序列文件以及快 进快退序列索引文件, 保存到所述存储单元中;
所述流媒体生成器, 接收来自客户端的快进快退播放请求, 指令所 述快进快退序列解析器执行所述快进快退播放请求; 将接收到的视频数 据通过网络发送至所述客户端;
所述快进快退序列解析器, 接收来自所述媒体生成器的指令, 从所 述快进快退序列索引文件中获取满足所述播放请求的快进快退序列索 引信息, 根据获取的索引信息, 从所述快进快退序列文件中获取满足所 述播放请求的视频数据, 发送至所述流媒体生成器。
由以上技术方案可见, 本发明实施例提供的快进快退播放视频数据 的方法和流媒体服务器, 通过从原始媒体文件中获取按不同倍速快进快 退播放时所需的视频数据, 利用获取到的视频数据生成快进快退序列文 件。 由于这种快进快退序列文件考虑到不同倍速快进快退播放时需要的 视频数据不同的问题, 提高了流媒体服务器的视频数据读取效率。 附图简要说明
图 1为本发明实施例的混合快进快退序列单元结构示意图; 图 2为本发明实施例的快进快退播放视频数据的流程图一; 图 3为本发明实施例的快进快退播放视频数据的流程图二; 图 4为本发明实施例的流媒体服务器结构图。 实施本发明的方式
为使本发明的目的、 技术方案和有益效果更加清楚明白, 下面结合 实施例和附图, 对本发明#文进一步地详细说明。
本发明实施例提供的快进快退播放视频数据的方法包括: 通过从原 始媒体文件中获取按不同倍速快进快退播放所需的视频数据, 利用获取 到的视频数据生成快进快退序列文件, 并生成快进快退序列索引文件; 当流媒体服务器接收到来自客户端的快进快退播放请求时, 从快进 快退序列索引文件中获取满足接收到的播放请求的快进快退索引信息, 根据获取的索引信息, 从快进快退序列文件中获取满足接收到的播放请 求的视频数据, 通过网络发送至客户端。
当流媒体服务器接收到的播放请求为从正常播放切换到特定倍速快 进快退播放时, 流媒体服务器获取满足接收到的播放请求的视频数据的 步骤包括:
确定已发送的最后一个视频数据 I帧之后或之前的第一个特定倍速 I 帧, 将其作为要发送的 I帧;
如果当前已发送的最后一个 I帧为正常播放的 I帧, 则查找快进快 退序列索引文件, 获取定位要发送的 I帧的索引信息, 根据获取的索引 信息,从快进快退序列文件中定位并读取要发送的 I帧,发送给客户端; 如果已发送的最后一个 I帧为按所述特定倍速快进快退播放的 I帧, 则确定要发送的 I帧是否已被读取到緩沖区中, 如果是, 则从緩沖区中 定位并读取相应的要发送的 I帧, 发送给客户端; 否则查找快进快退序 列索引文件, 获取定位要发送的 I帧的索引信息,根据获取的索引信息, 从快进快退序列文件中定位并读取要发送的 I帧, 发送给客户端。
当流媒体服务器在快进快退播放过程中, 接收到将初始倍速切换为 目标倍速的播放请求时, 流媒体服务器获取满足接收到的播放请求的视 频数据的步骤包括:
确定已发送的最后一个 I帧之后或之前的第一个目标倍速 I帧, 将 其作为要发送的 I帧;
检查当前已读取到緩沖区的视频数据是否包含要发送的 I帧, 如果 包含, 则从緩沖区中定位并读取要发送的 I帧, 发送至客户端; 如果不 包含, 则查找快进快退索引文件, 获取定位要发送的 I帧的索引信息; 根据获取的索引信息, 从快进快退序列文件中定位读取要发送的 I帧, 发送给客户端。
本发明实施例中, 利用获取到的视频数据生成快进快退序列文件, 并生成快进快退序列索引文件的第一种实现方案包括:
A、 选择至少两种快进快退播放倍速, 其中一种倍速作为标准倍速, 其余的倍速作为高倍速补偿倍速, 从原始媒体文件中获取按选择的倍速 快进快退播放时, 分别所需的视频数据;
B、 按顺序将获取到的不同倍速快进快退播放所需的视频数据, 以 选定的比例混合生成多个设定大小的混合快进快退序列单元,
每个混合快进快退序列单元的大小可以按緩沖区大小设置。 每个混 合快进快退序列单元包括: 标准倍速快进快退序列、 至少一种高倍速快 退补偿序列和至少一种高倍速快进补偿序列。
每一种高倍速快进补偿序列的起始位置由标准倍速快进快退序列的 结束位置确定; 每一种高倍速快退补偿序列的结束位置由标准倍速快进 快退序列的起始位置确定。
在这种实现方案中, 生成快进快退序列索引文件的步骤包括: 生成混合快进快退序列单元的索引文件, 该索引文件中包含混合快 进快退序列单元的特征信息、 混合快进快退序列单元在快进快退序列索 引文件中的位置信息、 以及对应的每一种高倍速快进快退序列索引的位 置信息;
生成标准倍速快进快退序列索引文件, 该索引文件中包含标准倍速 快进快退序列中每一个 I帧的特征信息以及每一个 I帧在快进快退序列 索引文件中的位置信息;
生成每个混合快进快退序列单元的每一种高倍速快进快退序列索 引, 每个高倍速快进快退序列索引中包含对应混合快进快退序列单元中 包含的所有对应高倍速 I帧的特征信息、 以及在快进快退序列索引文件 中的位置信息。
目前流媒体服务器支持的快进快退倍速通常包括 2倍速、 4倍速和 8 倍速, 有些流媒体服务器还支持 16倍速和 32倍速。 步骤 A所述的选择 至少两种倍速的方式有 4艮多种, 可以为选择系统支持的所有倍速, 如: 2、 4、 8、 16、 32倍速, 然后将 2倍速选定为标准倍速, 将 4、 8、 16、 32作为高倍速补偿倍速; 也可以为选定 2倍速为标准倍速, 选定 8、 32 为高倍速补偿倍速。
为了描述筒单, 以下实施例中均假设流媒体服务器所支持的最大快 进快退倍速为 32倍速。 选定 2、 4、 8倍速为低倍速, 16倍速和 32倍速 为高倍速, 将 2倍速设定为标准倍速, 将 16倍速设定为高倍速补偿倍 放时, 所需的视频数据包括:
从原始媒体文件中获取标准倍速, 即 2倍速, 快进快退播放时所需 的视频数据序列, 以及选定的高倍速补偿倍速, 即 16倍速, 快进快退 播放时所需的视频数据序列。
假设某段视频以 2倍速快进播放时发送了 n个 I帧, 按照正常播放 的先后顺序对这些 I帧进行编号, 在先播放的序号小, 在后播放的序号 大, 这些 I帧依次为 ^、 l2 In, 称为 2倍速 I帧, 持续时间为 m秒。 那么以 4倍速播放这段视频时持续时间减少一半, 为 m/2秒, 为了保持 视频输出流的恒定,这些 I帧只能抽取其中的一半发送,即发送 ^、 13、 ...、 In, 称为 4倍速 I帧。 8倍速时抽取 2倍速 I帧中的 1/4发送, 相应的 I 帧称为 8倍速 I帧, 16倍速和 32倍速依此类推。 因此, 标准倍速快进 快退所需的视频数据序列即为 2倍速 I帧, 高倍速补偿序列倍速所需的 视频数据序列即为 16倍速 I帧。本发明以下描述中 I帧序号均采用上述 的方式进行设置。
利用获取的视频数据生成快进快退序列文件的步骤包括:
按顺序将接收到的 2倍速 I帧和 16倍速 I帧, 以选定的比例混合生 成多个设定大小的混合快进快退序列单元, 每个混合快进快退序列单元 包含: 标准倍速快进快退序列、 高倍速快进补偿序列以及高倍速快退补 偿序列。 其中, 高倍速快进补偿序列的起始位置由标准倍速快进快退序 列的结束位置确定; 高倍速快退补偿序列的结束位置由标准倍速快进快 退序列的起始位置确定。
这里, 快进快退序列文件中的每个混合快进快退序列单元按緩沖区 大小设置。
在标准倍速快进快退序列中存放 2倍速 I帧。 流媒体服务器对原始 媒体文件遍历时, 从中抽取 2倍速 I帧, 按照先后顺序依次存放到混合 快进快退序列单元的标准倍速快进快退序列中, 当一个混合快进快退序 列单元中存放的 2倍速 I帧即将超过事先确定的比例时, 停止存放 2倍 速 I帧, 后续的 2倍速 I帧存放到下一个混合快进快退序列单元中; 当 抽取的 2倍速 I帧未填充满事先确定的比例时, 不足部分以 0填充。 从 以上存放方法中可以看出, 一个 2倍速 I帧只会存在于一个混合快进快 退序列单元中, 不同的混合快进快退序列单元不会重复出现同一个 2倍 速 I帧。
高倍速快退补偿序列存放 16倍速 I帧。假设当前单元的标准快进快 退序列的第 1个 I帧所对应的原始媒体文件中的 I帧序号为 ,流媒体服 务器从 开始对原始媒体文件进行反向遍历,找出 之前的用于 16倍速 快退的 I帧依次放入混合快进快退序列单元, 当达到预先确定的高倍速 快退补偿序列所占比例时, 停止存放 之前的 16倍速 I帧, 后续的 之前的 16倍速 I帧存放到下一个混合快进快退序列单元中; 当抽取的 之前的 16倍速 I帧未填充满预先确定的高倍速快退补偿序列所占比例 时, 不足部分以 0填充。 高倍速快退补偿序列中的 I帧可能存在于多个 混合快进快退序列单元中, 因为某个高倍速 I帧在该混合快进快退序列 单元中是高倍速快退补偿 I帧, 同时又是前一个混合快进快退序列单元 的高倍速快进补偿 I帧。
高倍速快进补偿序列存放 16倍速快进时所使用的 I帧。假设当前混 合快进快退序列单元中, 标准快进快进序列的最后 1个 I帧所对应的原 始媒体文件中的 I帧序号为 Ik, 那么流媒体服务器从 Ik开始对原始媒体 文件进行遍历,找出 Ik之后的用于 16倍速快进的 I帧依次放入混合快进 快退序列单元, 当达到预先确定的高倍速快退补偿序列所占比例时, 停 止存放 Ik之后的 16倍速 I帧, 后续的 Ik之后的 16倍速 I帧存放到下一 个混合快进快退序列单元中;当抽取的 Ik之后的 16倍速 I帧未填充满预 先确定的高倍速快退补偿序列所占比例时, 不足部分以 0填充。 高倍速 快进补偿序列中的 I帧可能存在于多个混合快进快退序列单元中, 因为 某个高倍速 I帧在该混合快进快退序列单元中是高倍速快进补偿 I帧, 同时又是下一个混合快进快退序列单元的高倍速快退补偿 I帧。
混合快进快退序列单元中各个不同部分的比例可以根据对应的各种 快进快退倍速的使用频率选择比例。 对于标准倍速选择 2倍速, 高倍速 补偿高倍速选择 16倍速的情况, 一种较佳的比例为: 标准倍速快进快 退序列占用一半空间、 高倍速快进补偿序列和高倍速快退补偿序列分别 占用 1/4空间。
图 1为本发明实施例的混合快进快退序列单元结构示意图。 假设在 该混合快进快退序列单元中, 标准倍速快进快退序列包括 15至 18四个 I 帧,则从 15开始往前遍历原始媒体文件中的 I帧,选择 16倍速播放时的 I帧, 在这种情况下只有 11 则在当前的高倍速快退序列中保存 11 其余 空间用 0填充, 该序列总共占用 1/4的空间; 从 18开始向后遍历原始媒 体文件中的 I帧, 选择 16倍速播放时需要的 I帧, 在这种情况下包括 19 和 117, 假设这两个 I帧正好占用 1/4空间, 则在高倍速快进序列中填充
¾ 和 Il7。
在上述实现方案中, 同时生成的快进快退索引文件用于定位每一个 视频数据的 I帧在快进快退序列文件中的位置。 较佳的实现方式可以包 括如下步骤:
生成混合快进快退序列单元的索引文件, 该索引文件中包含混合快 进快退序列单元的标识信息、 混合快进快退序列单元在快进快退序列索 引文件中的位置信息、 以及混合快进快退序列单元对应的高倍速快进快 退序列索引的位置信息。 具体可以在该索引文件中记录所有混合快进快 退序列单元的以下信息:
为混合快进快退序列单元设置的标识信息, 如序号; 混合快进快退 序列单元在混合快进快退序列文件中的起始位置、 混合快进快退序列单 元的大小以及混合快进快退序列单元对应的高倍速快进快退序列索引 文件在快进快退序列索引文件中的位置信息。
生成标准倍速快进快退序列索引文件, 该索引文件中包含标准倍速 快进快退序列中每一个 I帧的标识信息, 可以为序号、 在快进快退序列 索引文件中的位置信息。 具体可以在该索引文件中记录: 所有选定的标 准倍速, 如 2倍速, 快进快退 I帧的序号、 所在的混合快进快退序列单 元的序号、在混合快进快退序列单元中的起始位置、 以及该 I帧的大小。
生成每个混合快进快退序列单元的高倍速快进快退序列索引文件, 每个高倍速快进快退序列索引文件中包含对应混合快进快退序列单元 中包含的所有高倍速 I帧的标识信息以及所有高倍速 I帧在快进快退序 列索引文件中的位置信息。 这里所述的高倍速 I帧的标识信息可以为高 倍速 I帧的序号。
由于高倍速 I帧可能出现在多个混合快进快退序列单元中, 所以高 倍速快进快退序列索引以混合快进快退序列单元进行划分。 每个混合快 进快退序列单元都有一个单独的高倍速快进快退序列索引。 从每个混合 快进快退序列单元内挑选出所有高倍速 I帧, 包括标准序列中的高倍速 I帧和补偿序列中的高倍速 I帧, 记录这些 I帧的以下信息: I帧序号、 所在的混合快进快退序列单元的序号、 在混合快进快退序列单元中的起 始位置、 以及 I帧的大小。
图 2为本发明实施例的快进快退播放视频数据的流程图一。 该流程 给出了流媒体服务器从正常播放切换到快进或快退播放的流程, 设定快 进快退播放的倍速为 n倍速, 可以为 2、 4、 8、 16或 32倍速, 设定要 发送的 I帧为 1 帧, Ix帧所在的混合快进快退序列单元的序号为 ux。 该 流程包括如下步骤:
步骤 201 ,确定正常播放时发送的最后一个视频数据 I帧的序号,设 定为 Istart,计算该 1^帧之后或之前的第一个 n倍速 I帧,将其赋值到要 发送的 I帧: Ix帧。
步骤 202, 查找快进快退序列索引文件, 确定 Ix帧所在的混合快进 快退序列单元的序号, 以及该混合快进快退序列单元在快进快退序列文 件中的位置信息。
这里, 混合快进快退序列单元在快进快退序列文件中的位置信息可 以用混合快进快退序列单元在快进快退序列文件中的起始位置信息和 该混合快进快退序列单元的大小表示。
步骤 203, 查找快进快退序列索引文件, 确定 Ix帧在所确定的混合 快进快退序列单元中的位置信息。
这里, Ix帧在所确定的混合快进快退序列单元中的位置信息可以用 Ix帧在所确定的混合快进快退序列单元中的起始位置以及 Ix帧的大小表 示。
步骤 202和步骤 203合并在一起为定位要发送的 ^帧在快进快退序 列文件中的位置信息的步骤。
步骤 204, 根据 Ix帧所在的混合快进快退序列单元的位置将对应的 混合快进快退序列单元读取到緩沖区中; 根据 Ix帧在所确定的混合快进 快退序列单元中的位置和大小, 从緩沖区中定位并读取所述 Ix帧, 发送 给客户端;
步骤 205 , 计算当前已发送的最后一个 I帧之后或之前的第一个 n 倍速 I帧, 将计算所得的 I帧赋值到 Ix帧。
步骤 206, 查找快进快退序列索引文件, 定位 Ix帧所在混合快进快 退序列单元, 如果该单元已被读取到緩沖区中, 则直接从緩沖区中定位 并读取相应的 Ix帧,发送给客户端,返回步骤 205;否则,返回步骤 203。
当图 2所述流程应用到将正常播放切换为预先设定的低倍速快进或 快退播放时, 步骤 206所述查找快进快退序列索引文件为: 查找快进快 退序列索引文件中的标准倍速快进快退序列索引;
当图 2所述流程应用到将正常播放切换为预先设定的高倍速快进或 快退播放时, 步骤 206所述查找快进快退序列索引文件为: 查找快进快 退序列索引文件中的高倍速快进或快退序列索引。
在图 2所示实施例的实现过程中, 一旦流媒体服务器接收到停止或 改变当前播放方式的指令, 则结束当前流程。
当流媒体服务器接收到改变当前播放方式的指令时,如果该指令为: 正常播放流媒体文件, 则流媒体服务器根据当前发送的最后一个 I帧的 序号计算正常播放流媒体文件的开始位置, 根据计算确定的开始位置从 原始媒体文件中获取相应的流媒体数据, 并将获取的流媒体数据发送至 客户端。
图 3为本发明实施例的快进快退播放视频数据的流程图二。 该流程 给出了流媒体服务器从 n倍速快进或快退播放切换到 m倍速快进或快退 播放的流程, n和 m不等。 该流程包括如下步骤:
步骤 301 ,计算切换前发送的最后一个视频数据 I帧的序号,设定为 Istart,计算该 Istart帧之后或之前的第一个 m倍速 I帧,将其赋值到下一个 要发送的 I帧: Ix帧;
步骤 302, 检查当前读取到緩沖区的混合快进快退序列单元中是否 包含 Ix帧, 如果包含, 执行步骤 303; 否则, 转步骤 304。
本步骤的具体实现过程包括: 如果 m为预先设定的低倍速, 则查找 快进快退序列索引文件的标准倍速快进快退索引文件, 定位 Ix帧所在的 混合快进快退序列单元。 定位的方法可以为: 定位 Ix帧所在的混合快进 快退序列单元在快进快退序列文件中的起始位置和大小, 检查该单元是 否与已读取到緩沖区中的单元相同;
如果 m为预先设定的高倍速, 则查找快进快退序列索引文件的高倍 速快进快退索引文件, 获得已读取到緩沖区的混合快进快退序列单元中 所有的高倍速 I帧, 检查其中是否包含 Ix帧。
步骤 303, 从緩沖区中定位并读取 Ix帧对应的视频数据, 发送至客 户端, 之后执行步骤 306。
步骤 304, 查找快进快退序列索引文件, 确定 Ix帧在混合快进快退 序列单元中的起始位置以及 Ix帧的大小。
步骤 305, 根据 Ix帧所在的混合快进快退序列单元的位置将对应的 混合快进快退序列单元读取到緩沖区中; 根据 Ix帧在混合快进快退序列 单元中的起始位置和大小,从緩沖区中定位并读取 Ix帧,发送给客户端; 步骤 306, 计算当前 1 帧之后或之前的第一个 m倍速 I帧, 将其赋 值到 Ix帧, 返回步骤 302。
在图 3所示实施例的实现过程中, 当流媒体服务器接收到改变当前 播放方式的指令, 且该指令为: 正常播放流媒体文件时, 该方法进一步 包括:
流媒体服务器根据当前发送的最后一个 I帧的序号计算正常播放流 媒体文件的开始位置, 根据计算确定的开始位置从原始媒体文件中获取 相应的流媒体数据, 并将获取的流媒体数据发送至客户端。
以下对图 2和图 3所示实施例提供的快进快退播放视频数据方法的 读取效率进行分析, 并与现有技术两种方案的读取效率进行比较。
特定倍速快进快退时视频数据读取效率的衡量标准为: 连续读取 一组 I帧序列,计算当前快进快退倍速下可用的 I帧占整个序列的比例。 为了在各种倍速快进快退时都可以高效地读取视频数据, 取其中的最小 值作为流媒体服务器的快进快退视频数据读取效率。 以系统支持 2、 4、 8、 16和 32快进快退倍速为例进行对比分析。
现有技术的两种方案中, 各种倍速的快进快退视频数据读取效率分 别为: 2倍速: 读取的 I帧序列都可以用于 2倍速快进快退, 因此所占 比例是 100%; 4倍速:读取的 I帧序列的一半可以用于 4倍速快进快退, 因此所占比例是 50%; 8倍速:读取的 I帧序列的 1/4可以用于 8倍速快 进快退, 因此所占比例是 25%; 16倍速: 读取的 I帧序列的 1/8可以用 于 16倍速快进快退, 因此所占比例是 12.5%; 32倍速: 读取的 I帧序列 的 1/16可以用于 32倍速快进快退, 因此所占比例是 6.25%。
其中, 32倍速的读取效率最低, 因此流媒体服务器的快进快退读取 效率为 32倍速的读取效率, 即 6.25 %。
图 2和图 3所示实施例中, 标准快进快退序列为 2倍速快进快退序 列, 占混合快进快退序列单元的 1/2空间; 高倍速快退补偿序列为 16倍 速快退补偿序列, 占混合快进快退序列单元的 1/4空间; 高倍速快进补 偿序列为 16倍速快进补偿序列, 占混合快进快退序列单元的 1/4空间。 在这种情况下, 各个倍速的快进快退视频数据读取效率分别为:
2倍速: 标准快进快退序列都可以用于 2倍速快进快退, 因此所占 比例是 50%;
4倍速: 标准快进快退序列中的一半可以用于 4倍速快进快退, 因 此所占比例是 25%;
8倍速: 标准快进快退序列中的 1/4可以用于 8倍速快进快退, 因 此所占比例是 12.5%;
16倍速: 至少有高倍速快退补偿序列或高倍速快进补偿序列可用, 因此所占比例至少是 25%; 32倍速: 至少有高倍速快退补偿序列或高倍速快进补偿序列中的一 半可用, 因此所占比例是 12.5%;
其中, 8倍速和 32倍速的读取效率最低, 因此本技术方案的流媒体 服务器的快进快退视频数据读取效率为 8倍速或 32倍速的读取效率, 即 12.5%。 因此, 采用图 2和图 3实施例提供的方法进行快进快退播放 视频数据时, 流媒体服务器的快进快退读取效率是现有技术两种方案的 2倍。
本发明实施例提供的第二种利用获取到的视频数据生成快进快退序 列文件及快进快退序列索引文件的实现方案包括:
从原始文件中获取按当前系统支持的各种倍速快进快退播放时, 分 别所需的视频数据;
利用获取到的视频数据生成快进快退序列文件及快进快退序列索引 文件的方法包括:
将接收到的视频数据,按顺序分别生成不同倍速快进快退序列文件, 所有不同倍速快进快退序列文件组成快进快退序列文件;
同时生成不同倍速快进快退序列索引文件, 所有不同倍速快进快退 序列索引文件组成快进快退序列索引文件。
从快进快退序列索引文件中获取满足播放请求的快进快退序列索引 信息的步骤为: 根据接收到的播放请求指定的播放倍速, 从对应倍速快 退快进序列索引文件中获取索弓 )信息;
从快进快退序列文件中获取满足播放请求的视频数据的步骤为: 根 据获取的索引信息, 从对应倍速快进快退序列文件中获取满足接收到的 播放请求的视频数据。
采用第二种实现方案实现由正常播放切换到快进快退播放视频数 据, 或实现不同快进快退倍速之间的切换时, 流程与图 2和图 3所示的 流程的区别仅在于定位要发送的 Ix帧的过程中。 第二种实现方案中, 为 媒体服务器在确定要发送的 Ix帧后, 将根据当前要切换到的倍速查找对 应的快进快退序列索引文件, 定位要发送的 Ix帧在对应倍速的快进快退 序列文件中的位置信息, 可以包括要发送的 Ix帧在对应倍速的快进快退 序列文件中的起始位置信息以及该 Ix帧的大小。
本发明实施例同时提供了一种快进快退播放视频数据的装置, 即流 媒体服务器, 如图 4所示。 该流媒体服务器包括: 流媒体生成器、 存储 单元、 快进快退序列解析器以及快进快退序列生成器。 其中
存储单元, 用于存储原始媒体文件以及快进快退序列文件以及快进 快退序列索引文件;
快进快退序列生成器, 用于从原始媒体文件中获取按不同倍速快进 快退播放时所需的视频数据, 生成快进快退序列文件以及快进快退序列 索引文件;
流媒体生成器, 用于接收来自客户端的快进快退播放请求; 将满足 播放请求的视频数据通过网络发送至客户端;
快进快退序列解析器, 用于从快进快退序列索引文件中获取满足播 放请求的快进快退序列索引信息, 并根据索引信息从快进快退序列文件 中获取满足播放请求的视频数据。
这里, 获取满足播放请求的视频数据的实现方式有多种, 可以为: 快进快退序列解析器通过调用流媒体生成器中的播放请求, 根据该播放 请求实现上述功能, 获取满足播放请求的视频数据; 也可以为: 流媒体 生成器接收到播放请求后, 向快进快退序列解析器发送携带播放请求的 指令, 指令快进快退序列解析器实现上述功能, 获取满足播放请求的视 频数据。 其中, 快进快退序列生成器可以由第一视频数据获取单元和混合快 进快退序列文件生成单元组成。
第一视频数据获取单元, 用于从原始媒体文件中获取按选定的标准 倍速和高倍速补偿倍速快进快退播放分别所需的视频数据;
混合快进快退序列文件生成单元, 用于按顺序将视频数据以选定的 比例混合生成多个设定大小的混合快进快退序列单元, 并生成快进快退 序列索引文件。
或者, 快进快退序列生成器由第二视频数据获取单元和不同倍速快 进快退序列文件生成单元组成。
第二视频数据获取单元, 用于从原始媒体文件中获取按当前系统支 持的各种倍速快进快退播放分别所需的视频数据;
不同倍速快进快退序列文件生成单元, 用于将视频数据按顺序分别 同倍速快进快退的索引文件。
流媒体服务器中的流媒体生成器包括: 快进快退播放请求处理单元 和正常播放请求处理单元, 该流媒体服务器还包括: 媒体解析器。
其中, 快进快退播放请求处理单元, 用于接收来自客户端的快进快 退播放请求; 将接收到的视频数据通过网络发送至客户端。
正常播放请求处理单元, 用于接收来自客户端的正常播放请求; 将 接收到的流媒体数据通过网络发送至客户端。
媒体解析器, 用于根据正常播放请求, 从原始媒体文件中解析获取 流媒体数据, 将获取的流媒体数据发送至正常播放请求处理单元。
流媒体服务器中的媒体解析器包括: 播放位置确定单元和媒体文件 解析单元。
播放位置确定单元, 用于根据正常播放请求, 从快进快退序列解析 器中获取当前最后发送的视频数据的特征信息 , 根据获取的特征信息确 定正常播放的起始位置;
媒体文件解析单元, 用于根据播放位置确定单元确定的正常播放的 起始位置, 从原始媒体文件中解析获取流媒体数据, 将获取的流媒体数 据发送至正常播放请求处理单元。
由以上实施例可见, 利用本发明实施例提供的快进快退播放视频数 据的方法和流媒体服务器, 可以提高流媒体服务器的快进快退播放视频 数据的读取效率。 流媒体服务器的快进快退媒体数据读取效率越高, 意 味着有更多切换前读取的 I 帧可以用于切换后的快进快退视频数据播 放, 因此采用本发明实施例提供的技术方案, 在倍速切换时可以有更多 的已读取数据用于切换后的快进快退播放, 进而更快地将切换后的数据 发送至客户端, 缩短倍速切换的平均响应时间。
媒体文件读取是流媒体服务器的瓶颈之一, 其吞吐率往往决定了流 媒体服务器所能支持的最大并发用户数。 在确定流媒体服务器所能支持 的最大并发用户数时, 必须考虑最坏情况下一个用户所需要占用的资 源, 这样计算出来的并发用户数才是真实的, 否则在满负荷的情况下, 一旦某些用户播放方式发生改变, 需要占用更多的媒体文件读取资源, 很容易导致系统超负荷, 进而影响所有在线用户的体验。
流媒体服务器可以支持的最大并发用户数是衡量服务器性能的重要 减少了高倍速快进快退所需要的媒体文件读取资源, 提升了流服务器可 以支持的并发用户数。 另一方面, 在软硬件配置相同的情况下, 支持的 并发用户数越多, 意味着平均到每用户的流服务器成本也就越低, 因此 本发明实施例提供的方法和装置可以显著降低平均每用户的流服务器 成本。 总之, 以上所述仅为本发明的较佳实施例而已, 并非用于限定本发 明的保护范围。 凡在本发明的精神和原则之内, 所作的任何修改、 等同 替换、 改进等, 均应包含在本发明的保护范围之内。

Claims

权利要求书
1、 一种快进快退播放视频数据的方法, 其特征在于, 该方法包括: 从原始媒体文件中获取按不同倍速快进快退播放所需的视频数据; 利用所述视频数据生成快进快退序列文件和快进快退序列索引文 件;
接收来自客户端的快进快退播放请求, 从所述快进快退序列索引文 件中获取满足所述播放请求的快进快退索弓 )信息;
根据所述索引信息从所述快进快退序列文件中获取满足所述播放请 求的视频数据, 通过网络发送至所述客户端。
2、 如权利要求 1所述的方法, 其特征在于, 所述从原始媒体文件中 获取按不同倍速快进快退播放所需的视频数据包括:
选择至少两种快进快退播放倍速, 其中一种倍速作为标准倍速, 其 余的倍速作为高倍速补偿倍速;
从原始媒体文件中获取按所述选择的倍速快进快退播放分别所需的 视频数据。
3、 如权利要求 2所述的方法, 其特征在于, 所述利用视频数据生成 快进快退序列文件包括: 按顺序将接收到的不同倍速快进快退播放所需 的视频数据, 混合生成多个设定大小的混合快进快退序列单元。
4、 如权利要求 3所述的方法, 其特征在于, 所述生成设定大小的混 合快进快退序列单元为: 生成与读取视频数据的緩沖区大小相等的混合 快进快退序列单元。
5、 如权利要求 3所述的方法, 其特征在于, 所述混合快进快退序列 单元由标准倍速快进快退序列、 至少一种高倍速快退补偿序列和至少一 种高倍速快进补偿序列组成; 所述生成多个设定大小的混合快进快退序列单元包括: 选定所述混 多个设定大小的混合快进快退序列单元。
6、 如权利要求 5所述的方法, 其特征在于, 所述每一种高倍速快进 补偿序列的起始位置由所述标准倍速快进快退序列的结束位置确定; 所述每一种高倍速快退补偿序列的结束位置由所述标准倍速快进快 退序列的起始位置确定。
7、 如权利要求 6所述的方法, 其特征在于, 所述选定混合快进快退 序列单元的各个组成部分所占的比例为:
根据所述各个组成部分对应的快进快退播放倍速的使用频率, 选定
8、 如权利要求 1至 7任一项所述的方法, 其特征在于, 所述生成快 进快退序列索引文件包括:
生成混合快进快退序列单元的索引文件;
生成标准倍速快进快退序列索引文件;
生成每个混合快进快退序列单元的每一种高倍速快进快退序列索引 文件。
9、 如权利要求 1所述的方法, 其特征在于, 所述从原始文件中获取 按不同倍速快进快退播放所需的视频数据为: 从原始文件中获取按当前 系统支持的各种倍速快进快退播放分别所需的视频数据。
10、 如权利要求 9所述的方法, 其特征在于, 所述利用视频数据生 成快进快退序列文件及快进快退序列索引文件为: 同倍速快进快退序列索引文件。
11、 如权利要求 10所述的方法, 其特征在于, 所述获取满足播放请 求的快进快退序列索引信息为: 根据所述接收到的播放请求指定的播放 所述获取满足播放请求的视频数据为: 根据所述索引信息, 从对应 倍速快进快退序列文件中获取满足所述播放请求的视频数据。
12、 如权利要求 1至 7或 9至 11任一项所述的方法, 其特征在于, 当所述播放请求为从正常播放切换为特定倍速快进快退播放时, 所述获 取满足播放请求的视频数据包括:
确定已发送的最后一个 I帧之后或之前的第一个特定倍速 I帧, 将 其作为要发送的 I帧;
如果所述已发送的最后一个 I帧为正常播放的 I帧, 则查找所述快 进快退序列索引文件, 获取定位所述要发送的 I帧的索引信息, 根据获 取的所述索引信息, 从所述快进快退序列文件中定位并读取所述要发送 的 I帧, 发送给客户端;
如果所述已发送的最后一个 I帧为按所述特定倍速快进快退播放的 I 帧, 则确定所述要发送的 I帧是否已被读取到緩沖区中, 如果是, 则从 所述緩沖区中定位并读取相应的要发送的 I帧, 发送给客户端; 否则查 找所述快进快退序列索引文件,获取定位所述要发送的 I帧的索引信息, 根据获取的索引信息, 从所述快进快退序列文件中定位并读取所述要发 送的 I帧, 将其发送给客户端。
13、 如权利要求 12所述的方法, 其特征在于, 当所述流媒体服务器 接收到将初始倍速切换为目标倍速的播放请求时, 所述方法进一步包 括:
确定已发送的最后一个 I帧之后或之前的第一个目标倍速 I帧, 将 其作为要发送的 I帧;
检查当前已读取到緩沖区的视频数据是否包含所述要发送的 I帧, 如果包含, 则从所述緩沖区中定位并读取所述要发送的 I帧, 发送至客 户端; 如果不包含, 则查找所述快进快退索引文件, 获取定位所述要发 送的 I帧的索引信息; 根据获取的定位所述要发送的 I帧的索引信息, 从所述快进快退序列文件中定位读取所述要发送的 I帧,发送给客户端。
14、 如权利要求 13所述的方法, 其特征在于, 所述查找快进快退序 列索引文件, 获取定位所述要发送的 I帧的索引信息为:
查找所述快进快退序列索引文件, 确定所述要发送的 I帧所在的混 合快进快退序列单元的位置信息以及所述要发送的 I帧在所述混合快进 快退序列单元中的位置信息;
所述定位读取要发送的 I帧为: 根据所述要发送的 I帧所在的混合 快进快退序列单元的位置信息, 将所述混合快进快退序列单元读取到緩 沖区中; 根据所述要发送的 I帧在所述混合快进快退序列单元中的位置 信息, 从緩沖区中定位并读取所述要发送的 I帧;
所述确定要发送的 I帧是否已被读取到緩沖区为: 确定所述要发送 的 I帧所在的混合快进快退序列单元是否已被读取到緩沖区中。
15、 如权利要求 14所述的方法, 其特征在于, 当切换到设定的低倍 速快进或快退播放时, 所述确定所述要发送的 I帧所在的混合快进快退 序列单元是否已被读取到緩沖区中为: 查找快进快退序列索引文件中的 标准倍速快进快退序列索引文件, 确定所述要发送的 I帧所在的混合快 进快退序列单元是否已被读取到緩沖区中;
当切换到设定的高倍速快进或快退播放时, 所述确定所述要发送的 I 帧所在的混合快进快退序列单元是否已被读取到緩沖区中为: 查找快 进快退序列索引文件中的高倍速快进快退序列索引文件, 确定所述要发 送的 I帧所在的混合快进快退序列单元是否已被读取到緩沖区中。
16、 一种流媒体服务器, 其特征在于, 该流媒体服务器包括: 流媒 体生成器、 存储单元, 快进快退序列解析器、 快进快退序列生成器, 其 中
所述存储单元, 用于存储原始媒体文件以及快进快退序列文件以及 快进快退序列索引文件;
所述快进快退序列生成器, 用于从所述原始媒体文件中获取按不同 倍速快进快退播放时所需的视频数据, 生成所述快进快退序列文件以及 快进快退序列索引文件;
所述流媒体生成器, 用于接收来自客户端的快进快退播放请求; 将 满足所述播放请求的视频数据通过网络发送至所述客户端;
所述快进快退序列解析器, 用于从所述快进快退序列索引文件中获 取满足所述播放请求的快进快退序列索引信息, 根据所述索引信息从所 述快进快退序列文件中获取满足所述播放请求的视频数据。
17、 如权利要求 16所述的流媒体服务器, 其特征在于, 所述快进快 退序列生成器包括: 第一视频数据获取单元和混合快进快退序列文件生 成单元,
所述第一视频数据获取单元, 用于从所述原始媒体文件中获取按选 定的标准倍速和高倍速补偿倍速快进快退播放分别所需的视频数据; 所述混合快进快退序列文件生成单元, 用于按顺序将所述视频数据 以选定的比例混合生成多个设定大小的混合快进快退序列单元, 生成快 进快退序列索引文件。
18、 如权利要求 16所述的流媒体服务器, 其特征在于, 所述快进快 退序列生成器包括: 第二视频数据获取单元和不同倍速快进快退序列文 件生成单元,
所述第二视频数据获取单元, 用于从所述原始媒体文件中获取按当 前系统支持的各种倍速快进快退播放分别所需的视频数据; 所述不同倍速快进快退序列文件生成单元, 用于将所述视频数据按 顺序分别生成支持不同倍速快进快退的快进快退序列文件, 生成对应的 支持不同倍速快进快退的索引文件。
19、 如权利要求 16所述的流媒体服务器, 其特征在于, 所述流媒体 生成器包括: 快进快退播放请求处理单元和正常播放请求处理单元, 所 述流媒体服务器还包括: 媒体解析器,
所述快进快退播放请求处理单元, 用于接收来自客户端的快进快退 播放请求; 将接收到的视频数据通过网络发送至所述客户端;
所述正常播放请求处理单元, 用于接收来自所述客户端的正常播放 请求; 将接收到的流媒体数据通过网络发送至所述客户端;
所述媒体解析器, 用于根据所述正常播放请求, 从所述原始媒体文 件中解析获取流媒体数据, 将获取的流媒体数据发送至所述正常播放请 求处理单元。
20、 如权利要求 19所述的流媒体服务器, 其特征在于, 所述媒体解 析器包括: 媒体文件解析单元和播放位置确定单元,
所述播放位置确定单元, 用于根据所述正常播放请求, 从所述快进 快退序列解析器中获取当前最后发送的视频数据的特征信息, 根据所述 特征信息确定正常播放的起始位置;
所述媒体文件解析单元, 用于根据所述正常播放的起始位置, 从所 述原始媒体文件中解析获取流媒体数据, 将获取的流媒体数据发送至所 述正常播放请求处理单元。
PCT/CN2007/070685 2007-02-08 2007-09-13 Procédé de lecture avant et arrière rapide de données vidéo et serveur multimédia en flux WO2008095387A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP07801093A EP2031876A4 (en) 2007-02-08 2007-09-13 METHOD FOR QUICK READ AND REAR READING OF VIDEO DATA AND FLOW MULTIMEDIA SERVER
US12/336,372 US8311399B2 (en) 2007-02-08 2008-12-16 Method for fast forward/backward play of video data and a streaming server

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CNB2007100071971A CN100551043C (zh) 2007-02-08 2007-02-08 一种快进快退播放视频数据的方法和流媒体服务器
CN200710007197.1 2007-02-08

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US12/336,372 Continuation US8311399B2 (en) 2007-02-08 2008-12-16 Method for fast forward/backward play of video data and a streaming server

Publications (1)

Publication Number Publication Date
WO2008095387A1 true WO2008095387A1 (fr) 2008-08-14

Family

ID=38727048

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2007/070685 WO2008095387A1 (fr) 2007-02-08 2007-09-13 Procédé de lecture avant et arrière rapide de données vidéo et serveur multimédia en flux

Country Status (4)

Country Link
US (1) US8311399B2 (zh)
EP (1) EP2031876A4 (zh)
CN (1) CN100551043C (zh)
WO (1) WO2008095387A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111931713A (zh) * 2020-09-21 2020-11-13 成都睿沿科技有限公司 一种异常行为检测方法、装置、电子设备及存储介质
CN115442666A (zh) * 2022-08-31 2022-12-06 中通服创立信息科技有限责任公司 一种iptv视频倍速播放方法及系统

Families Citing this family (52)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100551043C (zh) 2007-02-08 2009-10-14 华为技术有限公司 一种快进快退播放视频数据的方法和流媒体服务器
CN101179704B (zh) * 2007-11-23 2010-07-21 华为终端有限公司 一种节目内容定位方法以及节目内容定位装置
JP2009194688A (ja) * 2008-02-15 2009-08-27 Seiko Epson Corp 画像転送装置、画像表示装置、画像表示システム、画像データの転送方法、画像表示方法、およびコンピュータプログラム
KR20100134868A (ko) * 2009-06-16 2010-12-24 삼성전자주식회사 비디오 파일 제공 시스템 및 방법
CN102055717B (zh) * 2009-11-09 2014-08-13 华为技术有限公司 快速播放的方法、终端及服务器
CN102065320B (zh) * 2009-11-12 2012-12-19 三星电子(中国)研发中心 用于处理关于ts码流的特技播放命令的方法和设备
KR101786051B1 (ko) 2009-11-13 2017-10-16 삼성전자 주식회사 데이터 제공 방법 및 장치와 데이터 수신 방법 및 장치
KR101750048B1 (ko) * 2009-11-13 2017-07-03 삼성전자주식회사 변속 재생 서비스 제공 방법 및 장치
KR101750049B1 (ko) 2009-11-13 2017-06-22 삼성전자주식회사 적응적인 스트리밍 방법 및 장치
KR101777347B1 (ko) 2009-11-13 2017-09-11 삼성전자주식회사 부분화에 기초한 적응적인 스트리밍 방법 및 장치
KR101737084B1 (ko) 2009-12-07 2017-05-17 삼성전자주식회사 메인 콘텐트에 다른 콘텐트를 삽입하여 스트리밍하는 방법 및 장치
US9510029B2 (en) 2010-02-11 2016-11-29 Echostar Advanced Technologies L.L.C. Systems and methods to provide trick play during streaming playback
KR101777348B1 (ko) 2010-02-23 2017-09-11 삼성전자주식회사 데이터 전송 방법 및 장치와 데이터 수신 방법 및 장치
KR20110105710A (ko) 2010-03-19 2011-09-27 삼성전자주식회사 복수의 챕터를 포함하는 콘텐트를 적응적으로 스트리밍하는 방법 및 장치
JP5056884B2 (ja) 2010-03-26 2012-10-24 カシオ計算機株式会社 通信装置及び通信制御プログラム
CN101867517B (zh) * 2010-05-31 2013-01-09 国家广播电影电视总局广播科学研究院 基于标引的媒体文件收发方法和装置
KR101837687B1 (ko) 2010-06-04 2018-03-12 삼성전자주식회사 콘텐트의 품질을 결정하는 복수의 인자에 기초한 적응적인 스트리밍 방법 및 장치
US9749676B2 (en) * 2010-06-08 2017-08-29 Microsoft Technology Licensing, Llc Virtual playback speed modification
US8806050B2 (en) * 2010-08-10 2014-08-12 Qualcomm Incorporated Manifest file updates for network streaming of coded multimedia data
US8490099B2 (en) 2010-08-16 2013-07-16 Clear Channel Management Services, Inc. Method and system for controlling a scheduling order per daypart category in a music scheduling system
US10908794B2 (en) 2010-08-16 2021-02-02 Iheartmedia Management Services, Inc. Automated scheduling of multimedia content avoiding adjacency conflicts
US9898499B2 (en) 2010-08-16 2018-02-20 Iheartmedia Management Services, Inc. Multimedia scheduling for airplay with alternate category support
US8418182B2 (en) 2010-08-16 2013-04-09 Clear Channel Managment Services, Inc. Method and system for controlling a scheduling order per category in a music scheduling system
KR101744977B1 (ko) * 2010-10-08 2017-06-08 삼성전자주식회사 멀티미디어 스트리밍 서비스에서 서비스 품질을 보장하는 방법
CN102143384B (zh) * 2010-12-31 2013-01-16 华为技术有限公司 一种媒体文件生成方法、装置及系统
CN102075793A (zh) * 2011-01-06 2011-05-25 深圳市九洲电器有限公司 一种网络流媒体数据发送的方法、系统及流媒体服务器
CN102594773B (zh) * 2011-01-10 2017-03-29 中兴通讯股份有限公司 一种实现数据获取的方法和系统
CN103053170B (zh) * 2011-02-14 2017-03-29 艾科星科技公司 用以在串流重放期间提供特技播放的系统和方法
CN102651756A (zh) * 2011-02-28 2012-08-29 上海未来宽带技术及应用工程研究中心有限公司 基于流式P2P直播技术的RealPlayer播放器系统及播放方法
WO2012167558A1 (zh) * 2011-11-16 2012-12-13 华为技术有限公司 播放媒体文件的方法、终端、服务器和系统
CN103369351A (zh) * 2012-03-29 2013-10-23 深圳市龙视传媒有限公司 一种流媒体快进快退的处理方法、视频服务器及系统
TWI517682B (zh) * 2012-12-28 2016-01-11 晨星半導體股份有限公司 多媒體資料流格式、元數據產生器、編碼及解碼方法與系統
CN103929656B (zh) * 2013-01-15 2017-10-20 晨星软件研发(深圳)有限公司 多媒体数据流格式、元数据产生器、编码及解码方法与系统
CN103942216B (zh) * 2013-01-21 2017-12-29 中国科学院声学研究所 一种基于稀疏解析的索引信息存储、查询方法及存储系统
CN103488529B (zh) * 2013-09-06 2018-03-09 上海骋娱传媒技术有限公司 一种用于视频资源访问控制的方法与设备
CN103581711B (zh) * 2013-10-31 2017-01-11 广州西维尔计算机系统有限公司 快进快退播放视频数据的方法及装置
CN104639951B (zh) * 2013-11-06 2019-05-21 杭州海康威视数字技术股份有限公司 视频码流的抽帧处理方法及装置
CN103686411A (zh) * 2013-12-11 2014-03-26 深圳Tcl新技术有限公司 视频的播放方法及多媒体设备
MX2017006830A (es) * 2014-11-25 2017-11-23 Arris Entpr Llc Detección de rellenador durante parada, pausa, retroceso y avance rápidos (trickplay).
CN105049881A (zh) * 2014-12-03 2015-11-11 武汉市烽视威科技有限公司 基于流媒体服务器实现快进快退播放的方法及系统
CN104394426B (zh) * 2014-12-10 2017-12-26 福建星网锐捷网络有限公司 流媒体倍速播放方法和装置
CN104869430B (zh) * 2015-05-18 2017-12-05 北京中熙正保远程教育技术有限公司 一种视频倍速播放方法及装置
CN104934049B (zh) * 2015-06-24 2018-03-16 深圳市九洲电器有限公司 一种变比特率mp3播放时间获取方法及系统
KR102282463B1 (ko) * 2015-09-08 2021-07-27 한화테크윈 주식회사 이벤트를 보존하는 비디오 축약 방법 및 이를 위한 장치
CN106612462B (zh) * 2015-10-26 2021-02-19 中兴通讯股份有限公司 快进快退的处理方法及终端
CN106453287A (zh) * 2016-09-28 2017-02-22 北京金山安全软件有限公司 一种多媒体数据的传输方法、客户端及服务器
CN107801092A (zh) * 2017-09-15 2018-03-13 青岛海信移动通信技术股份有限公司 一种视频倍速播放方法和装置
CN107743253B (zh) * 2017-11-03 2019-07-19 中广热点云科技有限公司 用于无线网络中的视频传输速率适配方法
US10468064B1 (en) * 2019-03-19 2019-11-05 Lomotif Inc. Systems and methods for efficient media editing
CN111031355B (zh) * 2019-12-25 2021-08-27 湖南快乐阳光互动娱乐传媒有限公司 媒体资源播放处理方法、装置及系统
CN113612981A (zh) * 2021-08-25 2021-11-05 福建天晴数码有限公司 一种基于视频的3d图形实时渲染的方法及其系统
CN114173202A (zh) * 2021-11-23 2022-03-11 武汉市烽视威科技有限公司 基于rtsp协议的连续倍速播放方法及相关设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0812112A2 (en) * 1996-06-05 1997-12-10 Sun Microsystems, Inc. System and method for indexing between trick play and normal play video streams in a video delivery system
US20030165322A1 (en) * 2001-08-20 2003-09-04 Jason Demas System and method for providing personal video recording trick modes
KR20050032899A (ko) * 2003-10-02 2005-04-08 (주)디디오넷 주문형 비디오 시스템에서 고배속 재생 모드 제어 방법
CN1883206A (zh) * 2003-11-18 2006-12-20 皇家飞利浦电子股份有限公司 特技播放信号的再现

Family Cites Families (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5717816A (en) * 1993-01-13 1998-02-10 Hitachi America Ltd. Method and apparatus for the selection of data for use in VTR trick playback operation in a system using intra-coded video frames
US6112226A (en) * 1995-07-14 2000-08-29 Oracle Corporation Method and apparatus for concurrently encoding and tagging digital information for allowing non-sequential access during playback
US5659539A (en) * 1995-07-14 1997-08-19 Oracle Corporation Method and apparatus for frame accurate access of digital audio-visual information
JP2001054066A (ja) 1999-08-11 2001-02-23 Toshiba Corp 復号化装置および画像表示システム並びに画像表示方法
US6760536B1 (en) * 2000-05-16 2004-07-06 International Business Machines Corporation Fast video playback with automatic content based variable speed
US6871006B1 (en) * 2000-06-30 2005-03-22 Emc Corporation Processing of MPEG encoded video for trick mode operation
US7231132B1 (en) * 2000-10-16 2007-06-12 Seachange International, Inc. Trick-mode processing for digital video
US7926080B2 (en) * 2002-11-07 2011-04-12 Microsoft Corporation Trick mode support for VOD with long intra-frame intervals
CN100353450C (zh) 2003-01-10 2007-12-05 华为技术有限公司 一种多媒体数据的处理方法
US7620180B2 (en) * 2003-11-03 2009-11-17 Sony Corporation Preparation of content for multiple conditional access methods in video on demand
JP4118232B2 (ja) * 2003-12-19 2008-07-16 三菱電機株式会社 映像データ処理方法および映像データ処理装置
CN1291598C (zh) 2003-12-31 2006-12-20 清华大学 基于帧内编码图象检索的视频快进快退及恢复常速的方法
CN100382594C (zh) 2004-05-27 2008-04-16 扬智科技股份有限公司 影音信号快进播放方法
US7412149B2 (en) 2004-10-28 2008-08-12 Bitband Technologies, Ltd. Trick mode generation in video streaming
CN1873820A (zh) 2006-05-18 2006-12-06 北京中星微电子有限公司 视频文件处理方法、视频索引方法和视频索引装置
CN100551043C (zh) 2007-02-08 2009-10-14 华为技术有限公司 一种快进快退播放视频数据的方法和流媒体服务器

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0812112A2 (en) * 1996-06-05 1997-12-10 Sun Microsystems, Inc. System and method for indexing between trick play and normal play video streams in a video delivery system
US20030165322A1 (en) * 2001-08-20 2003-09-04 Jason Demas System and method for providing personal video recording trick modes
KR20050032899A (ko) * 2003-10-02 2005-04-08 (주)디디오넷 주문형 비디오 시스템에서 고배속 재생 모드 제어 방법
CN1883206A (zh) * 2003-11-18 2006-12-20 皇家飞利浦电子股份有限公司 特技播放信号的再现

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2031876A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111931713A (zh) * 2020-09-21 2020-11-13 成都睿沿科技有限公司 一种异常行为检测方法、装置、电子设备及存储介质
CN115442666A (zh) * 2022-08-31 2022-12-06 中通服创立信息科技有限责任公司 一种iptv视频倍速播放方法及系统

Also Published As

Publication number Publication date
EP2031876A4 (en) 2009-07-29
CN100551043C (zh) 2009-10-14
US20090097819A1 (en) 2009-04-16
EP2031876A1 (en) 2009-03-04
US8311399B2 (en) 2012-11-13
CN101018323A (zh) 2007-08-15

Similar Documents

Publication Publication Date Title
WO2008095387A1 (fr) Procédé de lecture avant et arrière rapide de données vidéo et serveur multimédia en flux
US11050808B2 (en) Systems and methods for seeking within multimedia content during streaming playback
KR100492567B1 (ko) 이동통신 시스템의 http 기반 비디오 스트리밍 장치및 방법
US7418190B2 (en) Accelerated access to frames from a compressed digital video stream without keyframes
CN107071511B (zh) 提供客户端接收的广播视频流的倒回的方法及计算机系统
JP4313268B2 (ja) ビデオをオン・デマンドでレンダリングするvcrに似た機能
US9077946B2 (en) Streaming content management apparatus and method
JP7078697B2 (ja) トリックプレイ再生の間にオーディオコンテンツを提供するためのシステムおよび方法
JPH07284042A (ja) ビデオ・オン・デマンド・システムにおけるビデオ走査のためのフレーム・サンプリング方式
KR20070020727A (ko) 순차 조각 다운로드 방식을 이용한 의사 스트리밍 다운로드기능을 가지는 단말기 및 그 방법
WO2013053259A1 (zh) 流媒体数据的处理方法、播放方法以及装置
JP2003111048A (ja) コンテンツ再生のためのサーバ及びプログラム
CN104618673A (zh) 一种基于nvr的多路录像同步回放控制方法和装置
US20090136204A1 (en) System and method for remote live pause
CN115442666B (zh) 一种iptv视频倍速播放方法及系统
JP2003046928A (ja) ネットワーク映像再生方法および圧縮映像データ復号再生装置
JP2007267144A (ja) 情報配信方法、サーバ装置およびプログラム
JP5219122B2 (ja) 電子機器
JP2005197839A (ja) トランスポートストリームの特殊再生方法及びトランスポートストリームの記録再生装置
JP2003284025A (ja) マルチメディア情報伝送システム
JP4528022B2 (ja) 映像配信方法およびシステム
CN113132806B (zh) 一种播放终端及其节目播放方法
KR100248894B1 (ko) 대화형 케이블텔레비젼 시스템에 있어서 고속재생모드 제어방법
JP3670581B2 (ja) 映像音声配信装置及び映像音声ファイル解析方法
Venkataram et al. Disk-oriented VCR operations for a multiuser VOD system

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: 07801093

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2007801093

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE