CN108737895A - A kind of method that static images synthesize anti-fake video - Google Patents
A kind of method that static images synthesize anti-fake video Download PDFInfo
- Publication number
- CN108737895A CN108737895A CN201810572295.8A CN201810572295A CN108737895A CN 108737895 A CN108737895 A CN 108737895A CN 201810572295 A CN201810572295 A CN 201810572295A CN 108737895 A CN108737895 A CN 108737895A
- Authority
- CN
- China
- Prior art keywords
- video
- picture
- static images
- avassetwriterinput
- fake
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 27
- 230000003068 static effect Effects 0.000 title claims abstract description 19
- 239000000872 buffer Substances 0.000 claims abstract description 4
- 230000003139 buffering effect Effects 0.000 claims abstract description 4
- 230000007704 transition Effects 0.000 claims description 15
- 238000004519 manufacturing process Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 claims description 3
- 238000003860 storage Methods 0.000 claims description 3
- 238000012545 processing Methods 0.000 abstract description 4
- 238000005516 engineering process Methods 0.000 description 3
- 238000012546 transfer Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002688 persistence Effects 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44012—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Editing Of Facsimile Originals (AREA)
- Image Processing (AREA)
Abstract
The present invention relates to a kind of methods that static images synthesize anti-fake video, include the following steps:Picture pre-processes, and is zoomed in and out to picture by video size, and video data prepares, and specifically includes:Generate AVAssetWriter, AVAssetWriterInput is generated, when AVAssetWriterInput is subjected to image data, before not up to totalframes, continue to obtain present frame picture, picture pixels buffering area PixelBuffer is generated, totalframes is such as had reached, then generates video, generate pixel buffers adapter PixelBufferAdaptor, addition PixelBuffer is to adapter and the display time is arranged, and WriterInput is added to Writer, starts that startWriting is written.The present invention, algorithm are unified, clear process, good compatibility, can batch processing static images, and be converted into required video, output format is unified, can increase anti-counterfeiting mark, is easy to later stage adjustment, promotes user experience, improves the efficiency of exploitation App.
Description
Technical field
The present invention relates to images(Picture)Processing and video production technical field, specifically a kind of static images synthesis are anti-
The method of pseudo- video.
Background technology
Video(Video)Refer to a series of static images are captured in a manner of electric signal, are noted down, are handled, are stored,
Transmission and the various technologies reappeared.Continuous image change is per second more than 24 frames(frame)When more than picture, according to the persistence of vision
Principle, human eye can not distinguish the tableaux of single width;Smooth continuous visual effect is appeared to be, picture continuous in this way is called
Video.
The prosperity of network technology also promotes the record segment of video to be present in the form of streaming media on internet simultaneously
It can be received and played by computer.
Intra-company does not unify the algorithm of static images synthetic video at present, and scheme is different used in each development group,
Algorithm parameter is also inconsistent, there is inconvenience when App being caused to develop, and uses the conversion plan of third party's transfer algorithm, then to prop up
High expense is paid, the reasonable control for being unfavorable for cost is used for a long time, and third party's transfer algorithm is different, the later stage is to video
Maintenance, decoding etc. there are some limitations, be unfavorable for the promotion of App use feelings.
To avoid after video distribution by malicious modification, it is necessary to anti-fake protection appropriate is carried out to video, to avoid law
Dispute occurs.
Invention content
In view of the deficiencies in the prior art, the purpose of the present invention is to provide a kind of static images to synthesize anti-fake video
Method, algorithm is unified, clear process, good compatibility, can batch processing static images, and be converted into required video, export lattice
Formula is unified, can increase anti-counterfeiting mark, is easy to later stage adjustment, promotes user experience, improves the efficiency of exploitation App.
To achieve the above objectives, the technical solution adopted by the present invention is that:
A kind of method that static images synthesize anti-fake video, which is characterized in that include the following steps:
Picture pre-processes, and is zoomed in and out to picture by video size,
Video data prepares, and specifically includes:
AVAssetWriter is generated, for being write image and audio as a complete video file,
AVAssetWriterInput is generated, for receiving data, and is configured as that specified medium type can be handled,
When AVAssetWriterInput is subjected to image data, before not up to totalframes, continue to obtain present frame picture,
Picture pixels buffering area PixelBuffer is generated, totalframes is such as had reached, then generates video,
Pixel buffers adapter PixelBufferAdaptor is generated, PixelBuffer is to adapter and when being arranged display for addition
Between,
WriterInput is added to Writer,
Start that startWriting is written.
Based on the above technical solution, it when picture pre-processes, generates picture array and is used to traverse picture,
The video size refers to the acquiescence width and height of video.
Based on the above technical solution, when picture pre-processes, picture the ratio of width to height, adjustment picture to video size are kept
Size,
The given server is stored in anti-counterfeiting mark addition algorithm and provisioning file,
The correspondence of the provisioning file storage picture format, picture size and anti-counterfeiting mark addition algorithm,
The anti-counterfeiting mark addition algorithm includes at least anti-counterfei waterprint and adds algorithm.
Based on the above technical solution, when generating AVAssetWriterInput, for each track of file is written
Create an AVAssetWriterInput object.
Based on the above technical solution, in video production, totalframes is calculated according to following formula:
KVideoFPS * duration,
Free hand drawing piece frame number is calculated according to following formula:
imageDuration*kVideoFPS。
Based on the above technical solution, continue after obtaining the success of present frame picture, further whether judge present frame
For transition frames,
When for transition frames, setting transition frames need two pictures to show the dynamic effect of transition, then further execute and obtain transition frames
Next frame picture.
The method that static images of the present invention synthesize anti-fake video, algorithm is unified, and clear process, good compatibility can
Batch processing static images, and it is converted into required video, output format is unified, can increase anti-counterfeiting mark, is easy to later stage adjustment, carries
User experience is risen, the efficiency of exploitation App is improved.
Description of the drawings
The present invention has following attached drawing:
The flow chart of Fig. 1 present invention.
Specific implementation mode
Below in conjunction with attached drawing, invention is further described in detail.
As shown in Figure 1, the method that static images of the present invention synthesize anti-fake video, includes the following steps:
Picture pre-processes, and is zoomed in and out to picture by video size, increases anti-counterfeiting mark to picture from given server,
Video data prepares, and specifically includes:
AVAssetWriter is generated, for being write image and audio as a complete video file,
AVAssetWriterInput is generated, for receiving data, and is configured as that specified medium type can be handled,
When AVAssetWriterInput is subjected to image data, before not up to totalframes, continue to obtain present frame picture,
Picture pixels buffering area PixelBuffer is generated, totalframes is such as had reached, then generates video,
Pixel buffers adapter PixelBufferAdaptor is generated, PixelBuffer is to adapter and when being arranged display for addition
Between,
WriterInput is added to Writer,
Start that startWriting is written.
Based on the above technical solution, it when picture pre-processes, generates picture array and is used to traverse picture,
The video size refers to the acquiescence width and height of video.
Based on the above technical solution, when picture pre-processes, picture the ratio of width to height, adjustment picture to video size are kept
Size,
The given server is stored in anti-counterfeiting mark addition algorithm and provisioning file,
The correspondence of the provisioning file storage picture format, picture size and anti-counterfeiting mark addition algorithm,
The anti-counterfeiting mark addition algorithm includes at least anti-counterfei waterprint and adds algorithm.
Based on the above technical solution, when generating AVAssetWriterInput, for each track of file is written
Create an AVAssetWriterInput object.
Based on the above technical solution, in video production, totalframes is calculated according to following formula:
KVideoFPS * duration,
Free hand drawing piece frame number is calculated according to following formula:
imageDuration*kVideoFPS。
Duration is free hand drawing piece duration,
KVideoFPS is video frame rate.
Based on the above technical solution, continue after obtaining the success of present frame picture, further whether judge present frame
For transition frames,
When for transition frames, setting transition frames need two pictures to show the dynamic effect of transition, then further execute and obtain transition frames
Next frame picture.
The content not being described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.
Claims (6)
1. a kind of method that static images synthesize anti-fake video, which is characterized in that include the following steps:
Picture pre-processes, and is zoomed in and out to picture by video size, increases anti-counterfeiting mark to picture from given server,
Video data prepares, and specifically includes:
AVAssetWriter is generated, for being write image and audio as a complete video file,
AVAssetWriterInput is generated, for receiving data, and is configured as that specified medium type can be handled,
When AVAssetWriterInput is subjected to image data, before not up to totalframes, continue to obtain present frame picture,
Picture pixels buffering area PixelBuffer is generated, totalframes is such as had reached, then generates video,
Pixel buffers adapter PixelBufferAdaptor is generated, PixelBuffer is to adapter and when being arranged display for addition
Between,
WriterInput is added to Writer,
Start that startWriting is written.
2. the method that static images as described in claim 1 synthesize anti-fake video, it is characterised in that:It is raw when picture pre-processes
At picture array for traversing picture,
The video size refers to the acquiescence width and height of video.
3. the method that static images as described in claim 1 synthesize anti-fake video, it is characterised in that:When picture pre-processes, protect
Hold picture the ratio of width to height, adjustment picture to video size size,
The given server is stored in anti-counterfeiting mark addition algorithm and provisioning file,
The correspondence of the provisioning file storage picture format, picture size and anti-counterfeiting mark addition algorithm,
The anti-counterfeiting mark addition algorithm includes at least anti-counterfei waterprint and adds algorithm.
4. the method that static images as described in claim 1 synthesize anti-fake video, it is characterised in that:It generates
When AVAssetWriterInput, each track for file is written creates an AVAssetWriterInput object.
5. the method that static images as described in claim 1 synthesize anti-fake video, it is characterised in that:In video production, root
Totalframes is calculated according to following formula:
KVideoFPS * duration,
Free hand drawing piece frame number is calculated according to following formula:
imageDuration*kVideoFPS。
6. the method that static images as described in claim 1 synthesize anti-fake video, it is characterised in that:Continue to obtain present frame figure
After piece success, further judge whether present frame is transition frames,
When for transition frames, setting transition frames need two pictures to show the dynamic effect of transition, then further execute and obtain transition frames
Next frame picture.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810572295.8A CN108737895A (en) | 2018-06-06 | 2018-06-06 | A kind of method that static images synthesize anti-fake video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810572295.8A CN108737895A (en) | 2018-06-06 | 2018-06-06 | A kind of method that static images synthesize anti-fake video |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108737895A true CN108737895A (en) | 2018-11-02 |
Family
ID=63932093
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810572295.8A Pending CN108737895A (en) | 2018-06-06 | 2018-06-06 | A kind of method that static images synthesize anti-fake video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108737895A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113419802A (en) * | 2021-06-21 | 2021-09-21 | 网易(杭州)网络有限公司 | Atlas generation method and apparatus, electronic device and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101086754A (en) * | 2006-06-09 | 2007-12-12 | 中国科学院研究生院 | Mobile image digital copyright secure processing system based on digital watermark technology |
CN102663600A (en) * | 2012-01-17 | 2012-09-12 | 付强 | Anti-counterfeiting system based on digital watermarks and barcodes, anti-counterfeiting method for anti-counterfeiting system and application of anti-counterfeiting system |
US20130223812A1 (en) * | 2012-02-26 | 2013-08-29 | Antonio Rossi | Streaming video navigation systems and methods |
CN105227862A (en) * | 2015-09-16 | 2016-01-06 | 上海工程技术大学 | Can the video recombination system of auto Segmentation camera lens and video recombination method thereof |
CN106780677A (en) * | 2016-12-15 | 2017-05-31 | 南京偶酷软件有限公司 | The method that three-dimensional animation visual effect is simulated by camera motion background layered shaping |
CN107256346A (en) * | 2017-05-22 | 2017-10-17 | 努比亚技术有限公司 | Protect method, system and the storage medium of file copy right |
CN108055567A (en) * | 2017-10-25 | 2018-05-18 | 北京川上科技有限公司 | A kind of method for processing video frequency, device, terminal device and storage medium |
-
2018
- 2018-06-06 CN CN201810572295.8A patent/CN108737895A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101086754A (en) * | 2006-06-09 | 2007-12-12 | 中国科学院研究生院 | Mobile image digital copyright secure processing system based on digital watermark technology |
CN102663600A (en) * | 2012-01-17 | 2012-09-12 | 付强 | Anti-counterfeiting system based on digital watermarks and barcodes, anti-counterfeiting method for anti-counterfeiting system and application of anti-counterfeiting system |
US20130223812A1 (en) * | 2012-02-26 | 2013-08-29 | Antonio Rossi | Streaming video navigation systems and methods |
CN105227862A (en) * | 2015-09-16 | 2016-01-06 | 上海工程技术大学 | Can the video recombination system of auto Segmentation camera lens and video recombination method thereof |
CN106780677A (en) * | 2016-12-15 | 2017-05-31 | 南京偶酷软件有限公司 | The method that three-dimensional animation visual effect is simulated by camera motion background layered shaping |
CN107256346A (en) * | 2017-05-22 | 2017-10-17 | 努比亚技术有限公司 | Protect method, system and the storage medium of file copy right |
CN108055567A (en) * | 2017-10-25 | 2018-05-18 | 北京川上科技有限公司 | A kind of method for processing video frequency, device, terminal device and storage medium |
Non-Patent Citations (2)
Title |
---|
HHERIMA: "[算法]iOS 视频添加水印,合成视频两种方案(整体渲染和分割渲染)", 《HTTP://BLOG.CSDN.NET/HHERIMA/ARTICLE/DETAILS/72725395》 * |
比沉默寡言话多: "AVFoundation-根据图像生成视频", 《HTTPS://WWW.JIANSHU.COM/P/3B8A9A62794F》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113419802A (en) * | 2021-06-21 | 2021-09-21 | 网易(杭州)网络有限公司 | Atlas generation method and apparatus, electronic device and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101317450B (en) | Recording device, reproduction device, recording method | |
CN105744358B (en) | The processing method and processing device of video playing | |
CN102724492B (en) | Method and system for transmitting and playing video images | |
CN104168487B (en) | A kind of vision signal frame synchornization method and its device | |
CN1947332A (en) | Method and circuit for adaptive equalization of multiple signals in response to a control signal generated from one of the equalized signals | |
CN1132442A (en) | Input-output circuit, recording apparatus and reproduction apparatus for digital video signal | |
CN104135643B (en) | A kind of method and apparatus of long range high definition transmission | |
CN110460889A (en) | A kind of video throws screen method, apparatus, system and storage medium | |
CN108737895A (en) | A kind of method that static images synthesize anti-fake video | |
CN109168027A (en) | Instant video methods of exhibiting, device, terminal device and storage medium | |
CN102411488B (en) | Method for displaying images of mobile terminal and mobile terminal | |
CN1787648A (en) | Video-signal-processing device and video-signal-transfer method | |
CN103024315A (en) | Method for adjusting television picture size in real time according to video content | |
CN108777814A (en) | A kind of method of static images synthetic video | |
CN103503462A (en) | Real-time transcoding method and device | |
CN105430237B (en) | A kind of processing method and system of frame missing image | |
CN107613407A (en) | A kind of video display control method, device, electronic equipment and storage medium | |
CN107454408A (en) | A kind of method of Image Coding code check dynamic adjustment | |
CN104869360B (en) | Video acquisition and display synchronous method and device | |
CN205545512U (en) | Multichannel audio video collecting card and audio video collecting system | |
CN108737894A (en) | A method of by picture synthetic video | |
CN114638904A (en) | Color difference system and method for realizing LCD (liquid crystal display) picture compensation of liquid crystal spliced screen based on color transition | |
CN202102705U (en) | Automatic conversion device from traditional Chinese musical notation music book to MIDI (musical instrument digital interface) signals | |
CN102033730B (en) | Method for converting DirectShow video data into high-performance Java image buffering | |
CN208046757U (en) | The system that a kind of vertical screen is applied to liquid crystal Single-panel projection band number keystone |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181102 |