CN109660745A - Video recording method, device, terminal and computer readable storage medium - Google Patents

Video recording method, device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN109660745A
CN109660745A CN201811586656.0A CN201811586656A CN109660745A CN 109660745 A CN109660745 A CN 109660745A CN 201811586656 A CN201811586656 A CN 201811586656A CN 109660745 A CN109660745 A CN 109660745A
Authority
CN
China
Prior art keywords
video
camera
light
stream file
pictures data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811586656.0A
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.)
WeBank Co Ltd
Original Assignee
WeBank 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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201811586656.0A priority Critical patent/CN109660745A/en
Publication of CN109660745A publication Critical patent/CN109660745A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • 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/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/85406Content authoring involving a specific file format, e.g. MP4 format

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The invention discloses a kind of video recording methods, this method comprises: obtaining the collected encoding video pictures data of camera, the encoding video pictures data are converted to the video stream file of preset format;Obtain the camera it is current towards parameter;By the video stream file and it is described be sent to background server towards parameter so that the background server is according to the video stream file and described towards one video file of parameter synthesis.The invention also discloses a kind of video recording device, terminal and a kind of computer readable storage mediums.The present invention is able to solve in the prior art, and terminal carries out video record when carrying out recognition of face to realize, existing video record is ineffective, needs the problem that SDK packet to be mounted is excessive and processing load is larger.

Description

Video recording method, device, terminal and computer readable storage medium
Technical field
The present invention relates to field of terminal technology more particularly to video recording method, device, terminal and computer-readable storages Medium.
Background technique
Currently, face recognition technology is applied in all kinds of identity authorization systems more and more widely, known based on face Other identity authorization system, it is usually required mainly for solve two problems, one is face verification, the other is In vivo detection.Wherein, living Physical examination survey is primarily used to confirm that collected face image data rather than is played back or puppet producing material from user Material.Requirement with each field to identity authorization system safety and reliability is higher and higher, in addition to face verification and living body are examined Except survey, also while requiring the video recorded when user carries out recognition of face and being sent to authenticate and deposit for monitoring party from the background Card.
In the prior art, it is recorded to realize that side carries out recognition of face (including face verification and In vivo detection) Bian Jinhang video System, in video record, after camera data and audio data are converted to predetermined format by terminal needs, by being integrated in SDK (one for handling the third party of audio frequency and video by FFMpeg in (Software Development Kit, software development kit) Library) by audio, video data synthesize MP4 file reach backstage.The defect of this video recording method is: (1) terminal must be first Downloading is just able to achieve video record comprising the SDK packet of FFMpeg, and since terminal is all kinds of, certain terminal operating FFMpeg Performance is bad, causes user experience poor;(2) SDK externally provided as one, client are very sensitive to the size of SDK packet, FFMpeg is introduced, the packet size of 1MB is directly increased;It (3) include audio in the video file finally synthesized, and practical recognition of face Video authentication under scene does not need sound, so will lead to and increases the unnecessary processing load of terminal.
Summary of the invention
It is a primary object of the present invention to propose a kind of video recording method, device, terminal and computer-readable storage medium Matter, it is intended to solve in the prior art, terminal carries out video record when carrying out recognition of face to realize, existing video record Make problem ineffective, that need SDK packet to be mounted is excessive and processing load is larger.
To achieve the above object, the present invention provides a kind of video recording method, and the video recording method includes following step It is rapid:
The collected encoding video pictures data of camera are obtained, the encoding video pictures data are converted into default lattice The video stream file of formula;
Obtain the camera it is current towards parameter;
By the video stream file and it is described be sent to background server towards parameter so that the background server according to The video stream file and described towards one video file of parameter synthesis.
Optionally, the collected encoding video pictures data of acquisition camera, by the encoding video pictures data Before the step of being converted to the video stream file of preset format, further includes:
Video record instruction is received, is instructed according to the video record and calls camera;
Control the camera acquisition encoding video pictures data.
Optionally, described the step of controlling the camera acquisition encoding video pictures data, includes:
During the camera acquires encoding video pictures data, screen is controlled according to preset luminous parameters and is pressed The light of default kind of color is successively issued according to preset order, so that the camera successively acquires the light of default kind of the color Corresponding facial image forms human face image sequence, and wherein the light of each color corresponds to several frame facial images;
The disparity map between color adjacent two-by-two in the human face image sequence is obtained, difference graphic sequence is obtained;
The preset luminous parameters and the difference graphic sequence are sent to backstage light In vivo detection service, so that institute Whether state that light In vivo detection service judges the camera current shooting is true man;
When the detection knot that the camera current shooting for receiving the light In vivo detection service return is true man When fruit, step is executed: obtaining the collected encoding video pictures data of camera, the encoding video pictures data are converted to The video stream file of preset format.
Optionally, the disparity map obtained between color adjacent two-by-two in the human face image sequence, obtains difference The step of graphic sequence includes:
Identify the color change position in the human face image sequence;
Obtain the corresponding two frames facial image of two different colors of light at the color change position;
Two frame facial image corresponding to the light of described two different colours carries out variance analysis, obtains the face The disparity map of color mutated site;
The disparity map for taking all colours mutated site in the human face image sequence obtains difference graphic sequence.
Optionally, the step of encoding video pictures data are converted into the video stream file of preset format packet It includes:
When the encoding video pictures data got are yuv format, multimedia coding class MediaCodec is called The encoding video pictures data of the yuv format are converted to the video stream file of H264 format by class.
Optionally, the calling multimedia coding class MediaCodec class, by the video image coding yardage of the yuv format Include: according to the step of video stream file for being converted to H264 format
Multimedia coding class MediaCodec class is called, and obtains preset video tuning parameter;
According to the MediaCodec class and the preset video tuning parameter, by the video image of the yuv format Coded data is converted to the video stream file of H264 format.
Optionally, the video tuning parameter includes code rate, frame per second and the key frame interval of video.
Optionally, it is described obtain the camera it is current include: towards the step of parameter
The application programming interface for calling camera programm, gets the camera shooting by the application programming interface Head it is current towards parameter, wherein the camera is called by the camera programm.
In addition, to achieve the above object, the present invention also provides a kind of video recording device, the video recording device packet It includes:
Camera, for acquiring encoding video pictures data;
First obtains module, for obtaining the collected encoding video pictures data of camera, by the video image coding Code data are converted to the video stream file of preset format;
Second obtains module, for obtain the camera it is current towards parameter;
Sending module, for by the video stream file and it is described be sent to background server towards parameter so that described Background server is according to the video stream file and described towards one video file of parameter synthesis.
Optionally, described device further include:
Processing module instructs according to the video record for receiving video record instruction and calls camera;
Control module, for controlling the camera acquisition encoding video pictures data.
Optionally, the control module includes:
Control unit, for being shone during the camera acquires encoding video pictures data according to preset State modulator screen successively issues the light of default kind of color according to preset order so that the camera successively acquire it is described pre- If planting the corresponding facial image of light of color, human face image sequence is formed, wherein the light of each color corresponds to several frame people Face image;
Acquiring unit obtains difference for obtaining the disparity map between color adjacent two-by-two in the human face image sequence Different graphic sequence;
Transmission unit, for the preset luminous parameters and the difference graphic sequence to be sent to the inspection of backstage light living body Service is surveyed, so that whether what the light In vivo detection service judged the camera current shooting is true man;
Described first obtains module, is also used to work as when the camera for receiving the light In vivo detection service return When preceding shooting is the testing result of true man, the collected encoding video pictures data of camera are obtained, by the video image Coded data is converted to the video stream file of preset format.
Optionally, the acquiring unit includes:
Identify subelement, for identification the color change position in the human face image sequence;
Subelement is obtained, for obtaining the two different colors of light corresponding two at the color change position Frame facial image;
Subelement is analyzed, carries out difference for the corresponding two frames facial image of light to described two different colours Analysis, obtains the disparity map of the color change position;
The acquisition subelement, is also used to take the disparity map of all colours mutated site in the human face image sequence, obtains To difference graphic sequence.
Optionally, described first module is obtained, is also used to when the encoding video pictures data got be yuv format When, multimedia coding class MediaCodec class is called, the encoding video pictures data of the yuv format are converted into H264 format Video stream file.
Optionally, described first module is obtained, is also used to call multimedia coding class MediaCodec class, and obtain default Video tuning parameter;According to the MediaCodec class and the preset video tuning parameter, by the view of the yuv format Frequency image coded data is converted to the video stream file of H264 format.
In addition, to achieve the above object, the present invention also provides a kind of terminal, the terminal include: memory, processor and It is stored in the video record program that can be run on the memory and on the processor, the video record program is described The step of processor realizes video recording method as described above when executing.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium Video record program is stored on storage medium, the video record program realizes video as described above when being executed by processor The step of method for recording.
Video recording method proposed by the present invention, by transferring to background server to handle the synthesis of final video file, So that it is not necessary that comprising FFMpeg, this not only avoids performance existing for terminal operating FFMpeg is bad in the SDK packet of terminal downloads The problem of, the size of SDK packet is also reduced, in addition, the present invention is according only to video stream file and towards parameter synthesis final video File avoids the burden of terminal processes caused by audio recording.To which the present invention solves in the prior art, terminal is for reality Existing that video record is carried out when carrying out recognition of face, existing video record is ineffective, needs SDK packet to be mounted excessive, And the problem that processing load is larger.
Detailed description of the invention
Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of video recording method first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
As shown in Figure 1, Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
The terminal of that embodiment of the invention can be PC, be also possible to smart phone, tablet computer, portable computer etc. with aobvious Show the packaged type terminal device of function.
As shown in Figure 1, the terminal may include: processor 1001, such as CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components. User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include that the wired of standard connects Mouth, wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
Optionally, terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio Circuit, WiFi module etc..Wherein, sensor such as optical sensor, motion sensor and other sensors.Specifically, light Sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can according to the light and shade of ambient light come The brightness of display screen is adjusted, proximity sensor can close display screen and/or backlight when mobile terminal is moved in one's ear.As One kind of motion sensor, gravity accelerometer can detect the size of (generally three axis) acceleration in all directions, quiet Size and the direction that can detect that gravity when only, the application that can be used to identify mobile terminal posture are (such as horizontal/vertical screen switching, related Game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, mobile terminal can also match The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor are set, details are not described herein.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium Believe module, Subscriber Interface Module SIM and video record program.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, carries out with background server Data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client;And processor 1001 can be used for calling the video record program stored in memory 1005, and execute in following video recording method embodiments Operation.
The specific embodiment of terminal of the present invention and each specific embodiment of following video recording methods are essentially identical, herein not It repeats.
Based on above-mentioned hardware configuration, video recording method embodiment of the present invention is proposed.
It is the flow diagram of video recording method first embodiment of the present invention referring to Fig. 2, Fig. 2, which comprises
Step S10 obtains the collected encoding video pictures data of camera, by the encoding video pictures data conversion For the video stream file of preset format;
The present embodiment video recording method is applied to the scene that terminal carries out authentication to user, and such as each type of financial is infused Volume, payment scene, wherein terminal can be the terminal for carrying Android operation system, be also possible to carry the end of other operating systems End.In authentication scene, the requirement with each field to identity authorization system safety and reliability is higher and higher, in addition to Except face verification and In vivo detection, also while requiring the video recorded when user carries out recognition of face and being sent to backstage for prison Pipe side is authenticated and is deposited card, that is, terminal needs to carry out recognition of face on one side, carries out video record on one side.The present embodiment master If the improvement made for video record scheme.
In the present embodiment, when carrying out video record, terminal acquires encoding video pictures data by camera first, i.e., Then the encoding video pictures data are converted to the video stream file of preset format by the data of video image portion, in order to Subsequent processing.
Specifically, the described the step of encoding video pictures data are converted to the video stream file of preset format, can be with It include: to call multimedia coding class MediaCodec class when the encoding video pictures data got are yuv format, The encoding video pictures data of the yuv format are converted to the video stream file of H264 format.
YUV is a kind of colour coding method, is often used in each video output component, and YUV is to photo or video volume When code, it is contemplated that the sensing capability of the mankind allows to reduce the bandwidth of coloration.In the present embodiment, when the video image coding got When code data are yuv format, terminal calls the multimedia coding class MediaCodec class of own system, by the view of the yuv format Frequency image coded data is converted to the video stream file of H264 format.Wherein, MediaCodec class can be used for accessing terminal bottom Multimedia coding-decoder, to realize encoding and decoding;H264 is a kind of video compression algorithm being commonly used, and passes through video figure As coded data is converted to H264 format, can be very good to realize video compress.
Further, the calling multimedia coding class MediaCodec class, by the encoding video pictures of the yuv format Data be converted to the step of video stream file of H264 format may include: call multimedia coding class MediaCodec class, and Obtain preset video tuning parameter;According to the MediaCodec class and the preset video tuning parameter, by the YUV The encoding video pictures data of format are converted to the video stream file of H264 format.
Specifically, target component that can in advance in terminal profile video tuning parameter as H264 compression algorithm, the mesh Mark parameter can be obtained by experiment, later, can call MediaCodec using the preset video tuning parameter as ginseng is entered Class is converted to the video flowing text of H264 format by the encoding video pictures data of yuv format by H264 video compression algorithm Part can so guarantee that the image definition of finally obtained video stream file and size meet actual application scenarios demand.
Further, video tuning parameter may include code rate, frame per second and the key frame interval of video.It preferably, can be with Tuning parameter is set are as follows: code rate 100kbps, frame per second 15fps and 5 frame of key frame interval, such value not only can satisfy identity The requirement to image definition is authenticated, and the video flowing size finally compressed is also more appropriate.
Certainly, other transformation rules can be used when specific implementation also to get video stream file, wherein transformation rule It can and flexible setting different according to the formats of encoding video pictures data.
Step S20, obtain the camera it is current towards parameter;
In the step, to synthesize final video file, terminal further obtain camera it is current towards parameter, the direction Parameter is used to indicate the relative position situation of the video of camera and recording.Due to for different terminals, the position of camera It sets and is likely located to the left above screen, to the right above screen, when face face screen, the video image of recording is not but with people Centered on face, it is so not easy to certification of the later period to video, to carry out direction correction to video image, needs to obtain camera and works as It is preceding towards parameter.
Specifically, step S20 may include: the application programming interface for calling camera programm, pass through the application Program Interfaces get the camera it is current towards parameter, wherein the camera is called by the camera programm.
In terminal recorded video, camera is called by the camera programm of terminal built-in, and terminal is by calling the camera journey The application programming interface of sequence, can get camera it is current towards parameter, this specifically can be with degree towards parameter Form, such as 0 degree, 90 degree, 180 degree etc..
Step S30, by the video stream file and it is described be sent to background server towards parameter so that the backstage take Device be engaged according to the video stream file and described towards one video file of parameter synthesis.
Later, terminal is sent to background server by the above-mentioned video stream file got and towards parameter, which takes Business device is used to provide the service of video file synthesis, can specifically be serviced and be realized by FFMpeg, FFmpeg be a set of can to use Come record, converted digital audio, video, and the open source computer program of stream can be translated into.Background server is receiving Video stream file and described towards after parameter, can be by FFmpeg order by the video stream file and towards parameter synthesis one The video file of MP4 format, and the video file is saved, so that supervisor checks at any time.
It should be noted that since the video authentication under practical recognition of face scene does not need sound, thus this implementation Example is only handled video image data, is realized under the premise of meeting actual video certification demand, is mitigated the place of terminal Reason burden.
The video recording method that the present embodiment proposes, by transferring to the synthesis of final video file at background server Reason, so that it is not necessary that comprising FFMpeg, this not only avoids performances existing for terminal operating FFMpeg not in the SDK packet of terminal downloads Good problem also reduces the size of SDK packet, in addition, the present embodiment is final according only to video stream file and towards parameter synthesis Video file avoids the burden of terminal processes caused by audio recording.To which the present embodiment solves in the prior art, terminal Video record is carried out when carrying out recognition of face in order to realize, existing video record is ineffective, needs SDK packet to be mounted Excessive and larger processing load problem.
Further, it is based on video recording method first embodiment of the present invention, proposes video recording method second of the present invention Embodiment.
It in the present embodiment, can also include: to receive video record instruction, according to the view before above-mentioned steps S10 Camera is called in frequency record command;Control the camera acquisition encoding video pictures data.
Wherein, video record instruction can be triggered manually by user, can also by terminal applies automatic trigger, such as with During the payment application of family using terminal, when the payment application receives payment instruction, that is, automatically generates video record and refer to It enables to carry out authentication to user.
After terminal receives video record instruction, itself camera is called, camera is then controlled and acquires video image coding Code data show customized face frame during controlling camera acquisition encoding video pictures data in application interface Control, with the video image acquired by the customized face frame control display, by the way that face frame is made into customized control, It can be convenient the style (border color fills gradual change, text color etc.) that user customizes face frame, meet the personalized need of user It asks.
Further, it is based on video recording method second embodiment of the present invention, proposes video recording method third of the present invention Embodiment.
In the present embodiment, the step of control camera acquisition encoding video pictures data may include: During the camera acquisition encoding video pictures data, screen is controlled according to preset order according to preset luminous parameters The light of default kind of color is successively issued, so that the camera successively acquires the corresponding face of light of default kind of the color Image forms human face image sequence, and wherein the light of each color corresponds to several frame facial images;Obtain the facial image sequence Disparity map in column between color adjacent two-by-two obtains difference graphic sequence;By the preset luminous parameters and the difference Graphic sequence is sent to backstage light In vivo detection service, so that the light In vivo detection service judges that the camera is currently clapped Whether what is taken the photograph is true man;It is true man's when receiving the camera current shooting that the light In vivo detection service returns When testing result, step is executed: the collected encoding video pictures data of camera are obtained, by the encoding video pictures data Be converted to the video stream file of preset format.
Specifically, during camera acquires encoding video pictures data, face In vivo detection, the people can be carried out The step of face In vivo detection specifically: firstly, successively being sent out according to preset luminous parameters controlling terminal screen according to preset order Preset the light of kind of color out, wherein the color category of light and quantity can with flexible choice, such as can from it is red, yellow, blue, Randomly select 4 kinds in the light of 6 kinds of colors such as purple, green, orange, then controlling terminal screen successively issued according to preset order this 4 The light of kind color, reflects according to light, and camera can successively collect the corresponding facial image of light of this 4 kinds of colors, by This forms a human face image sequence, and wherein the light of each color is all corresponding with several frame facial images;Then, the people is obtained Disparity map in face image sequence between color adjacent two-by-two, obtains difference graphic sequence, for example, terminal screen successively issue it is red, The light of this yellow, blue, purple 4 kinds of colors, then need to obtain reddish yellow respectively, champac, the difference between these adjacent colors of royal purple Figure, thus obtains a difference graphic sequence;Later, after above-mentioned preset luminous parameters and the difference graphic sequence being sent to together Platform light In vivo detection service works as end so that whether what the light In vivo detection service judged camera current shooting is true man Termination receives the camera current shooting of light In vivo detection service return when being the testing result of true man, i.e. execution step: The collected encoding video pictures data of camera are obtained, the encoding video pictures data are converted to the video of preset format Stream file, conversely, work as the camera current shooting for receiving light In vivo detection service return is not the testing result of true man When, video record and output error prompt information can be terminated.
By above-mentioned light In vivo detection, terminal can identify camera current shooting during video record Whether it is true man, further improves the safety and reliability of video record.
Further, it is based on video recording method 3rd embodiment of the present invention, proposes video recording method the 4th of the present invention Embodiment.
In the present embodiment, the disparity map obtained between color adjacent two-by-two in the human face image sequence, obtains It may include: the color change position in the identification human face image sequence to the step of difference graphic sequence;Obtain the color The corresponding two frames facial image of the two different colors of light of variant positions;To the light of described two different colours Corresponding two frames facial image carries out variance analysis, obtains the disparity map of the color change position;Take the face figure As the disparity map of all colours mutated site in sequence, difference graphic sequence is obtained.
In the present embodiment, to obtain difference graphic sequence, the color change position in human face image sequence can be identified first It sets, which refers to a kind of position of the facial image in human face image sequence by color change for another color It sets, for example terminal screen successively issues the light of this red, yellow, blue, purple 4 kinds of colors, then can identify from human face image sequence 3 color change positions out;Then, the corresponding two frames people of two different colors of light at color change position is obtained Face image, since for random color mutated site, the right and left is corresponding two frame of two different colors of light respectively Facial image can respectively obtain a frame facial image from the right and left at this time;Later, to the right and left from color change position The two frame facial images got carry out variance analysis, the disparity map of the color change position are obtained, for example, can be to two frame people The pixel coordinate pair of face image should do subtraction, to obtain the disparity map of two frame facial images;Finally, taking the face In image sequence the disparity map of all colours mutated site to get arrive difference graphic sequence.
By the above-mentioned means, the disparity map between color adjacent two-by-two in human face image sequence can be effectively got, Whether for the service of subsequent ray In vivo detection premise is provided for true man according to what difference graphic sequence judged camera current shooting Guarantee.
The present invention also provides a kind of video recording devices.Video recording device of the present invention includes:
Camera, for acquiring encoding video pictures data;
First obtains module, for obtaining the collected encoding video pictures data of camera, by the video image coding Code data are converted to the video stream file of preset format;
Second obtains module, for obtain the camera it is current towards parameter;
Sending module, for by the video stream file and it is described be sent to background server towards parameter so that described Background server is according to the video stream file and described towards one video file of parameter synthesis.
Further, described device further include:
Processing module instructs according to the video record for receiving video record instruction and calls camera;
Control module, for controlling the camera acquisition encoding video pictures data.
Further, the control module includes:
Control unit, for being shone during the camera acquires encoding video pictures data according to preset State modulator screen successively issues the light of default kind of color according to preset order so that the camera successively acquire it is described pre- If planting the corresponding facial image of light of color, human face image sequence is formed, wherein the light of each color corresponds to several frame people Face image;
Acquiring unit obtains difference for obtaining the disparity map between color adjacent two-by-two in the human face image sequence Different graphic sequence;
Transmission unit, for the preset luminous parameters and the difference graphic sequence to be sent to the inspection of backstage light living body Service is surveyed, so that whether what the light In vivo detection service judged the camera current shooting is true man;
Described first obtains module, is also used to work as when the camera for receiving the light In vivo detection service return When preceding shooting is the testing result of true man, the collected encoding video pictures data of camera are obtained, by the video image Coded data is converted to the video stream file of preset format.
Further, the acquiring unit includes:
Identify subelement, for identification the color change position in the human face image sequence;
Subelement is obtained, for obtaining the two different colors of light corresponding two at the color change position Frame facial image;
Subelement is analyzed, carries out difference for the corresponding two frames facial image of light to described two different colours Analysis, obtains the disparity map of the color change position;
The acquisition subelement, is also used to take the disparity map of all colours mutated site in the human face image sequence, obtains To difference graphic sequence.
Further, described first module is obtained, is also used to when the encoding video pictures data got be YUV lattice When formula, multimedia coding class MediaCodec class is called, the encoding video pictures data of the yuv format are converted into H264 lattice The video stream file of formula.
Further, described first module is obtained, is also used to call multimedia coding class MediaCodec class, and obtain pre- If video tuning parameter;According to the MediaCodec class and the preset video tuning parameter, by the yuv format Encoding video pictures data are converted to the video stream file of H264 format.
Operation performed by above-mentioned camera and each module specifically can refer to video recording method embodiment of the present invention, herein It repeats no more.
The present invention also provides a kind of computer readable storage mediums.
Video record program is stored on computer readable storage medium of the present invention, the video record program is by processor The step of video recording method as described above is realized when execution.
Wherein, the video record program run on the processor, which is performed realized method, can refer to the present invention Video recording method embodiment, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (14)

1. a kind of video recording method, which is characterized in that the video recording method includes the following steps:
The collected encoding video pictures data of camera are obtained, the encoding video pictures data are converted into preset format Video stream file;
Obtain the camera it is current towards parameter;
By the video stream file and it is described be sent to background server towards parameter so that the background server is according to Video stream file and described towards one video file of parameter synthesis.
2. video recording method as described in claim 1, which is characterized in that the collected video image of the acquisition camera Coded data, before the step of encoding video pictures data are converted to the video stream file of preset format, further includes:
Video record instruction is received, is instructed according to the video record and calls camera;
Control the camera acquisition encoding video pictures data.
3. video recording method as claimed in claim 2, which is characterized in that the control camera acquires video image The step of coded data includes:
During the camera acquires encoding video pictures data, screen is controlled according to pre- according to preset luminous parameters If sequence successively issues the light of default kind of color, so that the light that the camera successively acquires default kind of the color is corresponding Facial image, formed human face image sequence, wherein the light of each color corresponds to several frame facial images;
The disparity map between color adjacent two-by-two in the human face image sequence is obtained, difference graphic sequence is obtained;
The preset luminous parameters and the difference graphic sequence are sent to backstage light In vivo detection service, so that the light Whether what line In vivo detection service judged the camera current shooting is true man;
When the camera current shooting for receiving the light In vivo detection service return is the testing result of true man, It executes step: obtaining the collected encoding video pictures data of camera, the encoding video pictures data are converted to default The video stream file of format.
4. video recording method as claimed in claim 3, which is characterized in that described to obtain in the human face image sequence two-by-two Disparity map between adjacent color, the step of obtaining difference graphic sequence include:
Identify the color change position in the human face image sequence;
Obtain the corresponding two frames facial image of two different colors of light at the color change position;
Two frame facial image corresponding to the light of described two different colours carries out variance analysis, and it is prominent to obtain the color Conjugate the disparity map set;
The disparity map for taking all colours mutated site in the human face image sequence obtains difference graphic sequence.
5. video recording method as described in claim 1, which is characterized in that described by the encoding video pictures data conversion For preset format video stream file the step of include:
When the encoding video pictures data got are yuv format, multimedia coding class MediaCodec class is called, it will The encoding video pictures data of the yuv format are converted to the video stream file of H264 format.
6. video recording method as claimed in claim 5, which is characterized in that the calling multimedia coding class MediaCodec Class, the step of encoding video pictures data of the yuv format are converted to the video stream file of H264 format include:
Multimedia coding class MediaCodec class is called, and obtains preset video tuning parameter;
According to the MediaCodec class and the preset video tuning parameter, by the encoding video pictures of the yuv format Data are converted to the video stream file of H264 format.
7. video recording method as claimed in claim 6, which is characterized in that the video tuning parameter includes the code of video Rate, frame per second and key frame interval.
8. the video recording method as described in any one of claims 1 to 7, which is characterized in that described to obtain the camera It is current to include: towards the step of parameter
The application programming interface for calling camera programm, gets the camera by the application programming interface and works as It is preceding towards parameter, wherein the camera is called by the camera programm.
9. a kind of video recording device, which is characterized in that the video recording device includes:
Camera, for acquiring encoding video pictures data;
First obtains module, for obtaining the collected encoding video pictures data of camera, by the video image coding yardage According to the video stream file for being converted to preset format;
Second obtains module, for obtain the camera it is current towards parameter;
Sending module, for by the video stream file and it is described be sent to background server towards parameter so that the backstage Server is according to the video stream file and described towards one video file of parameter synthesis.
10. video recording device as claimed in claim 9, which is characterized in that described device further include:
Processing module instructs according to the video record for receiving video record instruction and calls camera;
Control module, for controlling the camera acquisition encoding video pictures data.
11. video recording device as claimed in claim 10, which is characterized in that the control module includes:
Control unit is used for during the camera acquires encoding video pictures data, according to preset luminous parameters The light that screen successively issues default kind of color according to preset order is controlled, so that the camera successively acquires described default kind The corresponding facial image of the light of color forms human face image sequence, and wherein the light of each color corresponds to several frame face figures Picture;
Acquiring unit obtains disparity map for obtaining the disparity map between color adjacent two-by-two in the human face image sequence Sequence;
Transmission unit, for the preset luminous parameters and the difference graphic sequence to be sent to backstage light In vivo detection clothes Business, so that whether what the light In vivo detection service judged the camera current shooting is true man;
Described first obtains module, is also used to currently clap when the camera for receiving the light In vivo detection service return It takes the photograph when being the testing result of true man, the collected encoding video pictures data of camera is obtained, by the encoding video pictures Data are converted to the video stream file of preset format.
12. video recording device as claimed in claim 11, which is characterized in that the acquiring unit includes:
Identify subelement, for identification the color change position in the human face image sequence;
Subelement is obtained, for obtaining the corresponding two frames people of two different colors of light at the color change position Face image;
Subelement is analyzed, carries out difference point for the corresponding two frames facial image of light to described two different colours Analysis, obtains the disparity map of the color change position;
The acquisition subelement, is also used to take the disparity map of all colours mutated site in the human face image sequence, obtains difference Different graphic sequence.
13. a kind of terminal, which is characterized in that the terminal includes: for acquiring the camera of encoding video pictures data, storage Device, processor and it is stored in the video record program that can be run on the memory and on the processor, the video record It realizes when processing procedure sequence is executed by the processor such as the step of video recording method described in any item of the claim 1 to 8.
14. a kind of computer readable storage medium, which is characterized in that be stored with video record on the computer readable storage medium Processing procedure sequence realizes such as video described in any item of the claim 1 to 8 when the video record program is executed by the processor The step of method for recording.
CN201811586656.0A 2018-12-21 2018-12-21 Video recording method, device, terminal and computer readable storage medium Pending CN109660745A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811586656.0A CN109660745A (en) 2018-12-21 2018-12-21 Video recording method, device, terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811586656.0A CN109660745A (en) 2018-12-21 2018-12-21 Video recording method, device, terminal and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109660745A true CN109660745A (en) 2019-04-19

Family

ID=66115078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811586656.0A Pending CN109660745A (en) 2018-12-21 2018-12-21 Video recording method, device, terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109660745A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110414346A (en) * 2019-06-25 2019-11-05 北京迈格威科技有限公司 Biopsy method, device, electronic equipment and storage medium
CN111901692A (en) * 2020-08-06 2020-11-06 杭州当虹科技股份有限公司 System for synthesizing VR (virtual reality) based on multi-audio and video streams
CN114389893A (en) * 2022-01-22 2022-04-22 重庆长安汽车股份有限公司 Live video processing vehicle real-name authentication system and method and automobile

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060032247A (en) * 2004-10-11 2006-04-17 (주)버뮤다정보기술 Apparatus and method for prohibiting false electronic banking using face recognition technology
CN1829321A (en) * 2005-02-28 2006-09-06 索尼株式会社 Information processing method and apparatus
CN105447459A (en) * 2015-11-18 2016-03-30 上海海事大学 Unmanned plane automation detection target and tracking method
CN105577664A (en) * 2015-12-22 2016-05-11 深圳前海微众银行股份有限公司 Cipher reset method and system, client and server
CN105744278A (en) * 2016-02-16 2016-07-06 福建星网智慧科技股份有限公司 Android system based H264 coding and decoding method
CN107846633A (en) * 2016-09-18 2018-03-27 腾讯科技(深圳)有限公司 A kind of live broadcasting method and system
CN107992794A (en) * 2016-12-30 2018-05-04 腾讯科技(深圳)有限公司 A kind of biopsy method, device and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20060032247A (en) * 2004-10-11 2006-04-17 (주)버뮤다정보기술 Apparatus and method for prohibiting false electronic banking using face recognition technology
KR100715323B1 (en) * 2004-10-11 2007-05-07 (주)버뮤다정보기술 Apparatus and method for prohibiting false electronic banking using face recognition technology
CN1829321A (en) * 2005-02-28 2006-09-06 索尼株式会社 Information processing method and apparatus
CN105447459A (en) * 2015-11-18 2016-03-30 上海海事大学 Unmanned plane automation detection target and tracking method
CN105577664A (en) * 2015-12-22 2016-05-11 深圳前海微众银行股份有限公司 Cipher reset method and system, client and server
CN105744278A (en) * 2016-02-16 2016-07-06 福建星网智慧科技股份有限公司 Android system based H264 coding and decoding method
CN107846633A (en) * 2016-09-18 2018-03-27 腾讯科技(深圳)有限公司 A kind of live broadcasting method and system
CN107992794A (en) * 2016-12-30 2018-05-04 腾讯科技(深圳)有限公司 A kind of biopsy method, device and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110414346A (en) * 2019-06-25 2019-11-05 北京迈格威科技有限公司 Biopsy method, device, electronic equipment and storage medium
CN111901692A (en) * 2020-08-06 2020-11-06 杭州当虹科技股份有限公司 System for synthesizing VR (virtual reality) based on multi-audio and video streams
CN111901692B (en) * 2020-08-06 2022-09-06 杭州当虹科技股份有限公司 System for synthesizing VR (virtual reality) based on multi-audio and video streams
CN114389893A (en) * 2022-01-22 2022-04-22 重庆长安汽车股份有限公司 Live video processing vehicle real-name authentication system and method and automobile

Similar Documents

Publication Publication Date Title
US20200012418A1 (en) Video encoding method and electronic device adapted thereto
KR102222073B1 (en) Method and electronic device for taking a photograph
KR102277178B1 (en) Electronic Device Including The Camera Module And Method For Processing Image Of the Same
CN109660745A (en) Video recording method, device, terminal and computer readable storage medium
US20180025478A1 (en) Electronic device for processing image
WO2021197139A1 (en) Service recommending method, electronic device, and system
US9117410B2 (en) Image display device and method
CN102845057B (en) Display device, television receiver, display device control method
CN110119719A (en) Biopsy method, device, equipment and computer readable storage medium
JP7533854B2 (en) Projection data processing method and apparatus
KR102327779B1 (en) Method for processing image data and apparatus for the same
KR102509939B1 (en) Electronic device and method for encoding image data thereof
CN107087101A (en) Apparatus and method for providing dynamic panorama function
US11736763B2 (en) Fake video detection using block chain
KR20190087230A (en) Method for creating video data using cameras and server for processing the method
CN108351960A (en) Electronic equipment with improved iris recognition and its method
US9001216B2 (en) Method and apparatus for video streaming
US20150020122A1 (en) Mobile device, display apparatus and method for sharing contents thereof
KR102371211B1 (en) Device and method for authenticating biometric data using a plural camera
CN112306442A (en) Cross-device content screen projection method, device, equipment and storage medium
KR20130056529A (en) Apparatus and method for providing augmented reality service in portable terminal
KR101870670B1 (en) Apparatus and method for collecting digital data based on digital forensics
CN106134189A (en) Image processing apparatus, camera head, image processing method and program
CN114424520A (en) Image processing method and electronic device supporting the same
CN106982327A (en) Image processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190419