WO2018184223A1 - Method and device for video compression processing - Google Patents

Method and device for video compression processing Download PDF

Info

Publication number
WO2018184223A1
WO2018184223A1 PCT/CN2017/079772 CN2017079772W WO2018184223A1 WO 2018184223 A1 WO2018184223 A1 WO 2018184223A1 CN 2017079772 W CN2017079772 W CN 2017079772W WO 2018184223 A1 WO2018184223 A1 WO 2018184223A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
video
code stream
storage
level
Prior art date
Application number
PCT/CN2017/079772
Other languages
French (fr)
Chinese (zh)
Inventor
刘建桥
杨雄
谭喆
Original Assignee
深圳中兴力维技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳中兴力维技术有限公司 filed Critical 深圳中兴力维技术有限公司
Priority to PCT/CN2017/079772 priority Critical patent/WO2018184223A1/en
Publication of WO2018184223A1 publication Critical patent/WO2018184223A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Definitions

  • the present invention relates to the field of video storage technologies, and in particular, to a video compression processing method and apparatus.
  • the existing video storage for video surveillance is divided into full frame rate storage and video frame collection storage.
  • full frame rate stored video recording has higher frame rate and image details.
  • Framed storage can save storage space by reducing frame rate and save bandwidth.
  • the arrival of high-definition surveillance has led to a significant increase in the cost of the entire video surveillance system.
  • the cost of storage devices has risen dramatically. Therefore, how to balance video quality and save storage costs is a problem that needs to be discussed.
  • Existing storage The device is a code stream acquired from the camera, and stores video recording at a full frame rate, and is not capable of dynamic frame drawing for the video file.
  • the main purpose of the present invention is to provide a video compression processing method and apparatus, which can select a frame drawing mode and a frame drawing level by storing a space condition and a bandwidth condition, and store video frames in a framed manner, thereby saving storage space and saving. bandwidth.
  • a video compression processing method provided by the present invention includes:
  • the frame drawing mode includes: a frame extraction frame and a spatial frame extraction, where the frame extraction level includes: a base layer and a plurality of enhancement layers.
  • the selecting the frame drawing mode and the frame drawing level according to the preset condition include:
  • the selecting the frame drawing mode and the frame drawing level according to the preset condition include:
  • the frame selection mode is selected according to a preset rule, and a transmission code stream of each video is calculated according to the uplink bandwidth and the number of request paths, and the frame extraction level is selected according to the transmission code stream.
  • the selecting the frame drawing mode and the frame drawing level according to the preset condition includes:
  • the video file in the storage space is framed and re-stored.
  • a video compression processing apparatus including: [0021] a code stream receiving module, configured to receive a video code stream;
  • a frame drawing module configured to select a frame drawing mode and a frame drawing level according to a preset condition
  • a storage module configured to store the video code stream according to the frame drawing mode and the framed frame level.
  • the frame drawing mode includes: a frame extraction frame and a spatial frame extraction, where the frame extraction level includes: a base layer and a plurality of enhancement layers.
  • the frame drawing module includes
  • a first obtaining unit configured to acquire I/O bandwidth performance of the storage disk, where the I/O bandwidth performance includes an I/O maximum write speed;
  • a first calculating unit configured to calculate a product of a storage path number and a code rate of the video code stream
  • the first determining unit is configured to determine whether the product is smaller than the maximum write speed of the I/O, and if yes, perform full frame rate storage on the video code stream; [0029] a first frame unit, configured to: when the product is not less than the I/O maximum write speed ⁇ , select a frame drawing mode according to a preset rule, and according to the I/O maximum write speed and the The number of storage paths calculates the write code rate of each video, and the frame draw level is selected according to the write code rate.
  • the frame drawing module includes:
  • the second determining unit is configured to determine whether the concurrent request volume of the user is greater than an uplink bandwidth
  • a second frame-splitting unit configured to: when the user requests that the concurrent quantity is greater than the uplink bandwidth, select a frame-splitting mode according to a preset rule, and calculate a transmission code stream of each channel according to the uplink bandwidth and the number of request channels, The framed level is selected according to the transmitted code stream.
  • the frame drawing module includes:
  • the third determining unit is configured to determine whether the storage space occupancy rate is less than a preset occupancy rate, and if yes, perform full frame rate saving on the video code stream;
  • the third frame drawing unit is configured to perform frame extraction and re-storing of the video file in the storage space when the storage space occupancy rate is not less than a preset occupancy rate.
  • the present invention provides a video compression processing method and apparatus, the method comprising: receiving a video code stream; selecting a frame drawing mode and a frame drawing level according to a preset condition; according to the frame drawing mode and the frame drawing Level writing the video file to the video stream, greatly improving the number of concurrent writes of the video recording storage.
  • the frame mode and the frame drawing can be selected through the storage space condition and the bandwidth condition. Level, to store video frames for video recording, saving storage space and saving bandwidth.
  • the present invention provides a video compression processing method and apparatus, the method comprising: receiving a video code stream; selecting a frame drawing mode and a frame drawing level according to a preset condition; according to the frame drawing mode and the frame drawing Level writing the video file to the video stream, greatly improving the number of concurrent writes of the video recording storage.
  • the frame mode and the frame drawing can be selected through the storage space condition and the bandwidth condition. Level, to store video frames for video recording, saving storage space and saving bandwidth.
  • DRAWINGS 1 is a flowchart of a video compression processing method according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic diagram of selection of a frame drawing mode according to Embodiment 1 of the present invention.
  • FIG. 3 is a schematic diagram of selecting a frame selection level of a domain according to Embodiment 1 of the present invention.
  • FIG. 4 is a schematic diagram of selecting a spatial domain frame selection level according to Embodiment 1 of the present invention.
  • FIG. 5 is a flowchart of a video compression processing method according to Embodiment 2 of the present invention.
  • FIG. 6 is a flowchart of a video compression processing method according to Embodiment 3 of the present invention.
  • FIG. 7 is a flowchart of a video compression processing method according to Embodiment 4 of the present invention.
  • FIG. 8 is a block diagram showing an exemplary structure of a video compression processing apparatus according to Embodiment 5 of the present invention.
  • FIG. 9 is a block diagram showing an exemplary structure of a video compression processing apparatus according to Embodiment 6 of the present invention.
  • FIG. 10 is a block diagram showing an exemplary structure of a video compression processing apparatus according to Embodiment 7 of the present invention.
  • FIG. 11 is a block diagram showing an exemplary structure of a video compression processing apparatus according to Embodiment 8 of the present invention.
  • a video compression processing method includes:
  • S20 Select a frame drawing mode and a frame drawing level according to preset conditions.
  • the frame drawing mode and the frame drawing level can be selected by the storage space condition and the bandwidth condition to write the framed video file to the video recording, thereby greatly increasing the number of concurrent writing channels of the video recording storage.
  • the storage space is saved and the bandwidth is saved.
  • the frame drawing mode includes: a frame extraction frame and a spatial frame extraction, where the frame drawing level includes : Base layer and several enhancement layers.
  • the frame extraction frame (indicated by the inter-turn field in the figure) and the spatial frame extraction (indicated by the spatial domain in the figure) are controlled by the frame selection mode selection.
  • the frame selection ie, the frame rate is reduced
  • the space is further developed on the basis of the frame extraction.
  • Framed frame of the domain reduced resolution
  • the frame extraction frame is based on SVC-T (temporal scaled video coding), and the inter-layer P frame prediction technology is used to segment the video stream into a basic layer.
  • Layer code stream represented by TO
  • three enhancement layer code streams that can be independently decoded represented by Tl, ⁇ 2, ⁇ 3, respectively.
  • the enhancement layer code stream may be selectively discarded according to the size of the network bandwidth to output a code stream with frame rates of 3.75 fps, 7.5 fps, 15 fps, and 30 fps respectively; predicting the current image by referring to the already encoded image.
  • the low-level coded image can not refer to the high-level coded image
  • the high-level coded image can refer to the underlying coded image to introduce the domain
  • the concept of grading; the code stream of different frame rates can be extracted from the video stream, wherein the output frame rate of the base layer T0 is 3.75 fps, the corresponding code stream is 512 Kbps, and the output frame rate of the enhancement layer T1 is 7.5 fps.
  • the corresponding code stream is 1024Kbps
  • the output frame rate of the enhancement layer T2 is 15fps
  • the corresponding code stream is 2048Kbps
  • the output frame rate of the enhancement layer T3 is 30fps
  • the corresponding code stream is 4096Kbps.
  • the spatial frame extraction refers to that a code stream having different image sizes can be proposed from a code stream, and the spatial domain level is also represented by T0, T1, ⁇ 2, and ⁇ 3 layers to output different resolutions.
  • the code stream where ⁇ 0 layer is the base layer is cif
  • the T2 layer is 720P, the resolution is 1280 *720, the corresponding code stream is 3072Kbps;
  • the T3 layer is 1080P, the resolution is 1920*1080, and the corresponding code stream is 4096Kbps.
  • FIG. 4 In the spatial domain frame drawing mode, a schematic diagram of selection of the frame drawing level is shown in FIG. 4.
  • the frame drawing mode of the present invention may be a combination of a frame extraction frame and a spatial frame extraction frame.
  • the frame selection may be performed first before the frame is extracted by the domain; wherein, the actual Requirements include: When the code stream is accepted, it can be compressed, and the code stream can be compressed at the same time. Repeated compression can be performed; the three conditions respectively correspond to the following three preset conditions; the preset conditions include: storage disk I/O bandwidth performance, user bandwidth, and user request concurrency and storage space occupancy; Under these conditions, the video file is stored by frame-storing to save storage space.
  • 1080P code stream storage requires about 80G of storage space per day. If the frame is only stored in the base layer, it only needs 10-20G space, and the space saves about 70%.
  • the preset condition is the I/O bandwidth performance of the storage disk
  • the stored disk I/O will become a bottleneck, if not Frame processing will result in slow writes to the disk and data loss.
  • the storage device can be based on the number of storage channels and the I/O performance of the disk and the set pumping.
  • the frame mode (configured in the frame-splitting mode, or in the silent mode) is used to store the frames after the frame is taken. By reducing the stored code stream, the normal writing of the recorded files is ensured, and the number of concurrent writes of the video recording storage is greatly improved.
  • the step S20 includes:
  • S21 Acquire I/O bandwidth performance of the storage disk, where the I/O bandwidth performance includes an I/O maximum write speed (unit is Mb/s);
  • step S23 determining whether the product is smaller than the maximum write speed of the I/O, and if yes, proceeding to step S25, performing full frame rate storage on the video code stream;
  • step S24 selecting a frame drawing mode according to a preset rule, and calculating a write code rate of each video according to the I/O maximum write speed and the number of storage paths, according to the writing Rate select frame level
  • the preset condition is that the transmission code rate is adjusted according to the user bandwidth and the user request concurrency, for example: when the synchronization requests the number of recorded playback channels, or the bandwidth is poor.
  • can move The mode selects the frame to send the code stream. If the network is in poor condition, or the mobile phone user requests video playback, the 1080P code stream can be framed to 720P or lower Dl, CIF resolution to adapt to the bandwidth situation.
  • the step S20 includes:
  • step S210 determining whether the concurrent request bandwidth of the user is greater than the uplink bandwidth (the uplink bandwidth is generally about 60 ⁇ 3 ⁇ 4 of the total bandwidth), and if not, proceeding to step S220, performing full frame rate storage on the video code stream;
  • step S230 select a frame drawing mode according to a preset rule, and calculate a transmission code stream of each video according to the uplink bandwidth and the number of request paths, and select a frame drawing level according to the transmission code stream;
  • the frame mode is the configured frame mode, and the frame is framed by default. If the frame is not satisfied by the single frame, the frame is mixed in the hollow domain mode to reduce the resolution. Rate and transmission rate).
  • the 1080p video is converted into a C IF resolution video by air-framed to ensure the smoothness of the video playback by the mobile phone user.
  • the corresponding frame extraction or spatial frame extraction can reduce the pressure of decoding and the pressure of the bandwidth;
  • Frame level is another IJT2; 2x speed ⁇ selects the frame level T1; 4 times speed or above ⁇ selects the frame level T0.
  • the step S20 includes:
  • step S211 determining whether the storage space occupancy rate is less than a preset occupancy rate, and if yes, proceeding to step S2 21, performing full frame rate storage on the video code stream;
  • step S231 the video file in the storage space is re-stored.
  • the method before the step S231, the method further includes: determining whether the video file only includes the base layer code stream, and if yes, the frame cannot be drawn again; otherwise, the frame is re-stored.
  • the preset occupancy rate may be customized by the user, for example, 90%.
  • the device After the storage space is occupied by 90%, the device starts to re-storage the stored video files. After reading the video file, analyze the svc level of each frame of data, extract the base layer data for storage, and mark the processed file. In order to save storage space, store video video as long as possible. The video file is mixed and framed, and the first spatial domain is framed to reduce the resolution to CIF format. When the frame is extracted, the frame rate is reduced to 3.75 fps.
  • a video compression processing apparatus including: [0087] a code stream receiving module 10, configured to receive a video code stream;
  • the frame drawing module 20 is configured to select a frame drawing mode and a frame drawing level according to a preset condition
  • the storage module 30 is configured to store the video code stream according to the frame drawing mode and the frame drawing level.
  • the frame drawing mode and the frame drawing level can be selected by the storage space condition and the bandwidth condition to write the framed video file to the video recording, thereby greatly increasing the number of concurrent writing channels of the video recording storage.
  • the storage space is saved and the bandwidth is saved.
  • the frame drawing mode includes: a frame extraction frame and a spatial frame extraction
  • the frame extraction level includes: a base layer and a plurality of enhancement layers.
  • the frame extraction and the spatial frame extraction are controlled by the frame selection mode selection.
  • the frame selection is performed first by default. (ie, reduce the frame rate), when the frame extraction cannot meet the requirements, the spatial frame extraction (reduction of resolution) will be further performed on the basis of the frame extraction.
  • the frame extraction frame is based on SVC-T (temporal scaled video coding), and the inter-layer P frame prediction technology is used to segment the video stream into a basic layer.
  • Layer code stream represented by TO
  • three enhancement layer code streams that can be independently decoded represented by Tl, ⁇ 2, ⁇ 3, respectively.
  • the enhancement layer code stream may be selectively discarded according to the size of the network bandwidth to output a code stream with frame rates of 3.75 fps, 7.5 fps, 15 fps, and 30 fps respectively; predicting the current image by referring to the already encoded image.
  • the low-level coded image can not refer to the high-level coded image
  • the high-level coded image can refer to the underlying coded image to introduce the domain
  • the concept of grading; the code stream of different frame rates can be extracted from the video code stream, wherein the output frame rate of the base layer T0 is 3.75 fps, and the corresponding code stream is 512.
  • the output frame rate of the enhancement layer Tl is 7.5fps
  • the corresponding code stream is 1024Kbps
  • the output frame rate of the enhancement layer T2 is 15fps
  • the corresponding code stream is 2048Kbps
  • the output frame rate of the enhancement layer T3 is 30fps
  • the corresponding code The stream is 4096Kbps.
  • the selection of the frame selection level is as shown in FIG. 3.
  • the spatial domain frame extraction means that code streams having different image sizes can be proposed from the code stream, and the spatial domain level is also represented by T0, T1, ⁇ 2, and ⁇ 3 layers to output different resolutions.
  • the code stream where the TO layer is the base layer is cif
  • the T2 layer is 720P, the resolution is 1280 *720, the corresponding code stream is 3072Kbps;
  • the T3 layer is 1080P, the resolution is 1920*1080, and the corresponding code stream is 4096Kbps.
  • FIG. 4 In the spatial domain frame drawing mode, a schematic diagram of the selection of the frame drawing level is shown in FIG. 4.
  • the preset conditions include: storage disk I/O bandwidth performance, user bandwidth, and user request concurrency and storage space occupancy; under these conditions, by frame extraction storage To store video files, to save storage space and reduce hardware costs.
  • 1080P code stream storage requires about 80G of storage space per day. If the frame is only stored in the base layer, it only needs 10-2 0G space, and the space saves about 70%.
  • the frame drawing module includes:
  • the first obtaining unit 21 is configured to acquire I/O bandwidth performance of the storage disk, where the I/O bandwidth performance includes an I/O maximum write speed.
  • the first calculating unit 22 is configured to calculate a product of a storage path number and a code rate of the video code stream;
  • the first determining unit 23 is configured to determine whether the product is smaller than the maximum write speed of the I/O, and if yes, Performing full frame rate storage on the video code stream;
  • the first frame drawing unit 24 is configured to: when the product is not less than the maximum write speed of the I/O, select a frame drawing mode according to a preset rule, and according to the maximum write speed of the I/O
  • the storage path number calculates the write code rate of each video, and selects the frame draw level according to the write code rate.
  • the frame selection may be dynamically selected. Sending a stream, such as when the network is poor, or when the mobile phone user requests video playback, the 1080P stream can be framed to a 720P or lower Dl, CIF resolution to adapt to the bandwidth situation, which can ensure smooth playback. Therefore, as shown in FIG. 10, the frame drawing module includes:
  • the second determining unit 210 is configured to determine whether the concurrent request volume of the user is greater than the uplink bandwidth (the uplink bandwidth is generally about 60% of the total bandwidth);
  • the second frame extracting unit 220 is configured to: when the user requests that the concurrent quantity is greater than the uplink bandwidth, select a frame drawing mode according to a preset rule, and calculate a sending code stream of each video according to the uplink bandwidth and the number of request paths. And selecting a framed level according to the sent code stream.
  • the framed level is determined according to the calculated transmit code stream, and the code stream after the frame is not higher than the transmit code stream. Refer to the code stream corresponding to each layer of the frame (the frame mode is the configured frame mode, and the frame is framed by default. If the frame is not satisfied by the single frame, the frame is mixed in the hollow domain mode to reduce the resolution. Rate and transmission rate).
  • the 1080p video is converted into a C IF resolution video by air-framed to ensure the smoothness of the video playback by the mobile phone user.
  • the corresponding frame extraction or spatial frame extraction can reduce the pressure of decoding and the pressure of the bandwidth;
  • Frame level is another IJT2; 2x speed ⁇ selects the frame level T1; 4 times speed or above ⁇ selects the frame level T0.
  • the frame drawing module when the preset condition is a storage space occupancy, the frame drawing module includes:
  • the third determining unit 211 is configured to determine whether the storage space occupancy rate is less than a preset occupancy rate, and if yes, perform full frame rate saving on the video code stream;
  • the third frame drawing unit 221 is configured to perform frame extraction and re-storing of the video file in the storage space when the storage space occupancy rate is not less than a preset occupancy rate.
  • the method before the step S231, the method further includes: determining whether the video file only includes the base layer code stream, and if yes, not drawing the frame again; otherwise, performing frame extraction and re-storing.
  • the preset occupancy rate may be customized by the user, for example, 90%.
  • the device After the storage space is occupied by 90%, the device starts to re-storage the stored video files. After reading the video file, analyze the svc level of each frame of data, extract the base layer data for storage, and mark the processed file. In order to save storage space, store video video as long as possible. The file is mixed and framed, and the first spatial domain is framed to reduce the resolution to CIF format. When the frame is extracted, the frame rate is reduced to 3.75 fps.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, In the CD), including several The instructions are for causing a terminal device (which may be a cell phone, computer, server, air conditioner, or network device, etc.) to perform the methods described in various embodiments of the present invention.
  • a terminal device which may be a cell phone, computer, server, air conditioner, or network device, etc.
  • a video compression processing method and apparatus includes: receiving a video code stream; selecting a frame drawing mode and a frame drawing level according to a preset condition; according to the frame drawing mode and the frame drawing Level writing the video file to the video stream, greatly improving the number of concurrent writes of the video recording storage.
  • the frame mode and the frame drawing can be selected through the storage space condition and the bandwidth condition. Level, to store video frames for video recording, saving storage space and saving bandwidth. Therefore, it has industrial applicability.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

Related to the technical field of video storage, disclosed are a method and device for video compression processing. The method comprises: receiving a video stream; selecting a frame extracting mode and a frame extracting level on the basis of a preset criterion; writing the video stream into a video file according to the frame extracting mode and the frame extracting level, thus greatly increasing the number of write paths for video recording storage concurrency. In addition, when the video file is written into a storage, a frame extracting mode and a frame extracting level can be selected on the basis of a storage space state and bandwidth state for the frame extracting storage of the video recording, thus conserving storage space and conserving bandwidth.

Description

发明名称:一种视频压缩处理方法及装置  Invention name: A video compression processing method and device
技术领域  Technical field
[0001] 本发明涉及视频存储技术领域, 尤其涉及一种视频压缩处理方法及装置。  [0001] The present invention relates to the field of video storage technologies, and in particular, to a video compression processing method and apparatus.
背景技术  Background technique
[0002] 现有的针对视频监控中视频的录像存储, 分为全帧率存储和视频的抽帧存储, 对于视频录像来说, 全帧率存储的视频录像具有较高的帧率和图像细节, 抽帧 存储可以通过降低帧率来节省存储空间, 并节省带宽。 高清监控吋代的到来, 使得整个视频监控系统的成本幵始大幅度上升, 尤其是存储设备的成本上涨惊 人, 因此, 如何平衡视频质量以及节约存储成本, 是个需要讨论的问题, 现有 的存储装置是从摄像头获取的码流, 存储全帧率的视频录像, 而不能够针对录 像文件进行动态的抽帧。  [0002] The existing video storage for video surveillance is divided into full frame rate storage and video frame collection storage. For video recording, full frame rate stored video recording has higher frame rate and image details. , Framed storage can save storage space by reducing frame rate and save bandwidth. The arrival of high-definition surveillance has led to a significant increase in the cost of the entire video surveillance system. In particular, the cost of storage devices has risen dramatically. Therefore, how to balance video quality and save storage costs is a problem that needs to be discussed. Existing storage The device is a code stream acquired from the camera, and stores video recording at a full frame rate, and is not capable of dynamic frame drawing for the video file.
技术问题  technical problem
[0003] 本发明的主要目的在于提出一种视频压缩处理方法及装置, 能够通过存储空间 状况及带宽情况选择抽帧模式和抽帧级别, 来对视频录像进行抽帧存储, 节省 存储空间、 节省带宽。  [0003] The main purpose of the present invention is to provide a video compression processing method and apparatus, which can select a frame drawing mode and a frame drawing level by storing a space condition and a bandwidth condition, and store video frames in a framed manner, thereby saving storage space and saving. bandwidth.
问题的解决方案  Problem solution
技术解决方案  Technical solution
[0004] 为实现上述目的, 本发明提供的一种视频压缩处理方法, 包括:  [0004] In order to achieve the above object, a video compression processing method provided by the present invention includes:
[0005] 接收视频码流; [0005] receiving a video code stream;
[0006] 根据预设的条件选择抽帧模式和抽帧级别;  [0006] selecting a frame drawing mode and a frame drawing level according to preset conditions;
[0007] 按照所述抽帧模式和所述抽帧级别对所述视频码流进行存储。  And storing the video code stream according to the frame drawing mode and the frame drawing level.
[0008] 可选地, 所述抽帧模式包括: 吋域抽帧和空域抽帧, 所述抽帧级别包括: 基础 层和若干个增强层。  Optionally, the frame drawing mode includes: a frame extraction frame and a spatial frame extraction, where the frame extraction level includes: a base layer and a plurality of enhancement layers.
[0009] 可选地, 当所述预设的条件为存储磁盘的 I/O带宽性能吋, 所述根据预设的条 件选择抽帧模式和抽帧级别包括:  [0009] Optionally, when the preset condition is an I/O bandwidth performance of the storage disk, the selecting the frame drawing mode and the frame drawing level according to the preset condition include:
[0010] 获取存储磁盘的 I/O带宽性能, 所述 I/O带宽性能包括 I/O最大写速度; [0011] 计算所述视频码流的存储路数与码率的乘积; [0010] obtaining I/O bandwidth performance of the storage disk, where the I/O bandwidth performance includes an I/O maximum write speed; [0011] calculating a product of the number of storage channels of the video code stream and a code rate;
[0012] 判断所述乘积是否小于所述 I/O最大写速度, 若是, 则对所述视频码流进行全 帧率存储;  [0012] determining whether the product is smaller than the maximum write speed of the I/O, and if yes, performing full frame rate storage on the video code stream;
[0013] 否则, 按照预设的规则选择抽帧模式, 并根据所述 I/O最大写速度和所述存储 路数计算每路视频的写入码率, 根据所述写入码率选择抽帧级别。  [0013] Otherwise, selecting a frame drawing mode according to a preset rule, and calculating a write code rate of each video according to the I/O maximum write speed and the number of storage paths, and selecting a pumping according to the write code rate Frame level.
[0014] 可选地, 当所述预设的条件为用户带宽和用户请求并发量吋, 所述根据预设的 条件选择抽帧模式和抽帧级别包括:  [0014] Optionally, when the preset condition is a user bandwidth and a user request concurrency quantity, the selecting the frame drawing mode and the frame drawing level according to the preset condition include:
[0015] 判断用户请求并发量是否大于上行带宽;  [0015] determining whether the concurrent request volume of the user is greater than the uplink bandwidth;
[0016] 若是, 则按照预设的规则选择抽帧模式, 并根据所述上行带宽和请求路数计算 每路视频的发送码流, 根据所述发送码流选择抽帧级别。  [0016] If yes, the frame selection mode is selected according to a preset rule, and a transmission code stream of each video is calculated according to the uplink bandwidth and the number of request paths, and the frame extraction level is selected according to the transmission code stream.
[0017] 可选地, 当所述预设的条件为存储空间占用率吋, 所述根据预设的条件选择抽 帧模式和抽帧级别包括: [0017] Optionally, when the preset condition is a storage space occupancy, the selecting the frame drawing mode and the frame drawing level according to the preset condition includes:
[0018] 判断所述存储空间占用率是否小于预设的占用率, 若是, 则对所述视频码流进 行全帧率保存; [0018] determining whether the storage space occupancy rate is less than a preset occupancy rate, and if yes, performing full frame rate storage on the video code stream;
[0019] 否则, 对存储空间内的视频文件进行抽帧重新存储。  [0019] Otherwise, the video file in the storage space is framed and re-stored.
[0020] 作为本发明的另一方面, 提供的一种视频压缩处理装置, 其特征在于, 包括: [0021] 码流接收模块, 用于接收视频码流;  [0020] As another aspect of the present invention, a video compression processing apparatus is provided, including: [0021] a code stream receiving module, configured to receive a video code stream;
[0022] 抽帧模块, 用于根据预设的条件选择抽帧模式和抽帧级别;  [0022] a frame drawing module, configured to select a frame drawing mode and a frame drawing level according to a preset condition;
[0023] 存储模块, 用于按照所述抽帧模式和所述抽帧级别对所述视频码流进行存储。  [0023] a storage module, configured to store the video code stream according to the frame drawing mode and the framed frame level.
[0024] 可选地, 所述抽帧模式包括: 吋域抽帧和空域抽帧, 所述抽帧级别包括: 基础 层和若干个增强层。  [0024] Optionally, the frame drawing mode includes: a frame extraction frame and a spatial frame extraction, where the frame extraction level includes: a base layer and a plurality of enhancement layers.
[0025] 可选地, 当所述预设的条件为存储磁盘的 I/O带宽性能吋, 所述抽帧模块包括  [0025] Optionally, when the preset condition is an I/O bandwidth performance of the storage disk, the frame drawing module includes
[0026] 第一获取单元, 用于获取存储磁盘的 I/O带宽性能, 所述 I/O带宽性能包括 I/O最 大写速度; a first obtaining unit, configured to acquire I/O bandwidth performance of the storage disk, where the I/O bandwidth performance includes an I/O maximum write speed;
[0027] 第一计算单元, 用于计算所述视频码流的存储路数与码率的乘积;  [0027] a first calculating unit, configured to calculate a product of a storage path number and a code rate of the video code stream;
[0028] 第一判断单元, 用于判断所述乘积是否小于所述 I/O最大写速度, 若是, 则对 所述视频码流进行全帧率存储; [0029] 第一抽帧单元, 用于当所述乘积不小于所述 I/O最大写速度吋, 按照预设的规 则选择抽帧模式, 并根据所述 I/O最大写速度和所述存储路数计算每路视频的写 入码率, 根据所述写入码率选择抽帧级别。 [0028] The first determining unit is configured to determine whether the product is smaller than the maximum write speed of the I/O, and if yes, perform full frame rate storage on the video code stream; [0029] a first frame unit, configured to: when the product is not less than the I/O maximum write speed 吋, select a frame drawing mode according to a preset rule, and according to the I/O maximum write speed and the The number of storage paths calculates the write code rate of each video, and the frame draw level is selected according to the write code rate.
[0030] 可选地, 当所述预设的条件为用户带宽和用户请求并发量吋, 所述抽帧模块包 括:  [0030] Optionally, when the preset condition is user bandwidth and user request concurrency, the frame drawing module includes:
[0031] 第二判断单元, 用于判断用户请求并发量是否大于上行带宽;  [0031] The second determining unit is configured to determine whether the concurrent request volume of the user is greater than an uplink bandwidth;
[0032] 第二抽帧单元, 用于当用户请求并发量大于上行带宽吋, 按照预设的规则选择 抽帧模式, 并根据所述上行带宽和请求路数计算每路视频的发送码流, 根据所 述发送码流选择抽帧级别。 [0032] a second frame-splitting unit, configured to: when the user requests that the concurrent quantity is greater than the uplink bandwidth, select a frame-splitting mode according to a preset rule, and calculate a transmission code stream of each channel according to the uplink bandwidth and the number of request channels, The framed level is selected according to the transmitted code stream.
[0033] 可选地, 当所述预设的条件为存储空间占用率吋, 所述抽帧模块包括: [0033] Optionally, when the preset condition is a storage space occupancy, the frame drawing module includes:
[0034] 第三判断单元, 用于判断所述存储空间占用率是否小于预设的占用率, 若是, 则对所述视频码流进行全帧率保存; [0034] The third determining unit is configured to determine whether the storage space occupancy rate is less than a preset occupancy rate, and if yes, perform full frame rate saving on the video code stream;
[0035] 第三抽帧单元, 用于当所述存储空间占用率不小于预设的占用率吋, 对存储空 间内的视频文件进行抽帧重新存储。 [0035] The third frame drawing unit is configured to perform frame extraction and re-storing of the video file in the storage space when the storage space occupancy rate is not less than a preset occupancy rate.
[0036] 本发明提出的一种视频压缩处理方法及装置, 该方法包括: 接收视频码流; 根 据预设的条件选择抽帧模式和抽帧级别; 按照所述抽帧模式和所述抽帧级别对 所述视频码流进行视频文件的写入, 大大提高视频录像存储并发的写入路数, 另外, 视频文件写入存储后还能够通过存储空间状况及带宽情况选择抽帧模式 和抽帧级别, 来对视频录像进行抽帧存储, 节省存储空间、 节省带宽。 [0036] The present invention provides a video compression processing method and apparatus, the method comprising: receiving a video code stream; selecting a frame drawing mode and a frame drawing level according to a preset condition; according to the frame drawing mode and the frame drawing Level writing the video file to the video stream, greatly improving the number of concurrent writes of the video recording storage. In addition, after the video file is written and stored, the frame mode and the frame drawing can be selected through the storage space condition and the bandwidth condition. Level, to store video frames for video recording, saving storage space and saving bandwidth.
发明的有益效果  Advantageous effects of the invention
有益效果  Beneficial effect
[0037] 本发明提出的一种视频压缩处理方法及装置, 该方法包括: 接收视频码流; 根 据预设的条件选择抽帧模式和抽帧级别; 按照所述抽帧模式和所述抽帧级别对 所述视频码流进行视频文件的写入, 大大提高视频录像存储并发的写入路数, 另外, 视频文件写入存储后还能够通过存储空间状况及带宽情况选择抽帧模式 和抽帧级别, 来对视频录像进行抽帧存储, 节省存储空间、 节省带宽。  [0037] The present invention provides a video compression processing method and apparatus, the method comprising: receiving a video code stream; selecting a frame drawing mode and a frame drawing level according to a preset condition; according to the frame drawing mode and the frame drawing Level writing the video file to the video stream, greatly improving the number of concurrent writes of the video recording storage. In addition, after the video file is written and stored, the frame mode and the frame drawing can be selected through the storage space condition and the bandwidth condition. Level, to store video frames for video recording, saving storage space and saving bandwidth.
对附图的简要说明  Brief description of the drawing
附图说明 [0038] 图 1为本发明实施例一提供的一种视频压缩处理方法流程图; DRAWINGS 1 is a flowchart of a video compression processing method according to Embodiment 1 of the present invention;
[0039] 图 2为本发明实施例一提供的抽帧模式选择示意图;  2 is a schematic diagram of selection of a frame drawing mode according to Embodiment 1 of the present invention;
[0040] 图 3为本发明实施例一提供的吋域抽帧级别选择示意图;  3 is a schematic diagram of selecting a frame selection level of a domain according to Embodiment 1 of the present invention;
[0041] 图 4为本发明实施例一提供的空域抽帧级别选择示意图;  4 is a schematic diagram of selecting a spatial domain frame selection level according to Embodiment 1 of the present invention;
[0042] 图 5为本发明实施例二提供的一种视频压缩处理方法流程图;  5 is a flowchart of a video compression processing method according to Embodiment 2 of the present invention;
[0043] 图 6为本发明实施例三提供的一种视频压缩处理方法流程图;  6 is a flowchart of a video compression processing method according to Embodiment 3 of the present invention;
[0044] 图 7为本发明实施例四提供的一种视频压缩处理方法流程图;  7 is a flowchart of a video compression processing method according to Embodiment 4 of the present invention;
[0045] 图 8为本发明实施例五提供的一种视频压缩处理装置示范性结构框图;  8 is a block diagram showing an exemplary structure of a video compression processing apparatus according to Embodiment 5 of the present invention;
[0046] 图 9为本发明实施例六提供的一种视频压缩处理装置示范性结构框图;  9 is a block diagram showing an exemplary structure of a video compression processing apparatus according to Embodiment 6 of the present invention;
[0047] 图 10为本发明实施例七提供的一种视频压缩处理装置示范性结构框图;  FIG. 10 is a block diagram showing an exemplary structure of a video compression processing apparatus according to Embodiment 7 of the present invention; FIG.
[0048] 图 11为本发明实施例八提供的一种视频压缩处理装置示范性结构框图。  11 is a block diagram showing an exemplary structure of a video compression processing apparatus according to Embodiment 8 of the present invention.
[0049] 本发明目的的实现、 功能特点及优点将结合实施例, 参照附图做进一步说明。  [0049] The implementation, functional features, and advantages of the present invention will be further described with reference to the accompanying drawings.
本发明的实施方式 Embodiments of the invention
[0050] 在此处键入本发明的实施方式描述段落。 应当理解, 此处所描述的具体实施例 仅仅用以解释本发明, 并不用于限定本发明。  [0050] The description paragraphs of the embodiments of the invention are entered here. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0051] 在后续的描述中, 使用用于表示元件的诸如"模块"、 "部件 "或"单元"的后缀仅 为了有利于本发明的说明, 其本身并没有特定的意义。 因此, "模块 "与"部件"可 以混合地使用。 In the following description, the suffixes such as "module", "component" or "unit" used to denote an element are merely for the purpose of facilitating the description of the present invention, and do not have a specific meaning per se. Therefore, "module" and "component" can be used in combination.
[0052] 实施例一 Embodiment 1
[0053] 如图 1所示, 在本实施例中, 一种视频压缩处理方法, 包括:  [0053] As shown in FIG. 1, in this embodiment, a video compression processing method includes:
[0054] S10、 接收视频码流; [0054] S10. Receive a video code stream.
[0055] S20、 根据预设的条件选择抽帧模式和抽帧级别;  [0055] S20. Select a frame drawing mode and a frame drawing level according to preset conditions.
[0056] S30、 按照所述抽帧模式和所述抽帧级别对所述视频码流进行存储。 [0056] S30. Store the video code stream according to the frame drawing mode and the frame drawing level.
[0057] 在本实施例中, 能够通过存储空间状况及带宽情况选择抽帧模式和抽帧级别, 来对视频录像进行抽帧视频文件的写入, 大大提高视频录像存储并发的写入路 数, 另外, 视频文件写入存储后还, 节省存储空间、 节省带宽。 [0057] In this embodiment, the frame drawing mode and the frame drawing level can be selected by the storage space condition and the bandwidth condition to write the framed video file to the video recording, thereby greatly increasing the number of concurrent writing channels of the video recording storage. In addition, after the video file is written to the storage, the storage space is saved and the bandwidth is saved.
[0058] 在本实施例中, 所述抽帧模式包括: 吋域抽帧和空域抽帧, 所述抽帧级别包括 : 基础层和若干个增强层。 [0058] In this embodiment, the frame drawing mode includes: a frame extraction frame and a spatial frame extraction, where the frame drawing level includes : Base layer and several enhancement layers.
[0059] 如图 2所示, 在本实施例中, 吋域抽帧 (图中以吋间域标示) 和空域抽帧 (图 中以空间域标示) 由抽帧模式选择幵关来控制, 当系统也即存储装置没有选择 抽帧模式吋, 默认先进行吋域的抽帧 (即降低帧率), 当吋域抽帧无法满足要求吋 , 将进一步在吋域抽帧的基础上面进行空间域的抽帧 (降低分辨率) 。  As shown in FIG. 2, in this embodiment, the frame extraction frame (indicated by the inter-turn field in the figure) and the spatial frame extraction (indicated by the spatial domain in the figure) are controlled by the frame selection mode selection, When the system, that is, the storage device does not select the frame drawing mode, the frame selection (ie, the frame rate is reduced) is performed first by default, and when the frame extraction cannot satisfy the requirements, the space is further developed on the basis of the frame extraction. Framed frame of the domain (reduced resolution).
[0060] 在本实施例中, 所述吋域抽帧基于吋域可分层视频编码 (SVC-T, Temporal Scaled Video Coding) , 采用层间 P帧预测技术, 可将视频流分割成一个基础层 码流 (以 TO表示) 和三个可进行独立解码的增强层码流 (分别以 Tl、 Τ2、 Τ3表 示) 。 在网络传输过程中, 可根据网络带宽的大小选择性的丢弃增强层码流, 以输出帧率分别为 3.75fps, 7.5fps, 15fps以及 30fps的码流; 通过参考已经编码的 图像来预测当前图像, 可以减少视频编码的吋域冗余; 通过对编码图像的参考 属性进行层次化管理, 低层次的编码图像不可参考高层的编码图像, 高层次的 编码图像可以参考底层的编码图像, 引入吋域分级的概念; 可以从视频码流中 提取不同帧率的码流, 其中, 基础层 T0的输出帧率为 3.75fps, 对应的码流是 512 Kbps , 增强层 T1的输出帧率为 7.5fps, 对应的码流是 1024Kbps, 增强层 T2的输出 帧率为 15fps, 对应的码流是 2048Kbps, 增强层 T3的输出帧率为 30fps, 对应的码 流是 4096Kbps。  [0060] In this embodiment, the frame extraction frame is based on SVC-T (temporal scaled video coding), and the inter-layer P frame prediction technology is used to segment the video stream into a basic layer. Layer code stream (represented by TO) and three enhancement layer code streams that can be independently decoded (represented by Tl, Τ2, Τ3, respectively). During the network transmission process, the enhancement layer code stream may be selectively discarded according to the size of the network bandwidth to output a code stream with frame rates of 3.75 fps, 7.5 fps, 15 fps, and 30 fps respectively; predicting the current image by referring to the already encoded image. , can reduce the redundancy of the video coding domain; by hierarchically managing the reference attributes of the coded image, the low-level coded image can not refer to the high-level coded image, and the high-level coded image can refer to the underlying coded image to introduce the domain The concept of grading; the code stream of different frame rates can be extracted from the video stream, wherein the output frame rate of the base layer T0 is 3.75 fps, the corresponding code stream is 512 Kbps, and the output frame rate of the enhancement layer T1 is 7.5 fps. The corresponding code stream is 1024Kbps, the output frame rate of the enhancement layer T2 is 15fps, the corresponding code stream is 2048Kbps, the output frame rate of the enhancement layer T3 is 30fps, and the corresponding code stream is 4096Kbps.
[0061] 在吋域抽帧模式中, 抽帧级别的选择示意图如图 3所示。  [0061] In the frame extraction mode, the selection of the frame selection level is shown in FIG. 3.
[0062] 在本实施例中, 所述空域抽帧是指, 可以从码流中提出具有不同图像尺寸的码 流, 空域等级同样由 T0、 Tl、 Τ2、 Τ3层表示, 以输出不同分辨率的码流, 其中 Τ0层为基础层为 cif|&式, 分辨率是 352*288, 对应的码流是 512Kbps; T1层为 D1 格式, 分辨率是 704*576, 对应的码流是 2048Kbps; T2层为 720P, 分辨率是 1280 *720, 对应的码流是 3072Kbps; T3层为 1080P, 分辨率是 1920* 1080, 对应的码 流是 4096Kbps。  [0062] In this embodiment, the spatial frame extraction refers to that a code stream having different image sizes can be proposed from a code stream, and the spatial domain level is also represented by T0, T1, Τ2, and Τ3 layers to output different resolutions. The code stream, where Τ0 layer is the base layer is cif|&, the resolution is 352*288, the corresponding code stream is 512Kbps; the T1 layer is D1 format, the resolution is 704*576, and the corresponding code stream is 2048Kbps; The T2 layer is 720P, the resolution is 1280 *720, the corresponding code stream is 3072Kbps; the T3 layer is 1080P, the resolution is 1920*1080, and the corresponding code stream is 4096Kbps.
[0063] 在空域抽帧模式中, 抽帧级别的选择示意图如图 4所示。  [0063] In the spatial domain frame drawing mode, a schematic diagram of selection of the frame drawing level is shown in FIG. 4.
[0064] 在本实施例中, 本案的抽帧方式可以是吋域抽帧和空域抽帧的组合, 根据实际 的需求, 可以选择先进行吋域抽帧再进行空域抽帧; 其中, 实际的需求包括: 接受码流的吋候可以进行压缩, 发送码流的吋候也可以进行压缩, 存储之后还 可以进行重复压缩; 这三种情况分别对应以下的三种预设的条件; 所述预设的 条件包括: 存储磁盘的 I/O带宽性能、 用户带宽和用户请求并发量及存储空间占 用率; 在这几种条件下, 通过抽帧存储来存储录像文件, 以达到节省存储空间[0064] In this embodiment, the frame drawing mode of the present invention may be a combination of a frame extraction frame and a spatial frame extraction frame. According to actual requirements, the frame selection may be performed first before the frame is extracted by the domain; wherein, the actual Requirements include: When the code stream is accepted, it can be compressed, and the code stream can be compressed at the same time. Repeated compression can be performed; the three conditions respectively correspond to the following three preset conditions; the preset conditions include: storage disk I/O bandwidth performance, user bandwidth, and user request concurrency and storage space occupancy; Under these conditions, the video file is stored by frame-storing to save storage space.
, 减少硬件成本的目的。 例如: 1080P码流存储一天需要 80G左右的存储空间, 如果抽帧只存储基础层的情况下, 大概只需要 10-20G的空间, 空间节省了 70%左 右。 , the purpose of reducing hardware costs. For example: 1080P code stream storage requires about 80G of storage space per day. If the frame is only stored in the base layer, it only needs 10-20G space, and the space saves about 70%.
[0065] 实施例二  Embodiment 2
[0066] 在本实施例中, 当所述预设的条件为存储磁盘的 I/O带宽性能吋, 当存储路数 过多吋, 存储的磁盘 I/O将会成为瓶颈, 如果没有做抽帧处理, 将导致写入磁盘 过慢, 数据丢失, 这样很大程度上面限制了存储装置并发存储视频的路数, 本 存储装置能够根据存储路数及磁盘的 I/O性能以及设置好的抽帧模式 (配置好抽 帧模式, 或采用默方式) , 来进行抽帧后存储, 通过降低存储的码流, 以保证 录像文件的正常写入, 大大提高视频录像存储并发写入路数, 此吋, 如图 5所示 , 所述步骤 S20包括:  [0066] In this embodiment, when the preset condition is the I/O bandwidth performance of the storage disk, when the number of storage paths is too large, the stored disk I/O will become a bottleneck, if not Frame processing will result in slow writes to the disk and data loss. This greatly limits the number of channels that the storage device concurrently stores video. The storage device can be based on the number of storage channels and the I/O performance of the disk and the set pumping. The frame mode (configured in the frame-splitting mode, or in the silent mode) is used to store the frames after the frame is taken. By reducing the stored code stream, the normal writing of the recorded files is ensured, and the number of concurrent writes of the video recording storage is greatly improved.吋, as shown in FIG. 5, the step S20 includes:
[0067] S21、 获取存储磁盘的 I/O带宽性能, 所述 I/O带宽性能包括 I/O最大写速度 (单 位为 Mb/s) ;  [0067] S21: Acquire I/O bandwidth performance of the storage disk, where the I/O bandwidth performance includes an I/O maximum write speed (unit is Mb/s);
[0068] S22、 计算所述视频码流的存储路数与码率的乘积;  [0068] S22. Calculate a product of a storage path number and a code rate of the video code stream;
[0069] S23、 判断所述乘积是否小于所述 I/O最大写速度, 若是, 则进入步骤 S25、 对 所述视频码流进行全帧率存储;  [0069] S23: determining whether the product is smaller than the maximum write speed of the I/O, and if yes, proceeding to step S25, performing full frame rate storage on the video code stream;
[0070] 否则, 进入步骤 S24、 按照预设的规则选择抽帧模式, 并根据所述 I/O最大写速 度和所述存储路数计算每路视频的写入码率, 根据所述写入码率选择抽帧级别 [0070] Otherwise, proceeding to step S24, selecting a frame drawing mode according to a preset rule, and calculating a write code rate of each video according to the I/O maximum write speed and the number of storage paths, according to the writing Rate select frame level
[0071] 以吋域抽帧为例: 如计算后写入码流 1024Kbps, 则表示抽帧级别, 需要抽到 T1 层 (参见每层对应的码流) 。 所有码流抽帧到 1024Kbps码流后, 能存储的路数 将是全帧率存储路数的 4倍。 [0071] Taking the frame extraction in the 为 domain as an example: If the code stream is 1024Kbps after calculation, the frame level is extracted, and the T1 layer needs to be extracted (see the code stream corresponding to each layer). After all streams are framed to a 1024Kbps stream, the number of channels that can be stored will be four times the full frame rate.
[0072] 实施例三  Embodiment 3
[0073] 在本实施例中, 当所述预设的条件为根据用户带宽和用户请求并发量调整发送 码率吋, 例如: 当同步请求录像回放路数较多, 或带宽较差的情况下, 可以动 态的选择抽帧发送码流, 如网络较差情况下, 或者是手机用户请求视频回放吋 , 可以把 1080P码流抽帧成 720P或更低的 Dl、 CIF分辨率发送以适应带宽情况, 能够保证流畅的播放, 此吋, 如图 6所示, 所述步骤 S20包括: [0073] In this embodiment, when the preset condition is that the transmission code rate is adjusted according to the user bandwidth and the user request concurrency, for example: when the synchronization requests the number of recorded playback channels, or the bandwidth is poor. , can move The mode selects the frame to send the code stream. If the network is in poor condition, or the mobile phone user requests video playback, the 1080P code stream can be framed to 720P or lower Dl, CIF resolution to adapt to the bandwidth situation. As shown in FIG. 6, the step S20 includes:
[0074] S210、 判断用户请求并发量是否大于上行带宽 (上行带宽一般是带宽总量的 60 <¾左右) , 若不大于, 则进入步骤 S220、 对所述视频码流进行全帧率存储; [0074] S210, determining whether the concurrent request bandwidth of the user is greater than the uplink bandwidth (the uplink bandwidth is generally about 60<3⁄4 of the total bandwidth), and if not, proceeding to step S220, performing full frame rate storage on the video code stream;
[0075] 若是, 则进入步骤 S230、 按照预设的规则选择抽帧模式, 并根据所述上行带宽 和请求路数计算每路视频的发送码流, 根据所述发送码流选择抽帧级别; [0075] If yes, proceed to step S230, select a frame drawing mode according to a preset rule, and calculate a transmission code stream of each video according to the uplink bandwidth and the number of request paths, and select a frame drawing level according to the transmission code stream;
[0076] 根据计算后的发送码流确定抽帧级别, 抽帧后的码流不高于发送码流。 参照抽 帧每层对应的码流 (抽帧模式为配置的抽帧模式, 默认采用吋域抽帧, 如果单 独的吋域抽帧无法满足要求吋, 则进行吋空域混合模式抽帧, 降低分辨率和发 送码率) 。  [0076] determining a framed level according to the calculated transmit code stream, and the code stream after the frame is not higher than the transmit code stream. Refer to the code stream corresponding to each layer of the frame (the frame mode is the configured frame mode, and the frame is framed by default. If the frame is not satisfied by the single frame, the frame is mixed in the hollow domain mode to reduce the resolution. Rate and transmission rate).
[0077] 在本实施例中, 如手机用户请求视频回放, 则把 1080p视频通过空域抽帧转成 C IF分辨率视频, 保证手机用户回放视频的流畅度。  [0077] In this embodiment, if the mobile phone user requests video playback, the 1080p video is converted into a C IF resolution video by air-framed to ensure the smoothness of the video playback by the mobile phone user.
[0078] 当有用户倍速请求吋, 根据倍速情况进行相应的吋域抽帧或空域抽帧 (配置幵 关选择抽帧模式) , 能够降低解码的压力, 和带宽的压力; 1倍速吋选择抽帧级 另 IJT2; 2倍速吋选择抽帧级别 T1 ; 4倍速或以上吋选择抽帧级别 T0。  [0078] When there is a user double speed request, according to the double speed situation, the corresponding frame extraction or spatial frame extraction (configuration selection frame selection mode) can reduce the pressure of decoding and the pressure of the bandwidth; Frame level is another IJT2; 2x speed 吋 selects the frame level T1; 4 times speed or above 吋 selects the frame level T0.
[0079] 实施例四  [0079] Embodiment 4
[0080] 在本实施例中, 当所述预设的条件为存储空间中已存储的视频文件占用率吋, 如图 7所示, 所述步骤 S20包括:  [0080] In this embodiment, when the preset condition is the video file occupancy rate 已 stored in the storage space, as shown in FIG. 7, the step S20 includes:
[0081] S211、 判断所述存储空间占用率是否小于预设的占用率, 若是, 则进入步骤 S2 21、 对所述视频码流进行全帧率保存;  [0081] S211, determining whether the storage space occupancy rate is less than a preset occupancy rate, and if yes, proceeding to step S2 21, performing full frame rate storage on the video code stream;
[0082] 否则, 进入步骤 S231、 对存储空间内的视频文件进行抽帧重新存储。  [0082] Otherwise, the process proceeds to step S231, and the video file in the storage space is re-stored.
[0083] 在本实施例中, 所述步骤 S231之前还包括: 判断所述视频文件是否仅包含基础 层码流, 若是, 则不能再次抽帧, 否则, 进行抽帧重新存储。  [0083] In this embodiment, before the step S231, the method further includes: determining whether the video file only includes the base layer code stream, and if yes, the frame cannot be drawn again; otherwise, the frame is re-stored.
[0084] 在本实施例中, 所述预设的占用率可以由用户自定义, 比如 90%, 当存储空间 占用达到 90%以后, 本装置幵始对存储过的录像文件进行抽帧重新存储, 读取录 像文件后, 分析每帧数据的 svc级别, 抽取基础层数据进行存储, 并对处理过的 文件做标记, 为了能够节省存储的空间, 尽量长吋间的存储视频录像, 这里对 录像文件进行混合抽帧, 先空域抽帧降低分辨率为 CIF格式, 在进行吋域的抽帧 , 帧率降为 3.75fps。 当存储空间再次达到 90%, 且存在未抽帧的录像文件, 对未 抽帧的录像文件继续抽帧重新存储, 重复上面的操作, 直到所有文件都是抽帧 后只保留基础层的录像文件, 最大限度的利用存储空间。 [0084] In this embodiment, the preset occupancy rate may be customized by the user, for example, 90%. After the storage space is occupied by 90%, the device starts to re-storage the stored video files. After reading the video file, analyze the svc level of each frame of data, extract the base layer data for storage, and mark the processed file. In order to save storage space, store video video as long as possible. The video file is mixed and framed, and the first spatial domain is framed to reduce the resolution to CIF format. When the frame is extracted, the frame rate is reduced to 3.75 fps. When the storage space reaches 90% again, and there is a video file that has not been framed, continue to draw frames for the undrawn framed video file, and repeat the above operation until all the files are framed and only the video files of the base layer are retained. , make the most use of storage space.
[0085] 实施例五 Embodiment 5
[0086] 如图 8所示, 在本实施例中, 一种视频压缩处理装置, 其特征在于, 包括: [0087] 码流接收模块 10, 用于接收视频码流;  [0086] As shown in FIG. 8, in this embodiment, a video compression processing apparatus, including: [0087] a code stream receiving module 10, configured to receive a video code stream;
[0088] 抽帧模块 20, 用于根据预设的条件选择抽帧模式和抽帧级别;  [0088] The frame drawing module 20 is configured to select a frame drawing mode and a frame drawing level according to a preset condition;
[0089] 存储模块 30, 用于按照所述抽帧模式和所述抽帧级别对所述视频码流进行存储  [0089] The storage module 30 is configured to store the video code stream according to the frame drawing mode and the frame drawing level.
[0090] 在本实施例中, 能够通过存储空间状况及带宽情况选择抽帧模式和抽帧级别, 来对视频录像进行抽帧视频文件的写入, 大大提高视频录像存储并发的写入路 数, 另外, 视频文件写入存储后还, 节省存储空间、 节省带宽。 [0090] In this embodiment, the frame drawing mode and the frame drawing level can be selected by the storage space condition and the bandwidth condition to write the framed video file to the video recording, thereby greatly increasing the number of concurrent writing channels of the video recording storage. In addition, after the video file is written to the storage, the storage space is saved and the bandwidth is saved.
[0091] 在本实施例中, 所述抽帧模式包括: 吋域抽帧和空域抽帧, 所述抽帧级别包括 : 基础层和若干个增强层。  [0091] In this embodiment, the frame drawing mode includes: a frame extraction frame and a spatial frame extraction, and the frame extraction level includes: a base layer and a plurality of enhancement layers.
[0092] 如图 2所示, 在本实施例中, 吋域抽帧和空域抽帧由抽帧模式选择幵关来控制 , 当系统没有选择抽帧模式吋, 默认先进行吋域的抽帧 (即降低帧率), 当吋域抽 帧无法满足要求吋, 将进一步在吋域抽帧的基础上面进行空间域的抽帧 (降低 分辨率) 。  As shown in FIG. 2, in this embodiment, the frame extraction and the spatial frame extraction are controlled by the frame selection mode selection. When the system does not select the frame selection mode, the frame selection is performed first by default. (ie, reduce the frame rate), when the frame extraction cannot meet the requirements, the spatial frame extraction (reduction of resolution) will be further performed on the basis of the frame extraction.
[0093] 在本实施例中, 所述吋域抽帧基于吋域可分层视频编码 (SVC-T, Temporal Scaled Video Coding) , 采用层间 P帧预测技术, 可将视频流分割成一个基础层 码流 (以 TO表示) 和三个可进行独立解码的增强层码流 (分别以 Tl、 Τ2、 Τ3表 示) 。 在网络传输过程中, 可根据网络带宽的大小选择性的丢弃增强层码流, 以输出帧率分别为 3.75fps, 7.5fps, 15fps以及 30fps的码流; 通过参考已经编码的 图像来预测当前图像, 可以减少视频编码的吋域冗余; 通过对编码图像的参考 属性进行层次化管理, 低层次的编码图像不可参考高层的编码图像, 高层次的 编码图像可以参考底层的编码图像, 引入吋域分级的概念; 可以从视频码流中 提取不同帧率的码流, 其中, 基础层 T0的输出帧率为 3.75fps, 对应的码流是 512 Kbps , 增强层 Tl的输出帧率为 7.5fps, 对应的码流是 1024Kbps, 增强层 T2的输出 帧率为 15fps, 对应的码流是 2048Kbps, 增强层 T3的输出帧率为 30fps, 对应的码 流是 4096Kbps。 [0093] In this embodiment, the frame extraction frame is based on SVC-T (temporal scaled video coding), and the inter-layer P frame prediction technology is used to segment the video stream into a basic layer. Layer code stream (represented by TO) and three enhancement layer code streams that can be independently decoded (represented by Tl, Τ2, Τ3, respectively). During the network transmission process, the enhancement layer code stream may be selectively discarded according to the size of the network bandwidth to output a code stream with frame rates of 3.75 fps, 7.5 fps, 15 fps, and 30 fps respectively; predicting the current image by referring to the already encoded image. , can reduce the redundancy of the video coding domain; by hierarchically managing the reference attributes of the coded image, the low-level coded image can not refer to the high-level coded image, and the high-level coded image can refer to the underlying coded image to introduce the domain The concept of grading; the code stream of different frame rates can be extracted from the video code stream, wherein the output frame rate of the base layer T0 is 3.75 fps, and the corresponding code stream is 512. Kbps, the output frame rate of the enhancement layer Tl is 7.5fps, the corresponding code stream is 1024Kbps, the output frame rate of the enhancement layer T2 is 15fps, the corresponding code stream is 2048Kbps, and the output frame rate of the enhancement layer T3 is 30fps, the corresponding code The stream is 4096Kbps.
[0094] 在吋域抽帧模式中, 抽帧级别的选择示意图如图 3所示。  [0094] In the frame extraction mode, the selection of the frame selection level is as shown in FIG. 3.
[0095] 在本实施例中, 所述空域抽帧是指, 可以从码流中提出具有不同图像尺寸的码 流, 空域等级同样由 T0、 Tl、 Τ2、 Τ3层表示, 以输出不同分辨率的码流, 其中 TO层为基础层为 cif|&式, 分辨率是 352*288, 对应的码流是 512Kbps; Tl层为 D1 格式, 分辨率是 704*576, 对应的码流是 2048Kbps; T2层为 720P, 分辨率是 1280 *720, 对应的码流是 3072Kbps; T3层为 1080P, 分辨率是 1920* 1080, 对应的码 流是 4096Kbps。  [0095] In this embodiment, the spatial domain frame extraction means that code streams having different image sizes can be proposed from the code stream, and the spatial domain level is also represented by T0, T1, Τ2, and Τ3 layers to output different resolutions. The code stream, where the TO layer is the base layer is cif|&, the resolution is 352*288, the corresponding code stream is 512Kbps; the Tl layer is D1 format, the resolution is 704*576, and the corresponding code stream is 2048Kbps; The T2 layer is 720P, the resolution is 1280 *720, the corresponding code stream is 3072Kbps; the T3 layer is 1080P, the resolution is 1920*1080, and the corresponding code stream is 4096Kbps.
[0096] 在空域抽帧模式中, 抽帧级别的选择示意图如图 4所示。  [0096] In the spatial domain frame drawing mode, a schematic diagram of the selection of the frame drawing level is shown in FIG. 4.
[0097] 在本实施例中, 所述预设的条件包括: 存储磁盘的 I/O带宽性能、 用户带宽和 用户请求并发量及存储空间占用率; 在这几种条件下, 通过抽帧存储来存储录 像文件, 以达到节省存储空间, 减少硬件成本的目的。 例如: 1080P码流存储一 天需要 80G左右的存储空间, 如果抽帧只存储基础层的情况下, 大概只需要 10-2 0G的空间, 空间节省了 70%左右。 [0097] In this embodiment, the preset conditions include: storage disk I/O bandwidth performance, user bandwidth, and user request concurrency and storage space occupancy; under these conditions, by frame extraction storage To store video files, to save storage space and reduce hardware costs. For example: 1080P code stream storage requires about 80G of storage space per day. If the frame is only stored in the base layer, it only needs 10-2 0G space, and the space saves about 70%.
[0098] 实施例六 Embodiment 6
[0099] 在本实施例中, 当所述预设的条件为存储磁盘的 I/O带宽性能吋, 当存储路数 过多吋, 存储的磁盘 I/O将会成为瓶颈, 如果没有做抽帧处理, 将导致写入磁盘 过慢, 数据丢失, 这样很大程度上面限制了存储装置并发存储视频的路数, 本 存储装置能够根据存储路数及磁盘的 I/O性能以及设置好的抽帧模式 (配置好抽 帧模式, 或采用默方式) , 来进行抽帧后存储, 通过降低存储的码流, 以保证 录像文件的正常写入, 大大提高视频录像存储并发写入路数, 此吋, 如图 9所示 , 所述抽帧模块包括:  [0099] In this embodiment, when the preset condition is the I/O bandwidth performance of the storage disk, when the number of storage paths is too large, the stored disk I/O will become a bottleneck, if not Frame processing will result in slow writes to the disk and data loss. This greatly limits the number of channels that the storage device concurrently stores video. The storage device can be based on the number of storage channels and the I/O performance of the disk and the set pumping. The frame mode (configured in the frame-splitting mode, or in the silent mode) is used to store the frames after the frame is taken. By reducing the stored code stream, the normal writing of the recorded files is ensured, and the number of concurrent writes of the video recording storage is greatly improved.吋, as shown in FIG. 9, the frame drawing module includes:
[0100] 第一获取单元 21, 用于获取存储磁盘的 I/O带宽性能, 所述 I/O带宽性能包括 I/O 最大写速度;  [0100] The first obtaining unit 21 is configured to acquire I/O bandwidth performance of the storage disk, where the I/O bandwidth performance includes an I/O maximum write speed.
[0101] 第一计算单元 22, 用于计算所述视频码流的存储路数与码率的乘积;  [0101] The first calculating unit 22 is configured to calculate a product of a storage path number and a code rate of the video code stream;
[0102] 第一判断单元 23, 用于判断所述乘积是否小于所述 I/O最大写速度, 若是, 则 对所述视频码流进行全帧率存储; [0102] The first determining unit 23 is configured to determine whether the product is smaller than the maximum write speed of the I/O, and if yes, Performing full frame rate storage on the video code stream;
[0103] 第一抽帧单元 24, 用于当所述乘积不小于所述 I/O最大写速度吋, 按照预设的 规则选择抽帧模式, 并根据所述 I/O最大写速度和所述存储路数计算每路视频的 写入码率, 根据所述写入码率选择抽帧级别。 [0103] The first frame drawing unit 24 is configured to: when the product is not less than the maximum write speed of the I/O, select a frame drawing mode according to a preset rule, and according to the maximum write speed of the I/O The storage path number calculates the write code rate of each video, and selects the frame draw level according to the write code rate.
[0104] 以吋域抽帧为例: 如计算后写入码流 1024Kbps, 则表示抽帧级别, 需要抽到 T1 层 (参见每层对应的码流) 。 所有码流抽帧到 1024Kbps码流后, 能存储的路数 将是全帧率存储路数的 4倍。  [0104] Taking the frame extraction in the 为 domain as an example: If the code stream is 1024Kbps after calculation, the frame level is extracted, and the T1 layer needs to be extracted (see the corresponding code stream of each layer). After all streams are framed to a 1024Kbps stream, the number of channels that can be stored will be four times the full frame rate.
[0105] 实施例七  Example 7
[0106] 在本实施例中, 当所述预设的条件为用户带宽和用户请求并发量吋, 当同步请 求录像回放路数较多, 或带宽较差的情况下, 可以动态的选择抽帧发送码流, 如网络较差情况下, 或者是手机用户请求视频回放吋, 可以把 1080P码流抽帧成 720P或更低的 Dl、 CIF分辨率发送以适应带宽情况, 能够保证流畅的播放, 此吋 , 如图 10所示, 所述抽帧模块包括:  [0106] In this embodiment, when the preset condition is the user bandwidth and the user requesting the concurrent quantity, when the number of synchronization request video playback channels is large, or the bandwidth is poor, the frame selection may be dynamically selected. Sending a stream, such as when the network is poor, or when the mobile phone user requests video playback, the 1080P stream can be framed to a 720P or lower Dl, CIF resolution to adapt to the bandwidth situation, which can ensure smooth playback. Therefore, as shown in FIG. 10, the frame drawing module includes:
[0107] 第二判断单元 210, 用于判断用户请求并发量是否大于上行带宽 (上行带宽一 般是带宽总量的 60%左右) ;  [0107] The second determining unit 210 is configured to determine whether the concurrent request volume of the user is greater than the uplink bandwidth (the uplink bandwidth is generally about 60% of the total bandwidth);
[0108] 第二抽帧单元 220, 用于当用户请求并发量大于上行带宽吋, 按照预设的规则 选择抽帧模式, 并根据所述上行带宽和请求路数计算每路视频的发送码流, 根 据所述发送码流选择抽帧级别。  [0108] The second frame extracting unit 220 is configured to: when the user requests that the concurrent quantity is greater than the uplink bandwidth, select a frame drawing mode according to a preset rule, and calculate a sending code stream of each video according to the uplink bandwidth and the number of request paths. And selecting a framed level according to the sent code stream.
[0109] 根据计算后的发送码流确定抽帧级别, 抽帧后的码流不高于发送码流。 参照抽 帧每层对应的码流 (抽帧模式为配置的抽帧模式, 默认采用吋域抽帧, 如果单 独的吋域抽帧无法满足要求吋, 则进行吋空域混合模式抽帧, 降低分辨率和发 送码率) 。  [0109] The framed level is determined according to the calculated transmit code stream, and the code stream after the frame is not higher than the transmit code stream. Refer to the code stream corresponding to each layer of the frame (the frame mode is the configured frame mode, and the frame is framed by default. If the frame is not satisfied by the single frame, the frame is mixed in the hollow domain mode to reduce the resolution. Rate and transmission rate).
[0110] 在本实施例中, 如手机用户请求视频回放, 则把 1080p视频通过空域抽帧转成 C IF分辨率视频, 保证手机用户回放视频的流畅度。  [0110] In this embodiment, if the mobile phone user requests video playback, the 1080p video is converted into a C IF resolution video by air-framed to ensure the smoothness of the video playback by the mobile phone user.
[0111] 当有用户倍速请求吋, 根据倍速情况进行相应的吋域抽帧或空域抽帧 (配置幵 关选择抽帧模式) , 能够降低解码的压力, 和带宽的压力; 1倍速吋选择抽帧级 另 IJT2; 2倍速吋选择抽帧级别 T1 ; 4倍速或以上吋选择抽帧级别 T0。  [0111] When there is a user double speed request, according to the double speed situation, the corresponding frame extraction or spatial frame extraction (configuration selection frame selection mode) can reduce the pressure of decoding and the pressure of the bandwidth; Frame level is another IJT2; 2x speed 吋 selects the frame level T1; 4 times speed or above 吋 selects the frame level T0.
[0112] 实施例八 [0113] 如图 11所示, 在本实施例中, 当所述预设的条件为存储空间占用率吋, 所述抽 帧模块包括: Embodiment 8 [0113] As shown in FIG. 11, in the embodiment, when the preset condition is a storage space occupancy, the frame drawing module includes:
[0114] 第三判断单元 211, 用于判断所述存储空间占用率是否小于预设的占用率, 若 是, 则对所述视频码流进行全帧率保存;  [0114] The third determining unit 211 is configured to determine whether the storage space occupancy rate is less than a preset occupancy rate, and if yes, perform full frame rate saving on the video code stream;
[0115] 第三抽帧单元 221, 用于当所述存储空间占用率不小于预设的占用率吋, 对存 储空间内的视频文件进行抽帧重新存储。  [0115] The third frame drawing unit 221 is configured to perform frame extraction and re-storing of the video file in the storage space when the storage space occupancy rate is not less than a preset occupancy rate.
[0116] 在本实施例中, 所述步骤 S231之前还包括: 判断所述视频文件是否仅包含基础 层码流, 若是, 则不能再次抽帧, 否则, 进行抽帧重新存储。  [0116] In this embodiment, before the step S231, the method further includes: determining whether the video file only includes the base layer code stream, and if yes, not drawing the frame again; otherwise, performing frame extraction and re-storing.
[0117] 在本实施例中, 所述预设的占用率可以由用户自定义, 比如 90%, 当存储空间 占用达到 90%以后, 本装置幵始对存储过的录像文件进行抽帧重新存储, 读取录 像文件后, 分析每帧数据的 svc级别, 抽取基础层数据进行存储, 并对处理过的 文件做标记, 为了能够节省存储的空间, 尽量长吋间的存储视频录像, 这里对 录像文件进行混合抽帧, 先空域抽帧降低分辨率为 CIF格式, 在进行吋域的抽帧 , 帧率降为 3.75fps。 当存储空间再次达到 90%, 且存在未抽帧的录像文件, 对未 抽帧的录像文件继续抽帧重新存储, 重复上面的操作, 直到所有文件都是抽帧 后只保留基础层的录像文件, 最大限度的利用存储空间。  [0117] In this embodiment, the preset occupancy rate may be customized by the user, for example, 90%. After the storage space is occupied by 90%, the device starts to re-storage the stored video files. After reading the video file, analyze the svc level of each frame of data, extract the base layer data for storage, and mark the processed file. In order to save storage space, store video video as long as possible. The file is mixed and framed, and the first spatial domain is framed to reduce the resolution to CIF format. When the frame is extracted, the frame rate is reduced to 3.75 fps. When the storage space reaches 90% again, and there is a video file that has not been framed, continue to draw frames for the undrawn framed video file, and repeat the above operation until all the files are framed and only the video files of the base layer are retained. , make the most use of storage space.
[0118] 需要说明的是, 在本文中, 术语"包括"、 "包含 "或者其任何其他变体意在涵盖 非排他性的包含, 从而使得包括一系列要素的过程、 方法、 物品或者装置不仅 包括那些要素, 而且还包括没有明确列出的其他要素, 或者是还包括为这种过 程、 方法、 物品或者装置所固有的要素。 在没有更多限制的情况下, 由语句 "包 括一个 ...... "限定的要素, 并不排除在包括该要素的过程、 方法、 物品或者装置 中还存在另外的相同要素。  [0118] It should be noted that, in this document, the terms "including", "comprising", or any other variations thereof are intended to encompass a non-exclusive inclusion, such that a process, method, article, or device that comprises a Those elements, but also other elements not explicitly listed, or elements that are inherent to such a process, method, item or device. An element defined by the phrase "comprises a ..." without further restrictions does not exclude the presence of additional elements in the process, method, article, or device that comprises the element.
[0119] 上述本发明实施例序号仅仅为了描述, 不代表实施例的优劣。  [0119] The foregoing serial numbers of the embodiments of the present invention are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
[0120] 通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到上述实施例 方法可借助软件加必需的通用硬件平台的方式来实现, 当然也可以通过硬件, 但很多情况下前者是更佳的实施方式。 基于这样的理解, 本发明的技术方案本 质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该计 算机软件产品存储在一个存储介质 (如 ROM/RAM、 磁碟、 光盘) 中, 包括若干 指令用以使得一台终端设备 (可以是手机, 计算机, 服务器, 空调器, 或者网 络设备等) 执行本发明各个实施例所述的方法。 Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former It is a better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, In the CD), including several The instructions are for causing a terminal device (which may be a cell phone, computer, server, air conditioner, or network device, etc.) to perform the methods described in various embodiments of the present invention.
[0121] 以上仅为本发明的优选实施例, 并非因此限制本发明的专利范围, 凡是利用本 发明说明书及附图内容所作的等效结构或等效流程变换, 或直接或间接运用在 其他相关的技术领域, 均同理包括在本发明的专利保护范围内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the scope of the present invention, and the equivalent structure or equivalent process transformations made by the description of the present invention and the contents of the drawings may be directly or indirectly applied to other related The technical field is equally included in the scope of patent protection of the present invention.
工业实用性  Industrial applicability
[0122] 本发明提出的一种视频压缩处理方法及装置, 该方法包括: 接收视频码流; 根 据预设的条件选择抽帧模式和抽帧级别; 按照所述抽帧模式和所述抽帧级别对 所述视频码流进行视频文件的写入, 大大提高视频录像存储并发的写入路数, 另外, 视频文件写入存储后还能够通过存储空间状况及带宽情况选择抽帧模式 和抽帧级别, 来对视频录像进行抽帧存储, 节省存储空间、 节省带宽。 因此, 具有工业实用性。  [0122] A video compression processing method and apparatus according to the present invention, the method includes: receiving a video code stream; selecting a frame drawing mode and a frame drawing level according to a preset condition; according to the frame drawing mode and the frame drawing Level writing the video file to the video stream, greatly improving the number of concurrent writes of the video recording storage. In addition, after the video file is written and stored, the frame mode and the frame drawing can be selected through the storage space condition and the bandwidth condition. Level, to store video frames for video recording, saving storage space and saving bandwidth. Therefore, it has industrial applicability.

Claims

权利要求书 Claim
一种视频压缩处理方法, 包括: A video compression processing method includes:
接收视频码流; Receiving a video stream;
根据预设的条件选择抽帧模式和抽帧级别; Selecting a frame drawing mode and a frame drawing level according to preset conditions;
按照所述抽帧模式和所述抽帧级别对所述视频码流进行存储。 The video code stream is stored in accordance with the frame drawing mode and the framed frame level.
根据权利要求 1所述的一种视频压缩处理方法, 其中, 所述抽帧模式 包括: 吋域抽帧和空域抽帧, 所述抽帧级别包括: 基础层和若干个增 强层。 The video compression processing method according to claim 1, wherein the frame drawing mode comprises: a frame extraction frame and a spatial frame extraction, wherein the frame extraction level comprises: a base layer and a plurality of enhancement layers.
根据权利要求 2所述的一种视频压缩处理方法, 其中, 当所述预设的 条件为存储磁盘的 I/O带宽性能吋, 所述根据预设的条件选择抽帧模 式和抽帧级别包括: The video compression processing method according to claim 2, wherein, when the preset condition is an I/O bandwidth performance of the storage disk, the selecting the frame drawing mode and the frame drawing level according to the preset condition includes :
获取存储磁盘的 I/O带宽性能, 所述 I/O带宽性能包括 I/O最大写速度; 计算所述视频码流的存储路数与码率的乘积; Obtaining I/O bandwidth performance of the storage disk, where the I/O bandwidth performance includes an I/O maximum write speed; calculating a product of a storage path number and a code rate of the video code stream;
判断所述乘积是否小于所述 I/O最大写速度, 若是, 则对所述视频码 流进行全帧率存储; Determining whether the product is less than the maximum write speed of the I/O, and if so, performing full frame rate storage on the video code stream;
否则, 按照预设的规则选择抽帧模式, 并根据所述 I/O最大写速度和 所述存储路数计算每路视频的写入码率, 根据所述写入码率选择抽帧 级别。 Otherwise, the frame drawing mode is selected according to a preset rule, and the write code rate of each video is calculated according to the I/O maximum write speed and the number of stored channels, and the frame draw level is selected according to the write code rate.
根据权利要求 2所述的一种视频压缩处理方法, 其中, 当所述预设的 条件为用户带宽和用户请求并发量吋, 所述根据预设的条件选择抽帧 模式和抽帧级别包括: The video compression processing method according to claim 2, wherein, when the preset condition is a user bandwidth and a user request concurrency quantity, the selecting the frame drawing mode and the frame drawing level according to the preset condition comprises:
判断用户请求并发量是否大于上行带宽; Determining whether the concurrent request volume of the user is greater than the uplink bandwidth;
若是, 则按照预设的规则选择抽帧模式, 并根据所述上行带宽和请求 路数计算每路视频的发送码流, 根据所述发送码流选择抽帧级别。 根据权利要求 2所述的一种视频压缩处理方法, 其中, 当所述预设的 条件为存储空间占用率吋, 所述根据预设的条件选择抽帧模式和抽帧 级别包括: If yes, the frame selection mode is selected according to a preset rule, and a transmission code stream of each video is calculated according to the uplink bandwidth and the number of request paths, and the frame extraction level is selected according to the transmission code stream. The video compression processing method according to claim 2, wherein, when the preset condition is a storage space occupancy ratio, the selecting the frame drawing mode and the frame drawing level according to the preset condition comprises:
判断所述存储空间占用率是否小于预设的占用率, 若是, 则对所述视 频码流进行全帧率保存; Determining whether the storage space occupancy ratio is less than a preset occupancy rate, and if yes, The frequency code stream is saved at a full frame rate;
否则, 对存储空间内的视频文件进行抽帧重新存储。 Otherwise, the video files in the storage space are re-stored.
一种视频压缩处理装置, 包括: A video compression processing apparatus includes:
码流接收模块, 用于接收视频码流; a code stream receiving module, configured to receive a video code stream;
抽帧模块, 用于根据预设的条件选择抽帧模式和抽帧级别; 存储模块, 用于按照所述抽帧模式和所述抽帧级别对所述视频码流进 行存储。 a frame drawing module, configured to select a frame drawing mode and a frame drawing level according to a preset condition; and a storage module, configured to store the video code stream according to the frame drawing mode and the frame drawing level.
根据权利要求 6所述的一种视频压缩处理装置, 其中, 所述抽帧模式 包括: 吋域抽帧和空域抽帧, 所述抽帧级别包括: 基础层和若干个增 强层。 A video compression processing apparatus according to claim 6, wherein the frame drawing mode comprises: a frame extraction frame and a spatial frame extraction, the frame extraction level comprising: a base layer and a plurality of enhancement layers.
根据权利要求 7所述的一种视频压缩处理装置, 其中, 当所述预设的 条件为存储磁盘的 I/O带宽性能吋, 所述抽帧模块包括: The video compression processing device according to claim 7, wherein, when the preset condition is an I/O bandwidth performance of the storage disk, the frame drawing module comprises:
第一获取单元, 用于获取存储磁盘的 I/O带宽性能, 所述 I/O带宽性能 包括 I/O最大写速度; a first acquiring unit, configured to acquire I/O bandwidth performance of the storage disk, where the I/O bandwidth performance includes an I/O maximum write speed;
第一计算单元, 用于计算所述视频码流的存储路数与码率的乘积; 第一判断单元, 用于判断所述乘积是否小于所述 I/O最大写速度, 若 是, 则对所述视频码流进行全帧率存储; a first calculating unit, configured to calculate a product of a number of storage paths of the video code stream and a code rate; a first determining unit, configured to determine whether the product is smaller than a maximum write speed of the I/O, and if yes, The video stream is stored at a full frame rate;
第一抽帧单元, 用于当所述乘积不小于所述 I/O最大写速度吋, 按照 预设的规则选择抽帧模式, 并根据所述 I/O最大写速度和所述存储路 数计算每路视频的写入码率, 根据所述写入码率选择抽帧级别。 根据权利要求 7所述的一种视频压缩处理装置, 其中, 当所述预设的 条件为用户带宽和用户请求并发量吋, 所述抽帧模块包括: 第二判断单元, 用于判断用户请求并发量是否大于上行带宽; 第二抽帧单元, 用于当用户请求并发量大于上行带宽吋, 按照预设的 规则选择抽帧模式, 并根据所述上行带宽和请求路数计算每路视频的 发送码流, 根据所述发送码流选择抽帧级别。 a first frame drawing unit, configured to select a frame drawing mode according to a preset rule when the product is not less than the I/O maximum writing speed ,, and according to the I/O maximum writing speed and the number of storage paths The write code rate of each video is calculated, and the frame draw level is selected according to the write code rate. The video compression processing device according to claim 7, wherein, when the preset condition is a user bandwidth and a user request for a concurrent quantity, the frame drawing module comprises: a second determining unit, configured to determine a user request Whether the concurrent quantity is greater than the uplink bandwidth; the second frame drawing unit is configured to: when the user requests the concurrent quantity to be greater than the uplink bandwidth, select a frame drawing mode according to a preset rule, and calculate each channel according to the uplink bandwidth and the number of requested channels. Sending a code stream, and selecting a framed level according to the transmitted code stream.
根据权利要求 7所述的一种视频压缩处理装置, 其中, 当所述预设的 条件为存储空间占用率吋, 所述抽帧模块包括: 第三判断单元, 用于判断所述存储空间占用率是否小于预设的占用率 , 若是, 则对所述视频码流进行全帧率保存; The video compression processing device according to claim 7, wherein, when the preset condition is a storage space occupancy, the frame drawing module comprises: a third determining unit, configured to determine whether the storage space occupancy rate is less than a preset occupancy rate, and if yes, performing full frame rate saving on the video code stream;
第三抽帧单元, 用于当所述存储空间占用率不小于预设的占用率吋, 对存储空间内的视频文件进行抽帧重新存储。 The third frame extracting unit is configured to: when the storage space occupancy rate is not less than a preset occupancy rate, perform frame extraction and re-storing of the video file in the storage space.
PCT/CN2017/079772 2017-04-07 2017-04-07 Method and device for video compression processing WO2018184223A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/079772 WO2018184223A1 (en) 2017-04-07 2017-04-07 Method and device for video compression processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/079772 WO2018184223A1 (en) 2017-04-07 2017-04-07 Method and device for video compression processing

Publications (1)

Publication Number Publication Date
WO2018184223A1 true WO2018184223A1 (en) 2018-10-11

Family

ID=63711951

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/079772 WO2018184223A1 (en) 2017-04-07 2017-04-07 Method and device for video compression processing

Country Status (1)

Country Link
WO (1) WO2018184223A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050165796A1 (en) * 2004-01-15 2005-07-28 Xerox Corporation. Method and system for managing image files in a hierarchical storage mangement system
CN1751508A (en) * 2003-10-20 2006-03-22 松下电器产业株式会社 Multimedia data recording apparatus, monitor system, and multimedia data recording method
CN102239688A (en) * 2008-10-07 2011-11-09 惠普开发有限公司 Degrading a video
CN102833509A (en) * 2012-08-27 2012-12-19 安科智慧城市技术(中国)有限公司 Storage method and storage device for video data and video monitoring system
CN104639951A (en) * 2013-11-06 2015-05-20 杭州海康威视数字技术股份有限公司 Video bitstream frame extraction process and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1751508A (en) * 2003-10-20 2006-03-22 松下电器产业株式会社 Multimedia data recording apparatus, monitor system, and multimedia data recording method
US20050165796A1 (en) * 2004-01-15 2005-07-28 Xerox Corporation. Method and system for managing image files in a hierarchical storage mangement system
CN102239688A (en) * 2008-10-07 2011-11-09 惠普开发有限公司 Degrading a video
CN102833509A (en) * 2012-08-27 2012-12-19 安科智慧城市技术(中国)有限公司 Storage method and storage device for video data and video monitoring system
CN104639951A (en) * 2013-11-06 2015-05-20 杭州海康威视数字技术股份有限公司 Video bitstream frame extraction process and device

Similar Documents

Publication Publication Date Title
US10187668B2 (en) Method, system and server for live streaming audio-video file
US10291618B2 (en) Method and apparatus for providing and receiving contents via network, method and apparatus for backing up data via network, backup data providing device, and backup system
JP4585479B2 (en) Server apparatus and video distribution method
JP6225446B2 (en) Moving image data distribution apparatus, method, program, and system
WO2018010662A1 (en) Video file transcoding method and device, and storage medium
US10187648B2 (en) Information processing device and method
US8407565B2 (en) System and method for producing importance rate-based rich media, and server applied to the same
US20120304235A1 (en) Method and system for playing video file, and media resource server
US8218616B2 (en) Method and system for addition of video thumbnail
CN113115067A (en) Live broadcast system, video processing method and related device
US10623735B2 (en) Method and system for layer based view optimization encoding of 360-degree video
JP5082152B2 (en) Video playback device, video conversion playback system, and program
EP2629476A1 (en) Adaptive display streams
CN114363649B (en) Video processing method, device, equipment and storage medium
JP4481304B2 (en) Storage device for storing different data formats
CN104661059A (en) Picture playing method and device as well as set-top box
CA2769222A1 (en) Method, system and apparatus for providing contents
JP5504363B2 (en) Reference frame management apparatus and method for hierarchical video coding
JP6258168B2 (en) Distribution device, playback device, and distribution system
JP5135147B2 (en) Video file transmission server and operation control method thereof
JPH0818622A (en) Information communication terminal
WO2018184223A1 (en) Method and device for video compression processing
EP3661216A1 (en) A method and apparatus for loop-playing video content
JP5072524B2 (en) Moving picture reproduction apparatus, processing method thereof, and program thereof
JP2009100106A (en) Image reproducing apparatus, processing method thereof, and program thereof

Legal Events

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

Ref document number: 17904523

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17904523

Country of ref document: EP

Kind code of ref document: A1