[go: up one dir, main page]

CN101686391A - Video coding/decoding method and device as well as video playing method, device and system - Google Patents

Video coding/decoding method and device as well as video playing method, device and system Download PDF

Info

Publication number
CN101686391A
CN101686391A CN 200810211296 CN200810211296A CN101686391A CN 101686391 A CN101686391 A CN 101686391A CN 200810211296 CN200810211296 CN 200810211296 CN 200810211296 A CN200810211296 A CN 200810211296A CN 101686391 A CN101686391 A CN 101686391A
Authority
CN
China
Prior art keywords
frame
video
current
media server
encoder
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 200810211296
Other languages
Chinese (zh)
Inventor
罗泽文
仇刚
刘启铭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
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 CN 200810211296 priority Critical patent/CN101686391A/en
Priority to PCT/CN2009/072768 priority patent/WO2010031273A1/en
Publication of CN101686391A publication Critical patent/CN101686391A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/162User input
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field
    • 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
    • H04N21/234345Processing 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 the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4383Accessing a communication channel
    • H04N21/4384Accessing a communication channel involving operations to reduce the access time, e.g. fast-tuning for reducing channel switching latency
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明实施例公开了一种视频编码/解码方法、装置与视频播放方法、装置及系统,涉及通讯技术领域。为了解决现有技术中同一直播频道,由于用户接入的时刻不同并且当前的接入帧不是I帧,流媒体服务器总是根据缓存区中与用户当前接入帧最近的I帧,开始给用户发送数据,从而造成相同的时间,不同时刻接入的用户看到的节目不同,使得用户观看到的节目与实时播放的节目之间产生的时延问题而发明。本发明实施例提供了一种视频编码方法,该方法,包括:编码器将源图像进行帧间编码为P帧;将所述源图像进行帧内编码,获取与P帧相对应的I帧;将所述与P帧相对应的I帧存储在编码器的缓存中。采用本发明可以使得接入用户可以实时观看直播节目。

The embodiment of the invention discloses a video encoding/decoding method and device, and a video playing method, device and system, and relates to the technical field of communication. In order to solve the problem of the same live channel in the prior art, since the user accesses at different times and the current access frame is not an I frame, the streaming media server always starts to send the user an I frame according to the I frame closest to the user's current access frame in the buffer area. Sending data, resulting in the same time, users who access at different times see different programs, so that the time delay between the programs that users watch and the programs that are played in real time is invented. An embodiment of the present invention provides a video encoding method, the method comprising: an encoder performs inter-frame encoding on a source image into a P frame; performs intra-frame encoding on the source image, and obtains an I frame corresponding to the P frame; The I-frame corresponding to the P-frame is stored in the buffer of the encoder. Adoption of the present invention can enable access users to watch live programs in real time.

Description

视频编码/解码方法、装置与视频播放方法、装置及系统 Video encoding/decoding method, device and video playback method, device and system

技术领域 technical field

本发明涉及通讯技术领域,尤其涉及视频编解码技术。The invention relates to the field of communication technology, in particular to video codec technology.

背景技术 Background technique

由于直播数据的实时性,要求用户不管何时接入,只要观看同一个频道,所观看的节目都是一样,实际上就是要求各个客户端几乎同时接收到同样的媒体数据。流媒体一般采用诸如“IPPPPPPPPI”的图像序列来传输,其中,所述双引号的字符串中,I表示I帧,P表示P帧。由于P帧必须依据I帧才能解码,如果用户接入时,不是在发I帧的时刻接入,即客户端收到的第一个数据就不是I帧,客户端就无法解码,直到收到下一个I帧。这样,从用户切换时刻到下一个I帧到来之前的一小段时间必然出现严重的花屏或黑屏。实际上,不仅仅是接入时刻有此问题,码率切换、频道切换、插播广告等等场景都存在类似的问题。为了消除接入/切换/插播等场景时的花屏或黑屏现象,就要求服务端在用户接入/切换/插播时,首先发送I帧数据。Due to the real-time nature of live broadcast data, users are required to watch the same channel no matter when they access it, and the programs they watch are the same. In fact, each client is required to receive the same media data almost at the same time. Streaming media is generally transmitted using an image sequence such as "IPPPPPPPPI", wherein, in the string of double quotes, I represents an I frame, and P represents a P frame. Because the P frame must be decoded according to the I frame, if the user does not access when the I frame is sent, that is, the first data received by the client is not an I frame, and the client cannot decode it until it receives the I frame. next I-frame. In this way, a serious blurred screen or black screen will inevitably appear in a short period of time from the moment when the user switches to the arrival of the next I frame. In fact, this problem is not only encountered at the time of access, but also in scenarios such as bit rate switching, channel switching, and advertisement insertion. In order to eliminate the blurry or black screen phenomenon when accessing/switching/inserting scenes, the server is required to send I-frame data first when the user accesses/switches/inserts.

在实现本发明的过程中,发明人发现现有技术中至少存在如下问题:In the process of realizing the present invention, the inventor finds that there are at least the following problems in the prior art:

在流媒体服务器中,针对每个直播频道,开创一个缓存区,该缓存区缓存至少两个I帧之间的数据,即要求缓存区至少有一个完整的I帧数据,其他的P帧与B帧数据也要缓存起来,当用户接入并且当前帧不是I帧时如图1中所示,从缓存数据中找到最近的I帧数据,从此I帧数据开始为该用户提供服务。这样,使得同一直播频道,由于所述的用户接入帧不是I帧,流媒体服务器总是根据缓存区中与用户当前接入帧最近的I帧,开始给用户发送数据,从而造成相同的时间,不同的用户看到的节目不同,不能实时观看当前的直播节目,有一定的时延。因为用户接入时,当前帧不是I帧,用户收看到的节目总是从缓存区中与接入用户帧最近的I帧播放的节目。In the streaming media server, for each live channel, a buffer area is created, which buffers data between at least two I frames, that is, the buffer area is required to have at least one complete I frame data, and other P frames and B The frame data also needs to be cached. When the user accesses and the current frame is not an I frame, as shown in Figure 1, the latest I frame data is found from the cache data, and the I frame data starts to provide services for the user. In this way, for the same live channel, since the user access frame is not an I frame, the streaming media server always starts to send data to the user according to the I frame closest to the user's current access frame in the buffer area, thereby causing the same time , Different users see different programs, and cannot watch the current live program in real time, and there is a certain delay. Because when the user accesses, the current frame is not an I frame, and the program that the user watches is always the program played from the I frame closest to the access user frame in the buffer area.

在流媒体服务器中,针对每个直播频道,可以缓存最近一个完整的I帧数据,后续每收到一个完整的新I帧数据,实时更新。当有新用户接入进来并且当前帧不是I帧时,PSS(Packet-switched Streaming Server,分组域流媒体服务器)先给该用户发送缓存好的I帧数据,然后接着发送当前帧,所述的当前帧是P帧或者B帧。如图1所示,即PSS先把I0帧数据发送完毕后,就接着P4帧数据继续提供服务。但是,在发送缓存区I帧后就发送当前帧,相当于丢掉了隔在最近I帧到当前帧的P帧或B帧间的帧数据,如图1所示,就是相当于丢掉了P2、P2、P3帧的数据。因此,初始接入时不可避免的出现图像模糊或马赛克现象。In the streaming media server, for each live channel, the latest complete I-frame data can be cached, and updated in real time each time a complete new I-frame data is received. When a new user comes in and the current frame is not an I frame, PSS (Packet-switched Streaming Server, packet domain streaming server) sends the cached I frame data to the user first, and then sends the current frame, the described The current frame is a P frame or a B frame. As shown in Figure 1, that is, after the PSS sends the I0 frame data first, it continues to provide services following the P4 frame data. However, sending the current frame after sending the I frame in the buffer area is equivalent to losing the frame data between the P frame or the B frame of the recent I frame to the current frame, as shown in Figure 1, which is equivalent to losing P2, Data of P2 and P3 frames. Therefore, image blurring or mosaic phenomenon inevitably occurs during the initial access.

发明内容 Contents of the invention

为了解决现有技术中,同一直播频道,由于用户接入时当前的接入帧不是I帧,而流媒体服务器总是根据缓存区中与用户当前接入帧最近的I帧,开始给用户发送数据,从而造成相同的时间,不同时刻接入的用户看到的节目不同,使得用户观看到的节目与实时播放的节目之间产生的时延问题,本发明的实施例提供了一种视频编解码方法、装置与视频播放方法、装置及系统以解决的时延问题。In order to solve the problem in the prior art, since the current access frame is not an I frame when the user accesses the same live channel, the streaming media server always starts to send the I frame to the user according to the I frame closest to the user's current access frame in the buffer area. data, resulting in different programs seen by users accessing at different times at the same time, causing delay problems between the programs watched by users and the programs played in real time. Embodiments of the present invention provide a video editing Decoding method, device and video playing method, device and system to solve time delay problem.

在实现本发明的技术方案中,本发明的实施例提供了一种视频编码方法,该方法,包括:In realizing the technical solution of the present invention, an embodiment of the present invention provides a video coding method, the method including:

编码器将源图像进行帧间编码为P帧;The encoder inter-codes the source image into a P frame;

将所述源图像进行帧内编码,获取与P帧相对应的I帧;Intra-coding the source image to obtain an I frame corresponding to a P frame;

将所述与P帧相对应的I帧存储在编码器的缓存中。The I-frame corresponding to the P-frame is stored in the buffer of the encoder.

在实现本发明的技术方案中,本发明实施例提供了一种视频解码方法,该方法,包括:In realizing the technical solution of the present invention, an embodiment of the present invention provides a video decoding method, the method including:

接收流媒体服务器转发的视频帧;Receive the video frame forwarded by the streaming media server;

若接收的视频帧为P帧时,获取与当前P帧相对应的I帧,参考所述与当前P帧相对应的I帧进行解码。If the received video frame is a P frame, the I frame corresponding to the current P frame is obtained, and decoding is performed with reference to the I frame corresponding to the current P frame.

在实现本发明的技术方案中,本发明实施例提供了一种视频播放方法,该方法,包括:In realizing the technical solution of the present invention, the embodiment of the present invention provides a video playback method, the method including:

若接收的视频帧为P帧时,流媒体服务器发送获取所述P帧对应的I帧请求消息;If the received video frame is a P frame, the streaming media server sends an I frame request message corresponding to the P frame;

流媒体服务器接收I帧,所述I帧为编码器设备根据所述的获取I帧请求将所述P帧所对应的源图像进行帧内编码所获取的;The streaming media server receives the I frame, and the I frame is obtained by the encoder device by intra-coding the source image corresponding to the P frame according to the request for obtaining the I frame;

流媒体服务器将所述I帧转发给客户端设备,以便所述客户端设备根据所述I帧对接收的所述I帧对应的视频P帧进行解码播放。The streaming media server forwards the I frame to the client device, so that the client device decodes and plays the video P frame corresponding to the received I frame according to the I frame.

在实现本发明的技术方案中,本发明实施例还提供一种视频编码装置,该装置,包括:In realizing the technical solution of the present invention, the embodiment of the present invention also provides a video coding device, the device including:

编码单元:用于在编码器将源图像进行帧间编码为P帧时,将所述源图像进行帧内编码,获取与P帧相对应的I帧;Encoding unit: used to perform intra-frame encoding on the source image when the encoder performs inter-frame encoding of the source image into a P frame, and obtain an I frame corresponding to the P frame;

缓存单元:用于将所述与P帧相对应的I帧存储在编码器的缓存中。A cache unit: used to store the I frame corresponding to the P frame in the cache of the encoder.

在实现本发明的技术方案中,本发明实施例还提供一种视频解码装置,该装置,包括:In realizing the technical solution of the present invention, the embodiment of the present invention also provides a video decoding device, which includes:

接收单元,用于接收流媒体服务器转发的视频帧;The receiving unit is used to receive the video frame forwarded by the streaming media server;

解码单元,用于若接收的视频帧是P帧时,获取与当前P帧相对应的I帧,参考所述与当前P帧相对应的I帧进行解码。The decoding unit is configured to obtain an I frame corresponding to the current P frame if the received video frame is a P frame, and decode with reference to the I frame corresponding to the current P frame.

在实现本发明的技术方案中,本发明实施例还提供一种视频播放装置,该装置,包括:In realizing the technical solution of the present invention, the embodiment of the present invention also provides a video playback device, which includes:

信息发送单元:用于若接收的视频帧为P帧时,流媒体服务器发送获取所述P帧对应的I帧请求消息;Information sending unit: for if the received video frame is a P frame, the streaming media server sends an I frame request message corresponding to the P frame;

信息接收单元:用于流媒体服务器接收I帧,所述I帧为编码器设备根据所述的获取I帧请求将所述P帧所对应的源图像进行帧内编码所获取的;还用于通过消息通道,流媒体服务器接收所述获取I帧的响应消息;The information receiving unit: used for the streaming media server to receive the I frame, the I frame is obtained by the encoder device by intra-coding the source image corresponding to the P frame according to the request for obtaining the I frame; it is also used for Through the message channel, the streaming media server receives the response message for obtaining the I frame;

信息转发单元:用于流媒体服务器将所述I帧转发给客户端设备,以便所述客户端设备根据所述I帧对接收的所述I帧对应的视频P帧进行解码播放。An information forwarding unit: used for the streaming media server to forward the I frame to the client device, so that the client device decodes and plays the video P frame corresponding to the received I frame according to the I frame.

在实现本发明的技术方案中,本发明实施例还提供一种视频播放系统,该系统,包括:In realizing the technical solution of the present invention, the embodiment of the present invention also provides a video playback system, the system including:

请求接收单元,用于若接收的视频帧为P帧时,编码器设备接收流媒体服务器发送的获取所述P帧对应的I帧请求消息;The request receiving unit is used for if the received video frame is a P frame, the encoder device receives the I frame request message sent by the streaming media server to obtain the corresponding I frame of the P frame;

信息获取单元,用于编码器设备根据所述的获取I帧请求消息,将所述当前P帧所对应的源图像进行帧内编码,获取与当前P帧相对应的I帧;The information acquisition unit is used for the encoder device to perform intra-frame encoding on the source image corresponding to the current P frame according to the acquisition I frame request message, and acquire the I frame corresponding to the current P frame;

信息下发单元,用于编码器设备将所述I帧下发给所述的流媒体服务器;通过消息通道,下发所述获取I帧的响应消息给流媒体服务器;通过临时通道,下发所述I帧给流媒体服务器下发;The information sending unit is used for the encoder device to send the I frame to the streaming media server; through the message channel, sending the response message for obtaining the I frame to the streaming media server; through the temporary channel, sending The I frame is issued to the streaming media server;

转发单元,用于流媒体服务器将所述I帧转发给客户端设备;A forwarding unit, configured for the streaming media server to forward the I frame to the client device;

解码播放单元,客户端设备根据所述I帧对接收的所述I帧对应的视频P帧进行解码播放。The decoding and playing unit, the client device decodes and plays the video P frame corresponding to the received I frame according to the I frame.

本发明实施例提供的视频播放方法、装置及系统与视频编码/解码方法、装置,通过在编码器侧将源图像进行帧间编码为P帧时,在进行P帧编码的同时进行P帧相应I帧的编码,并将其存储在编码器的缓存中以备后用;当分组域流媒体服务器判断当前接入帧不是I帧,发起获取I帧请求,编码器设备将根据所述请求获取I帧并将所述I帧通过分组域流媒体服务器转发给客户端设备,从而使得客户端设备可以根据所述I帧对当前接入的P帧进行解码,从而使得用户接入、切换/插播时,可以实时清晰的收看到图像;本发明根据所述的I帧进行解码,可以使得不同时刻接入的用户,直接获得与当前接入P帧相对应的I帧进行直播,从而不但减小了直播频道的播放延时,而且还可以清晰的将P帧进行解码,改善了解码图像的清晰度。The video playback method, device and system provided by the embodiments of the present invention and the video encoding/decoding method and device, when the source image is inter-frame encoded into a P frame on the encoder side, the P frame is encoded while the P frame is corresponding Encoding of the I frame, and storing it in the cache of the encoder for later use; when the packet domain streaming server judges that the current access frame is not an I frame, it initiates a request to obtain the I frame, and the encoder device will obtain the frame according to the request I frame and forward the I frame to the client device through the packet domain streaming media server, so that the client device can decode the currently accessed P frame according to the I frame, so that the user accesses, switches/inserts , the image can be watched clearly in real time; the present invention decodes according to the I frame, so that users who access at different times can directly obtain the I frame corresponding to the current access P frame for live broadcast, thereby not only reducing the It reduces the playback delay of the live channel, and can also clearly decode the P frame, improving the clarity of the decoded image.

附图说明 Description of drawings

图1为现有技术中从用户接入点播放帧的示意图;FIG. 1 is a schematic diagram of playing a frame from a user access point in the prior art;

图2为本发明实施例提供的一种视频编码方法流程图;FIG. 2 is a flowchart of a video encoding method provided by an embodiment of the present invention;

图3为本发明实施例提供的一种视频解码方法流程图;FIG. 3 is a flowchart of a video decoding method provided by an embodiment of the present invention;

图4为本发明实施例提供的一种视频播放方法流程图;FIG. 4 is a flowchart of a video playback method provided by an embodiment of the present invention;

图5为本发明实施例提供的当用户接入时,实现视频播放方法的处理流程图;Fig. 5 is a processing flowchart for implementing a video playback method when a user accesses according to an embodiment of the present invention;

图6为本发明实施例提供的一种视频编码装置结构示意图;FIG. 6 is a schematic structural diagram of a video encoding device provided by an embodiment of the present invention;

图7为本发明实施例提供的一种视频解码装置结构示意图;FIG. 7 is a schematic structural diagram of a video decoding device provided by an embodiment of the present invention;

图8为本发明实施例提供的一种视频播放装置结构示意图;FIG. 8 is a schematic structural diagram of a video playback device provided by an embodiment of the present invention;

图9为本发明实施例提供的一种视频播放系统结构示意图;FIG. 9 is a schematic structural diagram of a video playback system provided by an embodiment of the present invention;

图10为本发明实施例提供的消息通道中数据体的结构示意图;FIG. 10 is a schematic structural diagram of a data body in a message channel provided by an embodiment of the present invention;

图11为本发明实施例提供的一种视频编码方法的原理图。FIG. 11 is a schematic diagram of a video coding method provided by an embodiment of the present invention.

具体实施方式 Detailed ways

下面结合附图对本发明实施例提供的一种视频编码/解码方法、装置及视频播放方法、装置进行详细描述。A video encoding/decoding method and device, and a video playing method and device provided in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

如图2所示,本发明实施例提供的一种视频编码方法,在实现本发明实施例的过程中,该方法,包括:As shown in Figure 2, a video encoding method provided by an embodiment of the present invention, in the process of implementing the embodiment of the present invention, the method includes:

201:编码器将源图像进行帧间编码为P帧;201: The encoder performs inter-frame encoding of the source image into a P frame;

202:将所述源图像进行帧内编码,获取与P帧相对应的I帧;202: Perform intra-frame encoding on the source image to obtain an I frame corresponding to a P frame;

203:将所述与P帧相对应的I帧存储在编码器的缓存中。203: Store the I frame corresponding to the P frame in the cache of the encoder.

其中,在该实施例中,所述的步骤202分别可以有三种不同的编码方法:Wherein, in this embodiment, the step 202 can have three different encoding methods respectively:

第一种合成I帧的编码方法为:The first encoding method for synthesizing I frames is:

获取当前P帧的参考帧的原始图像;Obtain the original image of the reference frame of the current P frame;

将所述当前P帧的参考帧的原始图像作为源图像,进行帧内编码,获取与P帧相对应的I帧。The original image of the reference frame of the current P frame is used as a source image, and intra-frame encoding is performed to obtain an I frame corresponding to the P frame.

第二种合成I帧的编码方法为:The second encoding method for synthesizing I frames is:

获取当前P帧的参考帧的重构图像;Obtain the reconstructed image of the reference frame of the current P frame;

将所述当前P帧参考帧的重构图像作为源图像,进行帧内编码,获取与P帧相对应的I帧。Using the reconstructed image of the reference frame of the current P frame as a source image, perform intra-frame encoding to obtain an I frame corresponding to the P frame.

第三种合成I帧的编码方法为:The third encoding method for synthesizing I frames is:

获取当前P帧的至少两幅参考帧的源图像合成的图像;Obtain an image synthesized from source images of at least two reference frames of the current P frame;

将所述当前P帧的至少两幅参考帧的原始图像合成的图像作为源图像,进行帧内编码,获取与P帧相对应的I帧。An image synthesized from original images of at least two reference frames of the current P frame is used as a source image, and intra-frame coding is performed to obtain an I frame corresponding to the P frame.

进一步地,在该实施例中,所述的步骤203可以包括:Further, in this embodiment, the step 203 may include:

根据编码器的当前编码帧与分组域流媒体服务器的当前转发帧设置编码器缓存的大小;Set the size of the encoder cache according to the current encoding frame of the encoder and the current forwarding frame of the packet domain streaming server;

将所述与P帧相对应的I帧,根据所述编码器缓存的大小进行实时更新存储。The I frame corresponding to the P frame is updated and stored in real time according to the size of the encoder cache.

如图3所示,本发明实施例提供的一种视频解码方法,在实现本发明实施例的过程中,该方法,包括:As shown in Figure 3, a video decoding method provided by an embodiment of the present invention, in the process of implementing the embodiment of the present invention, the method includes:

301:接收流媒体服务器转发的视频帧;301: Receive the video frame forwarded by the streaming media server;

302:若接收的视频帧为P帧时,获取与当前P帧相对应的I帧,参考所述与当前P帧相对应的I帧进行解码。其中,若接收的视频帧是P帧时,获取与当前P帧相对应的I帧,参考所述与当前P帧相对应的I帧进行解码的步骤,包括:302: If the received video frame is a P frame, acquire an I frame corresponding to the current P frame, and decode with reference to the I frame corresponding to the current P frame. Wherein, if the received video frame is a P frame, the I frame corresponding to the current P frame is obtained, and the step of decoding with reference to the I frame corresponding to the current P frame includes:

根据接收到的视频帧,判断当前接收的视频帧为P帧;According to the received video frame, it is judged that the currently received video frame is a P frame;

获取与当前P帧相对应的I帧,参考所述与当前P帧相对应的I帧进行解码。Obtain an I frame corresponding to the current P frame, and decode with reference to the I frame corresponding to the current P frame.

本发明实施例提供的视频编码/解码方法,通过编码器将源图像进行帧间编码为P帧的同时,将源图像进行帧内编码,获取与P帧相对应的I帧并将其缓存在编码器中,使得用户在接入为P帧时,可以实时获取与P帧相对应的I帧进行解码,从而用户可以无时延的观看直播频道的节目。In the video encoding/decoding method provided by the embodiment of the present invention, the source image is inter-coded into a P frame by the encoder, and at the same time, the source image is intra-coded, and the I frame corresponding to the P frame is obtained and cached in In the encoder, when the access is a P frame, the user can obtain the I frame corresponding to the P frame in real time for decoding, so that the user can watch the program of the live channel without delay.

如图4所示,本发明实施例提供了一种视频播放方法,该方法,包括:As shown in Figure 4, the embodiment of the present invention provides a video playback method, the method, including:

401:若接收的视频帧为P帧时,流媒体服务器发送获取所述P帧对应的I帧请求消息;401: If the received video frame is a P frame, the streaming media server sends an I frame request message corresponding to the P frame;

402:流媒体服务器接收I帧,所述I帧为编码器设备根据所述的获取I帧请求将所述P帧所对应的源图像进行帧内编码所获取的;即通过消息通道,流媒体服务器接收所述获取I帧的响应消息;通过临时通道,流媒体服务器接收所述I帧。402: The streaming media server receives an I frame, and the I frame is obtained by the encoder device by intra-coding the source image corresponding to the P frame according to the request for obtaining the I frame; that is, through the message channel, the streaming media The server receives the response message for acquiring the I frame; the streaming media server receives the I frame through the temporary channel.

403:流媒体服务器将所述I帧转发给客户端设备,以便所述客户端设备根据所述I帧对接收的所述I帧对应的视频P帧进行解码播放。403: The streaming media server forwards the I frame to the client device, so that the client device decodes and plays the video P frame corresponding to the received I frame according to the I frame.

其中,所述请求消息中至少携带直播频道ID、当前帧ID、临时通道的接收端口和命令指示值;所述响应消息中至少携带直播频道ID、当前帧ID、临时通道的接收端口和命令指示值。Wherein, the request message at least carries the live channel ID, the current frame ID, the receiving port of the temporary channel and the command indication value; the response message carries at least the live channel ID, the current frame ID, the receiving port of the temporary channel and the command indication value.

如图5所示,本发明实施例提供的当用户接入时,实现视频播放方法的处理流程图;在实现本发明实施例的过程中,具体的步骤如下:As shown in FIG. 5 , the embodiment of the present invention provides a processing flowchart for implementing a video playback method when the user accesses; in the process of realizing the embodiment of the present invention, the specific steps are as follows:

501、客户端设备根据用户需要发出点播请求;501. The client device sends an on-demand request according to user needs;

502、PSS点播接收到点播请求后回复请求响应;502. PSS on-demand responds to the request after receiving the on-demand request;

503、PSS判断当前帧是否是I帧,如果是I帧,直接进入第508步;如果不是I帧,直接进行步骤504;503, PSS judges whether the current frame is an I frame, if it is an I frame, directly enters step 508; if not an I frame, directly proceeds to step 504;

504、PSS发送请求当前帧的I帧;其中,所述的请求当前帧的I帧的请求消息可以通过消息通过发送给编码器设备。504. The PSS sends an I frame requesting the current frame; wherein, the request message requesting the I frame of the current frame may be sent to the encoder device through a message.

505、编码器设备根据接收的获取当前帧的I帧的请求,进行I帧合成处理;本发明实施可以通过如上所述的视频编码方法进行合成I帧处理:505. The encoder device performs I frame synthesis processing according to the received request for obtaining the I frame of the current frame; the implementation of the present invention can perform synthesis I frame processing through the video encoding method as described above:

在实现本发明实施例中获取合成I帧的过程中,以图1所示的接入用户播放帧的过程为例,本发明实施例的在对I0、P1、P2、P3、P4、P5、P6、P7、P8、I9帧进行编码的过程如图11所示。如果Fn将要编码为P帧,除了执行1和2的正常流程将Fn的源图像编码为P帧之外,还需要执行3流程,通过流程3进行帧内编码生成一个与该Fn的源图像相对应的I帧,将所述的I帧存储在如图7中的In中;如果Fn将要编码为I帧时,In与输出到NAL的数据都一样;如果Fn将要编码为B帧时,由于B帧不会被别的帧参考,也就是说Fn肯定不会被后续帧参考,也就没有必要生成Fn对应的I帧数据。其中,所述的Fn可以是当前帧的参考帧的源图像,也可以是当前帧的参考帧的重构图像,还可以是将当前帧的多个参考帧合成的一幅图像。In the process of obtaining and synthesizing I frames in the embodiment of the present invention, take the process of accessing the user's play frame shown in Figure 1 as an example, in the embodiment of the present invention for I0, P1, P2, P3, P4, P5, The encoding process of P6, P7, P8, and I9 frames is shown in FIG. 11 . If Fn is to be encoded as a P frame, in addition to performing the normal processes of 1 and 2 to encode the source image of Fn into a P frame, it is also necessary to perform 3 processes, and perform intra-frame encoding through process 3 to generate an image corresponding to the source image of the Fn. Corresponding I frame, described I frame is stored in among the In such as Fig. 7; If Fn will be encoded as I frame, In is all the same with the data output to NAL; If Fn will be encoded as B frame, because The B frame will not be referenced by other frames, which means that Fn will definitely not be referenced by subsequent frames, and there is no need to generate I frame data corresponding to Fn. Wherein, the Fn may be the source image of the reference frame of the current frame, or the reconstructed image of the reference frame of the current frame, or an image synthesized from multiple reference frames of the current frame.

506、编码器设备响应PSS的请求,将所述合成I帧的响应消息通过消息通道通知分组域流媒体服务器;506. The encoder device responds to the request of the PSS, and notifies the packet domain streaming media server of the response message of the synthesized I frame through the message channel;

其中,所述通过消息通道传送的请求消息和响应消息的数据体结构可以如图10所示,本发明实施例以基于TCP协议的消息通道为例,由于编码器设备Encoder一般支持多个频道,根据频道ID就能唯一识别出一个直播频道,有时候频道ID可能填写直播频道的组播IP;命令指示值含义如下:01表示PSS向Encoder请求当前帧对应的合成I帧,02表示Encoder响应PSS的请求。该数据体结构的具体使用办法为:当PSS需要请求某P帧的合成I帧时,首先,按上述数据体结构构造一条数据,并与Encoder建立短TCP连接即获取到合成I帧数据就断开;然后,使用TCP协议把上述构造好的数据传输到Encoder上。当Encoder接收到PSS请求后,按规定的合成I帧方法合成I帧后,首先,按上述数据体结构构造一条数据,并将该数据通过消息通道响应PSS的请求,然后通过临时通道把合成I帧数据发送到数据体结构中指定的端口中,这样整个传输交互过程就完成了。Wherein, the data body structure of the request message and the response message transmitted through the message channel may be as shown in FIG. A live channel can be uniquely identified according to the channel ID. Sometimes the channel ID may fill in the multicast IP of the live channel; the meaning of the command indication value is as follows: 01 means that the PSS requests the Encoder for the synthesized I frame corresponding to the current frame, and 02 means that the Encoder responds to the PSS request. The specific usage method of this data body structure is: when PSS needs to request the synthesized I frame of a certain P frame, first, construct a piece of data according to the above data body structure, and establish a short TCP connection with the Encoder to obtain the synthesized I frame data and then disconnect Open; then, use the TCP protocol to transmit the above constructed data to the Encoder. After the Encoder receives the PSS request, after synthesizing the I frame according to the specified method of synthesizing the I frame, first, construct a piece of data according to the above data body structure, and respond the data to the PSS request through the message channel, and then synthesize the I frame through the temporary channel The frame data is sent to the port specified in the data body structure, so that the entire transmission interaction process is completed.

507、编码器设备通过临时通道发送I帧的数据;将所述I帧通过临时通道向分组域流媒体服务器下发。507. The encoder device sends the data of the I frame through the temporary channel; and delivers the I frame to the packet-domain streaming media server through the temporary channel.

所述请求消息与响应消息中至少携带直播频道ID、当前帧ID、临时通道的接收端口和命令指示值;所述消息通道至少基于TCP(Transfer ControlProtocol,传输控制协议)、UDP(User Datagram Protocol,用户数据报协议)中的一种;所述临时通道基于RTP(Real-time Transport Protocol,实时传输协议)。The request message and the response message at least carry the receiving port of the live channel ID, the current frame ID, the temporary channel and the command indication value; the message channel is at least based on TCP (Transfer Control Protocol, Transmission Control Protocol), UDP (User Datagram Protocol, User Datagram Protocol); the temporary channel is based on RTP (Real-time Transport Protocol, real-time transport protocol).

508、PSS发送I帧的数据;508. The PSS sends the data of the I frame;

509、PSS后续按照普通直播流程发送正常的直播流。509. The PSS subsequently sends a normal live stream according to a common live broadcast process.

进一步讲,根据分组域流媒体服务器转发的帧,客户端设备判断当前接收帧是否为I帧;Further speaking, according to the frame forwarded by the packet domain streaming media server, the client device judges whether the current received frame is an I frame;

如果当前接收帧是I帧,就直接播放I帧,如果当前帧不是I帧,并且其参考帧不存在,就获取与当前P帧相对应的I帧进行解码。其中,上述提到的第三种合成I帧的方式,所述合成I帧的过程,改变了当前帧的参考帧的参考关系。例如:某Pn帧的参考帧Pi、Pj、Pk帧,由于Pi、Pj、Pk被合成了I帧,帧的序号只能保留一个,因此Pn的某些宏块就无法根据报文指示的帧序号来找到参考帧,从而就无法解码,所以就可以根据本发明实施中提到的合成I帧对当前帧进行解码。还有一种最常见的情况是,由于无线网络的不稳定性,极有可能出现丢包,假设丢了Pn的参考帧Pi,后续的P帧直到下一个I帧到达之前就不能解码,这种情况,也可以根据本发明的实施例获取I帧,从而对当前帧进行解码。If the currently received frame is an I frame, the I frame is played directly; if the current frame is not an I frame, and its reference frame does not exist, the I frame corresponding to the current P frame is obtained for decoding. Wherein, in the above-mentioned third way of synthesizing the I frame, the process of synthesizing the I frame changes the reference relationship of the reference frame of the current frame. For example: the reference frames Pi, Pj, and Pk of a certain Pn frame, because Pi, Pj, and Pk are synthesized into an I frame, only one sequence number of the frame can be reserved, so some macroblocks of Pn cannot be processed according to the frame indicated by the message. No. to find the reference frame, so that it cannot be decoded, so the current frame can be decoded according to the synthetic I frame mentioned in the implementation of the present invention. Another most common situation is that due to the instability of the wireless network, packet loss is very likely to occur. Assuming that the reference frame Pi of Pn is lost, the subsequent P frame cannot be decoded until the next I frame arrives. In some cases, the I frame may also be obtained according to the embodiment of the present invention, so as to decode the current frame.

如图6所示,本发明实施例提供了一种视频编码装置,该装置,包括:As shown in FIG. 6, an embodiment of the present invention provides a video encoding device, which includes:

编码单元601:用于在编码器将源图像进行帧间编码为P帧时,将所述源图像进行帧内编码,获取与P帧相对应的I帧;Encoding unit 601: used to perform intra-frame encoding on the source image when the encoder performs inter-frame encoding on the source image into a P frame, and obtain an I frame corresponding to the P frame;

缓存单元602:用于将所述与P帧相对应的I帧存储在编码器的缓存中。Buffering unit 602: configured to store the I frame corresponding to the P frame in the buffer of the encoder.

其中,所述的视频编码装置,还包括:Wherein, the video encoding device also includes:

源图像获取单元603:用于获取当前P帧的参考帧的原始图像、重构图像或者当前P帧的至少两幅参考帧的原始图像合成的图像。Source image acquisition unit 603: used to acquire the original image of the reference frame of the current P frame, the reconstructed image, or an image synthesized from the original images of at least two reference frames of the current P frame.

所述的缓存单元602,进一步包括:The cache unit 602 further includes:

缓存设置子单元:用于根据编码器的当前编码帧与分组域流媒体服务器的当前转发帧设置编码器缓存的大小;Cache setting subunit: used to set the size of the encoder cache according to the current encoding frame of the encoder and the current forwarding frame of the packet domain streaming media server;

更新存储子单元:用于将所述与P帧相对应的I帧,根据所述编码器缓存的大小进行实时更新存储。Update storage sub-unit: for updating and storing the I frame corresponding to the P frame in real time according to the size of the encoder cache.

如图7所示,本发明实施例提供了一种视频解码装置,该装置,包括:As shown in FIG. 7, an embodiment of the present invention provides a video decoding device, which includes:

接收单元701:用于接收流媒体服务器转发的视频帧;Receiving unit 701: for receiving the video frame forwarded by the streaming media server;

解码单元702:用于若接收的视频帧为P帧时,获取与当前P帧相对应的I帧,参考所述与当前P帧相对应的I帧进行解码。The decoding unit 702: if the received video frame is a P frame, obtain an I frame corresponding to the current P frame, and decode with reference to the I frame corresponding to the current P frame.

如图8所示,本发明实施例提供了一种视频播放装置;该装置,包括:As shown in Figure 8, an embodiment of the present invention provides a video playback device; the device includes:

信息发送单元801:用于若接收的视频帧为P帧时,流媒体服务器发送获取所述P帧对应的I帧请求消息;Information sending unit 801: used for, if the received video frame is a P frame, the streaming media server sends an I frame request message corresponding to the P frame;

信息接收单元802:用于流媒体服务器接收I帧,所述I帧为编码器设备根据所述的获取I帧请求将所述P帧所对应的源图像进行帧内编码所获取的;还用于通过消息通道,流媒体服务器接收所述获取I帧的响应消息;The information receiving unit 802: used for the streaming media server to receive the I frame, the I frame is obtained by the encoder device by intra-coding the source image corresponding to the P frame according to the request for obtaining the I frame; Through the message channel, the streaming media server receives the response message for obtaining the I frame;

信息转发单元803:用于流媒体服务器将所述I帧转发给客户端设备,以便所述客户端设备根据所述I帧对接收的所述I帧对应的视频P帧进行解码播放。The information forwarding unit 803 is used for the streaming media server to forward the I frame to the client device, so that the client device decodes and plays the video P frame corresponding to the received I frame according to the I frame.

如图9所示,本发明实施例提供了一种视频播放系统;该系统,包括:As shown in Figure 9, an embodiment of the present invention provides a video playback system; the system includes:

请求接收单元901:用于若接收的视频帧为P帧时,编码器设备接收流媒体服务器发送的获取所述P帧对应的I帧请求消息;Request receiving unit 901: used for, if the received video frame is a P frame, the encoder device receives the I frame request message corresponding to the P frame sent by the streaming media server;

信息获取单元902:用于编码器设备根据所述的获取I帧请求,将所述当前P帧所对应的源图像进行帧内编码,获取与当前P帧相对应的I帧;The information acquisition unit 902 is used for the encoder device to perform intra-frame encoding on the source image corresponding to the current P frame according to the acquisition I frame request, and acquire the I frame corresponding to the current P frame;

信息下发单元903:用于编码器设备将所述I帧下发给所述的流媒体服务器;即通过消息通道,下发所述获取I帧的响应消息给分组域流媒体服务器;通过临时通道,下发所述I帧给分组域流媒体服务器下发。Information sending unit 903: used for the encoder device to send the I frame to the streaming media server; that is, send the response message for obtaining the I frame to the packet domain streaming media server through a message channel; channel, and deliver the I frame to the packet-domain streaming media server.

转发单元904,用于流媒体服务器将所述I帧转发给客户端设备;A forwarding unit 904, configured for the streaming media server to forward the I frame to the client device;

解码播放单元905,客户端设备根据所述I帧对接收的所述I帧对应的视频P帧进行解码播放。The decoding and playing unit 905, the client device decodes and plays the video P frame corresponding to the received I frame according to the I frame.

进一步,所述的解码播放单元905,还包括:Further, the decoding playback unit 905 also includes:

容错处理子单元:用于根据接收到的视频帧,判断当前接收的视频帧为P帧,客户端设备根据所述的与当前P帧相对应的I帧对所述接收的视频P帧进行解码播放。Error-tolerant processing subunit: used to judge the currently received video frame as a P frame according to the received video frame, and the client device decodes the received video P frame according to the I frame corresponding to the current P frame play.

本发明实施例提供的视频播放方法、装置及系统,通过在编码器侧将源图像进行帧间编码为P帧时,在进行P帧编码的同时进行P帧相应I帧的编码,并将其存储在编码器的缓存中以备后用;当分组域流媒体服务器判断当前接入帧不是I帧,发起获取I帧请求,编码器设备将根据所述请求获取I帧并将所述I帧通过分组域流媒体服务器转发给客户端设备,从而使得客户端设备可以根据所述I帧对当前接入的P帧进行解码,从而使得用户接入、切换/插播时,可以实时清晰的收看到图像;与现有技术,由于用户接入的时刻不同并且当前的接入帧不是I帧,流媒体服务器总是根据缓存区中与用户当前接入帧最近的I帧,开始给用户发送数据,从而造成相同的时间,不同时刻接入的用户看到的节目不同,使得用户观看到的节目与实时播放的节目之间产生的时延,本发明根据所述的I帧进行解码,可以使得不同时刻接入的用户,直接获得与当前接入P帧相对应的I帧进行直播,从而不但减小了直播频道的播放延时,而且还可以清晰的将P帧进行解码,改善了解码图像的清晰度。In the video playback method, device and system provided by the embodiments of the present invention, when the source image is inter-coded into a P frame on the encoder side, the corresponding I frame of the P frame is coded while the P frame is coded, and its Stored in the cache of the encoder for later use; when the packet domain streaming media server judges that the current access frame is not an I frame, it initiates a request to obtain an I frame, and the encoder device will obtain the I frame according to the request and send the I frame It is forwarded to the client device through the packet domain streaming media server, so that the client device can decode the currently accessed P frame according to the I frame, so that when the user accesses, switches/inserts the broadcast, he can clearly watch it in real time Image; with the prior art, because the time when the user accesses is different and the current access frame is not an I frame, the streaming media server always starts to send data to the user according to the I frame closest to the user's current access frame in the cache area, Thereby causing the same time, different programs seen by users who access at different times, so that the time delay generated between the programs watched by the users and the programs played in real time, the present invention decodes according to the I frame, which can make different Users who access at any time can directly obtain the I frame corresponding to the currently accessed P frame for live broadcast, which not only reduces the playback delay of the live channel, but also can clearly decode the P frame, improving the quality of the decoded image clarity.

通过以上的实施方式的描述,本领域普通技术人员可以理解:实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,所述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,包括如上述方法实施例的步骤,所述的存储介质,如:ROM/RAM、磁碟、光盘等。Through the description of the above embodiments, those of ordinary skill in the art can understand that all or part of the steps in the method of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable When the program is executed, the program includes the steps of the above-mentioned method embodiment, the storage medium described, such as: ROM/RAM, magnetic disk, optical disk, etc.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (17)

1, a kind of method for video coding is characterized in that, comprising:
It is the P frame that encoder carries out interframe encode with source images;
Described source images is carried out intraframe coding, obtain and the corresponding I frame of P frame;
Be stored in the buffer memory of encoder with the corresponding I frame of P frame described.
2, method for video coding according to claim 1 is characterized in that, described source images is carried out intraframe coding, obtains the step with the corresponding I frame of P frame, comprising:
Obtain the original image of the reference frame of current P frame;
Original image with the reference frame of described current P frame carries out intraframe coding, obtains and the corresponding I frame of P frame.
3, method for video coding according to claim 1 is characterized in that, described source images is carried out intraframe coding, obtains the step with the corresponding I frame of P frame, comprising:
Obtain the reconstructed image of the reference frame of current P frame;
Reconstructed image with described current P frame reference frame carries out intraframe coding, obtains and the corresponding I frame of P frame.
4, method for video coding according to claim 1 is characterized in that, described source images is carried out intraframe coding, obtains the step with the corresponding I frame of P frame, comprising:
Obtain the synthetic image of original image of at least two width of cloth reference frames of current P frame;
The image that the original image of at least two width of cloth reference frames of described current P frame is synthetic carries out intraframe coding, obtains and the corresponding I frame of P frame.
5, method for video coding according to claim 1 is characterized in that, described and the corresponding I frame of P frame is stored in the step in the buffer memory of encoder, comprising:
The size of encoder buffer is set according to the current transmitted frame of the current encoded frame of encoder and streaming media server;
With the described and corresponding I frame of P frame, carry out the real-time update storage according to the size of described encoder buffer.
6, a kind of video encoding/decoding method is characterized in that, comprising:
The frame of video of receiving stream media server forwards;
If when the frame of video that receives is the P frame, obtain and the corresponding I frame of current P frame, decode with reference to the corresponding I frame of described and current P frame.
7, video encoding/decoding method according to claim 6 is characterized in that, when being the P frame as if the frame of video that receives, obtains and the corresponding I frame of current P frame, and the step with reference to the corresponding I frame of described and current P frame is decoded comprises:
According to the frame of video that receives, the frame of video of judging current reception is the P frame;
Obtain and the corresponding I frame of current P frame, decode with reference to the corresponding I frame of described and current P frame.
8, a kind of video broadcasting method is characterized in that, comprising:
When if the frame of video that receives is the P frame, streaming media server sends the I frame request message that obtains described P frame correspondence;
Streaming media server receives the I frame, and described I frame is that encoder device carries out intraframe coding according to the request of the described I of obtaining frame with the pairing source images of described P frame and obtains;
Streaming media server is transmitted to client device with described I frame, so as described client device according to described I frame to the broadcast of decoding of the video P frame of the described I frame correspondence that receives.
9, described according to Claim 8 video broadcasting method is characterized in that, obtains the request of I frame according to described, and streaming media server receives the step of I frame, comprising:
By message channel, streaming media server receives the described response message that obtains the I frame;
By occasional passage, streaming media server receives described I frame.
10, according to the described video broadcasting method of claim 9, it is characterized in that, carry the receiving port and the order indicated value of direct broadcast band ID, present frame ID, occasional passage in the described request message at least; At least carry the receiving port and the order indicated value of direct broadcast band ID, present frame ID, occasional passage in the described response message.
11, a kind of video coding apparatus is characterized in that, comprising:
Coding unit is used at encoder source images being carried out interframe encode when being the P frame, and described source images is carried out intraframe coding, obtains and the corresponding I frame of P frame;
Buffer unit is used for described and the corresponding I frame of P frame are stored in the buffer memory of encoder.
12, video coding apparatus according to claim 11 is characterized in that, also comprises:
Source images acquiring unit: the synthetic image of original image of at least two width of cloth reference frames of original image, reconstructed image or current P frame that is used to obtain the reference frame of current P frame.
13, video coding apparatus according to claim 11 is characterized in that, described buffer unit further comprises:
Buffer memory is provided with subelement: the size that is used for being provided with according to the current transmitted frame of the current encoded frame of encoder and streaming media server encoder buffer;
Updated stored subelement: be used for the described and corresponding I frame of P frame, carry out the real-time update storage according to the size of described encoder buffer.
14, a kind of video decoder is characterized in that, comprising:
Receiving element is used for the frame of video of receiving stream media server forwards;
Decoding unit is used for obtaining and the corresponding I frame of current P frame when if the frame of video that receives is the P frame, decodes with reference to the corresponding I frame of described and current P frame.
15, a kind of video play device is characterized in that, comprising:
Information transmitting unit: be used for when if the frame of video that receives is the P frame, streaming media server sends the I frame request message that obtains described P frame correspondence;
Information receiving unit: be used for streaming media server and receive the I frame, described I frame is that encoder device carries out intraframe coding according to the request of the described I of obtaining frame with the pairing source images of described P frame and obtains; Also be used for by message channel, streaming media server receives the described response message that obtains the I frame;
The information retransmission unit: be used for streaming media server described I frame be transmitted to client device so that described client device according to described I frame to the broadcast of decoding of the video P frame of the described I frame correspondence that receives.
16, a kind of audio/video player system is characterized in that, comprising:
The request receiving element is used for when if the frame of video that receives is the P frame I frame request message that obtains described P frame correspondence that encoder device receiving stream media server sends;
Information acquisition unit is used for encoder device according to the described I of obtaining frame request message, and the pairing source images of described current P frame is carried out intraframe coding, obtains and the corresponding I frame of current P frame;
Information issues the unit, is used for encoder device described I frame is handed down to described streaming media server; By message channel, the response message that issues the described I of obtaining frame is given streaming media server; By occasional passage, issue described I frame and issue to streaming media server;
Retransmission unit is used for streaming media server described I frame is transmitted to client device;
Decoding broadcast unit, client device according to described I frame to the broadcast of decoding of the video P frame of the described I frame correspondence that receives.
According to the described video play device of claim 16, it is characterized in that 17, described decoding broadcast unit comprises:
The fault-tolerant processing subelement is used for according to the frame of video that receives, and the frame of video of judging current reception is the P frame, client device according to the corresponding I frame of described and current P frame to the broadcast of decoding of the video P frame of described reception.
CN 200810211296 2008-09-22 2008-09-22 Video coding/decoding method and device as well as video playing method, device and system Pending CN101686391A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN 200810211296 CN101686391A (en) 2008-09-22 2008-09-22 Video coding/decoding method and device as well as video playing method, device and system
PCT/CN2009/072768 WO2010031273A1 (en) 2008-09-22 2009-07-15 Video encoding/decoding method, device and video playing method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810211296 CN101686391A (en) 2008-09-22 2008-09-22 Video coding/decoding method and device as well as video playing method, device and system

Publications (1)

Publication Number Publication Date
CN101686391A true CN101686391A (en) 2010-03-31

Family

ID=42039083

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810211296 Pending CN101686391A (en) 2008-09-22 2008-09-22 Video coding/decoding method and device as well as video playing method, device and system

Country Status (2)

Country Link
CN (1) CN101686391A (en)
WO (1) WO2010031273A1 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196249A (en) * 2011-05-17 2011-09-21 杭州华三通信技术有限公司 Monitoring data playback method, EC (Encoder) and video management server
CN104602044A (en) * 2015-02-05 2015-05-06 秦永红 RTMP stream media public network live broadcast system and design method thereof
CN104902289A (en) * 2015-06-29 2015-09-09 秦永红 Design method and system for RTMP (Real Time Messaging Protocol) streaming media live system warm backup
CN106027991A (en) * 2016-07-12 2016-10-12 李巍 Medical video and live broadcast all-in-one machine
CN106604064A (en) * 2016-12-30 2017-04-26 北京奇艺世纪科技有限公司 Rapid broadcasting method and device
WO2017124897A1 (en) * 2016-01-20 2017-07-27 努比亚技术有限公司 Terminal, method for video frame positioning by terminal, and computer storage medium
CN107135400A (en) * 2017-06-12 2017-09-05 上海高顿教育培训有限公司 A kind of method for reducing network direct broadcasting delay
WO2018028547A1 (en) * 2016-08-09 2018-02-15 华为技术有限公司 Channel switching method and device
WO2018032599A1 (en) * 2016-08-15 2018-02-22 深圳先进技术研究院 Identity authentication method and device for wearable intelligent device
CN107801049A (en) * 2016-09-05 2018-03-13 杭州海康威视数字技术股份有限公司 A real-time video transmission and playback method and device
CN110149491A (en) * 2018-02-11 2019-08-20 腾讯科技(深圳)有限公司 Method for video coding, video encoding/decoding method, terminal and storage medium
CN111314648A (en) * 2020-02-28 2020-06-19 联想(北京)有限公司 Information processing method, processing device, first electronic equipment and server
CN115174943A (en) * 2022-07-08 2022-10-11 叠境数字科技(上海)有限公司 Free visual angle playing method and system based on edge cloud cooperation and client self-adaption
US12289492B2 (en) 2020-08-25 2025-04-29 Huawei Technologies Co., Ltd. Encoding and decoding method, apparatus, and system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112866736A (en) * 2021-01-15 2021-05-28 北京乐学帮网络技术有限公司 Key frame sending method, processing server and live broadcast system
CN113727174A (en) * 2021-07-14 2021-11-30 深圳市有为信息技术发展有限公司 Method and device for controlling vehicle satellite positioning system video platform to play and electronic equipment
CN113784123B (en) * 2021-11-11 2022-03-15 腾讯科技(深圳)有限公司 Video encoding method and apparatus, storage medium, and electronic device
CN116156109A (en) * 2022-11-25 2023-05-23 天翼数字生活科技有限公司 A video surveillance playback method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7046910B2 (en) * 1998-11-20 2006-05-16 General Instrument Corporation Methods and apparatus for transcoding progressive I-slice refreshed MPEG data streams to enable trick play mode features on a television appliance
US20050089232A1 (en) * 2003-10-23 2005-04-28 Chun-Ming Hsu Method of video compression that accommodates scene changes
US20070230574A1 (en) * 2004-05-25 2007-10-04 Koninklijke Philips Electronics N.C. Method and Device for Encoding Digital Video Data
TW200704205A (en) * 2005-04-15 2007-01-16 Sony Corp Program, information processing apparatus, information processing method and recording medium

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102196249A (en) * 2011-05-17 2011-09-21 杭州华三通信技术有限公司 Monitoring data playback method, EC (Encoder) and video management server
CN104602044B (en) * 2015-02-05 2019-02-15 秦永红 A kind of RTMP streaming media public network live broadcast system and design method thereof
CN104602044A (en) * 2015-02-05 2015-05-06 秦永红 RTMP stream media public network live broadcast system and design method thereof
CN104902289A (en) * 2015-06-29 2015-09-09 秦永红 Design method and system for RTMP (Real Time Messaging Protocol) streaming media live system warm backup
CN104902289B (en) * 2015-06-29 2017-10-27 秦永红 A kind of design method and its system of RTMP flow medium live systems Hot Spare
WO2017124897A1 (en) * 2016-01-20 2017-07-27 努比亚技术有限公司 Terminal, method for video frame positioning by terminal, and computer storage medium
CN106027991A (en) * 2016-07-12 2016-10-12 李巍 Medical video and live broadcast all-in-one machine
CN106027991B (en) * 2016-07-12 2024-02-13 李巍 Medical video image live broadcast all-in-one
US10958972B2 (en) 2016-08-09 2021-03-23 Huawei Technologies Co., Ltd. Channel change method and apparatus
WO2018028547A1 (en) * 2016-08-09 2018-02-15 华为技术有限公司 Channel switching method and device
WO2018032599A1 (en) * 2016-08-15 2018-02-22 深圳先进技术研究院 Identity authentication method and device for wearable intelligent device
CN107801049A (en) * 2016-09-05 2018-03-13 杭州海康威视数字技术股份有限公司 A real-time video transmission and playback method and device
CN107801049B (en) * 2016-09-05 2020-01-17 杭州海康威视数字技术股份有限公司 A real-time video transmission and playback method and device
CN106604064A (en) * 2016-12-30 2017-04-26 北京奇艺世纪科技有限公司 Rapid broadcasting method and device
CN107135400A (en) * 2017-06-12 2017-09-05 上海高顿教育培训有限公司 A kind of method for reducing network direct broadcasting delay
CN110149491A (en) * 2018-02-11 2019-08-20 腾讯科技(深圳)有限公司 Method for video coding, video encoding/decoding method, terminal and storage medium
CN110149491B (en) * 2018-02-11 2021-09-28 腾讯科技(深圳)有限公司 Video encoding method, video decoding method, terminal and storage medium
CN111314648A (en) * 2020-02-28 2020-06-19 联想(北京)有限公司 Information processing method, processing device, first electronic equipment and server
US12289492B2 (en) 2020-08-25 2025-04-29 Huawei Technologies Co., Ltd. Encoding and decoding method, apparatus, and system
CN115174943A (en) * 2022-07-08 2022-10-11 叠境数字科技(上海)有限公司 Free visual angle playing method and system based on edge cloud cooperation and client self-adaption
CN115174943B (en) * 2022-07-08 2023-10-31 叠境数字科技(上海)有限公司 Free view angle playing method and system with edge cloud cooperation and client self-adaption

Also Published As

Publication number Publication date
WO2010031273A1 (en) 2010-03-25

Similar Documents

Publication Publication Date Title
CN101686391A (en) Video coding/decoding method and device as well as video playing method, device and system
CN101316357B (en) Channel switching method and terminal
JP5788101B2 (en) Network streaming of media data
KR101540878B1 (en) Ip broadcast streaming services distribution using file delivery methods
CN101854533B (en) Frequency channel switching method, device and system
CN101588494B (en) Method for processing media stream, communication system, and relative devices
CN106686438B (en) method, device and system for synchronously playing audio images across equipment
CN107566918B (en) A kind of low delay under video distribution scene takes the neutrel extraction of root
CN107819809B (en) Method and device for synchronizing content
CN102137275B (en) Method and device for rapidly pushing unicast stream in rapid channel switching
BR112016022201B1 (en) METHOD FOR RECOVERING MEDIA DATA BY A CLIENT DEVICE THAT HAS A MULTIMEDIA MULTICAST SERVICE CLIENT AND A DYNAMIC ADAPTIVE STREAMING CLIENT OVER HTTP, CLIENT DEVICE THAT HAS A MULTIMEDIA MULTICAST SERVICE CLIENT AND A DYNAMIC ADAPTIVE STREAMING CLIENT OVER HTTP, AND, COMPUTER READABLE MEMORY
CN101132521A (en) A method and device for realizing IPTV channel switching
CN101742271B (en) Method, system and device for transmitting stream media data
CN101742269A (en) Channel switching over method, device and system
CN101370139A (en) A method and device for switching video
MX2011012652A (en) Method, apparatus and system for reducing media delay.
CN106791997B (en) Method and system for processing streaming media data at receiving end and television terminal
JP5043096B2 (en) Channel changing method and digital video apparatus
WO2016077072A1 (en) Delivering partially received segments of streamed media data
CN103685314B (en) Method for achieving seamless switching of unicast and multicast of stream media playing
TW202423095A (en) Automatic generation of video content in response to network interruption
TW202337225A (en) Dynamic resolution change hints for adaptive streaming
US20140321556A1 (en) Reducing amount of data in video encoding
CN101860471B (en) Method, device and system for switching media stream
JP2008193500A (en) Data transmission device and data relay device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100331