Movatterモバイル変換


[0]ホーム

URL:


CN109348281A - Method for processing video frequency, device, computer equipment and storage medium - Google Patents

Method for processing video frequency, device, computer equipment and storage medium
Download PDF

Info

Publication number
CN109348281A
CN109348281ACN201811324699.1ACN201811324699ACN109348281ACN 109348281 ACN109348281 ACN 109348281ACN 201811324699 ACN201811324699 ACN 201811324699ACN 109348281 ACN109348281 ACN 109348281A
Authority
CN
China
Prior art keywords
audio
duration
video
image
recording
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811324699.1A
Other languages
Chinese (zh)
Other versions
CN109348281B (en
Inventor
唐志新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tiktok Technology Co ltd
Original Assignee
Beijing Microlive Vision 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 Beijing Microlive Vision Technology Co LtdfiledCriticalBeijing Microlive Vision Technology Co Ltd
Priority to CN201811324699.1ApriorityCriticalpatent/CN109348281B/en
Publication of CN109348281ApublicationCriticalpatent/CN109348281A/en
Application grantedgrantedCritical
Publication of CN109348281BpublicationCriticalpatent/CN109348281B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

This disclosure relates to a kind of method for processing video frequency, device, computer equipment and storage medium.Method includes: to obtain the first video, extracts the audio in the first video as the first audio, and extract audio initial time and the audio finish time of the first audio;The audioref duration of the first audio is calculated according to audio initial time and audio finish time;The record command for recording the second video is received, using audio initial time as the recording initial time of the second video;According to record command, the second audio is acquired from recording initial time;When receiving the recording stop instruction inputted according to audioref duration, stop the second audio of acquisition, and using the second audio collected as the recording audio in the second video.It can guarantee to record obtained the second audio and the first audio sync using this method, thereby may be ensured that the synchronization of video.

Description

Method for processing video frequency, device, computer equipment and storage medium
Technical field
This disclosure relates to field of computer technology, more particularly to a kind of method for processing video frequency, device, computer equipment andStorage medium.
Background technique
With the development of computer technology, user can carry out video record using terminal, and when carrying out video record,Can have the demand for needing to play existing video simultaneously, as user's needs using existing video as reference video to video record,And reference video and recorded video are played simultaneously.
Generally, due to which terminal can only realize that individually therefore broadcasting video or independent recorded video are recorded in userWhen, then it needs to be operated using two equipment simultaneously, includes in the video for causing user to acquire when clicking and starting and recordThe audio for including in audio and existing video is asynchronous.
Summary of the invention
Based on this, it is necessary to which in view of the above technical problems, the audio sync for including in video can be guaranteed by providing one kindMethod for processing video frequency, device, computer equipment and storage medium.
A kind of method for processing video frequency, which comprises
The first video is obtained, extracts the audio in first video as the first audio, and extract first audioAudio initial time and audio finish time;
The audioref duration of first audio is calculated according to the audio initial time and the audio finish time;
The record command for recording the second video is received, when the audio initial time is originated as the recording of the second videoIt carves;
According to the record command, the second audio is acquired from the recording initial time;
When receiving the recording stop instruction inputted according to the audioref duration, stop acquiring second soundFrequently, and using second audio collected as the recording audio in second video.
It is described in one of the embodiments, that the second audio is acquired from the recording initial time, comprising:
Present video is acquired since the recording initial time, and is obtained the corresponding present video of the present video and obtainedTake duration;
When the present video, which obtains duration, is not up to the audioref duration, when being obtained according to the present videoIt is long to lack duration with the audioref duration calculation audio, and acquire the corresponding amended record audio of the audio missing duration;
The second audio is obtained according to the present video and the amended record audio.
It is described in one of the embodiments, to receive the record command for recording the second video, it will according to the record commandAfter the audio initial time is as the recording initial time of the second video, further includes:
The second image is acquired from the recording initial time;
When receiving the recording stop instruction, stop acquisition, using second image collected as described theRecording image in two videos.
It is described in one of the embodiments, to acquire the second image from the recording initial time, comprising:
Present image is acquired since the recording initial time, and obtains the present image and the present imageCorresponding present image obtains duration;
When the corresponding present image of the present image, which obtains duration, is not up to the audioref duration, according to describedPresent image obtains duration and the audioref duration calculation image lacks duration, and it is corresponding to acquire described image missing durationAmended record image;
The second image is obtained according to the present image and the amended record image.
In one of the embodiments, the described method includes:
Obtain the recording total duration of second audio;
Compare the audioref duration and the recording total duration obtains comparison result;
The duration for the audio that time span is small in the comparison result is extracted as standard duration;
The length for the audio that time span is big in the comparison result is adjusted according to the standard duration.
In one of the embodiments, the method also includes:
The corresponding audio of the standard duration is obtained as standard audio;
The corresponding image of the standard audio is inquired as standard picture;
The length for the corresponding image of audio that time span is big in the comparison result is adjusted according to the standard picture.
It is described using the audio initial time as the recording initial time of the second video in one of the embodiments,Include:
Range at the time of inquiring corresponding with audio initial time;
As recording initial time at the time of will be in the moment range.
A kind of video process apparatus, described device include:
Module is obtained, for obtaining the first video, extracts the audio in first video as the first audio, and extractThe audio initial time of first audio and audio finish time;
Computing module, for calculating first audio according to the audio initial time and the audio finish timeAudioref duration;
Module is recorded, for receiving the record command for recording the second video, using the audio initial time as the second viewThe recording initial time of frequency;It is also used to according to the record command, the second audio is acquired from the recording initial time;
First stopping modular, for when receiving the recording stop instruction inputted according to the audioref duration,Then stop recording second video, and using second audio collected as the recording audio in second video.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processingThe step of device realizes the above method when executing the computer program.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processorThe step of above-mentioned method is realized when row.
Above-mentioned method for processing video frequency, device, computer equipment and storage medium, the audio that need to only obtain in the first video are madeFor the first audio, and obtain audio initial time and the audio finish time of the first audio, so according to audio initial time andAudio finish time calculates the audioref duration of the first audio, receives the instruction of the second video record, audio initial time is madeFor the recording initial time of the second audio, the second audio is acquired from initial time is recorded according to the instruction of the second video record, when connecingWhen receiving the recording stop instruction inputted according to audioref duration, then stop acquiring, using the second audio collected as theRecorded video in two videos thereby may be ensured that video to guarantee to record obtained the second audio and the first audio syncSynchronization.
Detailed description of the invention
Fig. 1 is the flow diagram of method for processing video frequency in one embodiment;
Fig. 2 is the flow diagram of the second audio collection step in one embodiment;
Fig. 3 is the flow diagram of the second image acquisition step in one embodiment;
Fig. 4 is the structural block diagram of video process apparatus in one embodiment;
Fig. 5 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the disclosure are more clearly understoodThe disclosure is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the disclosure, notFor limiting the disclosure.
In one embodiment, as shown in Figure 1, providing a kind of method for processing video frequency, comprising the following steps:
S102: obtaining the first video, extracts the audio in the first video as the first audio, and extract the sound of the first audioFrequency initial time and audio finish time.
Specifically, the first video refers to existing video, and the first video can be the video as reference, and then user canWith according to other videos of the first video record, the first video can be stored in the video in corresponding video library.First audioRefer to include existing audio in the first video.Specifically, terminal gets the existing video being stored in video library and makeesFor the first video, and then the first audio in the first video is extracted, the audio initial time of the first audio of inquiry terminates with audioMoment.It can be, the different video stored in the video library that user shows according to terminal selects, and gives birth to according to the user's choiceAt corresponding selection instruction, the video identifier of selected video is carried in selection instruction, and then terminal is according to selection instruction,From the different videos stored in server obtain with video corresponding to corresponding video identifier, which is the first viewFrequently, when and then getting first video, then the first audio for including in first video is extracted, and then inquires first audioAudio initial time and the first audio audio finish time.
S104: the audioref duration of the first audio is calculated according to audio initial time and audio finish time.
Specifically, audioref duration refers to the total duration of the first audio, the total duration be include in the first videoThe duration of audio, thus using the specific duration as the duration of recording audio when being recorded according to the first video.Work as terminalWhen getting the first audio, and getting the corresponding audio initial time of the first audio and audio end time, then it can calculateThe total duration of the first audio is obtained, namely the audioref duration of the first audio is calculated.It can be, when terminal getsOne audio, and get audio initial time and when audio finish time, then calculate audio initial time and audio finish timeDifference, it is subsequent then to be carried out when recording according to the audioref duration and then using the difference as audioref durationThe recording of video.
S106: receiving the record command for recording the second video, originates audio initial time as the recording of the second videoMoment.
Specifically, the second video refers to according to the first video the video recorded as reference video, this secondVideo can be user and be referred to according to the first video, imitate or the second video for recording of interaction forms.Record startingMoment refer to start record the second video at the time of.Specifically, terminal receives the record command for recording the second video, then can be withWhen starting to record the second video, including be acquired to the second audio and the second image, and recording the recording starting of the second videoCarve the audio initial time for above-mentioned the first audio got.It can be, got when terminal instructs according to the user's choiceWhen the first video, then the first video is shown, for user according to the first video of display, input is corresponding to start recording secondThe beginning record command of video, when terminal receives the record command, then terminal by said extracted into the first videoThe audio initial time of one audio starts to acquire the second audio as initial time is recorded.For example, when terminal will acquire theWhen one video is shown, user clicks the recording button shown on corresponding display interface according to the first video of display, eventuallyEnd generates corresponding beginning record command according to the clicking operation of user, then terminal starts to play the first video, by the first videoIn include the first audio audio initial time as record initial time acquire the second audio.Wherein, record command is generatedIt can also be the recording button of display etc. on the corresponding display interface of user's long-pressing.
S108: according to the record command, the second audio is acquired from recording initial time.
Specifically, the second audio be include audio in the second video.When terminal is according to the beginning record command of userWhen recording to the second video, then the audio for starting acquisition and recording is acted recording initial time, the audio of the recording is theTwo audios.It can be, when terminal receives the record command, then terminal originates the audio of the first audio in the first videoMoment start acquire the second audio, namely acquisition occur the first video of background sound or user interaction or template when audio,The collected audio is then the second audio
S110: when receiving the recording stop instruction inputted according to audioref duration, stopping the second audio of acquisition,And using the second audio collected as the recording audio in the second video.
Specifically, recording stop instruction refers to that the instruction of the second video is recorded in the stopping of user's input.Specifically, it is recordingWhen the second video, when user inputs corresponding Stop message, then corresponding recording stop instruction is generated, terminal is according to the stoppingRecord command stops recording the second video, and then inquires collected second audio, using collected second audio as secondRecording audio in video, duration and the sound corresponding to the first audio of the second audio as recording audio collected at this timeFrequency is identical with reference to duration, then subsequent when playing the first video and the second video, then the first audio can be synchronous with the second audioIt plays.Can be, when recording the second video, audioref duration is shown on corresponding display interface, when user according toAudioref duration, corresponding click stop recording button, then generate corresponding recording stop instruction, terminal is recorded according to the stoppingInstruction then stops recording the second video, and then terminal inquiry collected second audio at this time, using the second audio as the second viewAudio in frequency, the also recording audio as in the second video;Or when the display on the corresponding display interface of user's long-pressingThe recording that button carries out the second video is recorded, when acquiring the second audio, when the recording button shown on display interface is bounced,Then stop recording the second video, and then terminal inquiry collected second audio at this time, using the second audio as in the second videoAudio, the also recording audio as in the second video.
In the present embodiment, the equipment different without user's operation guarantees audio and existing view in the video recorded as far as possibleAudio sync in frequency, namely only need independent terminal to get the first video, and then get include in the first video firstAudio and audio initial time and audio finish time, and then audioref duration is calculated, terminal starts recording secondVideo using audio initial time as the recording initial time of the second video, and acquires the second audio from initial time is recorded, whenWhen receiving the recording stop instruction inputted according to audioref duration, then stop recording the second video, and by collected theTwo audios are as the recording audio in the second video, to guarantee that the first audio is synchronous with the second audio, namely in the first viewFor frequency with the second video when playing, what is played at the time of identical is same number of frames, guarantees to play synchronization.
The flow diagram for the step of referring to Fig. 2 in one of the embodiments, second audio collection is provided, theThe step of two audio collections, namely the second audio is acquired from recording initial time, comprising: it is acquired since recording initial timePresent video, and obtain the corresponding present video of present video and obtain duration;Audio ginseng is not up to when present video obtains durationWhen examining duration, when obtaining duration according to present video and audioref duration calculation audio lack duration, and acquiring audio missingLong corresponding amended record audio;The second audio is obtained according to present video and amended record audio.
Specifically, when terminal receives corresponding record command, then start the second video of recording and need when recordingThe duration that real-time detection is currently recorded, to judge that current time collected audio data is acquisition or gives up, Yi JishiIt is no carry out subsequent recording namely terminal since recording initial time acquisition present video, and then get present videoCorresponding present video obtains duration, compares present video and obtains duration and audioref duration, and then judges that present video obtainsIt takes whether duration reaches audioref duration, when present video, which obtains duration, is not up to audioref duration, acquires currentAudio data needs to continue to acquire subsequent audio data, terminal is obtained according to present video when collecting current audio dataTake duration and audioref duration calculation audio to lack duration, audio missing duration continue to acquire needed for being audio whenLong, so that terminal continues to acquire the corresponding amended record audio of audio missing duration, terminal is obtained according to present video and amended record audioAudio be the second audio.It can be, when terminal receives record command, made according to the audio initial time of the first audioTo record initial time, and then the second video is recorded since recording initial time, namely current from initial time acquisition is recordedAudio, and get the corresponding present video of present video and obtain duration, namely calculated from initial time to current time is recordedTime difference, which is that present video obtains duration, right when present video, which obtains duration, does not reach audioref durationThe audio data at current time is acquired, and needs further amended record, when obtaining duration and audioref according to present videoThe long audio that calculates lacks duration, and audio missing duration as needs the duration of the audio of amended record, and then terminal acquisition and audioAmended record audio corresponding to duration is lacked, according to present video and amended record audio, obtained whole audio is the second audio.
In the present embodiment, during obtaining the second audio, duration can be obtained according to present video and judge whether to acquireTo complete second audio, if not collecting the second audio of duration corresponding with the first audio, continue amended record, thus by amended recordAs the second audio, the second audio for guaranteeing that recording obtains is identical as the duration of the first audio for audio and present video, improves sameThe success rate of step.
The record command for recording the second video is received in one of the embodiments, is originated audio according to record commandAfter moment is as the recording initial time of the second video, further includes: acquire the second image from recording initial time;Work as receptionWhen to recording stop instruction, stop acquisition, using the second image collected as the recording image in the second video.
Specifically, the second image refers to include image in the second video, which can be user according to the first viewThe first image for including in frequency is imitated or is interacted, thus the image that terminal collects.Specifically, terminal is starting to recordWhen the second video, then collect the second audio, and at the time of acquiring the second audio from, while acquire the second image, Ye JigenAccording to the audio initial time of above-mentioned acquisition as video record initial time, terminal is acquired the second image, when user is defeatedWhen entering Stop message, then corresponding recording stop instruction is generated, terminal stops recording the second view according to the recording stop instructionFrequently, and then collected second image is inquired, also i.e. using collected second image as the recording image in the second video.
In the present embodiment, it can also be using the duration for the first image for including in the first video as reference, namelyThe image initial time for the first image for including in the first video is obtained, and then obtains the image finish time of the first image, rootImage reference duration is calculated according to image initial time and image finish time, namely when the second image of acquisition, according to image referenceCorresponding first image of duration collection then makees the second image collected when receiving corresponding recording stop instructionFor the recording image in the second video.
In the present embodiment, when acquiring the second image, can directly it be obtained according to the audioref duration of the first audioIt takes, to guarantee that collected second image can be synchronous with the second audio, guarantees that subsequent image is synchronous with audio, furtherGuarantee that the first video is synchronous with the second video.
Fig. 3 is referred in one of the embodiments, and the flow diagram of one second image acquisition step is provided, secondImage acquisition step, namely the second image is acquired from the recording initial time, comprising: it acquires and works as since recording initial timePreceding image, and obtain present image and the corresponding present image acquisition duration of present image;When present image is corresponding currentWhen image acquisition duration is not up to audioref duration, duration is obtained according to present image and audioref duration calculation image lacksDuration is lost, and acquires the corresponding amended record image of image missing duration;The second image is obtained according to present image and amended record image.
Specifically, when terminal receives record command, then start the second video of recording and need to examine in real time when recordingThe duration currently recorded is surveyed, to judge that current time acquired image frame is acquisition or gives up, and after whether carrying outSince continuous recording namely terminal acquire present image recording initial time, and gets the corresponding current figure of present imageAs obtaining duration, and then judge that present image obtains whether duration reaches audioref duration namely the acquisition of the first image isNo completion then acquires current picture frame when image, which obtains duration, is not up to audioref duration, when collecting current figureAs frame, then it can continue to acquire subsequent picture frame namely terminal according to present image acquisition duration and audioref duration meterNomogram picture lacks duration, and image missing duration is the duration for needing the image for continuing acquisition to be lacked, so that terminal continuesThe corresponding image of acquisition image missing duration is as amended record image, the image obtained according to obtained present image and amended record imageAs the second image.It can be, when terminal receives record command, then since terminal record the second view recording initial timeFrequently, present image namely from initial time is recorded is acquired, and gets the corresponding present image of present image and obtains duration, namelyThe time difference is calculated from initial time to current time is recorded, which is that present image obtains duration, when present image obtainsWhen duration being taken not reach audioref duration, then the image data at current time is acquired, and needs further amended record, then rootDuration is obtained according to present image and audioref duration calculation image lacks duration, and image missing duration is to need amended recordThe duration of image, and then terminal acquisition and amended record image corresponding to image missing duration, according to present image and amended record image,Obtained general image is the second image.
In the present embodiment, it can also be using the duration for the first image for including in the first video as reference, such as regardWhen the audio duration and image duration difference that include in frequency, then when acquiring the second image, then according to the duration conduct of the first imageWith reference to thus when image reference is calculated according to the image initial time of the first image got and image finish timeIt carves, and then acquires present image from image initial time, and obtain present image and corresponding present image acquisition duration, whenWhen present image acquisition duration is not up to image reference duration, then duration and image reference duration calculation are obtained according to present imageImage lacks duration, and obtains the corresponding amended record image of image missing duration, obtains second according to present image and amended record imageImage.
In the present embodiment, when acquiring the second image, can according to present image obtain duration judge whether to collect withCorresponding complete second image of first audio continues amended record if not collecting complete second image, thus by amended record figureAs, as the second image, improving synchronous success rate with present image.
Method for processing video frequency in one of the embodiments, comprising: obtain the recording total duration of the second audio;Compare soundFrequency obtains comparison result with reference to duration and recording total duration;Take the duration for the audio that time span is small in comparison result as standardDuration;;The length for the audio that time span is big in comparison result is adjusted according to standard duration.
Specifically, when completing to the second video record, then the first audio and the second view for including in the first video are verifiedThe length for the second audio for including in frequency, be further ensured that it is subsequent can be played simultaneously namely terminal obtain the second audio recordTotal duration processed, and then the audioref duration of the first audio is extracted, compare the recording total duration and the first audio of the second audioAudioref duration simultaneously obtains comparison result, using the duration of the small audio of time span in comparison result as standard duration, intoAnd according to the length of the big audio of adjustment time length.It can be, terminal gets the second audio initial time of the second audioWith the second audio finish time, the difference of the second audio initial time and the second audio finish time is calculated, the difference is as theThe recording total duration of two audios, and then compare and record total duration and audioref duration and obtain comparison result, in comparison resultThe duration of the small audio of time span is shown as standard duration, according to standard duration, by the ending of the big audio of time spanAudio data is deleted, to obtain duration audio identical with standard duration.
In the present embodiment, when obtaining the first audio and the second audio, needs further to verify, be further ensured that and playingWhen the first audio and the second audio, what is at a time played is audio data mutually in the same time, guarantees the first audio and secondSynchronization when audio plays.
Method for processing video frequency in one of the embodiments, further includes: obtain the corresponding audio of standard duration as standardAudio;The corresponding image of query criteria audio is as standard picture;It is big that time span in comparison result is adjusted according to standard pictureThe corresponding image of audio length.
Specifically, when to record the audio completed adjust complete when, then to the first image for including in the first video andThe second image for including in second video is adjusted, and when adjusting image, then the duration for the audio completed using adjustmentCorresponding image is adjusted, to guarantee in follow-up play, the first video and the second video audio at the time of identicalData are synchronous with picture frame, and guarantee be with the picture frame of the broadcasting of the second image in identical first image it is synchronous,Then terminal obtains the corresponding audio of standard duration as standard audio, and then inquires image corresponding to standard audio as markQuasi- image, then another image is then image corresponding to the audio as standard audio, that is to say the big audio institute of time spanCorresponding image, and then the length not as another image of standard picture is adjusted.It can be, terminal gets standardThe corresponding audio of duration is as standard audio, and then image corresponding to query criteria audio is as standard picture, query criteriaThe length of image deletes the ending frame data not as another image of standard picture, also will be with standard duration instituteCorresponding end of data is deleted at the time of difference, obtains image identical with the length of standard picture.It should be noted thatIn the present embodiment, when the duration of the first image in the first video is identical as the duration of the first audio, broadcast to guarantee to synchronizeIt puts, the duration of the second image in the second video is also identical as the duration of the second audio, and terminal can will be in above-mentioned comparison resultThe small duration of time span is as standard duration, thus according to the standard duration by the big audio of time span in comparison resultThe length of corresponding image is adjusted.When the duration difference of the duration of the first image in the first video and the second audio,In order to which synchronization is played simultaneously, then the first audio in the first video and the second audio sync in the second video, and the first videoIn the first image and the second video in the second image synchronization therefore inquire above-mentioned standard duration, it is corresponding to obtain standard durationAudio as standard audio, the corresponding image of query criteria audio compares knot as standard picture, according to standard picture adjustmentThe length of the corresponding image of the big audio of time span in fruit.
In the present embodiment, in order to guarantee in follow-up play, the first video and the second video audio number at the time of identicalAccording to being synchronous with picture frame, and guarantee be with the picture frame of the broadcasting of the second image in identical first image it is synchronous,Realize that the first video is synchronous with the second video.
In one of the embodiments, using the audio initial time as the recording initial time of the second video, comprising:Range at the time of inquiring corresponding with audio initial time;As recording initial time at the time of will be in moment range.
Specifically, choose record initial time when, due to record initial time possibly can not completely with the first audioThe matching of audio initial time, then record initial time can be at the time of default within the scope of, namely the recording initial time chosenThe audio initial time of the first audio, range at the time of terminal inquiry is corresponding with audio initial time, the moment can be later thanWhen at the time of being used as recording initial time effective at the time of in range, and will inquire in moment range as starting is recordedIt carves, the audio initial time of the first audio is later than at the time of in the moment range.
It, then can be according to range-based searching at the time of correspondence to accordingly when initial time is recorded in selection in the present embodimentInitial time is recorded, to guarantee choosing the flexibility for recording initial time.
Can be set in terminal in one of the embodiments, there are two display area, respectively the first display area withSecond display area includes the first video in the first display area, includes the second video, Yong Hu in the second display areaThe first video can be referred on identical display interface, to realize the recording to the second video, terminal is recording the second videoWhen, the first video in the first display area starts in time, and then terminal extracts the first audio for including in the first video, obtainsThe audio initial time of first audio and audio finish time calculate according to audio initial time and audio finish time to audioWith reference to duration, and from when recording initial time the second audio of acquisition, being that the real-time present video that obtains obtains duration, current sound is inquiredFrequency obtain duration whether reach audioref duration, when not reaching audioref duration, then acquisition with audioref duration withAudio data corresponding to the difference of present video acquisition duration is done and amended record audio, so that present video and amended record audio be madeFor the second audio, it is that audio lacks duration, and then user that wherein audioref duration and present video, which obtain the difference of duration,When stopping recording with reference to duration according to the recording on display interface, then terminal receives recording stop instruction, and terminal stops recordingSecond video, thus using collected second audio as the recording audio in the second video, in addition, when choosing recording startingWhen quarter, since audio initial time possibly can not be exactly matched with initial time is recorded, then recording initial time can be defaultAt the time of within the scope of, namely the recording initial time chosen can be later than audio initial time, and acquire second audioThe second image is also acquired simultaneously, namely acquire the second image from initial time is recorded, namely from recording initial timePresent image is acquired, and implements to obtain present image and duration is obtained with corresponding present image, when not reaching audioref durationWhen, then it acquires and obtains picture frame corresponding to the difference of duration with audioref duration and present image and do and amended record image, fromAnd using present image and amended record image as the second image, the difference that wherein audioref duration obtains duration with present image isDuration is lacked for image, after obtaining the first audio, the second audio, the first image and the second image, then can further be verified,Namely the duration of the audio that time span is small in the first audio and the second audio is chosen as standard duration, and then when according to standardIt is long to adjust another audio, also the end of data of another audio is deleted, obtains duration audio identical with standard duration,And then corresponding image is adjusted, namely when adjusting completion to audio, then using the corresponding audio of standard duration as markQuasi- audio using image corresponding to standard audio as standard picture, and then another image is adjusted, also i.e. by another figureThe ending frame data of picture are deleted, and the image of duration identical with the duration of standard picture is obtained.In the present embodiment, Ke YibaoDemonstrate,proving the first video and the second video can guarantee mutually all playing in same number of frames in the same time, namely as played first at a certain momentFrame, to guarantee to be played simultaneously.
It should be understood that although each step in the flow chart of Fig. 1-3 is successively shown according to the instruction of arrow,These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these stepsExecution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 1-3Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-stepsCompletion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successivelyIt carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternatelyIt executes.
In one embodiment, as shown in figure 4, providing a kind of video process apparatus 400, comprising: acquisition module 410,Computing module 420 records module 430 and stopping modular 440, in which:
Module 410 is obtained, for the first video of acquisition, extracts the audio in first video as the first audio, andExtract audio initial time and the audio finish time of first audio.
Computing module 420, for calculating the audioref of the first audio according to audio initial time and audio finish timeDuration.
Module 430 is recorded, for receiving the record command for recording the second video, using audio initial time as the second videoRecording initial time;It is also used to according to the record command, the second audio is acquired from recording initial time.
First stopping modular 440, for stopping when receiving the recording stop instruction inputted according to audioref durationSecond audio is only acquired, and using the second audio collected as the recording audio in the second video.
Module 430 is recorded in one of the embodiments, comprising:
Since present video acquisition unit for acquiring present video recording initial time, and obtain present video pairThe present video answered obtains duration.
Audio amended record unit, for when present video obtain duration be not up to audioref duration when, according to present videoIt obtains duration and audioref duration calculation audio lacks duration, and acquire the corresponding amended record audio of audio missing duration.
Second audio obtaining unit, for obtaining the second audio according to present video and amended record audio.
Video process apparatus in one of the embodiments, further include:
Second image capture module, for acquiring the second image from recording initial time.
Second stops acquisition module, for stopping acquisition, by the second figure collected when receiving recording stop instructionAs the recording image in the second video.
Second image capture module in one of the embodiments, comprising:
Present image acquisition unit, for since recording initial time acquire present image, and obtain present image withAnd the corresponding present image of present image obtains duration.
Image amended record unit, for being not up to audioref duration when the corresponding present image of present image obtains durationWhen, duration is obtained according to present image and audioref duration calculation image lacks duration, and it is corresponding to acquire image missing durationAmended record image.
Second image acquisition unit, for obtaining the second image according to present image and amended record image.
Video process apparatus in one of the embodiments, comprising:
It records total duration and obtains module, for obtaining the recording total duration of the second audio.
Comparison module obtains comparison result with reference to duration and recording total duration for comparing audio.
Extraction module, the duration of the audio small for time span in extraction comparison result is as standard duration.
The first adjustment module, for adjusting the length for the audio that time span is big in comparison result according to standard duration.
Video process apparatus in one of the embodiments, further includes:
Standard audio obtains module, for obtaining the corresponding audio of standard duration as standard audio.
Enquiry module, for the corresponding image of query criteria audio as standard picture.
Second adjustment module, for adjusting the corresponding image of audio that time span is big in comparison result according to standard pictureLength.
Module 430 is recorded in one of the embodiments, comprising:
Moment range query unit, range at the time of for inquiring corresponding with audio initial time.
Record initial time acquiring unit, for will be in moment range at the time of as record initial time.
Specific about video process apparatus limits the restriction that may refer to above for video process apparatus method,This is repeated no more.Modules in above-mentioned video process apparatus device can be fully or partially through software, hardware and combinations thereofTo realize.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with softPart form is stored in the memory in computer equipment, executes the corresponding behaviour of the above modules in order to which processor callsMake.
In one embodiment, a kind of computer equipment is provided, which can be terminal, internal structureFigure can be as shown in Figure 5.The computer equipment includes processor, the memory, network interface, display connected by system busScreen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The computer equipment is depositedReservoir includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system and computer journeySequence.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculatingThe network interface of machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor withRealize a kind of method for processing video frequency.The display screen of the computer equipment can be liquid crystal display or electric ink display screen,The input unit of the computer equipment can be the touch layer covered on display screen, be also possible to be arranged on computer equipment shellKey, trace ball or Trackpad, can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 5, only part relevant to disclosure scheme is tiedThe block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to disclosure scheme, specific computer equipmentIt may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored withComputer program, which performs the steps of when executing computer program obtains the first video, extracts in the first videoAudio extracts audio initial time and the audio finish time of the first audio as the first audio.According to audio initial timeThe audioref duration of the first audio is calculated with audio finish time.The record command for recording the second video is received, audio is risenBegin recording initial time of the moment as the second video.According to record command, the second audio is acquired from recording initial time.WhenWhen receiving the recording stop instruction inputted according to audioref duration, stop the second audio of acquisition, and by collected theTwo audios are as the recording audio in the second video.
The acquisition second from recording initial time is realized when processor executes computer program in one of the embodiments,Audio, comprising: when acquiring present video since recording initial time, and obtaining the corresponding present video of present video and obtainIt is long.When present video, which obtains duration, is not up to audioref duration, duration and audioref duration are obtained according to present videoIt calculates audio and lacks duration, and acquire the corresponding amended record audio of audio missing duration.It is obtained according to present video and amended record audioSecond audio.
Realize that receiving the recording for recording the second video refers to when processor executes computer program in one of the embodiments,It enables, according to record command using audio initial time as after the recording initial time of the second video: from recording initial timeAcquire the second image.When receiving recording stop instruction, stop acquisition, using the second image collected as in the second videoRecording image.
It is realized when processor executes computer program in one of the embodiments, from recording initial time and acquires the second figurePicture, comprising: acquire present image since recording initial time, and obtain present image and the corresponding current figure of present imageAs obtaining duration.When the corresponding present image acquisition duration of present image is not up to audioref duration, obtained according to present imageIt takes duration and audioref duration calculation image to lack duration, and acquires the corresponding amended record image of image missing duration.According to working asPreceding image and amended record image obtain the second image.
It is also performed the steps of when processor executes computer program in one of the embodiments, and obtains the second audioRecording total duration.Comparing audio obtains comparison result with reference to duration and recording total duration.Time span in extraction comparison resultThe duration of small audio is as standard duration.The length for the audio that time span is big in comparison result is adjusted according to standard duration.
Acquisition standard duration is also performed the steps of when processor executes computer program in one of the embodiments,Corresponding audio is as standard audio.The corresponding image of query criteria audio is as standard picture.Ratio is adjusted according to standard pictureThe length of the audio corresponding image big compared with time span in result.
It is realized when processor executes computer program in one of the embodiments, using audio initial time as the second viewThe recording initial time of frequency, comprising: range at the time of inquiry is corresponding with audio initial time.Make at the time of will be in moment rangeTo record initial time.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculatedMachine program performs the steps of when being executed by processor obtains the first video, extracts the audio in the first video as the first soundFrequently, and extract the first audio audio initial time and audio finish time.According to audio initial time and audio finish timeCalculate the audioref duration of the first audio.The record command for recording the second video is received, using audio initial time as secondThe recording initial time of video.According to record command, the second audio is acquired from recording initial time.When receiving according to audioWhen the recording stop instruction inputted with reference to duration, stop the second audio of acquisition, and using the second audio collected as secondRecording audio in video.
Computer program realizes from recording initial time acquisition the when being executed by processor in one of the embodiments,Two audios, comprising: when acquiring present video since recording initial time, and obtaining the corresponding present video of present video and obtainIt is long.When present video, which obtains duration, is not up to audioref duration, duration and audioref duration are obtained according to present videoIt calculates audio and lacks duration, and acquire the corresponding amended record audio of audio missing duration.It is obtained according to present video and amended record audioSecond audio.
The recording for receiving and recording the second video is realized when computer program is executed by processor in one of the embodiments,Instruction, according to record command using audio initial time as the recording initial time of the second video after: from record initial timePlay the second image of acquisition.When receiving recording stop instruction, stop acquisition, using the second image collected as the second videoIn recording image.
It is realized when computer program is executed by processor in one of the embodiments, from recording initial time acquisition secondImage, comprising: acquire present image since recording initial time, and obtain present image and present image is corresponding currentImage obtains duration.When the corresponding present image acquisition duration of present image is not up to audioref duration, according to present imageIt obtains duration and audioref duration calculation image lacks duration, and acquire the corresponding amended record image of image missing duration.According toPresent image and amended record image obtain the second image.
It is also performed the steps of when computer program is executed by processor in one of the embodiments, and obtains the second soundThe recording total duration of frequency.Comparing audio obtains comparison result with reference to duration and recording total duration.The time is long in extraction comparison resultThe duration of small audio is spent as standard duration.The length for the audio that time span is big in comparison result is adjusted according to standard durationDegree.
When also performing the steps of acquisition standard when computer program is executed by processor in one of the embodiments,Long corresponding audio is as standard audio.The corresponding image of query criteria audio is as standard picture.It is adjusted according to standard pictureThe length of the corresponding image of the big audio of time span in comparison result.
It realizes when computer program is executed by processor in one of the embodiments, using audio initial time as secondThe recording initial time of video, comprising: range at the time of inquiry is corresponding with audio initial time.At the time of will be in moment rangeAs recording initial time.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be withRelevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computerIn read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,To any reference of memory, storage, database or other media used in each embodiment provided by the disclosure,Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may includeRandom access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancingType SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodimentIn each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lanceShield all should be considered as described in this specification.
The several embodiments of the disclosure above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneouslyIt cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the artIt says, under the premise of not departing from disclosure design, various modifications and improvements can be made, these belong to the protection of the disclosureRange.Therefore, the scope of protection shall be subject to the appended claims for disclosure patent.

Claims (10)

CN201811324699.1A2018-11-082018-11-08Video processing method, video processing device, computer equipment and storage mediumActiveCN109348281B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201811324699.1ACN109348281B (en)2018-11-082018-11-08Video processing method, video processing device, computer equipment and storage medium

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201811324699.1ACN109348281B (en)2018-11-082018-11-08Video processing method, video processing device, computer equipment and storage medium

Publications (2)

Publication NumberPublication Date
CN109348281Atrue CN109348281A (en)2019-02-15
CN109348281B CN109348281B (en)2020-02-21

Family

ID=65314345

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201811324699.1AActiveCN109348281B (en)2018-11-082018-11-08Video processing method, video processing device, computer equipment and storage medium

Country Status (1)

CountryLink
CN (1)CN109348281B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109788224A (en)*2019-03-262019-05-21歌尔科技有限公司Video recording method, device, network shooting device and storage medium
CN114025116A (en)*2021-11-252022-02-08北京字节跳动网络技术有限公司Video generation method and device, readable medium and electronic equipment
CN114866687A (en)*2022-03-282022-08-05北京达佳互联信息技术有限公司Same-frame video shooting method and device, electronic equipment and medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100226624A1 (en)*2009-03-042010-09-09Fujitsu LimitedInformation processing apparatus, playback device, recording medium, and information generation method
JP2011248202A (en)*2010-05-282011-12-08Funai Electric Co LtdRecording and playback apparatus
CN102403007A (en)*2011-11-222012-04-04深圳市万兴软件有限公司Method and system for automatically recording songs
CN104392711A (en)*2014-08-272015-03-04贵阳朗玛信息技术股份有限公司Method and device for realizing karaoke function
CN104967900A (en)*2015-05-042015-10-07腾讯科技(深圳)有限公司Video generating method and video generating device
CN105657498A (en)*2016-02-172016-06-08腾讯科技(深圳)有限公司Video recording method and device of mobile terminal
CN105828100A (en)*2016-03-212016-08-03乐视网信息技术(北京)股份有限公司Audio and video files simultaneous playing method, device and system
CN105959773A (en)*2016-04-292016-09-21魔方天空科技(北京)有限公司Multimedia file processing method and device
CN106034214A (en)*2015-03-172016-10-19小米科技有限责任公司Video data recording method and apparatus thereof
CN108024085A (en)*2016-10-312018-05-11联芯科技有限公司The method for recording and equipment of audio and video
CN108235107A (en)*2016-12-152018-06-29广州市动景计算机科技有限公司Video recording method, device and electric terminal
CN108401124A (en)*2018-03-162018-08-14广州酷狗计算机科技有限公司The method and apparatus of video record
CN108769561A (en)*2018-06-222018-11-06广州酷狗计算机科技有限公司video recording method and device

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20100226624A1 (en)*2009-03-042010-09-09Fujitsu LimitedInformation processing apparatus, playback device, recording medium, and information generation method
JP2011248202A (en)*2010-05-282011-12-08Funai Electric Co LtdRecording and playback apparatus
CN102403007A (en)*2011-11-222012-04-04深圳市万兴软件有限公司Method and system for automatically recording songs
CN104392711A (en)*2014-08-272015-03-04贵阳朗玛信息技术股份有限公司Method and device for realizing karaoke function
CN106034214A (en)*2015-03-172016-10-19小米科技有限责任公司Video data recording method and apparatus thereof
CN104967900A (en)*2015-05-042015-10-07腾讯科技(深圳)有限公司Video generating method and video generating device
CN105657498A (en)*2016-02-172016-06-08腾讯科技(深圳)有限公司Video recording method and device of mobile terminal
CN105828100A (en)*2016-03-212016-08-03乐视网信息技术(北京)股份有限公司Audio and video files simultaneous playing method, device and system
CN105959773A (en)*2016-04-292016-09-21魔方天空科技(北京)有限公司Multimedia file processing method and device
CN108024085A (en)*2016-10-312018-05-11联芯科技有限公司The method for recording and equipment of audio and video
CN108235107A (en)*2016-12-152018-06-29广州市动景计算机科技有限公司Video recording method, device and electric terminal
CN108401124A (en)*2018-03-162018-08-14广州酷狗计算机科技有限公司The method and apparatus of video record
CN108769561A (en)*2018-06-222018-11-06广州酷狗计算机科技有限公司video recording method and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109788224A (en)*2019-03-262019-05-21歌尔科技有限公司Video recording method, device, network shooting device and storage medium
US11412172B2 (en)2019-03-262022-08-09Goertek Inc.Video recording method and device, Internet Protocol camera and storage medium
CN114025116A (en)*2021-11-252022-02-08北京字节跳动网络技术有限公司Video generation method and device, readable medium and electronic equipment
CN114025116B (en)*2021-11-252023-08-04北京字节跳动网络技术有限公司Video generation method, device, readable medium and electronic equipment
CN114866687A (en)*2022-03-282022-08-05北京达佳互联信息技术有限公司Same-frame video shooting method and device, electronic equipment and medium

Also Published As

Publication numberPublication date
CN109348281B (en)2020-02-21

Similar Documents

PublicationPublication DateTitle
CN112929745B (en)Video data processing method, device, computer readable storage medium and equipment
US11164604B2 (en)Video editing method and apparatus, computer device and readable storage medium
CN109348281A (en)Method for processing video frequency, device, computer equipment and storage medium
RU2763518C1 (en)Method, device and apparatus for adding special effects in video and data media
CN106982368B (en)Video response speed detection method and system
CN105338259B (en)Method and device for synthesizing video
CN109348155A (en)Video recording method, device, computer equipment and storage medium
CN110366032A (en)Video data handling procedure, device and video broadcasting method, device
CN112188307A (en)Video resource synthesis method and device, storage medium and electronic device
CN110703976A (en)Clipping method, electronic device, and computer-readable storage medium
CN110300322A (en)A kind of method of screen recording, client and terminal device
CN109821235B (en)Game video recording method, device and server
CN105872608A (en)Live broadcast page refreshing method and device
CN114845004B (en)Audio and video synchronization implementation method and acoustic imaging method
CN112199590B (en) A method, device and storage medium for generating theme scenes based on smart home
CN114443447A (en) A web page operation playback method, device, computer equipment and medium
KR102527469B1 (en) Video playback speed control method, apparatus, device and storage medium
CN109413352A (en)Processing method, device, equipment and the storage medium of video data
CN112306892A (en)Page response duration testing method and related equipment
CN112604260B (en)Dance analysis guidance method and device for group dance
CN115098346B (en)Big data-based end-side user scene playback method and system
CN110110103A (en)Acquisition methods, device, computer equipment and the storage medium of media resource
CN117440203A (en)Video synthesis method, device, computer equipment and storage medium
CN110365927A (en)Video recording method, device, storage medium and computer equipment
CN114745591B (en) Method, device, equipment and computer storage medium for judging video climax segment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CP03Change of name, title or address

Address after:2nd Floor, Building 4, No. 18 North Third Ring West Road, Haidian District, Beijing, 2022

Patentee after:Tiktok Technology Co.,Ltd.

Country or region after:China

Address before:Room 2-5-9b, 8th floor, building 2, No. 48, Zhichun Road, Haidian District, Beijing 100089

Patentee before:BEIJING MICROLIVE VISION TECHNOLOGY Co.,Ltd.

Country or region before:China

CP03Change of name, title or address

[8]ページ先頭

©2009-2025 Movatter.jp