CN116389665A - Video recording method and device, electronic equipment and readable storage medium - Google Patents

Video recording method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN116389665A
CN116389665A CN202310315987.5A CN202310315987A CN116389665A CN 116389665 A CN116389665 A CN 116389665A CN 202310315987 A CN202310315987 A CN 202310315987A CN 116389665 A CN116389665 A CN 116389665A
Authority
CN
China
Prior art keywords
recording
video
target
camera
different
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
CN202310315987.5A
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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202310315987.5A priority Critical patent/CN116389665A/en
Publication of CN116389665A publication Critical patent/CN116389665A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

The application discloses a video recording method and device, electronic equipment and a readable storage medium, and belongs to the technical field of electronic equipment. The video recording method comprises the following steps: identifying at least one recording object in the recording picture; determining a target camera for recording video according to at least one of the following: the corresponding relation between the at least one recording object and the camera and the distance between the at least one recording object and the electronic equipment; the target cameras are at least two of the cameras, and recording frame rates of different target cameras are different; and generating target videos with different recording frame rates according to the videos recorded by the target cameras.

Description

Video recording method and device, electronic equipment and readable storage medium
Technical Field
The application belongs to the technical field of electronic equipment, and particularly relates to a video recording method and device, electronic equipment and a readable storage medium.
Background
With the development of electronic equipment technology, more and more users record videos through electronic equipment, such as mobile phones, tablet computers and the like, and are used for life recording or video creation.
In the prior art, in the whole video recording process, video recording can only be carried out at a single recording frame rate, and if videos with different recording frame rates are obtained, the video post-processing is also needed to be carried out manually, so that the operation is complicated.
Disclosure of Invention
An object of the embodiments of the present application is to provide a video recording method and apparatus, an electronic device, and a readable storage medium, which can solve the problem of complicated operation when obtaining videos with different recording frame rates in the prior art.
In a first aspect, an embodiment of the present application provides a video recording method, which is applied to an electronic device including a plurality of cameras, where the method includes:
identifying at least one recording object in the recording picture;
determining a target camera for recording video according to at least one of the following: the corresponding relation between the at least one recording object and the camera and the distance between the at least one recording object and the electronic equipment; the target cameras are at least two of the cameras, and recording frame rates of different target cameras are different;
and generating target videos with different recording frame rates according to the videos recorded by the target cameras.
In a second aspect, an embodiment of the present application provides a video recording apparatus applied to an electronic device including a plurality of cameras, where the apparatus includes:
the identification module is used for identifying at least one target recording object in the recording picture;
the determining module is used for determining a target camera for recording video according to at least one of the following: the corresponding relation between the at least one recording object and the camera and the distance between the at least one recording object and the electronic equipment; the target cameras are at least two of the cameras, and recording frame rates of different target cameras are different;
and the video generation module is used for generating target videos with different recording frame rates according to the videos recorded by the target cameras.
In a third aspect, embodiments of the present application provide an electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps in the video recording method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium having stored thereon a program or instructions which, when executed by a processor, implement the steps in the video recording method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the video recording method according to the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product stored in a storage medium, the program product being executable by at least one frame processor to implement the video recording method according to the first aspect.
In the embodiment of the application, in the video recording process, video recording is performed by cameras with different recording frame rates so as to obtain a plurality of videos with different recording frame rates, and then a target video with different recording frame rates is generated based on the videos, so that manual video post-processing operation can be omitted, and the convenience of video processing is improved.
Drawings
Fig. 1 is a flowchart of a video recording method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a video recording interface according to an embodiment of the present disclosure;
FIG. 3 is a second schematic diagram of a video recording interface according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a video recording scene provided in an embodiment of the present application;
FIG. 5 is a third schematic diagram of a video recording interface according to an embodiment of the present disclosure;
FIG. 6 is a diagram illustrating a video recording interface according to an embodiment of the present disclosure;
fig. 7 is a schematic block diagram of a video recording apparatus provided in an embodiment of the present application;
FIG. 8 is a schematic block diagram of an electronic device provided by an embodiment of the present application;
fig. 9 is a schematic hardware structure of an electronic device provided in an embodiment of the present application.
Detailed Description
Technical solutions in the embodiments of the present application will be clearly described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
The terms first, second and the like in the description and in the claims, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or otherwise described herein, and that the objects identified by "first," "second," etc. are generally of a type and do not limit the number of objects, for example, the first object may be one or more. Furthermore, in the description and claims, "and/or" means at least one of the connected objects, and the character "/", generally means that the associated object is an "or" relationship.
The video recording method provided by the embodiment of the application is described in detail below by means of specific embodiments and application scenes thereof with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a video recording method provided in an embodiment of the present application, where the video recording method is performed by an electronic device, and the electronic device includes a plurality of cameras, i.e., at least two cameras. The plurality of cameras may be disposed on the same side of the electronic device. The electronic equipment supports multi-camera video recording, namely, in a video recording process, a plurality of cameras participate in the recording process.
As shown in fig. 1, the video recording method may include:
step 101: at least one recording object in the recording picture is identified.
In the video recording process, the electronic equipment can perform image recognition in real time or at regular time to determine a recording object in a recording picture.
The recording object may be preset, may be set before the video recording starts, or may be set after the video recording starts, for example, before the video recording starts, the person a in the preview picture is set as the recording object, or after the video recording starts, the person a in the recording picture is set as the recording object. Alternatively, the recording object may be set by the user, for example, the user manually selects the recording object; or may be set by default by the system, for example, the system automatically determines a person appearing in the screen as a target recording object.
Step 102: determining a target camera for recording video according to at least one of the following: the corresponding relation between at least one recording object and the camera and the distance between at least one recording object and the electronic equipment.
The target cameras are at least two of a plurality of cameras on the electronic equipment, and recording frame rates of different target cameras are different. For example, the target camera includes a camera a that performs video recording at a recording frame rate of 30fps and a camera B that performs video recording at a recording frame rate of 60 fps.
In the embodiment of the application, in the video recording process, the target camera for recording the video may be determined based on the correspondence between the recording object and the camera or the distance between the recording object and the electronic device.
The corresponding relation between the at least one recording object and the camera may be established after the recording object is set, and may be manually established by a user or may be automatically established. For example, before video recording starts, the user selects the recording object through the preview screen, then selects the camera corresponding to the recording object, and can establish the correspondence between different recording objects and different cameras. Of course, in some embodiments, the corresponding relationship between the same recording object and the plurality of cameras may be established by default, so as to realize automatic establishment of the corresponding relationship.
Step 103: and generating target videos with different recording frame rates according to the videos recorded by the target cameras.
The target video is automatically generated by the electronic equipment according to the video recorded by the target camera.
In the embodiment of the application, a plurality of cameras participate in video recording, and the recording frame rates of different cameras are different, so that a plurality of videos with different recording frame rates can be obtained, then a target video is generated based on the plurality of videos, so that the finally obtained target video is not a single video with different recording frame rates but a video with different recording frame rates, thus the manual post-processing operation of the video for obtaining the video with different recording frame rates by a user can be omitted, and the convenience of video processing is improved.
As an alternative embodiment, the multi-shot mode may be selected after turning on the camera application to enter the record mode. In the multi-shot mode, the image preview interface may display a usable camera, as shown in fig. 2, where the usable camera in the multi-shot mode includes: wide angle camera 201, main camera 202, and tele camera 203. Multiple recording frame rate options may also be displayed in the image preview interface, such as slow recording frame rate option 204, normal recording frame rate option 205, and fast recording frame rate option 206 in fig. 2. The user can set different recording frame rates for different cameras, for example, firstly select the wide-angle camera 201, then select the slow recording frame rate option 204, and then complete the setting of the video frame rate of the wide-angle camera 201; for another example, the main camera 202 is selected first, and then the normal recording frame rate option 205 is selected, so that setting of the recording frame rate of the main camera 202 is completed; for another example, the setting of the video frame rate of the tele camera 203 is completed by selecting the tele camera 203 and then selecting the fast recording frame rate option 206. It will be appreciated that the recording frame rate of each camera may be set according to actual requirements, not only as described in the above examples. In addition, each recording frame rate option may correspond to a recording frame rate value or a recording frame rate range. For the latter, different recording frame rate options may correspond to different recording frame rate ranges, and after selecting the corresponding recording frame rate option, a recording frame rate setting control may be displayed so that the user may set a specific recording frame rate.
As an alternative embodiment, in step 101: before identifying at least one recording object in the recording picture, the video recording method may further include:
receiving a first input to a preview screen; in response to the first input, the picture body selected by the first input is determined as the target recording object.
Wherein the number of target recording objects is one.
In this embodiment of the present application, before video recording starts, a recording object may be selected based on the preview image, and the recording object is determined to be the target recording object of all the target cameras, that is, the recording object of each target camera is the same.
For example, as shown in fig. 3, the person a in the preview screen is input by long press, or the person a is circled by a regular closed track or an irregular closed track, so that the person a is determined as the target recording object of all the target cameras, and the target recording objects of all the target cameras are the person a. After the target recording object is selected, an object focus tracking function can be started so as to carry out focus tracking processing on the target recording object. After the focus tracking function is turned off, the target recording object may be re-selected, for example, as shown in fig. 4, after clicking the "cancel focus tracking" control 207, the target recording object may be re-selected.
Optionally, step 102: determining a target camera for recording video according to at least one of the following: the correspondence between the at least one target recording object and the camera, and the distance between the at least one target recording object and the electronic device may include:
acquiring the distance between a target recording object and electronic equipment; from this distance, a target camera for recording video is determined.
Under different distances, the target cameras for recording videos are different.
In the embodiment of the application, under the condition that the target recording objects of each target camera are the same, the target recording objects can be tracked based on an object focus tracking algorithm, the distance between the target recording objects and the electronic equipment is obtained, and the target camera for recording the video is determined based on the distance. For example, the target camera includes: the target recording object is a person A. As shown in fig. 4, in the case that the distance between the person a and the video recording device is greater than the first preset value, that is, in the case that the distance between the person a and the video recording device is far, the long-focus camera is adopted to record the video, so as to obtain a clearer image of the person a; when the distance between the person A and the video recording device is larger than a second preset value and smaller than a first preset value, namely, when the distance between the person A and the video recording device is moderate, the main camera is adopted to record normal video; and under the condition that the distance between the person A and the video recording equipment is smaller than a second preset value, namely, the distance between the person A and the video recording equipment is smaller, the video recording is carried out by adopting the wide-angle camera, so that the image acquisition range is enlarged, and a more complete person A image is obtained. The first preset value is larger than the second preset value, and specific numerical values of the two preset values can be set according to actual requirements.
In this embodiment, the recording time of each target camera is different and not recorded together. For example, the first two minutes are recorded by the tele camera, then three minutes are recorded by the main camera, and then one minute is recorded by the wide-angle camera, so all the target cameras are not recorded at the same time.
Optionally, step 103: according to the video recorded by the target camera, the generation of the target video with different recording frame rates can comprise the following steps:
and according to the recording time sequence, splicing the videos recorded by all the target cameras to generate target videos with different recording frame rates in different time periods.
In the embodiment of the application, under the condition that the target camera for recording the video is determined according to the distance between the target recording object and the electronic equipment, the videos recorded by different target cameras can be spliced according to the time sequence, so that the target videos with different recording frame rates in different time periods are obtained, the manual video editing processing operation is omitted, the creation and flexibility of video recording are improved, and the user experience is improved.
For example, the target camera includes: the method comprises the steps of in the video recording process, enabling a person A serving as a target recording object to be far away from video recording equipment, adopting a long-focus camera, and recording a video by using a recording frame rate corresponding to the long-focus camera to obtain a video a; after 2 minutes, the distance between the person A and the video recording equipment is moderate, a main camera is adopted, and video recording is carried out by using the recording frame rate corresponding to the main camera, so that a video b is obtained; then, the distance between the person A and the video recording equipment is shorter for 2 minutes, a wide-angle camera is adopted, video recording is carried out by using the recording frame rate corresponding to the wide-angle camera, so as to obtain a video c, and then a recording end instruction is received, and the video recording equipment automatically carries out splicing processing on three videos according to the recording time sequence, namely the sequence of the video a, the video b and the video c, so as to obtain a target video.
As an alternative embodiment, step 102: determining a target camera for recording video according to at least one of the following: the correspondence between the at least one target recording object and the camera, and the distance between the at least one target recording object and the electronic device may include:
receiving a second input of a user to the recorded picture; and responding to the second input, establishing a corresponding relation between the first recording object and the first camera, and establishing a corresponding relation between the second recording object and the second camera.
The first recording object is a target recording object of the first camera, and the second recording object is a target recording object of the second camera; the first recording object is different from the second recording object, and the first camera and the second camera are respectively one of the target cameras.
In this embodiment of the present application, after video recording starts, target recording objects corresponding to different target cameras may be set. Specifically, a target camera may be selected first, then a recording object may be selected, and then the selected recording object is used as a target recording object corresponding to the selected target camera.
Alternatively, the first recording object may be a picture body in the recording picture, and the second recording object may be a background of the recording picture. In this case, the first camera and the target recording object corresponding to the first camera may be selected by the user, and the background is taken as the target recording object of the default camera (i.e. the second camera) by default, where the default camera may be the main camera. For example, as shown in fig. 5, the target camera includes a main camera 202 and a tele camera 203, and the user can select the tele camera 203 by clicking input and then select the person B by pressing input for a long time, the video recording apparatus sets the person B as the target recording object corresponding to the tele camera 203, and sets the background as the target recording object corresponding to the main camera 202 by default. It should be noted that, when the number of the picture bodies is M (M is greater than or equal to 2) and the number of the target cameras is N (N is greater than or equal to 3 and N is greater than M), different picture bodies may be set as target recording objects for N-1 target cameras, respectively, and for the remaining one target camera, the background is set as the target recording object of the target camera by default. For example, as shown in fig. 5, the screen main body includes a person B and a kitten 208, and the target camera includes: the tele camera, the main camera and the wide camera can set the character B as a target recording object of the tele camera, the kitten 208 as a target recording object of the wide camera and the background as a target recording object of the main camera.
Alternatively, the first recording object and the second recording object may be different picture bodies in the recording picture, respectively, in which case the user may select the first camera and the target recording object corresponding to the first camera, and select the second camera and the target recording object corresponding to the second camera, and default the background (may also be referred to as a third recording object) as the target recording object of the default camera (may also be referred to as a third camera), where the default camera may be the main camera. It can be appreciated that the correspondence between the background and the third camera may also be manually established by the user, for example, by selecting the third camera and the background, so as to establish the correspondence therebetween.
Optionally, the correspondence between the first recording object and the first camera and the correspondence between the second recording object and the second camera may also be established before the video recording starts, so in step 101: before identifying at least one recording object in the recording picture, the video recording method may further include:
receiving a second input of a user to the preview screen; and responding to the second input, establishing the correspondence between the first recording object and the first camera, and establishing the correspondence between the second recording object and the second camera.
Optionally, step 103: according to the video recorded by the target camera, the generation of the target video with different recording frame rates can comprise the following steps:
step A1: and acquiring a first image of the target recording object corresponding to the first camera from the video recorded by the first camera.
Step A2: and acquiring a second image of the target recording object corresponding to the second camera in the video recorded by the second camera.
Step A3: and synthesizing the first image and the second image to generate target videos with different recording frame rates of different recording objects.
In the embodiment of the application, after the target recording object is set for the first camera and the second camera, in the video recording process, the first camera and the second camera simultaneously record the video until the recording is finished, and two videos with the same recording duration are obtained. Then, for the video recorded by the first camera, the electronic equipment acquires a first image of a target recording object corresponding to the first camera from the video; for the video recorded by the second camera, the electronic equipment acquires a second image of a target recording object corresponding to the second camera from the video; and finally, the electronic equipment synthesizes the first image and the background image to generate a target video. Because the recording frame rates of the first camera and the second camera are different, the synthesized target video is also the video with different recording frame rates.
When one of the recording objects is a picture main body, the main body image can be made to present a special playing effect when the target video is played, for example, the main body image can present a slow motion effect when the recording frame rate of the main body image is greater than the playing frame rate, and the main body image can present a fast motion effect when the recording frame rate of the main body image is less than the playing frame rate. When the main body images are multiple and recorded at different recording frame rates, different playing effects of the different main body images can be displayed on the same picture, as shown in fig. 5, assuming that the recording frame rate of the character B is smaller than the playing frame rate and the recording frame rate of the kitten 208 is larger than the playing frame rate, the playing effect is that the character B waves the double fists fast and the kitten 208 jumps slowly upwards. Through the recording mode and the video processing mode, the record authoring property and flexibility can be improved, and the user experience is improved.
Optionally, in the embodiment of the present application, when the first image is a main image and the second image is a background image, a position of the main image in the background image may be recorded, and during the synthesis processing, a corresponding relationship between the first image and the second image is established according to the position of the main image in the background image, and the first image and the second image are stored as one video, so as to obtain target videos with different recording frame rates of different recording objects. When the video playing processing is performed, the main body image and the background image can be played respectively according to the same playing frame rate, and the positions of the main body image in the background image are controlled based on the corresponding relation between the main body image and the background image, so that different recorded objects can be played with different playing effects.
Alternatively, in the embodiment of the present application, the recording frame rate may include a fixed recording frame rate and a gradual recording frame rate.
The fixed recording frame rate corresponds to a recording frame rate, and the recorded video comprises the recording frame rate. For example, as shown in fig. 6, after the user selects the slow recording frame rate, the user displays a recording frame rate setting control 209 corresponding to the slow recording frame rate, and the user can set a specific recording frame rate, for example, a recording frame rate of 0.5 times, according to his own needs. After video recording starts, video recording is performed at a recording frame rate of 0.5 times.
The gradual change recording frame rate corresponds to a recording frame rate range, and the recorded target video comprises a plurality of recording frame rates.
The following further explains the gradual change recording frame rate by taking the first camera as an example.
In the case that the recording frame rate of the first camera is the gradual recording frame rate, in step 103: before generating the target video including different recording frame rates according to the video recorded by the target camera, the video recording method may further include:
and recording the video through the first camera according to the maximum value of the recording frame rate range corresponding to the gradual change recording frame rate, so as to obtain a first video.
For example, as shown in fig. 6, the user selects the tele camera 203 first, then selects the slow recording frame rate option 204, then displays the recording frame rate setting control 209 and the gradual recording frame rate control 210 corresponding to the slow recording frame rate option 204, then triggers the gradual recording frame rate control 210, and after video recording starts, the tele camera 203 performs video recording according to the maximum value of the slow recording frame rate value range, for example, 1.0 times of the recording frame rate.
Optionally, the recording frame rate range corresponding to the gradual recording frame rate in the embodiment of the present application may be a default system, for example, after the user triggers the gradual recording frame rate control 210, video recording is performed according to the default recording frame rate range; or may be manually set by a user, for example, after the user triggers the gradual change recording frame rate control 210, a recording frame rate range setting control is displayed, where the control may be a numerical range adjusting axis, and the user may set a minimum recording frame rate and a maximum recording frame rate required by the user, and then record video according to a recording frame rate range formed by the minimum recording frame rate and the maximum recording frame rate.
Correspondingly, step A1: in the video recorded by the first camera, obtaining a first image of a target recording object corresponding to the first camera may include:
Step A11: and dividing the video segments of the first video according to the duration of the first video.
Step A12: and determining the recording frame rate corresponding to each video clip according to the video clip dividing result and the gradual change recording frame rate.
Step A13: and performing frame extraction processing on the first video according to the recording frame rate corresponding to each video segment to obtain a second video.
Step A14: and in the second video, acquiring a first image of the target recording object corresponding to the first camera.
In the embodiment of the present application, the first camera records a video at a maximum value of a recording frame rate range corresponding to a gradual change recording frame rate, and obtains a first video after the recording is completed, and then the electronic device may automatically perform frame extraction processing on the first video, so that the first video becomes a second video with gradual change of the recording frame rate.
Specifically, the video segment division may be performed according to a duration of the first video, for example, the number of video segments corresponding to the first video may be determined according to a correspondence between a preset video duration and the number of video segments to be divided, and then the video segment division may be performed according to the determined number of video segments to be divided. And then, dividing the value interval of the same number for the recording frame rate range corresponding to the gradual change recording frame rate according to the number of the video clips. And then, taking a numerical value in each value interval, for example, taking an intermediate value as the recording frame rate of the corresponding video clip. And finally, performing frame extraction processing on the first video according to the recording frame rate corresponding to each video segment, thereby obtaining a second video.
For example, a first video is divided into n video segments, x 1 、x 2 、…、x n . The recording frame rate range corresponding to the gradual change recording frame rate is divided into n value intervals which are respectively y according to the sequence from small to large 1 、y 2 、…y n . Assume that each value is takenTaking the intermediate value of the interval as the recording frame rate of the corresponding video clip, and taking y 1 Intermediate value w of (2) 1 Taking y 2 Intermediate value w of (2) 2 … …, take y n Intermediate value w of (2) n And w is 1 Then it is video clip x 1 Corresponding recording frame rate, w 2 Then it is video clip x 2 Corresponding recording frame rate, … …, w n Then it is video clip x n The corresponding recording frame rate, at this time, the gradual change of the recording frame rate is from low to high. Optionally, the user may also set the gradual change of the recording frame rate from high to low, then w n For video segment x 1 Corresponding recording frame rate, w n-1 Then it is video clip x 2 Corresponding recording frame rate, … …, w 1 Then it is video clip x n Corresponding recording frame rate.
In this embodiment, for video with gradual change of recording frame rate, when playing video, the main body image may be made to show special playing effect, as shown in fig. 5, assuming that the gradual change recording frame rate of character B is from high to low and the gradual change recording frame rate of kitten 298 is from low to high, the playing effect is that the punch speed of character B is faster and faster, and the upward jump of kitten 208 is slower. Through the recording mode and the video processing mode, the record authoring property and flexibility can be improved, and the user experience is improved.
The foregoing is a description of a video recording method provided in the embodiments of the present application.
In summary, in the embodiment of the present application, in the video recording process, video recording is performed by the cameras with different recording frame rates, so as to obtain multiple videos with different recording frame rates, and then a target video is generated based on the multiple videos, so that the finally obtained target video is not a video with a single recording frame rate but a video with a different recording frame rate, thus, the manual post-processing operation of the video for obtaining the video with different recording frame rates by the user can be omitted, and the convenience of video processing is improved.
According to the video recording method provided by the embodiment of the application, the execution subject can be a video recording device. In the embodiment of the present application, a video recording device performs a video recording method as an example, and the video recording device provided in the embodiment of the present application is described.
Fig. 7 is a schematic block diagram of a video recording apparatus according to an embodiment of the present application, where the video recording apparatus includes a plurality of cameras, and the plurality of cameras may be disposed on the same side of an electronic device. The electronic equipment supports multi-camera video recording, namely, in a video recording process, a plurality of cameras participate in the recording process.
As shown in fig. 7, the video recording apparatus may include:
an identifying module 701, configured to identify at least one recording object in the recording picture;
a first determining module 702, configured to determine a target camera for recording video according to at least one of: the corresponding relation between the at least one recording object and the camera and the distance between the at least one recording object and the electronic equipment.
The target cameras are at least two of the cameras, and recording frame rates of different target cameras are different.
The video generating module 703 is configured to generate target videos with different recording frame rates according to the videos recorded by the target camera.
Optionally, the apparatus may further include:
the first receiving module is used for receiving a first input of the preview picture.
And the second determining module is used for responding to the first input and determining the picture main body selected by the first input as a target recording object.
Wherein the number of the target recording objects is one.
The first determining module 702 may include:
and the first acquisition unit is used for acquiring the distance between the target recording object and the electronic equipment.
And the determining unit is used for determining the target camera for recording the video according to the distance.
Under different distances, the target cameras for recording videos are different.
Optionally, the video generating module 703 may include:
the first video generation unit is used for performing splicing processing on videos recorded by all the target cameras according to the recording time sequence to generate the target videos with different recording frame rates in different time periods.
Optionally, the first determining module 702 may include:
the receiving unit is used for receiving a second input of a user to the recorded picture;
and the corresponding relation establishing unit is used for responding to the second input, establishing the corresponding relation between the first recording object and the first camera and establishing the corresponding relation between the second recording object and the second camera.
The first recording object is a target recording object of the first camera, and the second recording object is a target recording object of the second camera; the first recording object is different from the second recording object, and the first camera and the second camera are respectively one of the target cameras.
Optionally, the video generating module 703 may include:
the second acquisition unit is used for acquiring a first image of the target recording object corresponding to the first camera from the video recorded by the first camera.
And the third acquisition unit is used for acquiring a second image of the target recording object corresponding to the second camera in the video recorded by the second camera.
And the second video generation unit is used for synthesizing the first image and the second image to generate the target videos with different recording frame rates of different recording objects.
Optionally, the recording frame rate includes a gradual recording frame rate, the gradual recording frame rate corresponding to a recording frame rate range.
The apparatus may further include:
and the video recording module is used for recording the video through the first camera according to the maximum value of the recording frame rate range corresponding to the gradual change recording frame rate to obtain a first video.
The second acquisition unit may include:
and the dividing subunit is used for dividing the video segments of the first video according to the duration of the first video.
And the determining subunit is used for determining the recording frame rate corresponding to each video clip according to the video clip dividing result and the gradual change recording frame rate.
And the frame extraction processing subunit is used for carrying out frame extraction processing on the first video according to the recording frame rate corresponding to each video fragment to obtain a second video.
And the acquisition subunit is used for acquiring the first image of the target recording object corresponding to the first camera in the second video.
In summary, in the embodiment of the present application, in the video recording process, video recording is performed by the cameras with different recording frame rates, so as to obtain multiple videos with different recording frame rates, and then a target video is generated based on the multiple videos, so that the finally obtained target video is not a single video with different recording frame rates, but is a video with different recording frame rates, thus, the manual post-processing operation of the video for obtaining the video with different recording frame rates by the user can be omitted, and the convenience of video processing is improved.
The video recording apparatus in the embodiment of the present application may be an electronic device, or may be a component in an electronic device, for example, an integrated circuit or a chip. The electronic device may be a terminal, or may be other devices than a terminal. By way of example, the electronic device may be a mobile phone, tablet computer, notebook computer, palm computer, vehicle-mounted electronic device, mobile internet appliance (Mobile Internet Device, MID), augmented reality (augmented reality, AR)/Virtual Reality (VR) device, robot, wearable device, ultra-mobile personal computer, UMPC, netbook or personal digital assistant (personal digital assistant, PDA), etc., but may also be a server, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (TV), teller machine or self-service machine, etc., and the embodiments of the present application are not limited in particular.
The video recording apparatus in the embodiment of the present application may be an apparatus having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
The video recording apparatus provided in this embodiment of the present application can implement each process implemented by the embodiment of the video recording method shown in fig. 1, so as to achieve the same effect, and in order to avoid repetition, no further description is given here.
Optionally, as shown in fig. 8, an embodiment of the present application further provides an electronic device 800, including: the processor 801 and the memory 802, the memory 802 stores a program or an instruction that can be executed by the processor 801, where the program or the instruction implements each step of the video recording method embodiment described above when executed by the processor 801, and the same technical effects can be achieved, and for avoiding repetition, a detailed description is omitted herein.
It should be noted that, the electronic device 800 in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device.
Fig. 9 is a schematic hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 900 includes, but is not limited to: radio frequency unit 901, network module 902, audio output unit 903, input unit 904, sensor 905, display unit 906, user input unit 907, interface unit 908, memory 909, and processor 910. The electronic device may further include a plurality of cameras disposed on the same side.
Those skilled in the art will appreciate that the electronic device 900 may also include a power source (e.g., a battery) for powering the various components, which may be logically connected to the processor 910 by a power management system to perform functions such as managing charge, discharge, and power consumption by the power management system. The electronic device structure shown in fig. 9 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than shown, or may combine certain components, or may be arranged in different components, which are not described in detail herein.
Wherein the processor 910 may be configured to: identifying at least one recording object in the recording picture; and determining a target camera for recording video according to at least one of the following: the corresponding relation between the at least one recording object and the camera and the distance between the at least one recording object and the electronic equipment; the target cameras are at least two of the cameras, and recording frame rates of different target cameras are different; and generating target videos with different recording frame rates according to the videos recorded by the target cameras.
Alternatively, the user input unit 907 may be used to: receiving a first input to a preview screen; the processor 910 may also be configured to: and in response to the first input, determining the picture main body selected through the first input as a target recording object, wherein the number of the target recording objects is one.
Optionally, the processor 910 may also be configured to: acquiring the distance between the target recording object and the electronic equipment; determining a target camera for recording video according to the distance; under different distances, the target cameras for recording videos are different.
Optionally, the processor 910 may also be configured to: and according to the recording time sequence, performing splicing processing on all videos recorded by the target cameras to generate the target videos with different recording frame rates in different time periods.
Alternatively, the user input unit 907 may be used to: receiving a second input of a user to the recorded picture; receiving a second input from the user; the processor 910 may also be configured to: responding to the second input, establishing a corresponding relation between the first recording object and the first camera, and establishing a corresponding relation between the second recording object and the second camera; the first recording object is a target recording object of the first camera, and the second recording object is a target recording object of the second camera; the first recording object is different from the second recording object, and the first camera and the second camera are respectively one of the target cameras.
Optionally, the processor 910 may also be configured to: acquiring a first image of a target recording object corresponding to the first camera from the video recorded by the first camera; acquiring a second image of a target recording object corresponding to the second camera from the video recorded by the second camera; and synthesizing the first image and the second image to generate the target video with different recording frame rates of different recording objects.
Optionally, the processor 910 may also be configured to: under the condition that the recording frame rate of the first camera is the gradual change recording frame rate, video recording is carried out through the first camera according to the maximum value of the recording frame rate range corresponding to the gradual change recording frame rate, so that a first video is obtained; dividing video segments of the first video according to the duration of the first video; determining the recording frame rate corresponding to each video clip according to the video clip dividing result and the gradual change recording frame rate; performing frame extraction processing on the first video according to the recording frame rate corresponding to each video segment to obtain a second video; and acquiring the first image of the target recording object corresponding to the first camera in the second video.
In the embodiment of the invention, in the video recording process, the cameras with different recording frame rates are used for recording the video to obtain a plurality of videos with different recording frame rates, and then a target video is generated based on the videos, so that the finally obtained target video is not a single video with different recording frame rates but is a video with different recording frame rates, thus the manual post-processing operation of the video for obtaining the video with different recording frame rates by a user can be omitted, and the convenience of video processing is improved.
It should be understood that in the embodiment of the present application, the input unit 904 may include a graphics processor (Graphics Processing Unit, GPU) 9041 and a microphone 9042, and the graphics processor 9041 processes image data of still pictures or video obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 906 may include a display panel 9061, and the display panel 9061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 907 includes at least one of a touch panel 9071 and other input devices 9072. Touch panel 9071, also referred to as a touch screen. The touch panel 9071 may include two parts, a touch detection device and a touch controller. Other input devices 9072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and so forth, which are not described in detail herein.
The memory 909 may be used to store software programs as well as various data. The memory 909 may mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area may store an operating system, application programs or instructions (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory 909 may include a volatile memory or a nonvolatile memory, or the memory 909 may include both volatile and nonvolatile memories. The nonvolatile memory may be a ROM, a Programmable ROM (PROM), an Erasable Programmable EPROM (EPROM), an Electrically Erasable EPROM (EEPROM), or a flash memory. The volatile memory may be RAM, static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (ddr SDRAM), enhanced SDRAM (ESDRAM), synchronous DRAM (Synchronous link DRAM) and Direct memory bus RAM (DRAM). Memory 909 in embodiments of the present application includes, but is not limited to, these and any other suitable types of memory.
Processor 910 may include one or more processing units; optionally, the processor 910 integrates an application processor that primarily processes operations involving an operating system, user interface, application programs, etc., and a modem processor that primarily processes wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor 910.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction realizes each process of the embodiment of the video recording method, and the same technical effects can be achieved, so that repetition is avoided, and no description is repeated here.
Wherein the processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage medium such as computer readable memory ROM, random access memory RAM, magnetic or optical disk, etc.
The embodiment of the application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled with the processor, and the processor is used for running a program or an instruction, so that each process of the video recording method embodiment can be implemented, the same technical effect can be achieved, and in order to avoid repetition, the description is omitted here.
The embodiments of the present application provide a computer program product stored in a storage medium, where the program product is executed by at least one processor to implement the respective processes of the embodiments of the video recording method, and achieve the same technical effects, and are not repeated herein.
It should be understood that the chips referred to in the embodiments of the present application may also be referred to as system-on-chip chips, chip systems, or system-on-chip chips, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Furthermore, it should be noted that the scope of the methods and apparatus in the embodiments of the present application is not limited to performing the functions in the order shown or discussed, but may also include performing the functions in a substantially simultaneous manner or in an opposite order depending on the functions involved, e.g., the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a computer software product stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk) and including several instructions for causing a terminal (which may be a mobile phone, a computer, a server or a network device, etc.) to perform the methods described in the embodiments of the present application.
The embodiments of the present application have been described above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those of ordinary skill in the art without departing from the spirit of the present application and the scope of the claims, which are also within the protection of the present application.

Claims (10)

1. A video recording method, applied to an electronic device including a plurality of cameras, the method comprising:
identifying at least one recording object in the recording picture;
determining a target camera for recording video according to at least one of the following: the corresponding relation between the at least one recording object and the camera and the distance between the at least one recording object and the electronic equipment; the target cameras are at least two of the cameras, and recording frame rates of different target cameras are different;
and generating target videos with different recording frame rates according to the videos recorded by the target cameras.
2. The video recording method of claim 1, wherein prior to said identifying at least one recording object in a recording, the method further comprises:
receiving a first input to a preview screen;
determining a picture body selected through the first input as a target recording object in response to the first input; the number of the target recording objects is one;
the method comprises the steps of determining a target camera for recording video according to at least one of the following steps: the correspondence between the at least one target recording object and the camera, and the distance between the at least one target recording object and the electronic device, include:
Acquiring the distance between the target recording object and the electronic equipment;
determining the target camera for recording video according to the distance; under different distances, the target cameras for recording videos are different.
3. The video recording method according to claim 2, wherein the generating the target video with different recording frame rates according to the video recorded by the target camera includes:
and according to the recording time sequence, performing splicing processing on all videos recorded by the target cameras to generate the target videos with different recording frame rates in different time periods.
4. The video recording method of claim 1, wherein the determining the target camera for recording video is based on at least one of: the correspondence between the at least one target recording object and the camera, and the distance between the at least one target recording object and the electronic device, include:
receiving a second input of a user to the recorded picture;
responding to the second input, establishing a corresponding relation between the first recording object and the first camera, and establishing a corresponding relation between the second recording object and the second camera; the first recording object is a target recording object of the first camera, and the second recording object is a target recording object of the second camera; the first recording object is different from the second recording object, and the first camera and the second camera are respectively one of the target cameras.
5. The video recording method according to claim 4, wherein the generating the target video with different recording frame rates according to the video recorded by the target camera includes:
acquiring a first image of a target recording object corresponding to the first camera from the video recorded by the first camera;
acquiring a second image of a target recording object corresponding to the second camera from the video recorded by the second camera;
and synthesizing the first image and the second image to generate the target video with different recording frame rates of different recording objects.
6. The video recording method according to claim 5, wherein the recording frame rate includes a gradual recording frame rate, the gradual recording frame rate corresponding to a recording frame rate range;
in the case that the recording frame rate of the first camera is a gradual recording frame rate, before the step of generating the target video with different recording frame rates according to the video recorded by the target camera, the method further includes:
according to the maximum value of the recording frame rate range corresponding to the gradual change recording frame rate, video recording is carried out through the first camera to obtain a first video;
The obtaining, in the video recorded by the first camera, a first image of a target recording object corresponding to the first camera includes:
dividing video segments of the first video according to the duration of the first video;
determining the recording frame rate corresponding to each video clip according to the video clip dividing result and the gradual change recording frame rate;
performing frame extraction processing on the first video according to the recording frame rate corresponding to each video segment to obtain a second video;
and acquiring the first image of the target recording object corresponding to the first camera in the second video.
7. A video recording apparatus for use with an electronic device including a plurality of cameras, the apparatus comprising:
the identification module is used for identifying at least one recording object in the recording picture;
the first determining module is used for determining a target camera for recording video according to at least one of the following: the corresponding relation between the at least one recording object and the camera and the distance between the at least one recording object and the electronic equipment; the target cameras are at least two of the cameras, and recording frame rates of different target cameras are different;
And the video generation module is used for generating target videos with different recording frame rates according to the videos recorded by the target cameras.
8. The video recording device of claim 7, wherein the device further comprises:
a first receiving module for receiving a first input to the preview screen;
a second determining module, configured to determine, in response to the first input, a picture body selected by the first input as a target recording object; the number of the target recording objects is one;
the first determining module includes:
the first acquisition unit is used for acquiring the distance between the target recording object and the electronic equipment;
the determining unit is used for determining the target camera for recording the video according to the distance; under different distances, the target cameras for recording videos are different.
9. An electronic device comprising a processor and a memory storing a program or instructions executable on the processor, which when executed by the processor, implement the steps of the video recording method of any one of claims 1 to 6.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, implement the steps of the video recording method according to any one of claims 1 to 6.
CN202310315987.5A 2023-03-27 2023-03-27 Video recording method and device, electronic equipment and readable storage medium Pending CN116389665A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310315987.5A CN116389665A (en) 2023-03-27 2023-03-27 Video recording method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310315987.5A CN116389665A (en) 2023-03-27 2023-03-27 Video recording method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN116389665A true CN116389665A (en) 2023-07-04

Family

ID=86980011

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310315987.5A Pending CN116389665A (en) 2023-03-27 2023-03-27 Video recording method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116389665A (en)

Similar Documents

Publication Publication Date Title
CN112887609B (en) Shooting method and device, electronic equipment and storage medium
CN112714253B (en) Video recording method and device, electronic equipment and readable storage medium
CN107870999B (en) Multimedia playing method, device, storage medium and electronic equipment
CN112887618B (en) Video shooting method and device
CN114125179A (en) Shooting method and device
WO2024153191A1 (en) Video generation method and apparatus, electronic device, and medium
CN114390197A (en) Shooting method and device, electronic equipment and readable storage medium
CN116188343B (en) Image fusion method and device, electronic equipment, chip and medium
CN114125297B (en) Video shooting method, device, electronic equipment and storage medium
CN114025237B (en) Video generation method and device and electronic equipment
CN115941869A (en) Audio processing method and device and electronic equipment
CN114143455B (en) Shooting method and device and electronic equipment
CN115631109A (en) Image processing method, image processing device and electronic equipment
CN115756275A (en) Screen capture method, screen capture device, electronic equipment and readable storage medium
CN112367487B (en) Video recording method and electronic equipment
CN114500852A (en) Photographing method, photographing apparatus, electronic device, and readable storage medium
CN114357554A (en) Model rendering method, rendering device, terminal, server and storage medium
CN116389665A (en) Video recording method and device, electronic equipment and readable storage medium
CN114615426A (en) Shooting method, shooting device, electronic equipment and readable storage medium
CN112261483A (en) Video output method and device
CN114173178B (en) Video playing method, video playing device, electronic equipment and readable storage medium
CN112202958A (en) Screenshot method and device and electronic equipment
CN114157810B (en) Shooting method, shooting device, electronic equipment and medium
CN115442527B (en) Shooting method, device and equipment
CN115174812A (en) Video generation method, video generation device and electronic equipment

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