CN106998494B - Video recording method and related device - Google Patents

Video recording method and related device Download PDF

Info

Publication number
CN106998494B
CN106998494B CN201710272363.4A CN201710272363A CN106998494B CN 106998494 B CN106998494 B CN 106998494B CN 201710272363 A CN201710272363 A CN 201710272363A CN 106998494 B CN106998494 B CN 106998494B
Authority
CN
China
Prior art keywords
video
event
target
file
audio
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.)
Active
Application number
CN201710272363.4A
Other languages
Chinese (zh)
Other versions
CN106998494A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710272363.4A priority Critical patent/CN106998494B/en
Publication of CN106998494A publication Critical patent/CN106998494A/en
Application granted granted Critical
Publication of CN106998494B publication Critical patent/CN106998494B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4334Recording operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44016Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for substituting a video clip
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47205End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
    • 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)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention discloses a video recording method and a related device, which are used for recording display contents in an application interface to be recorded to obtain a first video file; determining an event information configuration file corresponding to the first video file, and determining a target event set containing a target event from the event information configuration file; determining target video time corresponding to each target event in the target event set; and generating a second video file according to the target video time and the first video file. The events in the first video file and the video time corresponding to the events are recorded in the event information configuration file, so that the target video time corresponding to each target event can be directly determined from the event information configuration file, and the second video file is generated by clipping the first video file according to the target video time.

Description

Video recording method and related device
Technical Field
The invention relates to the technical field of data processing, in particular to a video recording method and a related device.
Background
The application program is operated at a client, interacts with a user through an application interface, and completes one or more specific operations, and with the development of network technology, the requirements of the user on the application program do not only stay at the accurate operation level of the application, and the user puts higher requirements on the experience in the application program. For example, the display content in the application interface of the application program is recorded in a video mode, and the user can save the display content in the application interface through the video recording function.
The existing video recording method can only start to record the display content in the application interface to be recorded of the application program according to the recording starting instruction of the user, and end to record the display content in the application interface to be recorded according to the recording stopping instruction of the user, so as to obtain the recorded video file.
However, in the prior art, a video corresponding to a specific time in a video file cannot be clipped, and if the video clip at the specific time is to be implemented, the generated video file needs to be clipped by other video processing software, so that the operation of implementing the video clip at the specific time in the prior art is complicated.
Disclosure of Invention
In view of this, embodiments of the present invention provide a video recording method and a related apparatus, which solve the problem of complex operation in a manner of implementing video editing at a specific time in the prior art.
In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:
a video recording method, comprising:
recording display contents in an application interface to be recorded of an application to obtain a first video file;
determining an event information configuration file corresponding to the first video file, wherein each event in the first video file and video time corresponding to each event are recorded in the event information configuration file;
determining a target event set containing target events from the event information configuration file;
determining target video time corresponding to each target event in the target event set;
and generating a second video file according to the target video time and the first video file corresponding to the target event respectively.
A video recording apparatus comprising:
the recording module is used for recording the display content in the application interface to be recorded of the application to obtain a first video file;
an event information configuration file determining module, configured to determine an event information configuration file corresponding to the first video file, where each event in the first video file and a video time corresponding to each event are recorded in the event information configuration file;
the target event set determining module is used for determining a target event set containing target events from the event information configuration file;
the target video time determining module is used for determining target video time corresponding to each target event in the target event set;
and the second video file generation module is used for generating a second video file according to the target video time and the first video file which respectively correspond to the target event.
Based on the technical scheme, the embodiment of the invention discloses a video recording method and a related device, wherein the method comprises the following steps: recording display contents in an application interface to be recorded of an application to obtain a first video file; determining an event information configuration file corresponding to the first video file, and determining a target event set containing target events from the event information configuration file; determining target video time corresponding to each target event in the target event set; and generating a second video file according to the target video time and the first video file corresponding to the target event respectively. According to the method and the device for generating the second video file, the event information configuration file corresponding to the first video file is predetermined, each event in the first video file and the video time corresponding to each event are recorded in the event information configuration file, so that the target video time corresponding to each target event can be directly determined from the event information configuration file, the second video file is generated by clipping from the first video file according to the target video time, other video processing software is not needed in the process of generating the second video file according to the target video time, and the operation mode is simple.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a video recording method according to an embodiment of the present invention;
fig. 2 is a flowchart of another video recording method according to an embodiment of the present invention;
fig. 3 is a flowchart of another video recording method according to an embodiment of the present invention;
fig. 4 is a flowchart of another video recording method according to an embodiment of the present invention;
fig. 5 is a flowchart of another video recording method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a setup interface of game application software according to an embodiment of the present invention;
fig. 7 is a flowchart of another video recording method according to an embodiment of the present invention;
FIG. 8 is a schematic view of a game-to-game interface according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a display interface of game application software according to an embodiment of the present invention;
fig. 10 is a block diagram of a video recording apparatus according to an embodiment of the present invention;
fig. 11 is a block diagram of a hardware structure of a video recording apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a video recording method according to an embodiment of the present invention, which can be implemented by a terminal, where the terminal may specifically be a terminal device such as a PC, a mobile phone, or a tablet computer, and application software is installed on the terminal device. The application software may be of any type, such as game-like application software, social-like application software, shopping-like application software, and the like. Referring to fig. 1, the method may include:
s100, recording display contents in an application interface to be recorded of an application to obtain a first video file;
it should be noted that, after the application is started in the embodiment of the present invention, the application interface is entered, a user starts a video recording function of the application interface by triggering a video recording button corresponding to the application interface, and the application interface that starts the video recording function is the application interface to be recorded.
The video recording process in the embodiment of the present invention may record an application interface of any application displayed in the terminal, for example, the application interfaces of game application software, social application software, shopping application software, and the like may be recorded, and the embodiment of the present invention is not limited specifically.
Optionally, in the embodiment of the present invention, recording the display content in the to-be-recorded application interface of the application, and obtaining the first video file may be: receiving a recording starting command sent by a user, acquiring a picture visual angle of a terminal where the user is located according to the recording starting command, and recording the display content in the application interface to be recorded from the picture visual angle of the terminal where the user is located to obtain a first video file corresponding to the picture visual angle of the terminal where the user is located.
It should be noted that, the process of recording the display content in the application interface to be recorded may be: and respectively carrying out audio/video acquisition on the display content in the application interface to be recorded, respectively carrying out audio/video coding on audio/video files obtained by the audio/video acquisition, carrying out audio/video multiplexing on the files obtained by the audio/video coding, and storing the files subjected to the audio/video multiplexing as first video files.
In the process of video encoding, a video file can be encoded into an h.264 format by an audio and video encoder (a hardware encoder or a software encoder, etc.), an audio is encoded into an AAC format, and audio and video data is multiplexed into a first video file in an MP4 format by an audio and video multiplexing module.
It should be noted that, different terminals may apply different operating systems, for example: an Android operating system or an IOS operating system, for the video acquisition process, for different operating systems, the acquisition modes are different, for example: the IOS platform acquires image data in an application interface to be recorded by using a related interface of OpenGL ES; the Android platform is used for acquiring image data in an application interface to be recorded by using an OpenGL ES related interface in a system below 5.0; in a system above 5.0, acquiring image data in an application interface to be recorded by using a VirtualDisplay mirror of an Android system; and if the Android system is the Android system processed by ROOT, acquiring the image data in the application interface to be recorded through a SurfaceComposerclean interface provided by the system.
In addition, for the audio acquisition process, the acquisition mode is different for different operating systems, for example: and using AVAudio processing to collect microphone sound under an IOS operating system, and using OpenSL to collect microphone sound under an Android operating system.
Step S110, determining an event information configuration file corresponding to the first video file;
and recording each event in the first video file and the video time corresponding to each event in the event information configuration file.
Optionally, the event information configuration file in the embodiment of the present invention may be generated simultaneously in the process of generating the first video file.
Each event in the first video file refers to an event occurring in the first video file, and may be an event of a change in pictures and characters displayed in a social application software application interface, or an event of a change in action performance of a virtual character in a game scene of a game application software, for example: the shooting action change of the virtual character in the shooting game scene, the killing action change of the virtual character in the battlefield versus the block game scene, and the like.
It should be noted that the event information configuration file in the embodiment of the present invention may be stored in the terminal side, or may be stored in the server side, and when the terminal determines the event information configuration file corresponding to the first video file, the event information configuration file may be directly acquired from the server.
Step S120, determining a target event set containing target events from the event information configuration file;
it should be noted that the target event in the embodiment of the present invention may refer to a target event identified with a uniform predetermined identifier, a target event set for different users and having different user identifiers, a target event identified with different video identifiers for types of video content concerned by the user, a target event identified with different game identifiers, and the like, and the embodiment of the present invention is not limited specifically.
Step S130, determining target video time corresponding to each target event in the target event set;
optionally, in the embodiment of the present invention, in the event information configuration file, the target video time corresponding to each target event may be determined according to the type of the target event.
Step S140, generating a second video file according to the target video time and the first video file corresponding to each target event.
Optionally, the process of generating the second video file according to the target video time and the first video file respectively corresponding to the target event disclosed in the embodiment of the present invention may include: identifying audio and video contents at each moment in the first video file; and audio and video contents in a set time period before and after the target video moment in the first video file are obtained, and a second video file is generated.
Optionally, in the embodiment of the present invention, videos in a set time period before and after a target video time in a first video file may be recorded, so as to obtain a second video file; the method can also clip videos in a set time period before and after the target video in the first video file to obtain a second video file, and clip videos in a set time period before and after the target video in the first video file to obtain the second video file, wherein the specific process of obtaining the second video file can be as follows: and aiming at a first video file, positioning a clipping time point corresponding to the target video moment in the first video file, reading an audio/video file corresponding to the clipping time point in the first video file, then respectively carrying out audio/video timestamp correction on the audio/video file corresponding to the clipping time point, and multiplexing the audio/video file after the audio/video timestamp correction to obtain a second video file.
Optionally, in the embodiment of the present invention, video special effect processing may be further performed on the obtained second video file, for example: a preset video clip is inserted between any two video files in the obtained second video file, and the obtained second video file can be further processed by a video filter or an audio filter, for example: the embodiment of the present invention is not limited in particular, and the processing method includes performing black and white effect processing on a video, and performing denoising, sound changing, or sound mixing processing on an audio.
According to the method and the device for generating the second video file, the event information configuration file corresponding to the first video file is predetermined, each event in the first video file and the video time corresponding to each event are recorded in the event information configuration file, so that the target video time corresponding to each target event can be directly determined from the event information configuration file, the second video file is generated by clipping from the first video file according to the target video time, other video processing software is not needed in the process of generating the second video file according to the target video time, and the operation mode is simple.
Next, another video recording method process is specifically described in the embodiment of the present invention, please refer to a flow chart of the video recording method disclosed in fig. 2, and the method may include:
step S200, recording display contents in an application interface to be recorded of an application to obtain a first video file;
step S210, determining an event information configuration file corresponding to the first video file;
and recording each event in the first video file and the video time corresponding to each event in the event information configuration file.
Step S220, determining a target event set containing target events from the event information configuration file;
step S230, determining target video time corresponding to each target event in the target event set;
step S240, identifying audio and video contents at each moment in the first video file;
step S250, acquiring audio and video contents in a set time period before and after each target video moment in the first video file, and generating audio and video fragments corresponding to each target video moment;
and step S260, splicing the audio and video clips corresponding to each target video moment according to a preset audio and video clip splicing rule to generate a second video file.
In the embodiment of the present invention, the process of splicing the audio and video segments corresponding to each target video moment according to the preset audio and video segment splicing rule to generate the second video file may include: inserting predetermined audio and video clips between the audio and video clips corresponding to each target video moment; and splicing the audio and video clips corresponding to each target video moment and the inserted preset audio and video clips according to a preset audio and video clip splicing rule to generate a second video file.
Next, another video recording method process is specifically described in the embodiment of the present invention, please refer to a flow chart of the video recording method disclosed in fig. 3, and the method may include:
step S300, recording display contents in an application interface to be recorded of an application to obtain a first video file;
step S310, determining an event information configuration file corresponding to the first video file;
and recording each event in the first video file and the video time corresponding to each event in the event information configuration file.
Step S320, according to the type of the video content displayed in the application interface to be recorded of the application, determining an event identifier corresponding to the type of the video content as an event identifier of a target event;
since video files with different video contents correspond to different types of events, for example: the corresponding event in the shooting game video file may be a shooting action change of a virtual character, and the corresponding event in the battlefield battle-fighting game video file may be a killing action change of the virtual character, and the like.
Step S330, determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set;
step S340, determining target video time corresponding to each target event in the target event set;
step S350, generating a second video file according to the target video time and the first video file corresponding to each target event.
It should be noted that, in addition to the manner of determining the target event set in the foregoing embodiment, in the embodiment of the present invention, the following manner may be further used to determine the target event set, and in the following, another video recording method process is specifically described in the embodiment of the present invention, please refer to a flow chart of the video recording method disclosed in fig. 4, and the method may include:
s400, recording display contents in an application interface to be recorded of an application to obtain a first video file;
step S410, determining an event information configuration file corresponding to the first video file;
and recording each event in the first video file and the video time corresponding to each event in the event information configuration file.
Step S420, acquiring an event identifier corresponding to the type of the application as an event identifier of a target event according to the type of the application;
since video files with different application types correspond to different types of events, for example: the corresponding event in the social application video file may be a display of a change in a picture or a character, and the corresponding event in the game application video file may be a display of a change in an action of a virtual character.
Step S430, determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set;
step S440, determining target video time corresponding to each target event in the target event set;
step S450, generating a second video file according to the target video time and the first video file corresponding to the target event respectively.
It should be noted that, in addition to the manner of determining the target event set in the foregoing embodiment, in the embodiment of the present invention, the following manner may be further used to determine the target event set, and in the following, another video recording method process is specifically described in the embodiment of the present invention, please refer to a flow chart of the video recording method disclosed in fig. 5, and the method may include:
step S500, recording display contents in an application interface to be recorded of an application to obtain a first video file;
step S510, determining an event information configuration file corresponding to the first video file;
and recording each event in the first video file and the video time corresponding to each event in the event information configuration file.
Step S520, acquiring an event identifier corresponding to the trigger selection of the user as an event identifier of a target event according to the trigger selection of the user;
when there are multiple events in the first video file, the event identifier corresponding to the user's trigger operation may be selected as the event identifier of the target event according to the user's trigger operation, and for the game-like video file, there may be many changes in the actions of the virtual character, for example: the method comprises the steps of flying, running, killing, treating, laughing and the like, and the identification of the above events corresponding to the triggering selection of the user can be obtained as the event identification of the target event according to the triggering selection of the user.
Step S530, determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set;
step S540, determining target video time corresponding to each target event in the target event set;
step S550, generating a second video file according to the target video time and the first video file corresponding to each target event.
In the following, a specific game application software is taken as an example to describe in detail the process of video recording the display content in the game application software disclosed in the embodiment of the present invention:
as shown in fig. 6, the game application software is started, a video recording (queen moment) function is turned on a setting interface of the game application software, after the queen moment function is turned on, a wonderful video of the queen moment is recorded, and wonderful moments such as 'sansha' and 'wusha' in a battle can be automatically recorded and edited into a video collection, wherein the 'sansha' and the 'wusha' are predetermined instructions in the 'queen moment' of the game application software, and a user triggers 'sansha' and 'wusha' logic, namely triggers the predetermined instructions; referring to fig. 7, a flowchart of a video recording method disclosed in the present embodiment of the present invention is shown, where the method may include:
step S600, after the video recording function is started, entering a game interface;
it should be noted that, in the embodiment of the present invention, the video recording function is to record the display content in the game-to-game interface as shown in fig. 8.
Step S610, judging whether the memory of the terminal is sufficient, if so, executing step S620; otherwise, the recording is not started, and the user is prompted that the space is insufficient.
S620, intercepting and recording the picture on the screen of the terminal at a certain speed to obtain a game video file of the terminal where the user is located;
step S630, determining an event information configuration file corresponding to the game video file;
and the event information configuration file records each event in the game video file and the video time corresponding to each event.
Step S640, storing the obtained game video file and the corresponding event information configuration file in a storage device of the terminal until the game is matched and the recording is finished;
step S650, judging whether the wonderful moment needs to be edited, if so, executing step S660, otherwise, deleting the recorded game video file and the corresponding event information configuration file in a storage device of the terminal;
at the end of the game, switching to the interface as shown in fig. 9, in addition to displaying the battle performance of each user, the user can select whether to clip the highlight moment by the "give up" and "generate" buttons under the corresponding video icon.
Step S660, judging whether the recording is normally finished, if so, executing step S670; otherwise, prompting the user that the recording fails;
step S470, determining the wonderful time corresponding to the target events of 'three killers' and 'five killers' in the game video file;
and step S680, clipping the game video file according to the wonderful moments corresponding to the 'three killing' and 'five killing' target events to obtain a wonderful video clip file.
In the clipping process, all video clips 5 seconds before and 5 seconds after the killing can be clipped out to form a wonderful video clip file.
In the following, the video recording apparatus provided by the embodiment of the present invention is introduced, and the video recording apparatus described below may be referred to in correspondence with the video recording method described above. The video recording apparatus described below may be regarded as a functional module architecture that is required to implement the video recording method provided by the embodiment of the present invention.
Fig. 10 is a block diagram of a video recording apparatus according to an embodiment of the present invention, where the apparatus is applicable to a terminal, and referring to fig. 10, the apparatus may include:
the recording module 100 is configured to record display content in an application interface to be recorded of an application to obtain a first video file;
an event information configuration file determining module 110, configured to determine an event information configuration file corresponding to the first video file, where each event in the first video file and a video time corresponding to each event are recorded in the event information configuration file;
a target event set determining module 120, configured to determine a target event set including a target event from the event information configuration file;
a target video time determining module 130, configured to determine target video times corresponding to target events in a target event set;
the second video file generating module 140 is configured to generate a second video file according to the target video time and the first video file corresponding to each target event.
The target event set determination module comprises:
the first event identification determining module is used for determining an event identification corresponding to the type of the video content as an event identification of a target event according to the type of the video content displayed in an application interface to be recorded of an application;
and the first target event set forming module is used for determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set.
The target event set determination module comprises:
the second event identifier determining module is used for acquiring an event identifier corresponding to the type of the application as an event identifier of the target event according to the type of the application;
and the second target event set forming module is used for determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set.
The target event set determination module comprises:
the third event identifier determining module is used for acquiring an event identifier corresponding to the trigger selection of the user as an event identifier of the target event according to the trigger selection of the user;
and the third target event set forming module is used for determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set.
The second video file generation module includes:
the first audio and video content identification module is used for identifying audio and video contents at various moments in the first video file;
and the second video file generation submodule is used for acquiring audio and video contents in a set time period before and after the target video moment in the first video file and generating a second video file.
The second video file generation module includes:
the second audio and video content identification module is used for identifying the audio and video content at each moment in the first video file;
the audio/video clip generation module is used for acquiring audio/video contents in a set time period before and after each target video moment in the first video file and generating audio/video clips corresponding to each target video moment;
and the audio and video segment splicing module is used for splicing the audio and video segments corresponding to each target video moment according to a preset audio and video segment splicing rule to generate a second video file.
The audio and video segment splicing module comprises:
the predetermined audio and video clip inserting module is used for inserting predetermined audio and video clips between the audio and video clips corresponding to each target video moment;
and the audio and video segment splicing submodule is used for splicing the audio and video segments corresponding to the target video moments and the inserted preset audio and video segments according to a preset audio and video segment splicing rule to generate a second video file.
Alternatively, the video recording apparatus may be a terminal, and the above-described modules and units may be function modules disposed in the video recording apparatus. Fig. 11 is a block diagram showing a hardware configuration of a video recording apparatus, and referring to fig. 11, the video recording apparatus may include: a processor 1, a communication interface 2, a memory 3 and a communication bus 4; wherein, the processor 1, the communication interface 2 and the memory 3 complete the communication with each other through the communication bus 4; optionally, the communication interface 2 may be an interface of a communication module, such as an interface of a wifi module or an interface of a bluetooth module;
a processor 1 for executing a program; a memory 3 for storing a program; the program may include program code comprising computer operating instructions;
the processor 1 may be a central processing unit CPU or an application Specific Integrated circuit asic or one or more Integrated circuits configured to implement embodiments of the present invention; the memory 3 may comprise a high-speed RAM memory and may also comprise a non-volatile memory, such as at least one disk memory.
Among them, the procedure can be specifically used for:
recording display contents in an application interface to be recorded of an application to obtain a first video file;
determining an event information configuration file corresponding to the first video file, wherein each event in the first video file and video time corresponding to each event are recorded in the event information configuration file;
determining a target event set containing target events from the event information configuration file;
determining target video time corresponding to each target event in the target event set;
and generating a second video file according to the target video time and the first video file corresponding to the target event respectively.
In summary, the following steps:
the embodiment of the invention discloses a video recording method and a related device, comprising the following steps: recording display contents in an application interface to be recorded of an application to obtain a first video file; determining an event information configuration file corresponding to the first video file, and determining a target event set containing target events from the event information configuration file; determining target video time corresponding to each target event in the target event set; and generating a second video file according to the target video time and the first video file corresponding to the target event respectively. According to the method and the device for generating the second video file, the event information configuration file corresponding to the first video file is predetermined, each event in the first video file and the video time corresponding to each event are recorded in the event information configuration file, so that the target video time corresponding to each target event can be directly determined from the event information configuration file, the second video file is generated by clipping from the first video file according to the target video time, other video processing software is not needed in the process of generating the second video file according to the target video time, and the operation mode is simple.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A method for video recording, comprising:
recording display contents in an application interface to be recorded of an application to obtain a first video file;
determining an event information configuration file corresponding to the first video file, wherein each event occurring in the first video file and video time corresponding to each event occurring in the first video file are recorded in the event information configuration file;
determining a target event set containing target events from the event information configuration file by using at least one of a uniform predetermined identifier, a user identifier or a content identifier, including: determining an event identifier corresponding to the type of the video content as an event identifier of a target event according to the type of the video content displayed in an application interface to be recorded of an application; determining a target event corresponding to an event identifier of the target event from the event information configuration file to form a target event set, wherein the target event is at least one of a target event with a uniform preset identifier, a target event with different user identifiers set for different users, or a target event with different content identifiers identified for types of contents concerned by the users;
in the event information configuration file, determining target video time corresponding to each target event in the target event set according to the type of the target event;
generating a second video file according to the target video time and the first video file corresponding to the target event respectively;
the process of generating the second video file according to the target video time and the first video file corresponding to the target event includes: identifying audio and video contents at each moment in the first video file; acquiring audio and video contents in a set time period before and after each target video moment in a first video file, and generating audio and video fragments corresponding to each target video moment; and splicing the audio and video clips corresponding to each target video moment according to a preset audio and video clip splicing rule to generate a second video file.
2. The method of claim 1, wherein the determining the target event set containing the target event from the event information profile comprises:
according to the type of the application, acquiring an event identifier corresponding to the type of the application as an event identifier of a target event;
and determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set.
3. The method of claim 1, wherein the determining the target event set containing the target event from the event information profile comprises:
according to the trigger selection of a user, acquiring an event identifier corresponding to the trigger selection of the user as an event identifier of a target event;
and determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set.
4. The method according to any one of claims 1 to 3, wherein the generating the second video file according to the target video time and the first video file corresponding to each target event comprises:
identifying audio and video contents at each moment in the first video file;
and audio and video contents in a set time period before and after the target video moment in the first video file are obtained, and a second video file is generated.
5. The method according to claim 1, wherein the process of splicing the audio and video clips corresponding to each target video time according to a preset audio and video clip splicing rule to generate the second video file comprises:
inserting predetermined audio and video clips between the audio and video clips corresponding to each target video moment;
and splicing the audio and video clips corresponding to each target video moment and the inserted preset audio and video clips according to a preset audio and video clip splicing rule to generate a second video file.
6. A video recording apparatus, comprising:
the recording module is used for recording the display content in the application interface to be recorded of the application to obtain a first video file;
an event information configuration file determining module, configured to determine an event information configuration file corresponding to the first video file, where each event occurring in the first video file and a video time corresponding to each event occurring in the first video file are recorded in the event information configuration file;
a target event set determining module, configured to determine a target event set including a target event from the event information configuration file by using at least one of a uniform predetermined identifier, a user identifier, or a content identifier, including: determining an event identifier corresponding to the type of the video content as an event identifier of a target event according to the type of the video content displayed in an application interface to be recorded of an application; determining a target event corresponding to an event identifier of the target event from the event information configuration file to form a target event set, wherein the target event is at least one of a target event with a uniform preset identifier, a target event with different user identifiers set for different users, or a target event with different content identifiers identified for types of contents concerned by the users;
the target video time determining module is used for determining target video time corresponding to each target event in the target event set according to the type of the target event in the event information configuration file;
the second video file generation module is used for generating a second video file according to the target video time and the first video file which respectively correspond to the target event;
the second video file generation module includes: the second audio and video content identification module is used for identifying the audio and video content at each moment in the first video file; the audio/video clip generation module is used for acquiring audio/video contents in a set time period before and after each target video moment in the first video file and generating audio/video clips corresponding to each target video moment; and the audio and video segment splicing module is used for splicing the audio and video segments corresponding to each target video moment according to a preset audio and video segment splicing rule to generate a second video file.
7. The apparatus of claim 6, wherein the target event set determining module comprises:
the second event identifier determining module is used for acquiring an event identifier corresponding to the type of the application as an event identifier of the target event according to the type of the application;
and the second target event set forming module is used for determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set.
8. The apparatus of claim 6, wherein the target event set determining module comprises:
the third event identifier determining module is used for acquiring an event identifier corresponding to the trigger selection of the user as an event identifier of the target event according to the trigger selection of the user;
and the third target event set forming module is used for determining a target event corresponding to the event identifier of the target event from the event information configuration file to form a target event set.
9. The apparatus according to any one of claims 6-8, wherein the second video file generating module comprises:
the first audio and video content identification module is used for identifying audio and video contents at various moments in the first video file;
and the second video file generation submodule is used for acquiring audio and video contents in a set time period before and after the target video moment in the first video file and generating a second video file.
10. The apparatus of claim 6, wherein the audio-video segment splicing module comprises:
the predetermined audio and video clip inserting module is used for inserting predetermined audio and video clips between the audio and video clips corresponding to each target video moment;
and the audio and video segment splicing submodule is used for splicing the audio and video segments corresponding to the target video moments and the inserted preset audio and video segments according to a preset audio and video segment splicing rule to generate a second video file.
11. A computer-readable storage medium having stored thereon computer-executable instructions which, when loaded and executed by a processor, carry out a video recording method according to any one of claims 1 to 5.
CN201710272363.4A 2017-04-24 2017-04-24 Video recording method and related device Active CN106998494B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710272363.4A CN106998494B (en) 2017-04-24 2017-04-24 Video recording method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710272363.4A CN106998494B (en) 2017-04-24 2017-04-24 Video recording method and related device

Publications (2)

Publication Number Publication Date
CN106998494A CN106998494A (en) 2017-08-01
CN106998494B true CN106998494B (en) 2021-02-05

Family

ID=59434855

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710272363.4A Active CN106998494B (en) 2017-04-24 2017-04-24 Video recording method and related device

Country Status (1)

Country Link
CN (1) CN106998494B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109672922B (en) * 2017-10-17 2020-10-27 腾讯科技(深圳)有限公司 Game video editing method and device
CN107682652A (en) * 2017-10-30 2018-02-09 深圳市麦道微电子技术有限公司 A kind of urgent document recording system of hommization
CN108259990B (en) * 2018-01-26 2020-08-04 腾讯科技(深圳)有限公司 Video editing method and device
CN109246467A (en) * 2018-08-15 2019-01-18 上海蔚来汽车有限公司 Label is to the method, apparatus of sharing video frequency, video camera and smart phone
CN111093093B (en) * 2018-10-24 2022-03-01 腾讯科技(深圳)有限公司 Method, device and system for generating special effect video and computer equipment
CN109814926B (en) * 2018-12-28 2021-07-09 东软集团股份有限公司 Method and device for extracting data
CN109618184A (en) * 2018-12-29 2019-04-12 北京市商汤科技开发有限公司 Method for processing video frequency and device, electronic equipment and storage medium
CN110262707B (en) * 2019-04-26 2021-08-10 努比亚技术有限公司 Application program operation recording method and device and computer readable storage medium
CN111212316B (en) * 2019-12-10 2022-02-08 维沃移动通信有限公司 Video generation method and electronic equipment
CN111866577B (en) * 2020-07-20 2022-07-22 上海连尚网络科技有限公司 Screen recording method, electronic device and computer readable storage medium
CN112672200B (en) * 2020-12-14 2023-10-24 完美世界征奇(上海)多媒体科技有限公司 Video generation method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102522102A (en) * 2010-10-15 2012-06-27 微软公司 Intelligent determination of replays based on event identification
CN104811787A (en) * 2014-10-27 2015-07-29 深圳市腾讯计算机系统有限公司 Game video recording method and game video recording device
CN105142003A (en) * 2015-08-07 2015-12-09 深圳Tcl数字技术有限公司 Television program playing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130227416A1 (en) * 2011-01-06 2013-08-29 Edward Massena Device for logging, editing and production of video programs for activities of local interest
CA2912836A1 (en) * 2013-06-05 2014-12-11 Snakt, Inc. Methods and systems for creating, combining, and sharing time-constrained videos
CN106412702B (en) * 2015-07-27 2020-06-05 腾讯科技(深圳)有限公司 Video clip intercepting method and device
CN105939494A (en) * 2016-05-25 2016-09-14 乐视控股(北京)有限公司 Audio/video segment providing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102522102A (en) * 2010-10-15 2012-06-27 微软公司 Intelligent determination of replays based on event identification
CN104811787A (en) * 2014-10-27 2015-07-29 深圳市腾讯计算机系统有限公司 Game video recording method and game video recording device
CN105142003A (en) * 2015-08-07 2015-12-09 深圳Tcl数字技术有限公司 Television program playing method and device

Also Published As

Publication number Publication date
CN106998494A (en) 2017-08-01

Similar Documents

Publication Publication Date Title
CN106998494B (en) Video recording method and related device
CN110162343B (en) Application starting method and device, electronic equipment and storage medium
US20180255359A1 (en) Method for sharing a captured video clip and electronic device
CN110764855A (en) Information processing method, electronic equipment and storage medium
CN111556329B (en) Method and device for inserting media content in live broadcast
CN110968391A (en) Screenshot method, screenshot device, terminal equipment and storage medium
CN112422844A (en) Method, device and equipment for adding special effect in video and readable storage medium
CN108881766B (en) Video processing method, device, terminal and storage medium
CN115396705A (en) Screen projection operation verification method, platform and system
CN112511739B (en) Interactive information generation method and equipment
CN113038174B (en) Live video interaction method and device and computer equipment
US10133408B2 (en) Method, system and computer program product
CN109862295B (en) GIF generation method, device, computer equipment and storage medium
CN110809172A (en) Interactive special effect display method and device and electronic equipment
CN113038218B (en) Video screenshot method, device, equipment and readable storage medium
US11004472B2 (en) Method and device of playing video, and computing device
CN111901667B (en) Screen recording method and related device
CN109529321B (en) Information processing method, device and storage medium
CN112423099A (en) Video loading method and device and electronic equipment
CN108614656B (en) Information processing method, medium, device and computing equipment
JP2012169743A (en) Information processing device and information processing method
CN112861612A (en) Method and device for shooting image, electronic equipment and storage medium
CN111913918A (en) File storage method and device and electronic equipment
CN106205654B (en) Audio-video data processing method and device
CN111343391A (en) Video capture method and electronic device using same

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
GR01 Patent grant
GR01 Patent grant