[go: up one dir, main page]

CN114630103A - Video processing method and device - Google Patents

Video processing method and device Download PDF

Info

Publication number
CN114630103A
CN114630103A CN202011450293.5A CN202011450293A CN114630103A CN 114630103 A CN114630103 A CN 114630103A CN 202011450293 A CN202011450293 A CN 202011450293A CN 114630103 A CN114630103 A CN 114630103A
Authority
CN
China
Prior art keywords
video
frame
transcoding
sequence
initial
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.)
Granted
Application number
CN202011450293.5A
Other languages
Chinese (zh)
Other versions
CN114630103B (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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202011450293.5A priority Critical patent/CN114630103B/en
Priority to US17/547,165 priority patent/US12113993B2/en
Publication of CN114630103A publication Critical patent/CN114630103A/en
Application granted granted Critical
Publication of CN114630103B publication Critical patent/CN114630103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/004Diagnosis, testing or measuring for television systems or their details for digital television systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a video processing method and a video processing device, wherein the video processing method comprises the steps of generating an initial video comprising a plurality of video frames based on a preset video rule; sending the initial video to a preset video transcoding system for video transcoding, and receiving a transcoded video returned by the video transcoding system; determining the number of test objects contained in each video frame in the transcoded video according to the arrangement sequence of the video frames in the transcoded video; comparing the number of the test objects contained in each video frame in the initial video with the number of the test objects contained in each video frame in the transcoded video to determine a transcoding result of the initial video; by comparing whether the number of the test objects in each video frame of the initial video is consistent with the number of the test objects in each video frame of the transcoded video, whether the transcoded video loses frames or drops frames can be judged quickly and accurately.

Description

视频处理方法及装置Video processing method and device

技术领域technical field

本申请涉及计算机技术领域,特别涉及一种视频处理方法。本申请同时涉及一种视频处理装置,一种计算设备,以及一种计算机可读存储介质。The present application relates to the field of computer technology, and in particular, to a video processing method. The present application also relates to a video processing apparatus, a computing device, and a computer-readable storage medium.

背景技术Background technique

目前在视频行业,一般会对用户的原视频进行转码,以通过转码获得不同清晰度的视频,方便用户可以根据清晰度需求有选择的进行播放观看,但是视频转码就会涉及到对用户的原视频的重新处理,因为转码过程中的各种封装和编码协议的兼容问题,可能会出现各种各样的问题,例如转码后的视频会出现丢帧、掉帧的问题,极大的影响用户的视频观看体验。At present, in the video industry, the user's original video is generally transcoded to obtain videos of different resolutions through transcoding, so that users can selectively play and watch according to the resolution requirements, but video transcoding will involve In the reprocessing of the user's original video, various problems may occur due to the compatibility of various encapsulation and encoding protocols during the transcoding process. It greatly affects the user's video viewing experience.

发明内容SUMMARY OF THE INVENTION

有鉴于此,本申请实施例提供了一种视频处理方法。本申请同时涉及一种视频处理装置,一种计算设备,以及一种计算机可读存储介质,以解决现有技术中存在的转码后的视频会出现丢帧、掉帧的技术缺陷。In view of this, embodiments of the present application provide a video processing method. The present application also relates to a video processing apparatus, a computing device, and a computer-readable storage medium, so as to solve the technical defects in the prior art that the transcoded video will have frame loss and frame drop.

根据本申请实施例的第一方面,提供了一种视频处理方法,包括:According to a first aspect of the embodiments of the present application, a video processing method is provided, including:

基于预设视频规则生成包括多个视频帧的初始视频,其中,每个视频帧均包含至少一个数量逐帧递增的测试对象;Generate an initial video including a plurality of video frames based on preset video rules, wherein each video frame includes at least one test object whose number increases frame by frame;

将所述初始视频发送至预设视频转码系统进行视频转码,并接收所述视频转码系统返回的转码视频;sending the initial video to a preset video transcoding system for video transcoding, and receiving the transcoded video returned by the video transcoding system;

按照所述转码视频中视频帧的排列顺序,确定所述转码视频中每个视频帧包含的测试对象的数量;According to the arrangement order of the video frame in the described transcoded video, determine the quantity of the test object included in each video frame in the described transcoded video;

将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果。The number of test objects contained in each video frame in the initial video is compared with the number of test objects contained in each video frame in the transcoded video to determine a transcoding result of the initial video.

根据本申请实施例的第二方面,提供了一种视频处理装置,包括:According to a second aspect of the embodiments of the present application, a video processing apparatus is provided, including:

视频生成模块,被配置为基于预设视频规则生成包括多个视频帧的初始视频,其中,每个视频帧均包含至少一个数量逐帧递增的测试对象;A video generation module, configured to generate an initial video including a plurality of video frames based on preset video rules, wherein each video frame includes at least one test object whose number increases frame by frame;

视频转码模块,被配置为将所述初始视频发送至预设视频转码系统进行视频转码,并接收所述视频转码系统返回的转码视频;a video transcoding module, configured to send the initial video to a preset video transcoding system for video transcoding, and receive the transcoded video returned by the video transcoding system;

对象数量确定模块,被配置为按照所述转码视频中视频帧的排列顺序,确定所述转码视频中每个视频帧包含的测试对象的数量;an object quantity determination module, configured to determine the number of test objects included in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video;

转码结果确定模块,被配置为将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果。The transcoding result determination module is configured to compare the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the The transcoding result of the original video.

根据本申请实施例的第三方面,提供了一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,所述处理器执行所述指令时实现所述视频处理方法的步骤。According to a third aspect of the embodiments of the present application, a computing device is provided, including a memory, a processor, and computer instructions stored in the memory and executable on the processor, the processor implementing the instructions when the processor executes the instructions The steps of a video processing method.

根据本申请实施例的第四方面,提供了一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时实现所述视频处理方法的步骤。According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the instructions are executed by a processor, implements the steps of the video processing method.

本申请提供的视频处理方法,包括基于预设视频规则生成包括多个视频帧的初始视频,其中,每个视频帧均包含至少一个数量逐帧递增的测试对象;将所述初始视频发送至预设视频转码系统进行视频转码,并接收所述视频转码系统返回的转码视频;按照所述转码视频中视频帧的排列顺序,确定所述转码视频中每个视频帧包含的测试对象的数量;将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果。The video processing method provided by the present application includes generating an initial video including a plurality of video frames based on a preset video rule, wherein each video frame includes at least one test object whose number increases frame by frame; sending the initial video to a pre- Suppose the video transcoding system performs video transcoding, and receives the transcoded video returned by the video transcoding system; according to the arrangement order of the video frames in the transcoded video, determine the content of each video frame in the transcoded video. The number of test objects; compare the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding of the initial video. code result.

具体的,所述视频处理方法通过在初始视频的每个视频帧中设置测试对象,以及获取与初始视频对应的转码后的转码视频的每个视频帧中的测试对象,按照视频帧的排列顺序,通过比较初始视频的每个视频帧中测试对象的数量与转码视频的每个视频帧中测试对象的数量是否一致,可以快速且准确的判断出转码后的视频是否发生了丢帧、掉帧问题。Specifically, in the video processing method, the test object is set in each video frame of the initial video, and the test object in each video frame of the transcoded transcoded video corresponding to the initial video is obtained. Arrangement order, by comparing the number of test objects in each video frame of the original video with the number of test objects in each video frame of the transcoded video, you can quickly and accurately determine whether the transcoded video is lost or not. Frame, drop frame problem.

附图说明Description of drawings

图1是本申请一实施例提供的一种视频处理方法的流程图;1 is a flowchart of a video processing method provided by an embodiment of the present application;

图2是本申请一实施例提供的一种视频处理方法中初始视频的一个视频帧的示意图;2 is a schematic diagram of a video frame of an initial video in a video processing method provided by an embodiment of the present application;

图3是本申请一实施例提供的一种视频处理方法中初始视频的多个视频帧的示意图;3 is a schematic diagram of multiple video frames of an initial video in a video processing method provided by an embodiment of the present application;

图4是本申请一实施例提供的一种视频处理方法中初始视频的每个视频帧中数量展示区的示意图;4 is a schematic diagram of a quantity display area in each video frame of an initial video in a video processing method provided by an embodiment of the present application;

图5是本申请一实施例提供的一种视频处理装置的结构示意图;5 is a schematic structural diagram of a video processing apparatus provided by an embodiment of the present application;

图6是本申请一实施例提供的一种计算设备的结构框图。FIG. 6 is a structural block diagram of a computing device provided by an embodiment of the present application.

具体实施方式Detailed ways

在下面的描述中阐述了很多具体细节以便于充分理解本申请。但是本申请能够以很多不同于在此描述的其它方式来实施,本领域技术人员可以在不违背本申请内涵的情况下做类似推广,因此本申请不受下面公开的具体实施的限制。In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar promotions without violating the connotation of the present application. Therefore, the present application is not limited by the specific implementation disclosed below.

在本申请一个或多个实施例中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本申请一个或多个实施例。在本申请一个或多个实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本申请一个或多个实施例中使用的术语“和/或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。The terminology used in one or more embodiments of the present application is for the purpose of describing a particular embodiment only, and is not intended to limit the one or more embodiments of the present application. As used in one or more embodiments of this application and the appended claims, the singular forms "a," "the," and "the" are intended to include the plural forms as well, unless the context clearly dictates otherwise. It will also be understood that the term "and/or" as used in one or more embodiments of this application refers to and includes any and all possible combinations of one or more of the associated listed items.

应当理解,尽管在本申请一个或多个实施例中可能采用术语第一、第二等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本申请一个或多个实施例范围的情况下,第一也可以被称为第二,类似地,第二也可以被称为第一。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。It should be understood that although the terms first, second, etc. may be used in one or more embodiments of the present application to describe various information, such information should not be limited by these terms. These terms are only used to distinguish the same type of information from each other. For example, the first could be termed the second, and similarly the second could be termed the first, without departing from the scope of one or more embodiments of the present application. Depending on the context, the word "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determining."

首先,对本申请一个或多个实施例涉及的名词术语进行解释。First, the terminology involved in one or more embodiments of the present application will be explained.

转码:对音视频进行重新编码的过程。Transcoding: The process of re-encoding audio and video.

丢帧:视频转码后导致某些帧级别的视频画面丢失。Dropped frames: Some frame-level video images are lost after video transcoding.

掉帧:视频转码后导致某些帧级别的视频画面丢失,并由相邻帧复制补充,但是视频画面在该时间段看起来会不流畅,好像卡顿了一样。Dropped frames: Some frame-level video pictures are lost after video transcoding, and are supplemented by adjacent frames, but the video picture will look unsmooth during this time period, as if it is stuck.

视频水印:在视频画面上增加一些文字或者贴图,例如视频上的台标/logo等。Video watermark: Add some text or stickers to the video screen, such as the station logo/logo on the video.

OCR:Optical Character Recognition,光学字符识别,指用机器电子识别文字字符内容。OCR: Optical Character Recognition, optical character recognition, refers to the use of machine electronic recognition of text character content.

目前对视频转码后出现的丢帧和掉帧的现象,机器很难主动识别,人眼判断也需要对帧率特别敏感的人才可以看出来,因此对视频转码后的视频质量检测是现有技术中的痛点。At present, it is difficult for machines to actively identify the phenomenon of dropped frames and dropped frames after video transcoding, and human eyes need to be particularly sensitive to the frame rate to see it. Therefore, the video quality detection after video transcoding is now There are pain points in technology.

基于此,在本申请中,提供了一种视频处理方法,本申请同时涉及一种视频处理装置,一种计算设备,以及一种计算机可读存储介质,在下面的实施例中逐一进行详细说明。Based on this, in the present application, a video processing method is provided. The present application also relates to a video processing apparatus, a computing device, and a computer-readable storage medium, which are described in detail in the following embodiments one by one. .

参见图1,图1示出了根据本申请一实施例提供的一种视频处理方法的流程图,具体包括以下步骤:Referring to FIG. 1, FIG. 1 shows a flowchart of a video processing method provided according to an embodiment of the present application, which specifically includes the following steps:

步骤102:基于预设视频规则生成包括多个视频帧的初始视频,其中,每个视频帧均包含至少一个数量逐帧递增的测试对象。Step 102: Generate an initial video including a plurality of video frames based on a preset video rule, wherein each video frame includes at least one test object whose number increases frame by frame.

本申请实施例提供的视频处理方法应用于对视频转码系统的质量检测场景中,首先基于用户需求生成特殊的初始视频,然后将生成的初始视频输入待质量检测的视频转码系统中,通过对比检测转码前的初始视频与转码后的转码视频,判断转码前的初始视频与转码后的转码视频是否有差异,从而确定视频转码系统是否存在转码质量问题,例如若转码前的初始视频与转码后的转码视频没有差异,则说明视频转码系统不存在转码质量问题,转码是成功的;若转码前的初始视频与转码后的转码视频存在差异,则说明视频转码系统存在转码质量问题,转码可能存在丢帧或者掉帧等问题,那么需要对视频转码系统进行修复。The video processing method provided by the embodiment of the present application is applied to a quality detection scenario of a video transcoding system. First, a special initial video is generated based on user requirements, and then the generated initial video is input into the video transcoding system to be quality detected, and the Compare and detect the initial video before transcoding and the transcoded video after transcoding, and determine whether there is a difference between the initial video before transcoding and the transcoded video after transcoding, so as to determine whether there is a transcoding quality problem in the video transcoding system, such as If there is no difference between the initial video before transcoding and the transcoded video after transcoding, it means that there is no transcoding quality problem in the video transcoding system, and the transcoding is successful; If there is a difference in the transcoded video, it means that the video transcoding system has transcoding quality problems, and the transcoding may have problems such as frame loss or frame drop, so the video transcoding system needs to be repaired.

其中,预设视频规则可以理解为用户需求,例如用户需求为想要生成包括多个底图为白色的视频帧的初始视频,又或者用户需求为想要生成包括多个底图为黑色的视频帧的初始视频等,具体实施时,预设视频规则可以根据实际应用进行设置,本申请对此不做任何限定。The preset video rules can be understood as user requirements. For example, the user requirement is to generate an initial video including multiple video frames with white base images, or the user requirement is to generate a video including multiple black background images. The initial video of the frame, etc., during specific implementation, the preset video rules can be set according to the actual application, which is not limited in this application.

具体的,所述基于预设视频规则生成包括多个视频帧的初始视频,包括:Specifically, generating an initial video including multiple video frames based on preset video rules includes:

基于预设视频规则生成包括多个由第一像素的底图和第二像素的测试对象组成的视频帧的初始视频,其中,所述第一像素和所述第二像素的相似度小于等于预设相似度阈值。An initial video including a plurality of video frames consisting of a base image of a first pixel and a test object of a second pixel is generated based on a preset video rule, wherein the similarity of the first pixel and the second pixel is less than or equal to a predetermined Set the similarity threshold.

其中,第一像素和第二像素的像素值不同,且第一像素和第二像素的像素值的相似度小于等于预设相似度阈值;即可以理解为第一像素为白色的情况下,第二像素则为与白色的第一像素反差较大的黑色、紫色或者绿色等等。Wherein, the pixel values of the first pixel and the second pixel are different, and the similarity of the pixel values of the first pixel and the second pixel is less than or equal to the preset similarity threshold; that is, it can be understood that when the first pixel is white, the first pixel is white. The two pixels are black, purple, or green, etc., which have a greater contrast with the first pixel of white.

举例说明,若第一像素为白色,第二像素为黑色,那么基于预设视频规则生成包括多个由第一像素的底图和第二像素的测试对象组成的视频帧的初始视频,可以理解为基于预设视频规则生成多个由白色的底图和黑色的测试对象组成的视频帧的初始视频。For example, if the first pixel is white and the second pixel is black, then based on the preset video rule, an initial video including a plurality of video frames consisting of the base image of the first pixel and the test object of the second pixel is generated, it can be understood that An initial video for generating multiple video frames consisting of a white basemap and black test objects based on preset video rules.

其中,测试对象包括但不限于任何形状的测试块,例如正方形、圆形或者长方形的黑色测试块。Wherein, the test objects include but are not limited to test blocks of any shape, such as square, circular or rectangular black test blocks.

参见图2,图2示出了根据本申请一实施例提供的一种视频处理方法中初始视频的一个视频帧的示意图。Referring to FIG. 2, FIG. 2 shows a schematic diagram of a video frame of an initial video in a video processing method provided according to an embodiment of the present application.

图2为初始视频中的一个视频帧的示意图,该视频帧由白色的底图和黑色的长方形测试块组成,其中,该黑色的长方形测试块即为上述的测试对象。FIG. 2 is a schematic diagram of a video frame in the initial video. The video frame is composed of a white base image and a black rectangular test block, wherein the black rectangular test block is the above-mentioned test object.

本申请实施例中,通过像素值反差较大的底图和测试对象生成视频帧,再由多个此种视频帧组成初始视频,在后续对初始视频的每个视频帧中的测试对象的数量进行统计时,可以方便快速的提取出每个视频中颜色反差较大的测试对象,避免测试对象与底图的颜色较为相近时,无法很准确的查找到测试对象的轮廓,无法实现测试对象的准确获取。In the embodiment of the present application, a video frame is generated from a base image with a large pixel value contrast and a test object, and then an initial video is composed of a plurality of such video frames. When performing statistics, it is convenient and quick to extract the test objects with large color contrast in each video, so as to avoid the inability to accurately find the outline of the test object when the color of the test object and the base image are relatively similar, and it is impossible to realize the detection of the test object. Accurately obtain.

具体实施时,基于预设规则生成的初始视频中包括多个视频帧,每个视频帧由颜色反差较大的底图和测试对象组成,且每个视频帧中的测试对象的数量呈线性递增,例如若初始视频中包括3个视频帧:视频帧1、视频帧2以及视频帧3,那么在视频帧1中包括10个测试对象的情况下,视频帧2中则包括11个测试对象,视频帧3中包括12个测试对象;即初始视频的每个视频帧中包含的测试对象的数量是根据该初始视频的每个视频帧的排列顺序逐帧递增的。During specific implementation, the initial video generated based on the preset rules includes a plurality of video frames, each video frame is composed of a base image with large color contrast and a test object, and the number of test objects in each video frame increases linearly For example, if the initial video includes 3 video frames: video frame 1, video frame 2 and video frame 3, then when video frame 1 includes 10 test objects, video frame 2 includes 11 test objects, The video frame 3 includes 12 test objects; that is, the number of test objects included in each video frame of the initial video increases frame by frame according to the arrangement order of each video frame of the initial video.

参见图3,图3示出了根据本申请一实施例提供的一种视频处理方法中初始视频的多个视频帧的示意图。Referring to FIG. 3 , FIG. 3 shows a schematic diagram of multiple video frames of an initial video in a video processing method provided according to an embodiment of the present application.

图3的初始视频中包括视频帧1、视频帧2以及视频帧3,其中,视频帧1中包括10个测试对象,视频帧2中包括11个测试对象,视频帧3中包括12个测试对象。The initial video of FIG. 3 includes video frame 1, video frame 2 and video frame 3, wherein video frame 1 includes 10 test objects, video frame 2 includes 11 test objects, and video frame 3 includes 12 test objects .

具体的,为了便于对每个视频帧中的测试对象进行提取,每个视频帧中的测试对象可以统一排列在视频帧的一个固定位置,当然实际应用中也不限定于此种排列,也可以将每个视频帧中的测试对象分别排列在不同的位置,例如将视频帧1中的测试对象排列在视频帧1的左上角,将视频帧2中的测试对象排列在视频帧2的右上角,将视频帧3中的测试对象排列在视频帧3的中间等。Specifically, in order to facilitate the extraction of the test objects in each video frame, the test objects in each video frame can be uniformly arranged in a fixed position of the video frame. Of course, the actual application is not limited to this arrangement. Arrange the test objects in each video frame in different positions, for example, arrange the test objects in video frame 1 in the upper left corner of video frame 1, and arrange the test objects in video frame 2 in the upper right corner of video frame 2 , arrange the test objects in video frame 3 in the middle of video frame 3, etc.

具体的,所述基于预设视频规则生成包括多个视频帧的初始视频之后,还包括:Specifically, after the initial video including multiple video frames is generated based on the preset video rules, the method further includes:

在所述初始视频的每个视频帧的预设位置设置一个测试对象的数量展示区;A quantity display area of a test object is set at the preset position of each video frame of the initial video;

将所述初始视频的每个视频帧包含的测试对象的数量放置在所述数量展示区。The number of test objects contained in each video frame of the initial video is placed in the number display area.

其中,数量展示区可以理解为在初始视频的每个视频帧的预设位置设置的一个数字水印,使用数字水印的目的是为了方便人们识别观看到每个视频帧中包含的测试对象的数量,与在每个视频帧中设置测试对象不同,每个视频帧中包含的测试对象是为了方便机器识别统计的,在具体实施时,由于测试对象是用数字像素表示颜色的,那么具体统计时计算机可以直接统计每个视频帧中包含的第二像素(如黑色像素)的个数即可以获得每个视频帧的测试对象的数量。Among them, the quantity display area can be understood as a digital watermark set at the preset position of each video frame of the initial video. The purpose of using the digital watermark is to facilitate people to identify and watch the number of test objects contained in each video frame. Different from setting the test object in each video frame, the test object contained in each video frame is for the convenience of machine identification and statistics. During the specific implementation, since the test object is represented by digital pixels, the computer The number of test objects in each video frame can be obtained by directly counting the number of second pixels (eg, black pixels) included in each video frame.

实际应用中,为了方便的对初始视频的每个视频帧中的测试对象的数量进行获取,可以在初始视频的每个视频帧的预设位置设置一个测试对象的数量展示区,然后将初始视频的每个视频帧包含的测试对象的数量方式在该数量展示区进行展示,其中,预设位置可以为每个视频帧的任意位置,例如四个角或者是中间区域均可。为了避免数量展示区对测试对象进行遮挡,可以将测试对象和数量展示区分别设置在每个视频帧的不同位置,例如将测试对象排列在视频帧的左上角,将数量展示区放置在视频帧的右上角等。In practical applications, in order to conveniently obtain the number of test objects in each video frame of the initial video, a display area for the number of test objects can be set at the preset position of each video frame of the initial video, and then the initial video The quantity of the test objects contained in each video frame of , is displayed in the quantity display area, wherein the preset position can be any position of each video frame, such as the four corners or the middle area. In order to avoid the occlusion of the test object by the quantity display area, you can set the test object and the quantity display area at different positions of each video frame, for example, arrange the test object in the upper left corner of the video frame, and place the quantity display area in the video frame. upper right corner, etc.

其中,数量展示区放置的是初始视频的每个视频帧中包含的测试对象的数量,沿用上例,视频帧1的数量展示区放置的是视频帧1中包含的测试对象的数量10,视频帧2的数量展示区放置的是视频帧2中包含的测试对象的数量11,视频帧3的数量展示区放置的是视频帧3中包含的测试对象的数量12。Among them, the number display area is placed in the number of test objects contained in each video frame of the initial video. Following the above example, the number display area of video frame 1 is placed in the number of test objects contained in video frame 1. The number of 10, the video The number 11 of the test objects contained in the video frame 2 is placed in the number display area of frame 2, and the number 12 of the test objects contained in the video frame 3 is placed in the number display area of the video frame 3.

参见图4,图4示出了根据本申请一实施例提供的一种视频处理方法中初始视频的每个视频帧中数量展示区的示意图。Referring to FIG. 4, FIG. 4 shows a schematic diagram of a quantity display area in each video frame of an initial video in a video processing method provided according to an embodiment of the present application.

图4的初始视频中包括视频帧1、视频帧2以及视频帧3,其中,视频帧1中包括10个测试对象,视频帧2中包括11个测试对象,视频帧3中包括12个测试对象。The initial video of FIG. 4 includes video frame 1, video frame 2 and video frame 3, wherein video frame 1 includes 10 test objects, video frame 2 includes 11 test objects, and video frame 3 includes 12 test objects .

其中,测试对象均排列在每个视频帧的左上角,而每个视频帧的右上角均设置一个数量展示区,用于展示每个视频帧中包括的测试对象的数量;即视频帧1的右上角的数量展示区放置的是视频帧1中包含的测试对象的数量10,视频帧2的右上角的数量展示区放置的是视频帧2中包含的测试对象的数量11,视频帧3的右上角的数量展示区放置的是视频帧3中包含的测试对象的数量12。Among them, the test objects are arranged in the upper left corner of each video frame, and a quantity display area is set in the upper right corner of each video frame to display the number of test objects included in each video frame; The quantity display area in the upper right corner places the number 10 of test objects contained in video frame 1, the quantity display area in the upper right corner of video frame 2 places the number 11 of the test objects contained in video frame 2, and the number of test objects contained in video frame 3 is 11. The number display area in the upper right corner places the number 12 of test objects contained in video frame 3.

本申请实施例中,为了更加方便的对初始视频中每个视频帧包含的测试对象的数量进行确定,可以在初始视频的每个视频帧中设置一个测试对象的数量展示区,将初始视频的每个视频帧包含的测试对象的数量放置且展示在对应的数量展示区。In the embodiment of the present application, in order to more conveniently determine the number of test objects contained in each video frame in the initial video, a display area for the number of test objects may be set in each video frame of the initial video, and the The number of test objects contained in each video frame is placed and displayed in the corresponding number display area.

步骤104:将所述初始视频发送至预设视频转码系统进行视频转码,并接收所述视频转码系统返回的转码视频。Step 104: Send the initial video to a preset video transcoding system for video transcoding, and receive the transcoded video returned by the video transcoding system.

其中,预设视频转码系统包括任意一个待进行转码质量测试的视频转码系统。Wherein, the preset video transcoding system includes any video transcoding system to be tested for transcoding quality.

具体的,生成包括多个视频帧的初始视频之后,将该初始视频发送至特定的需要进行转码质量测试的视频转码系统中进行转码,然后接收该视频转码系统返回的对初始视频转码后生成的转码视频。Specifically, after generating an initial video including multiple video frames, the initial video is sent to a specific video transcoding system that needs to be tested for transcoding quality for transcoding, and then the initial video returned by the video transcoding system is received. The transcoded video generated after transcoding.

具体实施时,所述将所述初始视频发送至预设视频转码系统进行视频转码,并接收所述视频转码系统返回的转码视频之后,还包括:During specific implementation, after the initial video is sent to a preset video transcoding system for video transcoding, and the transcoded video returned by the video transcoding system is received, the method further includes:

通过预设识别算法识别所述转码视频中每个视频帧在所述数量展示区展示的测试对象的数量。Identify the number of test objects displayed in the number display area for each video frame in the transcoded video by using a preset identification algorithm.

实际应用中,由于初始视频的每个视频帧的数量展示区均携带有该视频帧包含的测试对象的数量,且转码过程中,该数量展示区以及该数量展示区放置的测试对象的数量一般不会因为转码而丢失,或者出现乱码等,那么在转码后,转码视频的每个视频帧中也存在数量展示区,且每个数量展示区包含有一个测试对象的数量。In practical applications, since the number display area of each video frame of the initial video carries the number of test objects contained in the video frame, and during the transcoding process, the number of display areas and the number of test objects placed in the number display area are Generally, it will not be lost or garbled due to transcoding. After transcoding, there is also a quantity display area in each video frame of the transcoded video, and each quantity display area contains the quantity of a test object.

因此在获得转码视频后,可以通过预设识别算法(例如OCR识别算法)识别出转码视频中每个视频帧在数量展示区展示的测试对象的数量。Therefore, after obtaining the transcoded video, the number of test objects displayed in the quantity display area for each video frame in the transcoded video can be identified through a preset recognition algorithm (eg, an OCR recognition algorithm).

本申请实施例中,通过识别算法识别出转码视频中每个视频帧在数量展示区展示的测试对象的数量,后续可以基于该转码视频中每个视频帧在数量展示区展示的测试对象的数量与初始视频的每个视频帧在数量展示区展示的测试对象的数量进行比较,从而准确的确定初始视频在转码成转码视频后是否发生了丢帧或者掉帧的情况。In the embodiment of the present application, the number of test objects displayed in the quantity display area for each video frame in the transcoded video is identified by an identification algorithm, and subsequent test objects can be displayed in the quantity display area based on each video frame in the transcoded video. The number of each video frame of the original video is compared with the number of test objects displayed in the quantity display area, so as to accurately determine whether the original video has dropped or dropped frames after transcoding into transcoded video.

步骤106:按照所述转码视频中视频帧的排列顺序,确定所述转码视频中每个视频帧包含的测试对象的数量。Step 106: Determine the number of test objects included in each video frame in the transcoded video according to the sequence of video frames in the transcoded video.

具体的,获得转码视频后,按照转码视频中视频帧的排列顺序,确定该转码视频中每个视频帧包含的测试对象的数量。Specifically, after the transcoded video is obtained, the number of test objects contained in each video frame in the transcoded video is determined according to the arrangement order of the video frames in the transcoded video.

具体实施时,获得转码视频后,需要按照转码视频中视频帧的排列顺序,通过计算机统计出每个视频帧中包含的测试对象的数量,而非通过识别算法对转码视频的每个视频帧中数量展示区中的测试对象的数量进行识别。In the specific implementation, after obtaining the transcoded video, it is necessary to count the number of test objects contained in each video frame through the computer according to the arrangement order of the video frames in the transcoded video, instead of using the identification algorithm to identify each frame of the transcoded video. The number of test objects in the number display area in the video frame is identified.

由于初始视频转码的过程中可能会出现丢帧或者掉帧的现象,因此转码后的转码视频中的视频帧可能会出现错乱,此时重新统计转码视频的每个视频帧中包含的测试对象的数量会使得后续的比对更加准确。Since frames may be dropped or dropped during the initial video transcoding process, the video frames in the transcoded video may be chaotic. The number of test subjects will make subsequent alignments more accurate.

步骤108:将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果。Step 108: compare the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video .

其中,根据初始视频中每个视频帧包含的测试对象的数量与转码视频中每个视频帧包含的测试对象的数量进行比对,以确定出初始视频的转码结果至少包括两种情况可以实现,一种是通过计算机统计出来的测试对象的数量进行比对,另一种可以直接通过每个视频帧的数量展示区展示的测试对象的数量进行比对,具体实现方式如下所述:Wherein, according to the number of test objects contained in each video frame in the initial video and the number of test objects contained in each video frame in the transcoded video, it is determined that the transcoding result of the initial video includes at least two cases. One is to compare the number of test objects counted by the computer, and the other is to directly compare the number of test objects displayed in the number display area of each video frame. The specific implementation methods are as follows:

所述将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果,包括:Described comparing the number of test objects included in each video frame in the initial video with the number of test objects included in each video frame in the transcoded video, to determine the transcoding result of the initial video, include:

将所述初始视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第一数量序列,以及将所述转码视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第二数量序列;The number of test objects included in each video frame in the initial video is arranged frame by frame to form a first sequence of numbers, and the number of test objects included in each video frame in the transcoded video is arranged frame by frame, with forming a second sequence of quantities;

将所述第一数量序列与所述第二数量序列进行比对,在所述第一数量序列与所述第二数量序列全部匹配的情况下,确定所述初始视频转码成功。The first quantity sequence is compared with the second quantity sequence, and in the case that the first quantity sequence and the second quantity sequence all match, it is determined that the initial video transcoding is successful.

具体的,将初始视频中每个视频帧包含的测试对象的数量按照初始视频中所有视频帧的排列顺序逐帧排列,以形成第一数量序列。Specifically, the number of test objects included in each video frame in the initial video is arranged frame by frame according to the arrangement order of all video frames in the initial video, to form a first quantity sequence.

沿用上例,将初始视频中每个视频帧包含的测试对象的数量按照初始视频中所有视频帧的排列顺序逐帧排列,形成的第一数量序列为【10、11、12】。Following the above example, the number of test objects contained in each video frame in the initial video is arranged frame by frame according to the arrangement order of all video frames in the initial video, and the first number sequence formed is [10, 11, 12].

同时,将转码视频中每个视频帧包含的测试对象的数量按照转码视频中所有视频帧的排列顺序逐帧排列,以形成第二数量序列。At the same time, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement sequence of all video frames in the transcoded video, to form a second quantity sequence.

例如,转码视频仍包括三个顺序排列的视频帧:视频帧1、视频帧2和视频帧3,那么将转码视频中每个视频帧包含的测试对象的数量按照转码视频中所有视频帧的排列顺序逐帧排列,形成的第二数量序列为【10、11、12】。For example, the transcoded video still includes three video frames arranged in sequence: video frame 1, video frame 2 and video frame 3, then the number of test objects contained in each video frame in the transcoded video is determined according to the number of all the video frames in the transcoded video. The arrangement order of the frames is arranged frame by frame, and the second number sequence formed is [10, 11, 12].

那么将第一数量序列与第二数量序列进行比对,可以确定第一数量序列和第二数量序列全部匹配,此时则可以确定初始视频转码成功,而初始视频转码成功则可以说明当前的视频转码系统的转码质量良好。Then, by comparing the first quantity sequence with the second quantity sequence, it can be determined that the first quantity sequence and the second quantity sequence all match. At this time, it can be determined that the initial video transcoding is successful, and the success of the initial video transcoding can indicate that the current The transcoding quality of the video transcoding system is good.

本申请实施例中,通过将统计的初始视频的每个视频帧包含的测试对象的数量与统计的转码后的转码视频的每个视频帧包含的测试对象的数量进行比对,根据比对结果可以快速准确的判断出初始视频的转码结果是否正确,提升用户体验。In the embodiment of the present application, by comparing the number of test objects contained in each video frame of the initial video with the number of test objects contained in each video frame of the transcoded transcoded video, according to the comparison The result can be quickly and accurately judged whether the transcoding result of the initial video is correct, and the user experience can be improved.

实际应用中,所述将所述第一数量序列与所述第二数量序列进行比对之后,还包括:In a practical application, after aligning the sequence of the first quantity with the sequence of the second quantity, the method further includes:

在所述第一数量序列与所述第二数量序列不匹配的情况下,确定所述第二数量序列中与所述第一数量序列不匹配数量对应的视频帧,将所述第二数量序列中与所述第一数量序列不匹配数量对应的视频帧作为验证视频帧;In the case where the first quantity sequence does not match the second quantity sequence, determine the video frames in the second quantity sequence that correspond to the quantity that does not match the first quantity sequence, and assign the second quantity sequence The video frame corresponding to the unmatched quantity of the first quantity sequence is used as the verification video frame;

在所述验证视频帧满足预设转码条件的情况下,确定所述初始视频转码成功。In the case that the verification video frame satisfies the preset transcoding condition, it is determined that the initial video transcoding is successful.

其中,预设转码条件根据实际应用进行设置,本申请对此不做任何限定,例如预设转码条件为视频帧1可以有重复帧或者是视频帧2在转码的过程中可以丢帧。The preset transcoding condition is set according to the actual application, and this application does not make any limitation on this. For example, the preset transcoding condition is that video frame 1 may have repeated frames or video frame 2 may drop frames during the transcoding process .

沿用上例,若转码视频包括顺序排列的三个视频帧:视频帧1和视频帧3,将转码视频中每个视频帧包含的测试对象的数量按照转码视频中所有视频帧的排列顺序逐帧排列,形成的第二数量序列为【10、12、11】;那么第一数量序列【10、11、12】与第二数量序列【10、12】则不匹配,此时确定的第二数量序列中与第一数量序列不匹配的测试对象的数量为11,则不匹配的测试对象的数量对应的视频帧为初始视频中的视频帧2,那么视频帧2则为验证视频帧。Following the above example, if the transcoded video includes three video frames arranged in sequence: video frame 1 and video frame 3, the number of test objects contained in each video frame in the transcoded video is arranged according to the arrangement of all video frames in the transcoded video. The sequence is arranged frame by frame, and the second quantity sequence formed is [10, 12, 11]; then the first quantity sequence [10, 11, 12] does not match the second quantity sequence [10, 12]. The number of test objects that do not match the first number sequence in the second quantity sequence is 11, then the video frame corresponding to the number of unmatched test objects is the video frame 2 in the initial video, then the video frame 2 is the verification video frame .

若预设转码条件为视频帧2需要在视频转码的过程丢帧,根据该预设转码条件可以确定该验证视频帧满足该预设转码条件,此时也可以说明初始视频转码成功。If the preset transcoding condition is that video frame 2 needs to be dropped during the video transcoding process, it can be determined according to the preset transcoding condition that the verified video frame satisfies the preset transcoding condition, and the initial video transcoding can also be explained at this time. success.

本说明书实施例中,由于具体的视频转码场景不同,一些特殊视频转码场景中为了视频特效等需求会允许在视频转码的过程中出现丢帧、掉帧等情况的发生,因此在第一数量序列和第二数量序列不匹配的情况下,还需要基于具体应用场景中的预设转码条件再次验证初始视频是否转码成功,以扩大本申请提供的视频处理方法的应用场景,提升用户使用体验。In the embodiments of this specification, due to different specific video transcoding scenarios, some special video transcoding scenarios may allow frame loss, frame drop, etc. to occur during the video transcoding process for the needs of video special effects. In the case where the first quantity sequence and the second quantity sequence do not match, it is also necessary to re-verify whether the initial video is successfully transcoded based on the preset transcoding conditions in the specific application scenario, so as to expand the application scenarios of the video processing method provided in this application and improve the User experience.

此外,所述将所述第一数量序列与所述第二数量序列进行比对之后,还包括:In addition, after aligning the sequence of the first quantity with the sequence of the second quantity, the method further includes:

在所述第一数量序列与所述第二数量序列不匹配的情况下,确定所述初始视频转码失败,并基于不匹配的第一数量序列和第二数量序列中的数量对应的视频帧对所述转码视频进行解析,以对所述视频转码系统进行修复。In the case where the first number sequence does not match the second number sequence, determine that the initial video transcoding fails, and based on the mismatched first number sequence and the second number sequence of numbers corresponding to the number of video frames The transcoded video is parsed to repair the video transcoding system.

又或者是在所述验证视频帧不满足预设转码条件的情况下,基于所述验证视频帧对所述转码视频进行解析,以对所述视频转码系统进行修复。Alternatively, if the verification video frame does not meet the preset transcoding condition, the transcoded video is parsed based on the verification video frame, so as to repair the video transcoding system.

沿用上例,若转码视频仍包括顺序排列的三个视频帧:视频帧1、视频帧3和视频帧2,将转码视频中每个视频帧包含的测试对象的数量按照转码视频中所有视频帧的排列顺序逐帧排列,形成的第二数量序列为【10、12、11】。Following the above example, if the transcoded video still includes three video frames arranged in sequence: video frame 1, video frame 3 and video frame 2, the number of test objects contained in each video frame in the transcoded video is determined according to the number of test objects in the transcoded video. The arrangement order of all video frames is arranged frame by frame, and the second number sequence formed is [10, 12, 11].

那么将第一数量序列与第二数量序列进行比对,可以确定第一数量序列和第二数量序列不匹配,此时则可以确定初始视频转码失败,即转码之后的视频帧2和视频帧3的顺序发生了错乱,则可以说明当前的视频转码系统的转码质量不是很好,后续需要对视频转码系统进行修复,并且通过此种方式可以根据不匹配的数字快速定位到出错的问题视频帧,在对视频转码系统进行修复时,可以基于出错的问题视频帧进行问题分析。Then, by comparing the first quantity sequence with the second quantity sequence, it can be determined that the first quantity sequence and the second quantity sequence do not match. At this time, it can be determined that the initial video transcoding failed, that is, the video frame 2 and the video after transcoding The sequence of frame 3 is out of order, which means that the transcoding quality of the current video transcoding system is not very good, and the video transcoding system needs to be repaired later, and in this way, the error can be quickly located according to the mismatched numbers. When repairing the video transcoding system, the problem can be analyzed based on the faulty video frame.

另外一种情况下,若转码视频仍包括顺序排列的三个视频帧:视频帧1、视频帧3和视频帧2,将转码视频中每个视频帧包含的测试对象的数量按照转码视频中所有视频帧的排列顺序逐帧排列,形成的第二数量序列为【10、10、11】。In another case, if the transcoded video still includes three video frames arranged in sequence: video frame 1, video frame 3 and video frame 2, the number of test objects contained in each video frame in the transcoded video is calculated according to the number of test objects in the transcoded video. The arrangement order of all video frames in the video is arranged frame by frame, and the second number sequence formed is [10, 10, 11].

那么将第一数量序列与第二数量序列进行比对,可以确定第一数量序列和第二数量序列不匹配,此时则可以确定初始视频转码失败,即转码之后的视频帧2丢失,视频帧1产生了重复帧,此时这种视频帧重复转码的情况与视频帧转码出现视频帧数错乱的情况不同,这种情况下,转码后的视频播放时,不仅会造成视频画面前后关联度较差,且还会由于重复视频帧产生卡顿感。因此对于此种情况,也需要对视频转码系统进行修复,并且通过上述方式根据不匹配的数字快速定位到出错的问题视频帧,在对视频转码系统进行修复时,可以基于出错的问题视频帧进行问题分析。Then, by comparing the first quantity sequence with the second quantity sequence, it can be determined that the first quantity sequence and the second quantity sequence do not match. At this time, it can be determined that the initial video transcoding failed, that is, the video frame 2 after transcoding is lost, Video frame 1 generates repeated frames. At this time, the situation of repeated transcoding of video frames is different from the situation that the number of video frames is disordered in video frame transcoding. In this case, when the transcoded video is played, not only the video The correlation between the front and rear of the picture is poor, and it will also cause a sense of stuttering due to repeated video frames. Therefore, in this case, it is also necessary to repair the video transcoding system, and quickly locate the faulty video frame according to the mismatched numbers in the above method. When repairing the video transcoding system, it can be based on the faulty video frame. frame for problem analysis.

仍沿用上例,实际应用中,初始视频转码后的转码视频中还可能包括四个视频帧,例如某个视频帧重复转码(即掉帧),又或者包括两个视频帧,例如某个视频帧丢帧了,这几种情况下,获得的第二数量序列与第一数量序列也不会匹配。Still using the above example, in practical applications, the transcoded video after the initial video transcoding may also include four video frames, for example, a certain video frame is repeatedly transcoded (that is, dropped frames), or includes two video frames, such as A certain video frame is dropped. In these cases, the obtained second quantity sequence does not match the first quantity sequence.

本申请实施例中,通过将统计的初始视频的每个视频帧包含的测试对象的数量与统计的转码后的转码视频的每个视频帧包含的测试对象的数量进行比对,根据比对结果可以快速准确的判断出初始视频的转码结果是否正确,在初始视频的转码结果不准确的情况下,通过对转码视频的解析,确定出转码视频是发生了丢帧或者是掉帧的情况,然后基于确定的情况针对性的对视频转码系统进行修复。In the embodiment of the present application, by comparing the number of test objects contained in each video frame of the initial video with the number of test objects contained in each video frame of the transcoded transcoded video, according to the comparison The result can quickly and accurately determine whether the transcoding result of the original video is correct. If the frame is dropped, the video transcoding system is repaired in a targeted manner based on the determined situation.

另一种情况下,所述将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果,包括:In another case, comparing the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the initial Transcoding results of the video, including:

将所述初始视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第三数量序列,以及将所述转码视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第四数量序列;Arranging, frame by frame, the number of test objects displayed in the quantity display area for each video frame in the initial video to form a third quantity sequence, and displaying each video frame in the transcoded video in the quantity The number of test objects displayed in the area is arranged frame by frame to form a fourth number sequence;

将所述第三数量序列与所述第四数量序列进行比对,在所述第三数量序列与所述第四数量序列全部匹配的情况下,确定所述初始视频转码成功。The third quantity sequence is compared with the fourth quantity sequence, and in the case that the third quantity sequence and the fourth quantity sequence all match, it is determined that the initial video transcoding is successful.

具体的,将初始视频中每个视频帧在对应的数量展示区展示的测试对象的数量按照初始视频中所有视频帧的排列顺序逐帧排列,以形成第三数量序列。Specifically, the number of test objects displayed in the corresponding quantity display area for each video frame in the initial video is arranged frame by frame according to the arrangement order of all video frames in the initial video to form a third quantity sequence.

沿用上例,将初始视频中每个视频帧在对应的数量展示区展示的测试对象的数量按照初始视频中所有视频帧的排列顺序逐帧排列,形成的第三数量序列为【10、11、12】。Following the above example, the number of test objects displayed in the corresponding quantity display area for each video frame in the initial video is arranged frame by frame according to the arrangement order of all video frames in the initial video, and the third quantity sequence formed is [10, 11, 12].

同时,将转码视频中每个视频帧在对应的数量展示区展示的测试对象的数量按照转码视频中所有视频帧的排列顺序逐帧排列,以形成第二数量序列。At the same time, the number of test objects displayed in the corresponding quantity display area for each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video to form a second quantity sequence.

例如,转码视频仍包括三个顺序排列的视频帧:视频帧1、视频帧2和视频帧3,那么将转码视频中每个视频帧在对应的数量展示区展示的测试对象的数量按照转码视频中所有视频帧的排列顺序逐帧排列,形成的第四数量序列为【10、11、12】。For example, the transcoded video still includes three video frames arranged in sequence: video frame 1, video frame 2 and video frame 3, then the number of test objects displayed in the corresponding quantity display area for each video frame in the transcoded video is based on The arrangement order of all video frames in the transcoded video is arranged frame by frame, and the fourth number sequence formed is [10, 11, 12].

那么将第三数量序列与第四数量序列进行比对,可以确定第三数量序列和第四数量序列全部匹配,此时则可以确定初始视频转码成功,而初始视频转码成功则可以说明当前的视频转码系统的转码质量良好。Then, by comparing the third quantity sequence with the fourth quantity sequence, it can be determined that the third quantity sequence and the fourth quantity sequence all match. At this time, it can be determined that the initial video transcoding is successful, and the success of the initial video transcoding can indicate that the current The transcoding quality of the video transcoding system is good.

本申请实施例中,通过将统计的初始视频的每个视频帧在对应的数量展示区展示的测试对象的数量与统计的转码后的转码视频的每个视频帧在对应的数量展示区展示的测试对象的数量进行比对,根据比对结果可以快速准确的判断出初始视频的转码结果是否正确,提升用户体验。In the embodiment of the present application, the statistics of the number of test objects displayed in each video frame of the initial video in the corresponding number display area and the statistics of each video frame of the transcoded transcoded video in the corresponding number display area The number of displayed test objects is compared, and according to the comparison results, it can be quickly and accurately judged whether the transcoding result of the initial video is correct, and the user experience can be improved.

实际应用中,所述将所述第三数量序列与所述第四数量序列进行比对之后,还包括:In a practical application, after aligning the sequence of the third quantity with the sequence of the fourth quantity, the method further includes:

在所述第三数量序列与所述第四数量序列不匹配的情况下,确定所述第三数量序列与所述第四数量序列中不匹配数量对应的视频帧,将所述第三数量序列与所述第四数量序列中不匹配数量对应的视频帧作为验证视频帧;In the case that the third quantity sequence does not match the fourth quantity sequence, determine the video frames corresponding to the third quantity sequence and the unmatched quantity in the fourth quantity sequence, and assign the third quantity sequence The video frame corresponding to the unmatched quantity in the fourth quantity sequence is used as the verification video frame;

在所述验证视频帧满足预设转码条件的情况下,确定所述初始视频转码成功。In the case that the verification video frame satisfies the preset transcoding condition, it is determined that the initial video transcoding is successful.

其中,预设转码条件根据实际应用进行设置,本申请对此不做任何限定,例如预设转码条件为视频帧1可以有重复帧或者是视频帧2在转码的过程中可以丢帧。The preset transcoding condition is set according to the actual application, and this application does not make any limitation on this. For example, the preset transcoding condition is that video frame 1 may have repeated frames or video frame 2 may drop frames during the transcoding process .

沿用上例,若转码视频包括顺序排列的两个视频帧:视频帧1和视频帧3,将转码视频中每个视频帧包含的测试对象的数量按照转码视频中所有视频帧的排列顺序逐帧排列,形成的第四数量序列为【10、12】;那么第三数量序列【10、11、12】与第四数量序列【10、12】则不匹配,此时确定的第三数量序列中与第四数量序列不匹配的测试对象的数量为11,则不匹配的测试对象的数量对应的视频帧为初始视频中的视频帧2,那么视频帧2则为验证视频帧。Following the above example, if the transcoded video includes two video frames arranged in sequence: video frame 1 and video frame 3, the number of test objects contained in each video frame in the transcoded video is arranged according to the arrangement of all video frames in the transcoded video. The sequence is arranged frame by frame, and the fourth quantity sequence formed is [10, 12]; then the third quantity sequence [10, 11, 12] does not match the fourth quantity sequence [10, 12], and the determined third quantity sequence at this time does not match. The number of test objects that do not match the fourth number sequence in the quantity sequence is 11, then the video frame corresponding to the number of unmatched test objects is the video frame 2 in the initial video, and then the video frame 2 is the verification video frame.

若预设转码条件为视频帧2需要在视频转码的过程丢帧,根据该预设转码条件可以确定该验证视频帧满足该预设转码条件,此时也可以说明初始视频转码成功。If the preset transcoding condition is that video frame 2 needs to be dropped during the video transcoding process, it can be determined according to the preset transcoding condition that the verified video frame satisfies the preset transcoding condition, and the initial video transcoding can also be explained at this time. success.

本说明书实施例中,由于具体的视频转码场景不同,一些特殊视频转码场景中为了视频特效等需求会允许在视频转码的过程中出现丢帧、掉帧等情况的发生,因此在第三数量序列和第四数量序列不匹配的情况下,还需要基于具体应用场景中的预设转码条件再次验证初始视频是否转码成功,以扩大本申请提供的视频处理方法的应用场景,提升用户使用体验。In the embodiments of this specification, due to different specific video transcoding scenarios, some special video transcoding scenarios may allow frame loss, frame drop, etc. to occur during the video transcoding process for the needs of video special effects. In the case where the third-quantity sequence does not match the fourth-quantity sequence, it is also necessary to re-verify whether the initial video is successfully transcoded based on the preset transcoding conditions in the specific application scenario, so as to expand the application scenarios of the video processing method provided in this application and improve the User experience.

此外,所述将所述第三数量序列与所述第四数量序列进行比对之后,还包括:In addition, after aligning the sequence of the third quantity with the sequence of the fourth quantity, the method further includes:

在所述第三数量序列与所述第四数量序列不匹配的情况下,确定所述初始视频转码失败,并基于不匹配的第三数量序列和第四数量序列中的数量对应的视频帧对所述转码视频进行解析,以对所述视频转码系统进行修复。In the case where the third quantity sequence does not match the fourth quantity sequence, it is determined that the initial video transcoding fails, and based on the unmatched third quantity sequence and the number of video frames corresponding to the fourth quantity sequence The transcoded video is parsed to repair the video transcoding system.

又或者是在所述验证视频帧不满足预设转码条件的情况下,基于所述验证视频帧对所述转码视频进行解析,以对所述视频转码系统进行修复。Alternatively, if the verification video frame does not meet the preset transcoding condition, the transcoded video is parsed based on the verification video frame, so as to repair the video transcoding system.

沿用上例,若转码视频仍包括顺序排列的三个视频帧:视频帧1、视频帧3和视频帧2,将转码视频中每个视频帧对应的数量展示区展示的测试对象的数量按照转码视频中所有视频帧的排列顺序逐帧排列,形成的第二数量序列为【10、12、11】。Following the above example, if the transcoded video still includes three video frames arranged in sequence: video frame 1, video frame 3 and video frame 2, the number of test objects displayed in the display area corresponding to the number of each video frame in the transcoded video will be displayed. According to the arrangement order of all video frames in the transcoded video, they are arranged frame by frame, and the second quantity sequence formed is [10, 12, 11].

那么将第一数量序列与第二数量序列进行比对,可以确定第一数量序列和第二数量序列不匹配,此时则可以确定初始视频转码失败,即转码之后的视频帧2和视频帧3的顺序发生了错乱,则可以说明当前的视频转码系统的转码质量不是很好,后续需要对视频转码系统进行修复,并且通过此种方式可以根据不匹配的数字快速定位到出错的问题视频帧,在对视频转码系统进行修复时,可以基于出错的问题视频帧进行问题分析。Then, by comparing the first quantity sequence with the second quantity sequence, it can be determined that the first quantity sequence and the second quantity sequence do not match. At this time, it can be determined that the initial video transcoding failed, that is, the video frame 2 and the video after transcoding The sequence of frame 3 is out of order, which means that the transcoding quality of the current video transcoding system is not very good, and the video transcoding system needs to be repaired later, and in this way, the error can be quickly located according to the mismatched numbers. When repairing the video transcoding system, the problem can be analyzed based on the faulty video frame.

实际应用中,初始视频转码后的转码视频中还可能包括四个视频帧,例如某个视频帧重复转码,那么第三数量序列中则会包括4个测试对象的数量;又或者包括两个视频帧,例如某个视频帧丢帧了,那么第四数量序列中则会包括2个测试对象的数量,这几种情况下,获得的第三数量序列与第四数量序列也不会匹配。In practical applications, the transcoded video after the initial video transcoding may also include four video frames. For example, if a video frame is repeatedly transcoded, the third quantity sequence will include the number of 4 test objects; or Two video frames, for example, if a video frame is lost, then the fourth quantity sequence will include the number of 2 test objects. In these cases, the obtained third quantity sequence and fourth quantity sequence will not be match.

本申请实施例中,通过将初始视频的每个视频帧对应的数量展示区展示的测试对象的数量与基于预设识别算法识别的转码后的转码视频的每个视频帧对应的数量展示区展示的测试对象的数量进行比对,根据比对结果可以快速准确的判断出初始视频的转码结果是否正确,在初始视频的转码结果不准确的情况下,通过对转码视频的解析,确定出转码视频是发生了丢帧或者是掉帧的情况,然后基于确定的情况针对性的对视频转码系统进行修复。In this embodiment of the present application, the number of test objects displayed in the number display area corresponding to each video frame of the initial video and the number corresponding to each video frame of the transcoded transcoded video identified based on the preset recognition algorithm are displayed. The number of test objects displayed in the area is compared, and according to the comparison results, it can be quickly and accurately judged whether the transcoding result of the initial video is correct. , determine whether the transcoded video has dropped or dropped frames, and then repair the video transcoding system in a targeted manner based on the determined situation.

本申请另一实施例中,所述将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果,包括:In another embodiment of the present application, the number of test objects contained in each video frame in the initial video is compared with the number of test objects contained in each video frame in the transcoded video to determine the number of test objects contained in each video frame in the transcoded video. The transcoding results of the initial video described above, including:

将所述初始视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第一数量序列,以及将所述转码视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第二数量序列;The number of test objects included in each video frame in the initial video is arranged frame by frame to form a first sequence of numbers, and the number of test objects included in each video frame in the transcoded video is arranged frame by frame, with forming a second sequence of quantities;

将所述初始视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第三数量序列,以及将所述转码视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第四数量序列;Arranging, frame by frame, the number of test objects displayed in the quantity display area for each video frame in the initial video to form a third quantity sequence, and displaying each video frame in the transcoded video in the quantity The number of test objects displayed in the area is arranged frame by frame to form a fourth number sequence;

将所述第一数量序列与所述第二数量序列进行比对,以及将所述第三数量序列与所述第四数量序列进行比对;aligning the first number sequence with the second number sequence, and aligning the third number sequence with the fourth number sequence;

在所述第一数量序列与所述第二数量序列全部匹配,或者所述第三数量序列与所述第四数量序列全部匹配的情况下,确定所述初始视频转码成功。In the case that the first quantity sequence and the second quantity sequence all match, or the third quantity sequence and the fourth quantity sequence all match, it is determined that the initial video transcoding is successful.

实际应用中,初始视频在转码的过程中可能会出现测试对象丢失或者数量展示区中测试对象的数量的丢失,而两者同时丢失的可能性较小,因此同时比较统计转码前后的测试对象的数量以及转码前后数量展示区的测试对象的数量,在任意一种测试对象的数量匹配的情况下,都可以说明初始视频转码成功,而两者都不匹配的情况下,才可以说明初始视频转码失败。In practical applications, during the transcoding process of the initial video, the test object may be lost or the number of test objects in the quantity display area may be lost, and the possibility of both being lost at the same time is small, so compare the statistics of the test before and after the transcoding. The number of objects and the number of test objects in the display area before and after transcoding. If the number of any test objects matches, it can indicate that the initial video transcoding is successful, and if they do not match, it can be Description Initial video transcoding failed.

具体实施时,对第一数量序列、第二数量序列、第三数量序列以及第四数量序列的获取以及比对方式可以参见上述实施例,在此不再赘述。During specific implementation, the acquisition and comparison methods of the first quantity sequence, the second quantity sequence, the third quantity sequence, and the fourth quantity sequence may refer to the above-mentioned embodiments, which will not be repeated here.

本申请实施例中,为了保证初始视频转码结果的准确性,同时对两种测试对象的数量进行比对,在任意一种比对结果匹配的情况下,则可以认定初始视频的转码结果成功,视频转码系统无转码质量问题,通过此种方式可以通过转码前后的视频的差异,自动化判断该视频转码系统是否存在转码质量问题,提升用户体验。In the embodiment of the present application, in order to ensure the accuracy of the initial video transcoding result, the numbers of the two test objects are compared at the same time, and if any of the comparison results match, the transcoding result of the initial video can be determined. If successful, the video transcoding system has no transcoding quality problems. In this way, the difference between the videos before and after transcoding can be used to automatically determine whether the video transcoding system has transcoding quality problems, thereby improving user experience.

与上述方法实施例相对应,本申请还提供了视频处理装置实施例,图5示出了本申请一实施例提供的一种视频处理装置的结构示意图。如图5所示,该装置包括:Corresponding to the foregoing method embodiments, the present application further provides an embodiment of a video processing apparatus, and FIG. 5 shows a schematic structural diagram of a video processing apparatus provided by an embodiment of the present application. As shown in Figure 5, the device includes:

视频生成模块502,被配置为基于预设视频规则生成包括多个视频帧的初始视频,其中,每个视频帧均包含至少一个数量逐帧递增的测试对象;The video generation module 502 is configured to generate an initial video including a plurality of video frames based on preset video rules, wherein each video frame includes at least one test object whose number increases frame by frame;

视频转码模块504,被配置为将所述初始视频发送至预设视频转码系统进行视频转码,并接收所述视频转码系统返回的转码视频;The video transcoding module 504 is configured to send the initial video to a preset video transcoding system for video transcoding, and receive the transcoded video returned by the video transcoding system;

对象数量确定模块506,被配置为按照所述转码视频中视频帧的排列顺序,确定所述转码视频中每个视频帧包含的测试对象的数量;The object quantity determination module 506 is configured to determine the number of test objects included in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video;

转码结果确定模块508,被配置为将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果。The transcoding result determination module 508 is configured to compare the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the number of test objects contained in each video frame in the transcoded video. Describe the transcoding result of the original video.

可选的,所述装置,还包括:Optionally, the device further includes:

数量展示模块,被配置为:Quantity display module, configured as:

在所述初始视频的每个视频帧的预设位置设置一个测试对象的数量展示区;A quantity display area of a test object is set at the preset position of each video frame of the initial video;

将所述初始视频的每个视频帧包含的测试对象的数量放置在所述数量展示区。The number of test objects contained in each video frame of the initial video is placed in the number display area.

可选的,所述装置,还包括:Optionally, the device further includes:

数量识别模块,被配置为通过预设识别算法识别所述转码视频中每个视频帧在所述数量展示区展示的测试对象的数量。The quantity identification module is configured to identify, through a preset identification algorithm, the quantity of test objects displayed in the quantity display area for each video frame in the transcoded video.

可选的,所述转码结果确定模块508,被配置为:Optionally, the transcoding result determination module 508 is configured to:

将所述初始视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第一数量序列,以及将所述转码视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第二数量序列;The number of test objects included in each video frame in the initial video is arranged frame by frame to form a first sequence of numbers, and the number of test objects included in each video frame in the transcoded video is arranged frame by frame, with forming a second sequence of quantities;

将所述第一数量序列与所述第二数量序列进行比对,在所述第一数量序列与所述第二数量序列全部匹配的情况下,确定所述初始视频转码成功。The first quantity sequence is compared with the second quantity sequence, and in the case that the first quantity sequence and the second quantity sequence all match, it is determined that the initial video transcoding is successful.

可选的,所述转码结果确定模块508,被配置为:Optionally, the transcoding result determination module 508 is configured to:

将所述初始视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第三数量序列,以及将所述转码视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第四数量序列;Arranging, frame by frame, the number of test objects displayed in the quantity display area for each video frame in the initial video to form a third quantity sequence, and displaying each video frame in the transcoded video in the quantity The number of test objects displayed in the area is arranged frame by frame to form a fourth number sequence;

将所述第三数量序列与所述第四数量序列进行比对,在所述第三数量序列与所述第四数量序列全部匹配的情况下,确定所述初始视频转码成功。The third quantity sequence is compared with the fourth quantity sequence, and in the case that the third quantity sequence and the fourth quantity sequence all match, it is determined that the initial video transcoding is successful.

可选的,所述装置,还包括:第一验证模块,被配置为:Optionally, the device further includes: a first verification module configured to:

在所述第一数量序列与所述第二数量序列不匹配的情况下,确定所述第一数量序列与所述第二数量序列中不匹配数量对应的视频帧,将所述第一数量序列与所述第二数量序列中不匹配数量对应的视频帧作为验证视频帧;In the case that the first quantity sequence does not match the second quantity sequence, determine the video frames corresponding to the unmatched quantity in the first quantity sequence and the second quantity sequence, and convert the first quantity sequence The video frame corresponding to the unmatched quantity in the second quantity sequence is used as the verification video frame;

在所述验证视频帧满足预设转码条件的情况下,确定所述初始视频转码成功。In the case that the verification video frame satisfies the preset transcoding condition, it is determined that the initial video transcoding is successful.

可选的,所述装置,还包括:第一验证模块,被配置为:Optionally, the device further includes: a first verification module configured to:

在所述第三数量序列与所述第四数量序列不匹配的情况下,确定所述第三数量序列与所述第四数量序列中不匹配数量对应的视频帧,将所述第三数量序列与所述第四数量序列中不匹配数量对应的视频帧作为验证视频帧;In the case where the third quantity sequence does not match the fourth quantity sequence, determine the video frames corresponding to the third quantity sequence and the unmatched quantity in the fourth quantity sequence, and assign the third quantity sequence The video frame corresponding to the unmatched quantity in the fourth quantity sequence is used as the verification video frame;

在所述验证视频帧满足预设转码条件的情况下,确定所述初始视频转码成功。In the case that the verification video frame satisfies the preset transcoding condition, it is determined that the initial video transcoding is successful.

可选的,所述转码结果确定模块508,被配置为:Optionally, the transcoding result determination module 508 is configured to:

将所述初始视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第一数量序列,以及将所述转码视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第二数量序列;The number of test objects included in each video frame in the initial video is arranged frame by frame to form a first sequence of numbers, and the number of test objects included in each video frame in the transcoded video is arranged frame by frame, with forming a second sequence of quantities;

将所述初始视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第三数量序列,以及将所述转码视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第四数量序列;Arranging, frame by frame, the number of test objects displayed in the quantity display area for each video frame in the initial video to form a third quantity sequence, and displaying each video frame in the transcoded video in the quantity The number of test objects displayed in the area is arranged frame by frame to form a fourth number sequence;

将所述第一数量序列与所述第二数量序列进行比对,以及将所述第三数量序列与所述第四数量序列进行比对;aligning the first number sequence with the second number sequence, and aligning the third number sequence with the fourth number sequence;

在所述第一数量序列与所述第二数量序列全部匹配,或者所述第三数量序列与所述第四数量序列全部匹配的情况下,确定所述初始视频转码成功。In the case that the first quantity sequence and the second quantity sequence all match, or the third quantity sequence and the fourth quantity sequence all match, it is determined that the initial video transcoding is successful.

可选的,所述视频生成模块502,被配置为:Optionally, the video generation module 502 is configured to:

基于预设视频规则生成包括多个由第一像素的底图和第二像素的测试对象组成的视频帧的初始视频,其中,所述第一像素和所述第二像素的相似度小于等于预设相似度阈值。An initial video including a plurality of video frames consisting of a base image of a first pixel and a test object of a second pixel is generated based on a preset video rule, wherein the similarity of the first pixel and the second pixel is less than or equal to a predetermined Set the similarity threshold.

本申请实施例提供的所述视频处理装置,通过在初始视频的每个视频帧中设置测试对象,以及获取与初始视频对应的转码后的转码视频的每个视频帧中的测试对象,按照视频帧的排列顺序,通过比较初始视频的每个视频帧中测试对象的数量与转码视频的每个视频帧中测试对象的数量是否一致,可以快速且准确的判断出转码后的视频是否发生了丢帧、掉帧问题。The video processing device provided by the embodiment of the present application, by setting a test object in each video frame of the initial video, and acquiring the test object in each video frame of the transcoded transcoded video corresponding to the initial video, According to the arrangement order of the video frames, by comparing the number of test objects in each video frame of the original video with the number of test objects in each video frame of the transcoded video, the transcoded video can be quickly and accurately judged. Whether there is a frame drop or frame drop problem.

上述为本实施例的一种视频处理装置的示意性方案。需要说明的是,该视频处理装置的技术方案与上述的视频处理方法的技术方案属于同一构思,视频处理装置的技术方案未详细描述的细节内容,均可以参见上述视频处理方法的技术方案的描述。The above is a schematic solution of a video processing apparatus according to this embodiment. It should be noted that the technical solution of the video processing device and the technical solution of the above-mentioned video processing method belong to the same concept, and the details that are not described in detail in the technical solution of the video processing device can be referred to the description of the technical solution of the above-mentioned video processing method. .

参见图6,图6示出了根据本申请一个实施例提供的一种计算设备600的结构框图。该计算设备600的部件包括但不限于存储器610和处理器620。处理器620与存储器610通过总线630相连接,数据库650用于保存数据。Referring to FIG. 6, FIG. 6 shows a structural block diagram of a computing device 600 provided according to an embodiment of the present application. Components of the computing device 600 include, but are not limited to, memory 610 and processor 620 . The processor 620 is connected with the memory 610 through the bus 630, and the database 650 is used for saving data.

计算设备600还包括接入设备640,接入设备640使得计算设备600能够经由一个或多个网络660通信。这些网络的示例包括公用交换电话网(PSTN)、局域网(LAN)、广域网(WAN)、个域网(PAN)或诸如因特网的通信网络的组合。接入设备640可以包括有线或无线的任何类型的网络接口(例如,网络接口卡(NIC))中的一个或多个,诸如IEEE802.11无线局域网(WLAN)无线接口、全球微波互联接入(Wi-MAX)接口、以太网接口、通用串行总线(USB)接口、蜂窝网络接口、蓝牙接口、近场通信(NFC)接口,等等。Computing device 600 also includes access device 640 that enables computing device 600 to communicate via one or more networks 660 . Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. Access device 640 may include one or more of any type of network interface (eg, network interface card (NIC)), wired or wireless, such as IEEE 802.11 wireless local area network (WLAN) wireless interface, World Interoperability for Microwave Access ( Wi-MAX) interface, Ethernet interface, Universal Serial Bus (USB) interface, cellular network interface, Bluetooth interface, Near Field Communication (NFC) interface, and the like.

在本申请的一个实施例中,计算设备600的上述部件以及图6中未示出的其他部件也可以彼此相连接,例如通过总线。应当理解,图6所示的计算设备结构框图仅仅是出于示例的目的,而不是对本申请范围的限制。本领域技术人员可以根据需要,增添或替换其他部件。In one embodiment of the present application, the above-mentioned components of the computing device 600 and other components not shown in FIG. 6 may also be connected to each other, eg, through a bus. It should be understood that the structural block diagram of the computing device shown in FIG. 6 is only for the purpose of example, rather than limiting the scope of the present application. Those skilled in the art can add or replace other components as required.

计算设备600可以是任何类型的静止或移动计算设备,包括移动计算机或移动计算设备(例如,平板计算机、个人数字助理、膝上型计算机、笔记本计算机、上网本等)、移动电话(例如,智能手机)、可佩戴的计算设备(例如,智能手表、智能眼镜等)或其他类型的移动设备,或者诸如台式计算机或PC的静止计算设备。计算设备600还可以是移动式或静止式的服务器。Computing device 600 may be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (eg, tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (eg, smart phones) ), wearable computing devices (eg, smart watches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. Computing device 600 may also be a mobile or stationary server.

其中,处理器620用于执行如下计算机可执行指令,所述处理器620执行所述指令时实现所述视频处理方法的步骤。The processor 620 is configured to execute the following computer-executable instructions, and when the processor 620 executes the instructions, the steps of the video processing method are implemented.

上述为本实施例的一种计算设备的示意性方案。需要说明的是,该计算设备的技术方案与上述的视频处理方法的技术方案属于同一构思,计算设备的技术方案未详细描述的细节内容,均可以参见上述视频处理方法的技术方案的描述。The above is a schematic solution of a computing device according to this embodiment. It should be noted that the technical solution of the computing device and the technical solution of the above-mentioned video processing method belong to the same concept, and the details not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the above-mentioned video processing method.

本申请一实施例还提供一种计算机可读存储介质,其存储有计算机指令,该指令被处理器执行时实现如前所述视频处理方法的步骤。An embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions, and when the instructions are executed by a processor, implements the steps of the aforementioned video processing method.

上述为本实施例的一种计算机可读存储介质的示意性方案。需要说明的是,该存储介质的技术方案与上述的视频处理方法的技术方案属于同一构思,存储介质的技术方案未详细描述的细节内容,均可以参见上述视频处理方法的技术方案的描述。The above is a schematic solution of a computer-readable storage medium of this embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the above-mentioned video processing method belong to the same concept. For details not described in detail in the technical solution of the storage medium, refer to the description of the technical solution of the above-mentioned video processing method.

上述对本申请特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。The foregoing describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that in the embodiments and still achieve desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

所述计算机指令包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。The computer instructions include computer program code, which may be in source code form, object code form, an executable file, some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Electric carrier signals and telecommunication signals are not included.

需要说明的是,对于前述的各方法实施例,为了简便描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其它顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定都是本申请所必须的。It should be noted that, for the convenience of description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily all necessary for the present application.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

以上公开的本申请优选实施例只是用于帮助阐述本申请。可选实施例并没有详尽叙述所有的细节,也不限制该发明仅为所述的具体实施方式。显然,根据本申请的内容,可作很多的修改和变化。本申请选取并具体描述这些实施例,是为了更好地解释本申请的原理和实际应用,从而使所属技术领域技术人员能很好地理解和利用本申请。本申请仅受权利要求书及其全部范围和等效物的限制。The preferred embodiments of the present application disclosed above are only provided to help illustrate the present application. Alternative embodiments are not intended to exhaust all details, nor do they limit the invention to only the described embodiments. Obviously, many modifications and variations are possible in light of the content of this application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can well understand and utilize the present application. This application is to be limited only by the claims, along with their full scope and equivalents.

Claims (12)

1.一种视频处理方法,其特征在于,包括:1. a video processing method, is characterized in that, comprises: 基于预设视频规则生成包括多个视频帧的初始视频,其中,每个视频帧均包含至少一个数量逐帧递增的测试对象;Generate an initial video including a plurality of video frames based on preset video rules, wherein each video frame includes at least one test object whose number increases frame by frame; 将所述初始视频发送至预设视频转码系统进行视频转码,并接收所述视频转码系统返回的转码视频;sending the initial video to a preset video transcoding system for video transcoding, and receiving the transcoded video returned by the video transcoding system; 按照所述转码视频中视频帧的排列顺序,确定所述转码视频中每个视频帧包含的测试对象的数量;According to the arrangement order of the video frame in the described transcoded video, determine the quantity of the test object included in each video frame in the described transcoded video; 将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果。The number of test objects contained in each video frame in the initial video is compared with the number of test objects contained in each video frame in the transcoded video to determine a transcoding result of the initial video. 2.根据权利要求1所述的视频处理方法,其特征在于,所述基于预设视频规则生成包括多个视频帧的初始视频之后,还包括:2. The video processing method according to claim 1, wherein after generating the initial video including a plurality of video frames based on preset video rules, further comprising: 在所述初始视频的每个视频帧的预设位置设置一个测试对象的数量展示区;A quantity display area of a test object is set at the preset position of each video frame of the initial video; 将所述初始视频的每个视频帧包含的测试对象的数量放置在所述数量展示区。The number of test objects contained in each video frame of the initial video is placed in the number display area. 3.根据权利要求2所述的视频处理方法,其特征在于,所述将所述初始视频发送至预设视频转码系统进行视频转码,并接收所述视频转码系统返回的转码视频之后,还包括:3. The video processing method according to claim 2, wherein the initial video is sent to a preset video transcoding system for video transcoding, and the transcoding video returned by the video transcoding system is received. After that, also include: 通过预设识别算法识别所述转码视频中每个视频帧在所述数量展示区展示的测试对象的数量。Identify the number of test objects displayed in the number display area for each video frame in the transcoded video by using a preset identification algorithm. 4.根据权利要求1或3所述的视频处理方法,其特征在于,所述将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果,包括:4. video processing method according to claim 1 or 3, is characterized in that, described by the quantity of the test object that each video frame comprises in described initial video and the quantity that each video frame comprises in described transcoding video. The number of test objects is compared to determine the transcoding result of the initial video, including: 将所述初始视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第一数量序列,以及将所述转码视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第二数量序列;The number of test objects included in each video frame in the initial video is arranged frame by frame to form a first sequence of numbers, and the number of test objects included in each video frame in the transcoded video is arranged frame by frame, with forming a second sequence of quantities; 将所述第一数量序列与所述第二数量序列进行比对,在所述第一数量序列与所述第二数量序列全部匹配的情况下,确定所述初始视频转码成功。The first quantity sequence is compared with the second quantity sequence, and in the case that the first quantity sequence and the second quantity sequence all match, it is determined that the initial video transcoding is successful. 5.根据权利要求3所述的视频处理方法,其特征在于,所述将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果,包括:5. video processing method according to claim 3, is characterized in that, described by the quantity of the test object that each video frame comprises in described initial video and the test object that each video frame comprises in described transcoding video The number of , is compared to determine the transcoding result of the initial video, including: 将所述初始视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第三数量序列,以及将所述转码视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第四数量序列;Arranging, frame by frame, the number of test objects displayed in the quantity display area for each video frame in the initial video to form a third quantity sequence, and displaying each video frame in the transcoded video in the quantity The number of test objects displayed in the area is arranged frame by frame to form a fourth number sequence; 将所述第三数量序列与所述第四数量序列进行比对,在所述第三数量序列与所述第四数量序列全部匹配的情况下,确定所述初始视频转码成功。The third quantity sequence is compared with the fourth quantity sequence, and in the case that the third quantity sequence and the fourth quantity sequence all match, it is determined that the initial video transcoding is successful. 6.根据权利要求4所述的视频处理方法,其特征在于,所述将所述第一数量序列与所述第二数量序列进行比对之后,还包括:6. The video processing method according to claim 4, wherein, after the comparison of the first quantity sequence and the second quantity sequence, the method further comprises: 在所述第一数量序列与所述第二数量序列不匹配的情况下,确定所述第一数量序列与所述第二数量序列中不匹配数量对应的视频帧,将所述第一数量序列与所述第二数量序列中不匹配数量对应的视频帧作为验证视频帧;In the case that the first quantity sequence does not match the second quantity sequence, determine the video frames corresponding to the unmatched quantity in the first quantity sequence and the second quantity sequence, and convert the first quantity sequence The video frame corresponding to the unmatched quantity in the second quantity sequence is used as the verification video frame; 在所述验证视频帧满足预设转码条件的情况下,确定所述初始视频转码成功。In the case that the verification video frame satisfies the preset transcoding condition, it is determined that the initial video transcoding is successful. 7.根据权利要求5所述的视频处理方法,其特征在于,所述将所述第三数量序列与所述第四数量序列进行比对之后,还包括:7. The video processing method according to claim 5, wherein, after the comparison of the third quantity sequence and the fourth quantity sequence, the method further comprises: 在所述第三数量序列与所述第四数量序列不匹配的情况下,确定所述第三数量序列与所述第四数量序列中不匹配数量对应的视频帧,将所述第三数量序列与所述第四数量序列中不匹配数量对应的视频帧作为验证视频帧;In the case that the third quantity sequence does not match the fourth quantity sequence, determine the video frames corresponding to the third quantity sequence and the unmatched quantity in the fourth quantity sequence, and assign the third quantity sequence The video frame corresponding to the unmatched quantity in the fourth quantity sequence is used as the verification video frame; 在所述验证视频帧满足预设转码条件的情况下,确定所述初始视频转码成功。In the case that the verification video frame satisfies the preset transcoding condition, it is determined that the initial video transcoding is successful. 8.根据权利要求3所述的视频处理方法,其特征在于,所述将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果,包括:8. video processing method according to claim 3, is characterized in that, described by the quantity of the test object that each video frame comprises in described initial video and the test object that each video frame comprises in described transcoding video The number of , is compared to determine the transcoding result of the initial video, including: 将所述初始视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第一数量序列,以及将所述转码视频中每个视频帧包含的测试对象的数量逐帧排列,以形成第二数量序列;The number of test objects included in each video frame in the initial video is arranged frame by frame to form a first sequence of numbers, and the number of test objects included in each video frame in the transcoded video is arranged frame by frame, with forming a second sequence of quantities; 将所述初始视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第三数量序列,以及将所述转码视频中每个视频帧在所述数量展示区展示的测试对象的数量逐帧排列,以形成第四数量序列;Arranging, frame by frame, the number of test objects displayed in the quantity display area for each video frame in the initial video to form a third quantity sequence, and displaying each video frame in the transcoded video in the quantity The number of test objects displayed in the area is arranged frame by frame to form a fourth number sequence; 将所述第一数量序列与所述第二数量序列进行比对,以及将所述第三数量序列与所述第四数量序列进行比对;aligning the first number sequence with the second number sequence, and aligning the third number sequence with the fourth number sequence; 在所述第一数量序列与所述第二数量序列全部匹配,或者所述第三数量序列与所述第四数量序列全部匹配的情况下,确定所述初始视频转码成功。In the case that the first quantity sequence and the second quantity sequence all match, or the third quantity sequence and the fourth quantity sequence all match, it is determined that the initial video transcoding is successful. 9.根据权利要求1-3任意一项所述的视频处理方法,其特征在于,所述基于预设视频规则生成包括多个视频帧的初始视频,包括:9. The video processing method according to any one of claims 1-3, wherein the generating an initial video comprising a plurality of video frames based on a preset video rule, comprising: 基于预设视频规则生成包括多个由第一像素的底图和第二像素的测试对象组成的视频帧的初始视频,其中,所述第一像素和所述第二像素的相似度小于等于预设相似度阈值。An initial video including a plurality of video frames consisting of a base image of a first pixel and a test object of a second pixel is generated based on a preset video rule, wherein the similarity of the first pixel and the second pixel is less than or equal to a predetermined Set the similarity threshold. 10.一种视频处理装置,其特征在于,包括:10. A video processing device, comprising: 视频生成模块,被配置为基于预设视频规则生成包括多个视频帧的初始视频,其中,每个视频帧均包含至少一个数量逐帧递增的测试对象;A video generation module, configured to generate an initial video including a plurality of video frames based on preset video rules, wherein each video frame includes at least one test object whose number increases frame by frame; 视频转码模块,被配置为将所述初始视频发送至预设视频转码系统进行视频转码,并接收所述视频转码系统返回的转码视频;a video transcoding module, configured to send the initial video to a preset video transcoding system for video transcoding, and receive the transcoded video returned by the video transcoding system; 对象数量确定模块,被配置为按照所述转码视频中视频帧的排列顺序,确定所述转码视频中每个视频帧包含的测试对象的数量;an object quantity determination module, configured to determine the number of test objects included in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video; 转码结果确定模块,被配置为将所述初始视频中每个视频帧包含的测试对象的数量与所述转码视频中每个视频帧包含的测试对象的数量进行比对,以确定所述初始视频的转码结果。The transcoding result determination module is configured to compare the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the The transcoding result of the original video. 11.一种计算设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机指令,其特征在于,所述处理器执行所述指令时实现权利要求1-9任意一项所述方法的步骤。11. A computing device, comprising a memory, a processor and computer instructions stored on the memory and running on the processor, wherein the processor implements any one of claims 1-9 when executing the instructions the steps of the method. 12.一种计算机可读存储介质,其存储有计算机指令,其特征在于,该指令被处理器执行时实现权利要求1-9任意一项所述方法的步骤。12. A computer-readable storage medium storing computer instructions, wherein when the instructions are executed by a processor, the steps of the method according to any one of claims 1-9 are implemented.
CN202011450293.5A 2020-12-11 2020-12-11 Video processing method and device Active CN114630103B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011450293.5A CN114630103B (en) 2020-12-11 2020-12-11 Video processing method and device
US17/547,165 US12113993B2 (en) 2020-12-11 2021-12-09 Video processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011450293.5A CN114630103B (en) 2020-12-11 2020-12-11 Video processing method and device

Publications (2)

Publication Number Publication Date
CN114630103A true CN114630103A (en) 2022-06-14
CN114630103B CN114630103B (en) 2025-04-08

Family

ID=81895569

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011450293.5A Active CN114630103B (en) 2020-12-11 2020-12-11 Video processing method and device

Country Status (1)

Country Link
CN (1) CN114630103B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006080943A1 (en) * 2005-01-24 2006-08-03 Thomson Licensing Method, apparatus and system for visual inspection of transcoded video
US20080120676A1 (en) * 2006-11-22 2008-05-22 Horizon Semiconductors Ltd. Integrated circuit, an encoder/decoder architecture, and a method for processing a media stream
US20100110199A1 (en) * 2008-11-03 2010-05-06 Stefan Winkler Measuring Video Quality Using Partial Decoding
US20120281761A1 (en) * 2011-05-02 2012-11-08 Futurewei Technologies, Inc. System and Method for Macroblock Transcoding
US9986288B2 (en) * 2014-08-21 2018-05-29 The Nielsen Company (Us), Llc Methods and apparatus to measure exposure to streaming media
CN108366295A (en) * 2018-02-12 2018-08-03 北京印刷学院 Visual classification feature extracting method, transcoding weight contracting detection method and storage medium
CN110049313A (en) * 2019-04-17 2019-07-23 微梦创科网络科技(中国)有限公司 A kind of video measurement method and system
CN110213598A (en) * 2018-05-31 2019-09-06 腾讯科技(深圳)有限公司 A kind of video code conversion system, method and Related product

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006080943A1 (en) * 2005-01-24 2006-08-03 Thomson Licensing Method, apparatus and system for visual inspection of transcoded video
US20080120676A1 (en) * 2006-11-22 2008-05-22 Horizon Semiconductors Ltd. Integrated circuit, an encoder/decoder architecture, and a method for processing a media stream
US20100110199A1 (en) * 2008-11-03 2010-05-06 Stefan Winkler Measuring Video Quality Using Partial Decoding
US20120281761A1 (en) * 2011-05-02 2012-11-08 Futurewei Technologies, Inc. System and Method for Macroblock Transcoding
US9986288B2 (en) * 2014-08-21 2018-05-29 The Nielsen Company (Us), Llc Methods and apparatus to measure exposure to streaming media
CN108366295A (en) * 2018-02-12 2018-08-03 北京印刷学院 Visual classification feature extracting method, transcoding weight contracting detection method and storage medium
CN110213598A (en) * 2018-05-31 2019-09-06 腾讯科技(深圳)有限公司 A kind of video code conversion system, method and Related product
CN110049313A (en) * 2019-04-17 2019-07-23 微梦创科网络科技(中国)有限公司 A kind of video measurement method and system

Also Published As

Publication number Publication date
CN114630103B (en) 2025-04-08

Similar Documents

Publication Publication Date Title
US20230116801A1 (en) Image authenticity detection method and device, computer device, and storage medium
CN110766033B (en) Image processing method, device, electronic device and storage medium
US11961237B2 (en) Foreground data generation method and method for applying same, related apparatus, and system
WO2020042754A1 (en) Method and apparatus for verifying holographic anti-counterfeiting code
US12125458B2 (en) Display terminal adjustment method and display terminal
WO2018133825A1 (en) Method for processing video images in video call, terminal device, server, and storage medium
US20220188357A1 (en) Video generating method and device
KR102002024B1 (en) Method for processing labeling of object and object management server
CN110570348B (en) Face image replacement method and equipment
WO2022105027A1 (en) Image recognition method and system, electronic device, and storage medium
CN111985281A (en) Image generation model generation method and device, and image generation method and device
CN111967397A (en) Face image processing method and device, storage medium and electronic equipment
EP4191513A1 (en) Image processing method and apparatus, device and storage medium
CN110516598A (en) Method and device for generating images
CN113508391B (en) A data processing method, device, system, medium and computer equipment
CN111241873A (en) Image reproduction detection method, training method of model thereof, payment method and payment device
CN115396705A (en) Screen projection operation verification method, platform and system
CN108696713B (en) Code stream safety test method, device and test equipment
WO2017028565A1 (en) Method and device for playing subtitles of 3d video
CN111049735B (en) Group head portrait display method, device, equipment and storage medium
CN111666884A (en) Living body detection method, living body detection device, computer-readable medium, and electronic apparatus
CN115937574A (en) Sensitive picture detection method and device, storage medium and terminal
CN111340865A (en) Method and apparatus for generating images
US12113993B2 (en) Video processing method and device
CN106682676A (en) Image test method and image test device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant