CN112422988A - Video watermark adding method - Google Patents

Video watermark adding method Download PDF

Info

Publication number
CN112422988A
CN112422988A CN202011241381.4A CN202011241381A CN112422988A CN 112422988 A CN112422988 A CN 112422988A CN 202011241381 A CN202011241381 A CN 202011241381A CN 112422988 A CN112422988 A CN 112422988A
Authority
CN
China
Prior art keywords
video
watermark
resolution
format
added
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011241381.4A
Other languages
Chinese (zh)
Inventor
陈阳
鲁永春
王周
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Mingyang Information Technology Co ltd
Original Assignee
Hefei Mingyang Information 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 Hefei Mingyang Information Technology Co ltd filed Critical Hefei Mingyang Information Technology Co ltd
Priority to CN202011241381.4A priority Critical patent/CN112422988A/en
Publication of CN112422988A publication Critical patent/CN112422988A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/467Embedding additional information in the video signal during the compression process characterised by the embedded information being invisible, e.g. watermarking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/835Generation of protective data, e.g. certificates
    • H04N21/8358Generation of protective data, e.g. certificates involving watermark

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

The disclosure relates to the technical field of video editing, and discloses a video watermark adding method, which comprises the following steps: s1, backing up the video to be added with the watermark, and converting the backup video into a universal format; analyzing the video converted in the step S1 to obtain information of a video coding format and resolution; determining the size of the resolution of the watermark to be added and the position of the watermark to be added according to the resolution of the video acquired in the step S2; processing and optimizing the watermark according to the watermark resolution obtained in the step S3; calling a data address of the current video, and storing the data of the watermark processed in the step S4 to the current position; the method comprises the steps of calling a video coding database, inserting a correlation algorithm of watermark resolution and video resolution, and outputting a video.

Description

Video watermark adding method
Technical Field
The disclosure belongs to the technical field of video editing, and particularly relates to a video watermark adding method.
Background
Watermarking refers to adding some digital information into data multimedia (such as images, sound, video signals, etc.) to achieve the functions of file authenticity identification, copyright protection, etc. The embedded watermark information is hidden in the host file, and the observability and the integrity of the original file are not influenced. Therefore, the watermarks can be added in the video encryption process, for example, a copyright owner LOGO, an arbitrary position warning language, a text advertisement, a ticker watermark and the like, and although the technical implementation forms of the various watermarks are different in the video encryption process, the watermarks are all used for improving the video decryption difficulty, increasing the operation cost of a pirate and reducing the probability of decrypting the video.
With the popularity of short videos such as fast-hand tremble and the like, a large number of video production platforms emerge, watermarks can be added to the produced videos without the production of the short videos, brand publicity is facilitated (the watermarks are generally App logos or company logos and the like), but the existing watermark addition cannot be well compatible with the videos, and when the video resolution changes, namely the videos use different playing clients, the watermarks cannot be adjusted to the proper resolution along with the change of the resolution, so that the visual experience of viewers is influenced, and therefore a video watermark adding method is provided
Disclosure of Invention
In view of the compatibility problem of the watermarks in the prior art, the present disclosure is directed to providing a video watermarking method to solve the problems in the background art.
The purpose of the disclosure can be realized by the following technical scheme: a video watermark adding method comprises the following steps:
s1, backing up the video to be added with the watermark, and converting the backup video into a universal format;
s2, analyzing the video converted in the step S1 to obtain information of video coding format and resolution;
s3, determining the size of the resolution of the watermark to be added and the position of the watermark to be added according to the resolution of the video acquired in the step S2;
s4, processing and optimizing the watermark according to the watermark resolution obtained in the step S3;
s5, calling a data address of the current video, and storing the data of the watermark processed in the step S4 to the current position;
s6, calling video coding data, and inserting a correlation algorithm formula of watermark resolution and video resolution, wherein the formula is as follows:
ShowW=rate/ratio*W
ShowH=rate/ratio*H
wherein, ratio is video resolution, ratio is a proportionality coefficient, W is watermark width, H is watermark height, ShowW is watermark display width, and ShowH is watermark display height. And calculating the width and the height of the watermark display according to the width and the height of the video resolution and a proportional coefficient, wherein the width of the watermark display is inversely proportional to the video resolution and is directly proportional to the actual watermark width, and the height of the watermark display is inversely proportional to the video resolution and is directly proportional to the actual watermark height.
As a further solution of the present disclosure, in the step S1, the video is converted into an AVI format with high compatibility by a format factory.
As a further aspect of the present disclosure, factory converted video using the format is selected for maximum resolution.
As a further scheme of the present disclosure, step S2 calls ffmpeg to analyze the original video, and resolves the resolution and coding format of the original video.
As a further aspect of the present disclosure, step S3 determines the maximum value of the watermark according to the maximum resolution of the current video.
As a further solution of the present disclosure, in step S4, the task is ended after the watermark is successfully added, the video with the watermark added is uploaded to the object for storage, and the generated video information and video address are stored in the database for the user to use.
As a further aspect of the present disclosure, the step S4 further includes: and formatting the watermark into a character string, and determining the dot matrix information of the character string.
As a further aspect of the present disclosure, the lattice information includes a format of the character string and a font, a size, and a color of each character.
The beneficial effect of this disclosure: according to the method and the device, the watermark resolution is associated with the video resolution by using an algorithm, so that the proper resolution is automatically adjusted by the watermark following the video resolution, and the display effect of the watermark under different resolutions of the video is ensured.
Detailed Description
The technical solutions of the present disclosure will be described clearly and completely with reference to the embodiments of the present disclosure, and it should be understood that the described embodiments are only a part of the embodiments of the present disclosure, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
In an embodiment of the present disclosure, a method for adding a video watermark includes the following steps:
s1, backing up the video to be added with the watermark, and converting the backup video into a universal format;
s2, analyzing the video converted in the step S1 to obtain information of video coding format and resolution;
s3, determining the size of the resolution of the watermark to be added and the position of the watermark to be added according to the resolution of the video acquired in the step S2;
s4, processing and optimizing the watermark according to the watermark resolution obtained in the step S3;
s5, calling a data address of the current video, and storing the data of the watermark processed in the step S4 to the current position;
s6, calling video coding data, and inserting a correlation algorithm formula of watermark resolution and video resolution, wherein the formula is as follows:
ShowW=rate/ratio*W
ShowH=rate/ratio*H
wherein, ratio is video resolution, ratio is a proportionality coefficient, W is watermark width, H is watermark height, ShowW is watermark display width, and ShowH is watermark display height. And calculating the width and the height of the watermark display according to the width and the height of the video resolution and a proportional coefficient, wherein the width of the watermark display is inversely proportional to the video resolution and is directly proportional to the actual watermark width, and the height of the watermark display is inversely proportional to the video resolution and is directly proportional to the actual watermark height.
When video processing is carried out, an original video is backed up firstly, so that the loss of an original video file caused by data loss during the video processing is prevented, the backed-up video is edited, the video is converted into a common format, and the video playing method is compatible with various video players for playing, so that the video editing is convenient for adopting various players for test playing test, the repeated conversion during the test is avoided, and the test efficiency is improved; the method comprises the steps of analyzing data of an original video file, obtaining the resolution ratio and the coding format of a video, selecting a proper video editing tool according to the coding format of the video, and meanwhile determining the resolution ratio of the added watermark according to the size of the video resolution ratio, so that the size and the adding position of the watermark are determined, the displaying effect of the watermark is guaranteed, the overall visual appreciation of the video is not affected, meanwhile, a conversion formula between the watermark and the video resolution ratio is implanted into a video coding algorithm, and when the resolution ratio of the video is adjusted in a self-adaptive mode according to a player, the resolution ratio of the watermark is adjusted according to the corresponding ratio, so that the playing effect of the video and the watermark.
Preferably, in step S1, the video is converted into an AVI format with high compatibility by a format factory, which has strong compatibility, is compatible with video files of almost all formats, and has good practicability, the AVI format is convenient to call, the image quality is good, and the compression standard can be arbitrarily selected.
Preferably, the video converted by the format factory selects the maximum resolution, and in order to ensure the playing definition of the video file, the highest resolution mode is adopted when the video is edited, so that the video is suitable for being played by players with various sizes, the playing definition of the video is ensured, and the visual experience requirements of users are met.
Preferably, step S2 calls ffmpeg to analyze the original video, resolve the resolution and coding format of the original video,
preferably, in step S3, the maximum value of the watermark is determined according to the maximum resolution of the current video, so as to ensure the clarity of the watermark when the video file is played by a larger player, thereby ensuring the overall enjoyment of the video.
Preferably, in step S4, the task is ended after the watermark is successfully added, the video with the watermark added is uploaded to the object for storage, and the generated video information and video address are stored in the database for the user to use.
Preferably, the step S4 further includes: and formatting the watermark into a character string, and determining the dot matrix information of the character string so as to facilitate the change of video coding data.
Preferably, the lattice information includes the format of the character string and the font, size and color of each character, and the change of the color size and font model of the watermark and the operation are facilitated by the change of the character string at a later stage.
The working principle of the disclosure is as follows: when video processing is carried out, an original video is backed up firstly, so that the loss of an original video file caused by data loss during the video processing is prevented, the backed-up video is edited, the video is converted into a common format, and the video playing method is compatible with various video players for playing, so that the video editing is convenient for adopting various players for test playing test, the repeated conversion during the test is avoided, and the test efficiency is improved; the method comprises the steps of analyzing data of an original video file, obtaining the resolution ratio and the coding format of a video, selecting a proper video editing tool according to the coding format of the video, and meanwhile determining the resolution ratio of the added watermark according to the size of the video resolution ratio, so that the size and the adding position of the watermark are determined, the displaying effect of the watermark is guaranteed, the overall visual appreciation of the video is not affected, meanwhile, a conversion formula between the watermark and the video resolution ratio is implanted into a video coding algorithm, and when the resolution ratio of the video is adjusted in a self-adaptive mode according to a player, the resolution ratio of the watermark is adjusted according to the corresponding ratio, so that the playing effect of the video and the watermark.
It will be appreciated by those skilled in the art that various changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the disclosure. The present disclosure is therefore to be considered in all respects as illustrative and not restrictive, the scope of the disclosure being indicated by the appended claims rather than by the foregoing description, and all changes which come within the spirit and scope of the disclosure, and any equivalents thereto, may be embraced by the scope of the disclosure.

Claims (8)

1. A video watermark adding method is characterized by comprising the following steps:
s1, backing up the video to be added with the watermark, and converting the backup video into a universal format;
s2, analyzing the video converted in the step S1 to obtain information of video coding format and resolution;
s3, determining the size of the resolution of the watermark to be added and the position of the watermark to be added according to the resolution of the video acquired in the step S2;
s4, processing and optimizing the watermark according to the watermark resolution obtained in the step S3;
s5, calling a data address of the current video, and storing the data of the watermark processed in the step S4 to the current position;
s6, calling video coding data, and inserting a correlation algorithm formula of watermark resolution and video resolution, wherein the formula is as follows:
ShowW=rate/ratio*W
ShowH=rate/ratio*H
wherein, ratio is video resolution, ratio is a proportionality coefficient, W is watermark width, H is watermark height, ShowW is watermark display width, and ShowH is watermark display height. And calculating the width and the height of the watermark display according to the width and the height of the video resolution and a proportional coefficient, wherein the width of the watermark display is inversely proportional to the video resolution and is directly proportional to the actual watermark width, and the height of the watermark display is inversely proportional to the video resolution and is directly proportional to the actual watermark height.
2. The method according to claim 1, wherein in step S1, the video is converted into AVI format with high compatibility by format factory.
3. A video watermarking method according to claim 2, wherein the video factory converted using the format is selected to have a maximum resolution.
4. The method for adding a video watermark according to claim 1, wherein step S2 calls ffmpeg to analyze the original video to obtain the resolution and encoding format of the original video.
5. The method according to claim 4, wherein step S3 is implemented by determining a maximum value of the watermark according to a maximum resolution of the current video.
6. The method according to claim 5, wherein in step S4, the task is completed after the watermark is successfully added, the video with the watermark added is uploaded to the object storage, and the generated video information and video address are stored in the database for the user to use.
7. The video watermarking method according to claim 1, wherein the step S4 further includes: and formatting the watermark into a character string, and determining the dot matrix information of the character string.
8. The method of watermarking video according to claim 7, wherein the lattice information includes a format of a character string and a font, a size, and a color of each character.
CN202011241381.4A 2020-11-09 2020-11-09 Video watermark adding method Pending CN112422988A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011241381.4A CN112422988A (en) 2020-11-09 2020-11-09 Video watermark adding method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011241381.4A CN112422988A (en) 2020-11-09 2020-11-09 Video watermark adding method

Publications (1)

Publication Number Publication Date
CN112422988A true CN112422988A (en) 2021-02-26

Family

ID=74780874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011241381.4A Pending CN112422988A (en) 2020-11-09 2020-11-09 Video watermark adding method

Country Status (1)

Country Link
CN (1) CN112422988A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103826168A (en) * 2014-02-25 2014-05-28 深圳市掌网立体时代视讯技术有限公司 Method and system for adding watermark to video
CN104469377A (en) * 2013-09-24 2015-03-25 无锡中科智能信息处理研发中心有限公司 H.264 file authentication playing method based on video steganography
CN110059274A (en) * 2019-03-15 2019-07-26 平安普惠企业管理有限公司 Front end picture amplifying method, device, computer equipment and storage medium
CN110198492A (en) * 2019-04-28 2019-09-03 腾讯科技(深圳)有限公司 A kind of watermark adding method of video, device, equipment and storage medium
CN111460398A (en) * 2020-03-16 2020-07-28 南京南瑞继保电气有限公司 Watermark adding method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104469377A (en) * 2013-09-24 2015-03-25 无锡中科智能信息处理研发中心有限公司 H.264 file authentication playing method based on video steganography
CN103826168A (en) * 2014-02-25 2014-05-28 深圳市掌网立体时代视讯技术有限公司 Method and system for adding watermark to video
CN110059274A (en) * 2019-03-15 2019-07-26 平安普惠企业管理有限公司 Front end picture amplifying method, device, computer equipment and storage medium
CN110198492A (en) * 2019-04-28 2019-09-03 腾讯科技(深圳)有限公司 A kind of watermark adding method of video, device, equipment and storage medium
CN111460398A (en) * 2020-03-16 2020-07-28 南京南瑞继保电气有限公司 Watermark adding method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US9799372B2 (en) System and method for embedding supplementary data into digital media files
KR100553469B1 (en) Electronic watermark data insertion apparatus and electronic watermark data detection apparatus
Weng et al. Reversible watermarking based on invariability and adjustment on pixel pairs
US7853040B2 (en) Covert and robust mark for media identification
US6707465B2 (en) Data processing apparatus and method, and storage medium
US6687384B1 (en) Method and apparatus for embedding data in encoded digital bitstreams
US20060215876A1 (en) Apparatus for embedding and reproducing watermark into and from contents data
JP4785317B2 (en) Transmarking watermark embedding function as rendering command and watermark embedding based on features of multimedia signal
JP2003509913A (en) Encoding digital information
US8755598B2 (en) System for embedding data
JP2005252989A (en) Stereoscopic visualizing parameter storage medium, stereoscopic visualizing parameter embedding apparatus, stereoscopic image reproducing apparatus and program, stereoscopic visualizing parameter embedding program, and video content data distribution method
CN106792088B (en) Plug-in subtitle encryption and decryption method and system and plug-in subtitle system
CN108882055B (en) Video live broadcast method and system, and method and device for synthesizing video stream
JP3325542B2 (en) Digital video coding and decoding apparatus and method using watermarking
CN110896484A (en) Video watermark adding and extracting method and device, video playing end and storage medium
US20020097891A1 (en) Electronic watermarking data insertion/detection device
JP4087537B2 (en) Data processing apparatus and data recording medium
US7831060B2 (en) Method for protecting content of vector graphics formats
CN112422988A (en) Video watermark adding method
US20070291979A1 (en) Efficient application of video marking technologies
Cheng et al. A new method for copyright and integrity protection for bitmap images by removable visible watermarks and irremovable invisible watermarks
Verma et al. Wavelet based robust video watermarking using spread spectrum technique
WO2010062290A1 (en) Multiphase watermark patterns
JP4471331B2 (en) Image processing apparatus, control method therefor, computer program, and storage medium
KR101352830B1 (en) Efficient application of video marking technologies

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210226

RJ01 Rejection of invention patent application after publication