CN103200419B - High-speed recognizing method of change degree of video content - Google Patents

High-speed recognizing method of change degree of video content Download PDF

Info

Publication number
CN103200419B
CN103200419B CN201310068909.6A CN201310068909A CN103200419B CN 103200419 B CN103200419 B CN 103200419B CN 201310068909 A CN201310068909 A CN 201310068909A CN 103200419 B CN103200419 B CN 103200419B
Authority
CN
China
Prior art keywords
video
frame
buffer
evaluated
data
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.)
Expired - Fee Related
Application number
CN201310068909.6A
Other languages
Chinese (zh)
Other versions
CN103200419A (en
Inventor
张大陆
祝嘉麒
李柏言
金翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tongji University
Original Assignee
Tongji University
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 Tongji University filed Critical Tongji University
Priority to CN201310068909.6A priority Critical patent/CN103200419B/en
Publication of CN103200419A publication Critical patent/CN103200419A/en
Application granted granted Critical
Publication of CN103200419B publication Critical patent/CN103200419B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明提供一种高速识别视频内容变化程度的方法,所述方法包括:根据应用场景为待评测视频建立缓冲区,所述应用场景包括离线场景和在线场景,初始化局部变量;从为待评测视频建立缓冲区首部读出下一帧,并判断该帧的类型,如果是关键帧,则执行下一步,否则执行该步骤;计算该帧的字节数,并累加至总字节数中;从为待评测视频建立缓冲区首部读出下一帧,继续判断该帧的类型,如果是预测帧,则执行上一步,如果不是,则执行下一步;通过该帧的字节数和总字节数计算视频内容变化程度度量值。本发明所述方法能以较低的计算复杂度和空间开销,高速评估视频的内容特性,能够满足对视频内容进行简单而快速分类的需要。

The present invention provides a method for identifying the change degree of video content at a high speed. The method includes: establishing a buffer zone for the video to be evaluated according to the application scene, the application scene includes an offline scene and an online scene, and initializing local variables; Create the buffer header to read the next frame, and judge the type of the frame, if it is a key frame, then execute the next step, otherwise execute this step; calculate the number of bytes of the frame, and add it to the total number of bytes; from Create a buffer header for the video to be evaluated and read the next frame, continue to judge the type of the frame, if it is a predicted frame, execute the previous step, if not, execute the next step; pass the number of bytes and the total bytes of the frame Calculate the degree of change in video content. The method of the invention can evaluate the content characteristics of the video at a high speed with relatively low computational complexity and space overhead, and can meet the requirement of simple and fast classification of the video content.

Description

一种高速识别视频内容变化程度的方法A high-speed method for identifying the degree of change in video content

技术领域technical field

本发明属于多媒体通信技术领域,涉及一种识别视频内容变化的方法,特别是涉及一种高速识别视频内容变化程度的方法。The invention belongs to the technical field of multimedia communication, and relates to a method for identifying changes in video content, in particular to a method for identifying the degree of change in video content at high speed.

背景技术Background technique

随着互联网的发展,音视频媒体流逐渐占据了网络的主要流量。然而,互联网是一种尽力而为的传输(Best-effort)网络,在流媒体的传输过程中的带宽、丢包、抖动、时延等情况时有发生,它们会对视频质量产生不利的影响。以往对网络服务质量QoS(Quality of Service)的研究是以提高网络性能和整体资源利用率为目的,而现在的ISP和ICP则更关注签约客户的实际使用感受,而QoS无法满足这一需要。因此引入用户体验质量QoE(Quality of Experience)来描述多媒体用户的观看质量。With the development of the Internet, audio and video media streams gradually occupy the main traffic of the network. However, the Internet is a best-effort transmission network. During the transmission of streaming media, bandwidth, packet loss, jitter, and delay occur from time to time, which will adversely affect the video quality. . Previous research on QoS (Quality of Service) was aimed at improving network performance and overall resource utilization, but current ISPs and ICPs pay more attention to the actual experience of contracted customers, and QoS cannot meet this need. Therefore, QoE (Quality of Experience) is introduced to describe the viewing quality of multimedia users.

目前,ITU、VQEG等多个研究组织提出了各自的视频质量评估模型,比较著名的有G.1070、E-Model、Evalvid等。而这些模型主要考虑了QoS参数对QoE的影响,但忽略了视频内容对QoE的影响。而现有实验表明,不同视频内容对QoE的影响存在很明显的不同。内容变化剧烈的视频(如足球赛等)受丢包、抖动的影响远大于内容变化平缓的视频(如新闻播报等),如图1所示。这种差异导致QoE评估模型的准确度比较低。At present, many research organizations such as ITU and VQEG have proposed their own video quality evaluation models, and the more famous ones are G.1070, E-Model, and Evalvid. These models mainly consider the impact of QoS parameters on QoE, but ignore the impact of video content on QoE. Existing experiments show that different video contents have significantly different effects on QoE. Videos with drastic content changes (such as football games, etc.) are much more affected by packet loss and jitter than videos with gentle content changes (such as news broadcasts, etc.), as shown in Figure 1. This difference leads to a relatively low accuracy of the QoE evaluation model.

现有的基于模式识别的视频内容识别技术能够对视频图像信息进行分析并获得内容信息。然而,该方法存在识别速度慢、资源开销大、需要前期大量数据的训练等问题,并且其识别的信息远多于QoE评估模型的需要,存在资源冗余和浪费。因此,在QoE的实时监测中很难将其引入。此外,国内外还有相关研究通过分析视频中每张图像的像素点的信息、或者分析编码后预测帧运动向量中DCT系数的信息,来估计视频的内容信息。Existing video content recognition technology based on pattern recognition can analyze video image information and obtain content information. However, this method has problems such as slow recognition speed, high resource overhead, and requires a large amount of data training in the early stage, and the information it recognizes is far more than the QoE evaluation model needs, and there are resource redundancy and waste. Therefore, it is difficult to introduce it in the real-time monitoring of QoE. In addition, there are related research at home and abroad to estimate the content information of the video by analyzing the pixel information of each image in the video, or analyzing the information of the DCT coefficient in the predicted frame motion vector after encoding.

发明内容Contents of the invention

鉴于以上所述现有技术的缺点,本发明的目的在于提供一种高速识别视频内容变化程度的方法,用于解决现有技术中存在识别速度慢、资源开销大、需要前期大量数据的训练,并且识别的信息远多于QoE评估模型的需要,存在资源冗余和浪费的问题。In view of the shortcomings of the prior art described above, the purpose of the present invention is to provide a method for high-speed recognition of the degree of change in video content, which is used to solve the problems of slow recognition speed, large resource overhead, and training requiring a large amount of data in the prior art. And the identified information is much more than what the QoE evaluation model needs, and there are problems of resource redundancy and waste.

为实现上述目的及其他相关目的,本发明提供一种高速识别视频内容变化程度的方法。所述方法包括:In order to achieve the above object and other related objects, the present invention provides a method for identifying the change degree of video content at high speed. The methods include:

S1,将视频帧中的关键帧字节数和总字节数置为0,根据应用场景为待评测视频建立缓冲区,所述应用场景包括离线场景和在线场景,初始化局部变量;当应用场景为在线评测时,为待评测视频建立网络缓冲区,网络缓存区中元素为服务端向客户端顺序发送的数据包队列,并且将为待评测视频建立的网络缓冲区指向媒体流服务器端的网络数据包队列;当应用场景为离线测评时,为待评测视频建立文件缓冲区,所述文件缓冲区中的元素为待测视频的连续帧;S1, set the number of key frame bytes and the total number of bytes in the video frame to 0, set up a buffer for the video to be evaluated according to the application scenario, the application scenario includes an offline scenario and an online scenario, and initialize local variables; when the application scenario For online evaluation, a network buffer is established for the video to be evaluated. The elements in the network buffer are the queues of data packets sent sequentially from the server to the client, and the network buffer established for the video to be evaluated points to the network data of the media stream server Packet queue; when the application scenario is offline evaluation, a file buffer is established for the video to be evaluated, and the elements in the file buffer are continuous frames of the video to be evaluated;

S2,从为待评测视频建立缓冲区首部读出下一帧,当应用场景为离线评测时,文件缓存区中的元素是为帧,直接从缓存区中读出首帧,将首帧数据存入临时帧数据缓存中,并执行下一步骤;当应用场景为在线评测时,为待评测视频建立的网络缓存区中的元素为数据包,需要先读取存放首帧的所有数据包,再将所述数据包组装成一个完整的帧,继续执行下一步骤;对于RTP协议的媒体流,为了确保需要读取的数据包的个数,采用清空临时帧数据缓冲数据,从为待评测视频建立的缓冲区中读出队首数据包,查看数据包中RTP协议域是否有标志位,并将所述数据包中的RTP数据域的数据取出存入临时帧数据缓冲数据中,如果查看到数据包中RTP协议域存在标志位,那么说明所述数据包是所承载帧的最后一个数据包,并说明已组装完成好一个帧,可以执行下一步骤;如果查看到数据包中RTP协议域不存在标志位,那么说明所述数据包是所承载帧的中间一个数据包;S2. Read the next frame from the buffer head of the video to be evaluated. When the application scenario is offline evaluation, the elements in the file buffer area are frames, and the first frame is directly read from the buffer area, and the data of the first frame is stored. into the temporary frame data cache, and perform the next step; when the application scenario is online evaluation, the elements in the network buffer area established for the video to be evaluated are data packets, and all data packets that store the first frame need to be read first, and then Assemble the data packets into a complete frame, and proceed to the next step; for the media stream of the RTP protocol, in order to ensure the number of data packets to be read, clear the temporary frame data buffer data, from the video to be evaluated Read out the first data packet in the built-up buffer, check whether there is a flag in the RTP protocol field in the data packet, and take out the data in the RTP data field in the data packet and store it in the temporary frame data buffer data. If there is a flag bit in the RTP protocol field in the data packet, it means that the data packet is the last data packet of the frame carried, and that a frame has been assembled, and the next step can be performed; if the RTP protocol field in the data packet is checked If there is no flag bit, it means that the data packet is a middle data packet of the carried frame;

S3,判断从为待评测视频建立缓冲区首部读出的帧是否为关键帧,若是,则执行下一步;若否,则返回步骤S2,重新执行步骤S2;S3, judging whether the frame read out from the buffer head of the video to be evaluated is a key frame, if so, then perform the next step; if not, then return to step S2, and re-execute step S2;

S4,计算所述临时帧数据缓冲所占字节数,并累加至总字节数;S4, calculating the number of bytes occupied by the temporary frame data buffer, and accumulating to the total number of bytes;

S5,从为待评测视频建立缓冲区首部读出下一帧存入所述临时帧数据缓冲中,该步骤和步骤S2一致;S5, read out the next frame from the head of the buffer for the video to be evaluated and store it in the temporary frame data buffer, this step is consistent with step S2;

S6,判断从为待评测视频建立缓冲区首部读出的帧是否为预测帧,若是,则返回步骤S4;若否,则执行下一步;S6, judging whether the frame read from the buffer header for the video to be evaluated is a predicted frame, if so, return to step S4; if not, perform the next step;

S7,计算视频内容变化程度度量值。S7. Calculate a video content change degree measurement value.

优选地,当应用场景为在线评测时,表示待评测视频已经存在;当应用场景为离线评测时,表示待评测视频是实时生成;在离线应用场景下,为待评测视频建立文件缓冲区中帧的存放顺序必须与待评测视频存储顺序一致;在在线应用场景下,为待评测视频建立的网络缓存区中帧的存放顺序必须与待评测视频编码后的顺序一致。Preferably, when the application scenario is online evaluation, it means that the video to be evaluated already exists; when the application scenario is offline evaluation, it means that the video to be evaluated is generated in real time; in the offline application scenario, the frame in the file buffer is established for the video to be evaluated The storage order of the video to be evaluated must be consistent with the storage order of the video to be evaluated; in the online application scenario, the storage order of the frames in the network buffer area established for the video to be evaluated must be consistent with the sequence of encoding of the video to be evaluated.

优选地,所述步骤S2还包括:从为待评测视频建立缓冲区首部读取下一帧在不同应用场景下,执行方式不同;在离线应用场景时,为待评测视频建立文件缓冲区中存放的元素是视频帧,因此直接从文件缓冲区中读取帧并返回;在在线应用场景时,为待评测视频建立的网络缓存区中存放的是网络数据包,需要将存放的数据包全部读出,组装成一个完整的视频帧再返回。Preferably, the step S2 also includes: reading the next frame from the head of the buffer for the video to be evaluated. In different application scenarios, the execution methods are different; The element is a video frame, so the frame is directly read from the file buffer and returned; in the online application scenario, the network buffer area established for the video to be evaluated stores network data packets, and all stored data packets need to be read. out, assembled into a complete video frame and returned.

优选地,在所述步骤S4中,如果所述临时帧数据缓冲是关键帧,那么关键帧字节数为所述临时帧数据缓冲所占字节数。Preferably, in the step S4, if the temporary frame data buffer is a key frame, then the number of key frame bytes is the number of bytes occupied by the temporary frame data buffer.

优选地,所述视频内容变化程度度量值MDVC是一个区间为[0,1)的小数,MDVC表示视频内容变化的剧烈程度。Preferably, the video content change degree metric value MDVC is a decimal with an interval of [0,1), and MDVC indicates the severity of video content change.

如上所述,本发明所述的高速识别视频内容变化程度的方法,具有以下有益效果:As mentioned above, the method for identifying the degree of change of video content at high speed according to the present invention has the following beneficial effects:

1、本发明计算复杂度低,空间开销小,收敛速度快的特点,能很好的解决视频内容分类问题;1. The present invention has the characteristics of low computational complexity, small space overhead, and fast convergence speed, which can well solve the problem of video content classification;

2、本发明可以快速分析视频的内容特性;2. The present invention can quickly analyze the content characteristics of the video;

3、本发明可用于识别MPEG4、H.264等编码的视频(但不仅限于这两种编码),并且拥有较高的准确度。3. The present invention can be used to identify videos encoded by MPEG4, H.264 (but not limited to these two encodings), and has high accuracy.

附图说明Description of drawings

图1显示为本发明的高速识别视频内容变化程度的方法的方法流程图。FIG. 1 is a flow chart of the method for identifying the degree of change of video content at high speed according to the present invention.

图2(a)显示为足球赛视频QoE模型的差异的示意图。Fig. 2(a) shows a schematic diagram of the difference of the QoE model for the football game video.

图2(b)显示为新闻播报视频QoE模型的差异的示意图。Fig. 2(b) shows a schematic diagram of the difference of QoE models for news broadcast video.

图3显示为本发明的高速识别视频内容变化程度的方法中不同编码参数下视频内容与MDVC的关系示意图。FIG. 3 is a schematic diagram showing the relationship between video content and MDVC under different encoding parameters in the method for identifying the degree of change of video content at high speed according to the present invention.

图4显示为本发明的高速识别视频内容变化程度的方法中不同内容的视频受丢包率影响后的不同MOS曲线示意图。FIG. 4 is a schematic diagram showing different MOS curves of videos with different contents affected by the packet loss rate in the method for quickly identifying the change degree of video content of the present invention.

具体实施方式Detailed ways

以下通过特定的具体实例说明本发明的实施方式,本领域技术人员可由本说明书所揭露的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在没有背离本发明的精神下进行各种修饰或改变。Embodiments of the present invention are described below through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific implementation modes, and various modifications or changes can be made to the details in this specification based on different viewpoints and applications without departing from the spirit of the present invention.

请参阅附图。需要说明的是,本实施例中所提供的图示仅以示意方式说明本发明的基本构想,遂图式中仅显示与本发明中有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。Please refer to attached picture. It should be noted that the diagrams provided in this embodiment are only schematically illustrating the basic idea of the present invention, and only the components related to the present invention are shown in the diagrams rather than the number, shape and shape of the components in actual implementation. Dimensional drawing, the type, quantity and proportion of each component can be changed arbitrarily during actual implementation, and the component layout type may also be more complicated.

下面结合实施例和附图对本发明进行详细说明。The present invention will be described in detail below in conjunction with the embodiments and the accompanying drawings.

目前主流编码,例如,H.264、MPEG4等,将视频帧分为关键帧(I帧),和预测帧(P帧、B帧)两类。其中,所述关键帧用于存放完整的图像信息,而所述预测帧用于存放大量运动向量和少量图像信息。在相同编码条件下,所述编码条件包括分辨率、码率、GOP(GROUPOF PICTURE,简称画面群)样式等编码参数,运动向量包含的信息越大,那么视频前后帧变化越快,因此视频运动程度越剧烈。通过对预测帧字节数的统计,可以估计视频的运动程度,并且本发明所述的高速识别视频内容变化程度的方法识别速度快,临时数据量小,可以应用于实时监测中。Current mainstream coding, such as H.264, MPEG4, etc., divides video frames into two types: key frames (I frames) and predictive frames (P frames, B frames). Wherein, the key frame is used to store complete image information, and the predicted frame is used to store a large amount of motion vectors and a small amount of image information. Under the same encoding conditions, the encoding conditions include encoding parameters such as resolution, code rate, GOP (GROUPOF PICTURE, referred to as group of pictures) style, the larger the information contained in the motion vector, the faster the frame changes before and after the video, so the video motion The degree is more severe. By counting the number of predicted frame bytes, the motion degree of the video can be estimated, and the method for identifying the change degree of the video content at high speed according to the present invention has a fast recognition speed and a small amount of temporary data, and can be applied to real-time monitoring.

本实施例提供一种高速识别视频内容变化程度的方法,所述方法如图1所示,具体包括:This embodiment provides a method for high-speed identification of the degree of change in video content. The method is shown in FIG. 1 and specifically includes:

S1,初始化步骤,将视频帧中的关键帧字节数(KeySize)和总字节数(TotalSize)置为0,根据应用场景Task(离线或在线)为待评测视频建立缓冲区(pFrameBuffer),所述应用场景包括离线场景和在线场景,初始化局部变量;当应用场景Task为在线评测时,为待评测视频建立网络缓冲区,网络缓存区中元素为服务端向客户端顺序发送的数据包队列,并且将为待评测视频建立的网络缓冲区(pFrameBuffer)指向媒体流服务器端的网络数据包队列;当应用场景(Task)为离线测评时,为待评测视频建立文件缓冲区,所述文件缓冲区中的元素为待测视频的连续帧;其中,当应用场景Task为在线评测时,也就是表示待评测视频已经存在,例如,VoD等视频点播服务;当应用场景Task为离线评测时,表示待评测视频是实时生成的,例如,视频会议、实况转播服务。为待评测视频建立缓冲区(pFrameBuffer)可以是一段视频流中的部分帧,也可以是整个视频的所有帧。在离线应用场景下,为待评测视频建立文件缓冲区中帧的存放顺序必须与待评测视频存储顺序一致;在在线应用场景下,为待评测视频建立的网络缓存区中帧的存放顺序必须与待评测视频编码后的顺序一致。S1, the initialization step, the key frame bytes (KeySize) and the total bytes (TotalSize) in the video frame are set to 0, and a buffer (pFrameBuffer) is established for the video to be evaluated according to the application scenario Task (offline or online), The application scenario includes an offline scenario and an online scenario, and local variables are initialized; when the application scenario Task is an online evaluation, a network buffer is established for the video to be evaluated, and the elements in the network buffer are the queues of packets sent sequentially from the server to the client , and point the network buffer (pFrameBuffer) for the video to be evaluated to the network data packet queue at the media streaming server; when the application scenario (Task) is offline evaluation, a file buffer is established for the video to be evaluated, and the file buffer The elements in are the continuous frames of the video to be tested; when the application scenario Task is online evaluation, it means that the video to be evaluated already exists, for example, VoD and other video-on-demand services; when the application scenario Task is offline evaluation, it means that the video to be evaluated already exists. Review videos are generated in real time, e.g. video conferencing, live broadcast services. The buffer (pFrameBuffer) established for the video to be evaluated can be a part of frames in a video stream, or all frames of the entire video. In the offline application scenario, the storage order of the frames in the file buffer for the video to be evaluated must be consistent with the storage order of the video to be evaluated; in the online application scenario, the storage order of the frames in the network buffer for the video to be evaluated must be consistent with The order of encoding of the video to be evaluated is consistent.

S2,从为待评测视频建立缓冲区(pFrameBuffer)首部读出下一帧,当应用场景Task为离线评测时,文件缓存区(pFrameBuffer)中的元素是为帧,直接从缓冲区中读出首帧,将首帧数据存入临时帧数据缓存中,并执行下一步骤;当应用场景Task为在线评测时,为待评测视频建立的网络缓存区(pFrameBuffer)中的元素为数据包,需要先读取存放首帧的所有数据包,再将所述数据包组装成一个完整的帧,继续执行下一步骤;对于RTP协议(Real-timeTransport Protocol,简称实时传送协议)的媒体流,为了确保需要读取的数据包的个数,采用清空临时帧数据缓冲数据,从为待评测视频建立的缓冲区(pFrameBuffer)中读出队首数据包,查看数据包中RTP协议域是否有Mark标志位,并将所述数据包中的RTP数据域的数据取出存入临时帧数据缓冲数据中,如果查看到数据包中RTP协议域存在标志位,那么说明所述数据包是所承载帧的最后一个数据包,并说明已组装完成好一个帧,可以执行下一步骤;如果查看到数据包中RTP协议域不存在标志位,那么说明所述数据包是所承载帧的中间一个数据包;需注意的是,从为待评测视频建立缓冲区(pFrameBuffer)首部读取下一帧在不同应用场景下,执行方式不同;在离线应用场景时,为待评测视频建立文件缓冲区中存放的元素是视频帧,因此直接从文件缓冲区中读取帧并返回;在在线应用场景时,为待评测视频建立的网络缓存区中存放的是网络数据包,需要将存放的数据包全部读出,组装成一个完整的视频帧再返回。S2. Read the next frame from the head of the buffer (pFrameBuffer) for the video to be evaluated. When the application scenario Task is offline evaluation, the elements in the file buffer (pFrameBuffer) are frames, and the header is directly read from the buffer. frame, store the first frame data in the temporary frame data cache, and execute the next step; when the application scenario Task is online evaluation, the element in the network buffer (pFrameBuffer) established for the video to be evaluated is a data packet, which needs to be Read and store all data packets of the first frame, then assemble the data packets into a complete frame, and proceed to the next step; The number of read data packets is to clear the temporary frame data buffer data, read the first data packet from the buffer (pFrameBuffer) established for the video to be evaluated, and check whether there is a Mark flag in the RTP protocol field in the data packet. And the data of the RTP data field in the data packet is taken out and stored in the temporary frame data buffer data, if there is a flag bit in the RTP protocol field in the data packet, it means that the data packet is the last data of the frame carried package, and indicate that a frame has been assembled, and the next step can be performed; if there is no flag bit in the RTP protocol field in the data packet, it means that the data packet is the middle data packet of the carried frame; it should be noted Yes, reading the next frame from the header of the buffer (pFrameBuffer) for the video to be evaluated is performed in different ways in different application scenarios; in offline application scenarios, the elements stored in the file buffer for the video to be evaluated are video frames , so read the frame directly from the file buffer and return it; in the online application scenario, the network cache area established for the video to be evaluated stores network data packets, and all stored data packets need to be read out and assembled into a Complete video frames are returned.

S3,判断从为待评测视频建立缓冲区(pFrameBuffer)首部读出的帧是否为关键帧,若是,则执行下一步;若否,则返回步骤S2,重新执行步骤S2;S3, judging whether the frame read from the buffer (pFrameBuffer) header for the video to be evaluated is a key frame, if so, then perform the next step; if not, then return to step S2, and re-execute step S2;

S4,计算所述临时帧数据缓冲所占字节数(Size),并累加至总字节数(TotalSize)。如果所述临时帧数据缓冲是关键帧,那么关键帧字节数(KeySize)为所述临时帧数据缓冲所占字节数(Size);S4. Calculate the number of bytes (Size) occupied by the temporary frame data buffer, and add it to the total number of bytes (TotalSize). If the temporary frame data buffer is a key frame, then the key frame byte number (KeySize) is the occupied byte number (Size) of the temporary frame data buffer;

S5,从为待评测视频建立缓冲区(pFrameBuffer)首部读出下一帧存入所述临时帧数据缓冲中,该步骤和步骤S2一致;当应用场景Task为离线评测时,文件缓存区(pFrameBuffer)中的元素是为帧,直接从缓冲区中读出首帧,将首帧数据存入临时帧数据缓存中,并执行下一步骤;当应用场景Task为在线评测时,为待评测视频建立的网络缓存区(pFrameBuffer)中的元素为数据包,需要先读取存放首帧的所有数据包,再将所述数据包组装成一个完整的帧,继续执行下一步骤;对于RTP协议(Real-time Transport Protocol,简称实时传送协议)的媒体流,为了确保需要读取的数据包的个数,采用清空临时帧数据缓冲数据,从为待评测视频建立的缓冲区(pFrameBuffer)中读出队首数据包,查看数据包中RTP协议域是否有Mark标志位,并将所述数据包中的RTP数据域的数据取出存入临时帧数据缓冲数据中,如果查看到数据包中RTP协议域存在标志位,那么说明所述数据包是所承载帧的最后一个数据包,并说明已组装完成好一个帧,可以执行下一步骤;如果查看到数据包中RTP协议域不存在标志位,那么说明所述数据包是所承载帧的中间一个数据包。需注意的是,从为待评测视频建立缓冲区(pFrameBuffer)首部读取下一帧在不同应用场景下,执行方式不同;在离线应用场景时,为待评测视频建立文件缓冲区中存放的元素是视频帧,因此直接从文件缓冲区中读取帧并返回;在在线应用场景时,为待评测视频建立的网络缓存区中存放的是网络数据包,需要将存放的数据包全部读出,组装成一个完整的视频帧再返回。S5, read out the next frame from the buffer (pFrameBuffer) header for the video to be evaluated and store it in the temporary frame data buffer, this step is consistent with step S2; when the application scene Task is offline evaluation, the file buffer (pFrameBuffer ) is a frame, read the first frame directly from the buffer, store the first frame data in the temporary frame data buffer, and execute the next step; when the application scenario Task is online evaluation, establish The elements in the network cache area (pFrameBuffer) are data packets. It is necessary to read all the data packets storing the first frame first, then assemble the data packets into a complete frame, and proceed to the next step; for the RTP protocol (Real -time Transport Protocol (referred to as real-time transport protocol) media stream, in order to ensure the number of data packets that need to be read, the temporary frame data buffer data is cleared, and the queue is read from the buffer (pFrameBuffer) established for the video to be evaluated For the first data packet, check whether there is a Mark flag in the RTP protocol field in the data packet, and take out the data in the RTP data field in the data packet and store it in the temporary frame data buffer data. If it is found that the RTP protocol field in the data packet exists Flag bit, then it means that the data packet is the last data packet of the frame carried, and a frame has been assembled, and the next step can be performed; if there is no flag bit in the RTP protocol field in the data packet, then it means The data packet is a middle data packet of the carried frame. It should be noted that the execution method of reading the next frame from the header of the buffer (pFrameBuffer) for the video to be evaluated is different in different application scenarios; in offline application scenarios, the elements stored in the file buffer for the video to be evaluated are established It is a video frame, so the frame is directly read from the file buffer and returned; in the online application scenario, the network buffer area established for the video to be evaluated stores network data packets, and all stored data packets need to be read out. Assembled into a complete video frame and returned.

S6,判断从为待评测视频建立缓冲区(pFrameBuffer)首部读出的帧是否为预测帧,若是,则返回步骤S4;若否,则执行下一步;S6, judging whether the frame read from the buffer (pFrameBuffer) header for the video to be evaluated is a predicted frame, if so, then return to step S4; if not, then perform the next step;

S7,计算视频内容变化程度度量值MDVC,即所述视频内容变化程度度量值MDVC是一个区间为[0,1)的小数,MDVC表示视频内容变化的剧烈程度。定性地,MDVC越大,说明视频内容特征越活跃。S7, calculating the video content change degree metric value MDVC, namely The video content change degree metric value MDVC is a decimal with an interval of [0,1), and MDVC indicates the severity of video content change. Qualitatively, the larger the MDVC, the more active the video content features.

在实际应用中,本实施例所述的高速识别视频内容变化程度的方法可以较快校准地解决视频内容估计的问题,为视频QoE评估模型提供定量的数据,使得模型实现内容自适应,如图2所示不同视频内容下QoE模型的差异,图2(a)为足球赛视频QoE模型,图2(b)为新闻播报视频QoE模型。本发明可用以下实验证明其的可行性。实验中,将12个不同内容的视频片段分为两组,一组为高速移动(Fast-Moving Video)视频,一组为慢速移动(Slow-MovingVideo)视频。将所有的视频按照不同的编码参数,如表1所示,进行编码并计算各自的MDVC值。In practical applications, the method for identifying the degree of change in video content at high speed described in this embodiment can solve the problem of video content estimation quickly and calibratedly, and provide quantitative data for the video QoE evaluation model, so that the model can realize content self-adaptation, as shown in the figure Figure 2 shows the difference of QoE models under different video contents. Figure 2(a) shows the QoE model of football game video, and Figure 2(b) shows the QoE model of news broadcast video. The present invention can prove its feasibility with following experiment. In the experiment, 12 video clips with different contents were divided into two groups, one group was Fast-Moving Video, and the other group was Slow-Moving Video. All videos are encoded according to different encoding parameters, as shown in Table 1, and their respective MDVC values are calculated.

表1:测试参数取值Table 1: Test parameter values

参数parameter 取值value 帧率fps_vframe rate fps_v 24,25,30,48,6024,25,30,48,60 码率bitrate_vcode rate bitrate_v 386k,512k,1024k,2400k,5000k386k, 512k, 1024k, 2400k, 5000k 分辨率res_vresolution res_v 320x240,352x288,640x480,960x720320x240, 352x288, 640x480, 960x720 GOP大小λGOP size λ 12,30,60,12012,30,60,120 P帧间的B帧出现频率βThe frequency of B frames between P frames β 0,1,2,3,40,1,2,3,4 编码类型encoding type H.264,MPEG4H.264, MPEG4

图3显示了不同编码参数下视频内容与MDVC的关系,图中’○’和’◇’表示H.264和MPEG4编码的慢速移动视频的MDVC值,’+’和’*’表示H.264和MPEG4编码的高速移动视频的MDVC值。从图中结果可以看到,高速移动视频的MDVC取值在所有的编码条件下都高于慢速移动视频,证明了该方法的正确性。Figure 3 shows the relationship between video content and MDVC under different encoding parameters. In the figure, '○' and '◇' represent the MDVC values of H.264 and MPEG4 encoded slow motion video, and '+' and '*' represent the H. 264 and MPEG4 encoded MDVC values for high-speed mobile video. It can be seen from the results in the figure that the MDVC value of high-speed moving video is higher than that of slow-moving video under all encoding conditions, which proves the correctness of the method.

利用MDVC的计算,可以为视频QoE评估模型提供内容相关参数。图4显示了不同内容的视频受丢包率影响后的不同MOS曲线。可以看到,MDVC越大(高速运动视频),MOS值下降越快,说明视频QoE损伤越剧烈。在QoE评估模型中引入该视频内容度量方法,可以是QoE评估实现内容自适应,从而提高测量准确度。Using the calculation of MDVC, the content-related parameters can be provided for the video QoE evaluation model. Figure 4 shows different MOS curves of videos with different contents affected by the packet loss rate. It can be seen that the larger the MDVC (high-speed motion video), the faster the MOS value drops, indicating that the video QoE damage is more severe. Introducing the video content measurement method in the QoE evaluation model can realize content self-adaptation for QoE evaluation, thereby improving measurement accuracy.

本发明所述的高速识别视频内容变化程度的方法能够以较低的计算复杂度和空间开销,高速评估视频的内容特性,能够满足对视频内容进行简单而快速分类的需要。本发明即可用于VoD等视频点播服务,又可用于视频会议等实时流媒体服务。The method for identifying the change degree of video content at high speed in the present invention can evaluate the content characteristics of video at high speed with low computational complexity and space overhead, and can meet the need for simple and fast classification of video content. The present invention can be used for video-on-demand services such as VoD, and can also be used for real-time streaming media services such as video conferences.

本发明的特点是使用较少的空间和时间开销,快速分析视频的内容特性,相对于基于模式识别的视频内容分析方法,该算法具备计算复杂度低,空间开销小,收敛速度快的特点,能很好的解决视频内容分类问题。实践表明,该算法可用于识别MPEG4、H.264等编码的视频(但不仅限于这两种编码),并且拥有较高的准确度。The feature of the present invention is to use less space and time overhead to quickly analyze the content characteristics of the video. Compared with the video content analysis method based on pattern recognition, the algorithm has the characteristics of low computational complexity, small space overhead, and fast convergence speed. It can solve the problem of video content classification very well. Practice shows that this algorithm can be used to identify videos encoded by MPEG4, H.264 (but not limited to these two encodings), and has high accuracy.

本发明能够在O(1)计算复杂度下快速评估视频内容变化程度,并且适用于在线和离线两种常见的视频播放场景,为视频和视音频混合的用户体验质量(QoE)评估模型提供内容度量参数,提高模型的评估准确度。The present invention can quickly evaluate the change degree of video content under O(1) computational complexity, and is applicable to two common video playback scenarios, online and offline, and provides content for the user quality of experience (QoE) evaluation model combining video and video and audio Measure parameters to improve the evaluation accuracy of the model.

综上所述,本发明有效克服了现有技术中的种种缺点而具高度产业利用价值。To sum up, the present invention effectively overcomes various shortcomings in the prior art and has high industrial application value.

上述实施例仅例示性说明本发明的原理及其功效,而非用于限制本发明。任何熟悉此技术的人士皆可在不违背本发明的精神及范畴下,对上述实施例进行修饰或改变。因此,举凡所属技术领域中具有通常知识者在未脱离本发明所揭示的精神与技术思想下所完成的一切等效修饰或改变,仍应由本发明的权利要求所涵盖。The above-mentioned embodiments only illustrate the principles and effects of the present invention, but are not intended to limit the present invention. Anyone skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas disclosed in the present invention should still be covered by the claims of the present invention.

Claims (4)

1.一种高速识别视频内容变化程度的方法,其特征在于,所述方法包括:1. A method for high-speed recognition of the degree of change of video content, characterized in that the method comprises: S1,将视频帧中的关键帧字节数和总字节数置为0,根据应用场景为待评测视频建立缓冲区,所述应用场景包括离线场景和在线场景,初始化局部变量;当应用场景为在线评测时,为待评测视频建立网络缓冲区,网络缓存区中元素为服务端向客户端顺序发送的数据包队列,并且将为待评测视频建立的网络缓冲区指向媒体流服务器端的网络数据包队列;当应用场景为离线测评时,为待评测视频建立文件缓冲区,所述文件缓冲区中的元素为待测视频的连续帧;S1, set the number of key frame bytes and the total number of bytes in the video frame to 0, set up a buffer for the video to be evaluated according to the application scenario, the application scenario includes an offline scenario and an online scenario, and initialize local variables; when the application scenario For online evaluation, a network buffer is established for the video to be evaluated. The elements in the network buffer are the queues of data packets sent sequentially from the server to the client, and the network buffer established for the video to be evaluated points to the network data of the media stream server Packet queue; when the application scenario is offline evaluation, a file buffer is established for the video to be evaluated, and the elements in the file buffer are continuous frames of the video to be evaluated; S2,从为待评测视频建立缓冲区首部读出下一帧,当应用场景为离线评测时,文件缓存区中的元素是为帧,直接从缓存区中读出首帧,将首帧数据存入临时帧数据缓存中,并执行下一步骤;当应用场景为在线评测时,为待评测视频建立的网络缓存区中的元素为数据包,需要先读取存放首帧的所有数据包,再将所述数据包组装成一个完整的帧,继续执行下一步骤;对于RTP协议的媒体流,为了确保需要读取的数据包的个数,采用清空临时帧数据缓冲数据,从为待评测视频建立的缓冲区中读出队首数据包,查看数据包中RTP协议域是否有标志位,并将所述数据包中的RTP数据域的数据取出存入临时帧数据缓冲数据中,如果查看到数据包中RTP协议域存在标志位,那么说明所述数据包是所承载帧的最后一个数据包,并说明已组装完成好一个帧,可以执行下一步骤;如果查看到数据包中RTP协议域不存在标志位,那么说明所述数据包是所承载帧的中间一个数据包;S2. Read the next frame from the buffer head of the video to be evaluated. When the application scenario is offline evaluation, the elements in the file buffer area are frames, and the first frame is directly read from the buffer area, and the data of the first frame is stored. into the temporary frame data cache, and perform the next step; when the application scenario is online evaluation, the elements in the network buffer area established for the video to be evaluated are data packets, and all data packets that store the first frame need to be read first, and then Assemble the data packets into a complete frame, and proceed to the next step; for the media stream of the RTP protocol, in order to ensure the number of data packets to be read, clear the temporary frame data buffer data, from the video to be evaluated Read out the first data packet in the built-up buffer, check whether there is a flag in the RTP protocol field in the data packet, and take out the data in the RTP data field in the data packet and store it in the temporary frame data buffer data. If there is a flag bit in the RTP protocol field in the data packet, it means that the data packet is the last data packet of the frame carried, and that a frame has been assembled, and the next step can be performed; if the RTP protocol field in the data packet is checked If there is no flag bit, it means that the data packet is a middle data packet of the carried frame; S3,判断从为待评测视频建立缓冲区首部读出的帧是否为关键帧,若是,则执行下一步;若否,则返回步骤S2,重新执行步骤S2;S3, judging whether the frame read out from the buffer head of the video to be evaluated is a key frame, if so, then perform the next step; if not, then return to step S2, and re-execute step S2; S4,计算所述临时帧数据缓冲所占字节数,并累加至总字节数;S4, calculating the number of bytes occupied by the temporary frame data buffer, and accumulating to the total number of bytes; S5,从为待评测视频建立缓冲区首部读出下一帧存入所述临时帧数据缓冲中,该步骤和步骤S2一致;S5, read out the next frame from the head of the buffer for the video to be evaluated and store it in the temporary frame data buffer, this step is consistent with step S2; S6,判断从为待评测视频建立缓冲区首部读出的帧是否为预测帧,若是,则返回步骤S4;若否,则执行下一步;S6, judging whether the frame read from the buffer header for the video to be evaluated is a predicted frame, if so, return to step S4; if not, perform the next step; S7,计算视频内容变化程度度量值。S7. Calculate a video content change degree measurement value. 2.根据权利要求1所述的高速识别视频内容变化程度的方法,其特征在于:当应用场景为在线评测时,表示待评测视频已经存在;当应用场景为离线评测时,表示待评测视频是实时生成;在离线应用场景下,为待评测视频建立文件缓冲区中帧的存放顺序必须与待评测视频存储顺序一致;在在线应用场景下,为待评测视频建立的网络缓存区中帧的存放顺序必须与待评测视频编码后的顺序一致。2. The method for identifying the degree of change of video content at high speed according to claim 1, characterized in that: when the application scenario is online evaluation, it means that the video to be evaluated already exists; when the application scenario is offline evaluation, it means that the video to be evaluated is Real-time generation; in the offline application scenario, the storage order of the frames in the file buffer established for the video to be evaluated must be consistent with the storage order of the video to be evaluated; in the online application scenario, the storage of frames in the network buffer area established for the video to be evaluated The sequence must be the same as the coded sequence of the video to be evaluated. 3.根据权利要求1所述的高速识别视频内容变化程度的方法,其特征在于:在所述步骤S4中,如果所述临时帧数据缓冲是关键帧,那么关键帧字节数为所述临时帧数据缓冲所占字节数。3. The method for identifying the degree of change of video content at a high speed according to claim 1, characterized in that: in the step S4, if the temporary frame data buffer is a key frame, then the key frame byte count is the temporary The number of bytes occupied by the frame data buffer. 4.根据权利要求1所述的高速识别视频内容变化程度的方法,其特征在于:所述视频内容变化程度度量值MDVC是一个区间为[0,1)的小数,MDVC表示视频内容变化的剧烈程度。4. the method for the high-speed identification video content change degree according to claim 1 is characterized in that: described video content change degree metric value MDVC is an interval and is the decimal number of [0,1), and MDVC represents the sharpness of video content change degree.
CN201310068909.6A 2013-03-05 2013-03-05 High-speed recognizing method of change degree of video content Expired - Fee Related CN103200419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310068909.6A CN103200419B (en) 2013-03-05 2013-03-05 High-speed recognizing method of change degree of video content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310068909.6A CN103200419B (en) 2013-03-05 2013-03-05 High-speed recognizing method of change degree of video content

Publications (2)

Publication Number Publication Date
CN103200419A CN103200419A (en) 2013-07-10
CN103200419B true CN103200419B (en) 2015-04-08

Family

ID=48722759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310068909.6A Expired - Fee Related CN103200419B (en) 2013-03-05 2013-03-05 High-speed recognizing method of change degree of video content

Country Status (1)

Country Link
CN (1) CN103200419B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104410860B (en) * 2014-11-28 2017-08-15 北京航空航天大学 A kind of method of high definition ROI videos real-time quality regulation
CN108900804B (en) * 2018-07-09 2020-11-03 南通世盾信息技术有限公司 Self-adaptive video stream processing method based on video entropy
CN111783226B (en) * 2020-06-29 2024-03-19 北京百度网讯科技有限公司 Method, device, electronic device and storage medium for generating autonomous driving scene measurement parameters
CN114584744A (en) * 2022-03-01 2022-06-03 北京掌尚信控科技有限公司 Fault warning method, device, storage medium and equipment
CN115243101B (en) * 2022-06-20 2024-04-12 上海众源网络有限公司 Video dynamic and static ratio identification method and device, electronic equipment and storage medium
CN120416539B (en) * 2025-07-07 2025-09-26 浙江宇视科技有限公司 Video processing method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101835058A (en) * 2009-03-11 2010-09-15 华为技术有限公司 Method, system and equipment for detecting quality of experience of video
CN102223262A (en) * 2011-05-20 2011-10-19 同济大学 Evaluation platform and method of quality of experience of video based on QoS
CN102223565A (en) * 2010-04-15 2011-10-19 上海未来宽带技术及应用工程研究中心有限公司 Streaming media video quality estimation method based on video content features

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101835058A (en) * 2009-03-11 2010-09-15 华为技术有限公司 Method, system and equipment for detecting quality of experience of video
CN102223565A (en) * 2010-04-15 2011-10-19 上海未来宽带技术及应用工程研究中心有限公司 Streaming media video quality estimation method based on video content features
CN102223262A (en) * 2011-05-20 2011-10-19 同济大学 Evaluation platform and method of quality of experience of video based on QoS

Also Published As

Publication number Publication date
CN103200419A (en) 2013-07-10

Similar Documents

Publication Publication Date Title
CN102714752B (en) Video Quality Estimation Techniques
US9398301B2 (en) Parallel video encoding based on complexity analysis
US9723329B2 (en) Method and system for determining a quality value of a video stream
US9253063B2 (en) Bi-directional video compression for real-time video streams during transport in a packet switched network
CN103200419A (en) High-speed recognizing method of change degree of video content
Aguiar et al. Video quality estimator for wireless mesh networks
JP7431514B2 (en) Method and system for measuring quality of video call service in real time
Wang et al. Packet loss rate mapped to the quality of experience
CN105959685B (en) A kind of compression bit rate Forecasting Methodology based on video content and cluster analysis
JP2026508214A (en) Network transmission optimization method, device, electronic device, and computer program
US11399208B2 (en) Packet priority for visual content
US11356722B2 (en) System for distributing an audiovisual content
Niu et al. Tds-krfi: reference frame identification for live web streaming toward http flash video protocol
CN115550695A (en) Multimedia playing method, device, computer equipment
JP5405915B2 (en) Video quality estimation apparatus, video quality estimation method, and video quality estimation apparatus control program
Kirubha et al. MCCA scheduling for enhancing QoS based video streaming for video surveillance applications
Fajardo et al. QoE-driven and network-aware adaptation capabilities in mobile multimedia applications
Begen Quality-aware HTTP adaptive streaming
Uddin et al. Preliminary Study on Video Codec Optimization Using VMAF
CN106134202A (en) MMT assets and there is the distortion signaling of enhancing of ISOBMFF of MMT QOS descriptor of the improvement comprising multiple QOE operating point
Chen et al. Study on relationship between network video packet loss and video quality
Ghani et al. Objective video streaming qoe measurement based on prediction model
Liu et al. Applied Technology Based on NS2 the Research of Transmission of Video Streams in 802.11 Network
Kalampogia et al. Using simulated annealing for improved video bandwidth prediction
Zhang et al. Optimal QoS mapping for streaming video over differentiated services networks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150408

Termination date: 20180305