CN109640019B - Method for recording and editing long video through mobile terminal - Google Patents
Method for recording and editing long video through mobile terminal Download PDFInfo
- Publication number
- CN109640019B CN109640019B CN201811527016.2A CN201811527016A CN109640019B CN 109640019 B CN109640019 B CN 109640019B CN 201811527016 A CN201811527016 A CN 201811527016A CN 109640019 B CN109640019 B CN 109640019B
- Authority
- CN
- China
- Prior art keywords
- video
- recording
- picture
- transition animation
- long
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 23
- 230000007704 transition Effects 0.000 claims abstract description 26
- 238000009877 rendering Methods 0.000 claims abstract description 12
- 230000000694 effects Effects 0.000 claims description 8
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T15/00—3D [Three Dimensional] image rendering
- G06T15/005—General purpose rendering architectures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/433—Content storage operation, e.g. storage operation in response to a pause request, caching operations
- H04N21/4334—Recording operations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10016—Video; Image sequence
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Television Signal Processing For Recording (AREA)
- Processing Or Creating Images (AREA)
Abstract
The invention discloses a method for recording and editing a long video through a mobile terminal, which comprises the steps of recording a first video, and encoding the first video; saving the last picture of the first video and generating transition animation; recording a second video, and encoding the second video; the first video, the transition animation and the second video are combined to obtain a third video, and the third video is subjected to picture rendering processing to obtain a long video which is recorded and edited.
Description
Technical Field
The invention relates to the field of video processing, in particular to a method for recording and editing a long video through a mobile terminal.
Background
At present, most of mobile phone video editing is in a short video form, basically within 30 seconds, so that the video data volume is not large, mjpeg and other intraframe compression can be adopted, and rapid random access can be achieved, but if 720P video with the time more than 5 minutes needs to be recorded, the data volume can reach the GB level, a lot of performance can be wasted by high-resolution mjpeg coding and decoding, and real-time processing can not be achieved on a low-performance machine. Moreover, the video sticker in the prior art is mostly made in a frame-sequential animation mode, has large resources and needs to be downloaded, for example, a rotating windmill, which is often a nine-grid comic book, and can be continuously played to achieve the rotating effect.
Disclosure of Invention
The embodiment of the invention aims to provide a method for recording and editing a long video through a mobile terminal, which not only can quickly record and access the video, but also can generate an animation based on real-time checking calculation of the animation, thereby not only saving the resource space, but also enabling the animation to be smoother.
In order to achieve the above object, an embodiment of the present invention provides a method for recording and editing a long video through a mobile terminal, including the following steps:
recording a first video, and encoding the first video; the encoding process specifically includes: processing the recorded video by taking one second as a key frame to obtain a plurality of key frames, and storing the plurality of key frames in a flash memory through an intermediate format; during encoding, an index file needs to be generated; each key frame corresponds to an index file; the index file is used for reading the index file and positioning the video corresponding to the index file when playing back the video;
saving the last picture of the first video and generating transition animation; wherein, the transition animation takes the last picture of the first video as the initial input picture;
recording a second video, and encoding the second video;
combining the first video, the transition animation and the second video to obtain a third video, and performing picture rendering processing on the third video to obtain a long video which is recorded and edited; the video effect renderer adopts an open graphics library mode, describes each effect through a JSON file, and achieves the purpose of dynamically generating the shader through a lua script.
Further, the merging the first video, the transition animation, and the second video to obtain a third video, and obtaining the third video specifically includes:
inserting the transition animation after the last picture of the first video;
and after the second video is inserted into the transition animation, combining to obtain the third video.
Further, the performing picture rendering processing on the third video to obtain a long video that is recorded and edited includes:
and responding to the setting operation of the user, and adjusting the color, the brightness, the zoom, the range and the angle of the sixth video picture.
Further, when the video is encoded, the video is subjected to picture rendering processing at the same time.
Compared with the prior art, the method has the following beneficial effects:
the method for recording and editing the long video through the mobile terminal comprises the steps of recording a first video, and coding the first video; saving the last picture of the first video and generating transition animation; recording a second video, and encoding the second video; the first video, the transition animation and the second video are combined to obtain a third video, and the third video is subjected to picture rendering processing to obtain a long video which is recorded and edited.
Drawings
Fig. 1 is a schematic flowchart of a method for recording and editing a long video by a mobile terminal 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.
Referring to fig. 1, an embodiment of the present invention provides a method for recording and editing a long video by a mobile terminal, including the following steps: S1-S4;
and S1, recording the first video and encoding the first video.
In the embodiment of the present invention, the encoding process is: taking one second as a key frame, adopting a system hardware compression mode, and storing the compressed data in a mobile phone flash memory through an intermediate format; since the chip does not slice the key frames exactly in one second when encoding, the video time cannot be deduced simply by order.
It should be noted that, during encoding, an index file is also generated, where the index file is used to describe which file the first slice is, when the start time of the file is, and when the end time of the file is; during playback, a cache file can be quickly positioned by reading the index file, and after the cache file is read in, the video picture of the slice can be obtained.
S2, saving the last frame of the first video and generating a transition animation.
In the embodiment of the invention, the transition animation takes the last picture of the first video as the initial input picture.
And S3, recording the second video and carrying out coding processing on the second video.
And S4, combining the first video, the transition animation and the second video to obtain a third video, and performing picture rendering processing on the third video to obtain a long video which is recorded and edited.
In this embodiment, the transition animation is inserted after the last frame of the first video; and after the second video is inserted into the transition animation, combining to obtain a third video.
It should be noted that the last picture is saved as the initial input picture of the transition, so that when the user pulls the picture from back to front, the user pulls the picture to the beginning of the second video, and needs the last picture of the first section of video, the last picture can be directly read without decoding the previous key frame section, and the last frame of the key frame section, thereby greatly improving the efficiency of reading the video.
In the embodiment of the present invention, the color, brightness, zoom, range, and angle of the third video screen are adjusted in response to the setting operation by the user.
In the embodiment of the invention, the animation rendering is simultaneously taken as a filter form of a filter rendering chain, and in the whole video effect processing link, the transition animation is in the same dimension with the color filter and the transition animation, so that the unified management of programs is facilitated. The video effect renderer adopts an Open Graphics Library (OpenGL) mode to describe each effect by a JavaScript Object Notation (JSON) file, and achieves the purpose of dynamically generating a shader in the form of a lua script.
In summary, the method for recording and editing a long video through a mobile terminal according to the embodiment of the present invention includes recording a first video, and encoding the first video; saving the last picture of the first video and generating transition animation; recording a second video, and encoding the second video; the first video, the transition animation and the second video are combined to obtain a third video, and the third video is subjected to picture rendering processing to obtain a long video which is recorded and edited.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.
Claims (3)
1. A method for recording and editing a long video through a mobile terminal is characterized by comprising the following steps:
recording a first video, and encoding the first video; the encoding process specifically includes: processing the recorded video by taking one second as a key frame to obtain a plurality of key frames, and storing the plurality of key frames in a flash memory through an intermediate format; during encoding, an index file needs to be generated; each key frame corresponds to an index file; the index file is used for reading the index file and positioning the video corresponding to the index file when playing back the video;
saving the last picture of the first video and generating transition animation; wherein, the transition animation takes the last picture of the first video as the initial input picture;
recording a second video, and encoding the second video;
combining the first video, the transition animation and the second video to obtain a third video, and performing picture rendering processing on the third video to obtain a long video which is recorded and edited; the video effect renderer adopts an open graphics library mode, describes each effect through a JSON file, and achieves the purpose of dynamically generating a shader through a lua script;
the merging of the first video, the transition animation and the second video to obtain a third video specifically comprises:
inserting the transition animation after the last picture of the first video;
and after the second video is inserted into the transition animation, combining to obtain the third video.
2. The method for recording and editing a long video through a mobile terminal according to claim 1, wherein the step of performing picture rendering processing on the third video to obtain the recorded and edited long video comprises:
and responding to the setting operation of the user, and adjusting the color, the brightness, the zoom, the range and the angle of the third video picture.
3. The method for recording and editing a long video through a mobile terminal according to any one of claims 1-2, wherein the video is subjected to a picture rendering process at the same time as the video is subjected to an encoding process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811527016.2A CN109640019B (en) | 2018-12-13 | 2018-12-13 | Method for recording and editing long video through mobile terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811527016.2A CN109640019B (en) | 2018-12-13 | 2018-12-13 | Method for recording and editing long video through mobile terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109640019A CN109640019A (en) | 2019-04-16 |
CN109640019B true CN109640019B (en) | 2021-09-07 |
Family
ID=66073626
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811527016.2A Active CN109640019B (en) | 2018-12-13 | 2018-12-13 | Method for recording and editing long video through mobile terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109640019B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111083526B (en) * | 2019-12-31 | 2021-12-10 | 广州酷狗计算机科技有限公司 | Video transition method and device, computer equipment and storage medium |
CN114268741B (en) * | 2022-02-24 | 2023-01-31 | 荣耀终端有限公司 | Transition dynamic effect generation method, electronic device, and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102025956A (en) * | 2009-09-23 | 2011-04-20 | 华为技术有限公司 | Processing method, device and system for fast forward and fast backward playing of network stream media |
CN105516618A (en) * | 2014-09-27 | 2016-04-20 | 北京金山安全软件有限公司 | Method and device for making video and communication terminal |
CN107770457A (en) * | 2017-10-27 | 2018-03-06 | 维沃移动通信有限公司 | A kind of video creating method and mobile terminal |
CN107948562A (en) * | 2017-11-30 | 2018-04-20 | 广州市百果园信息技术有限公司 | Video recording method and video recording terminal |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170244894A1 (en) * | 2016-02-22 | 2017-08-24 | Seastar Labs, Inc. | Method and Apparatus for Managing Latency of Remote Video Production |
-
2018
- 2018-12-13 CN CN201811527016.2A patent/CN109640019B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102025956A (en) * | 2009-09-23 | 2011-04-20 | 华为技术有限公司 | Processing method, device and system for fast forward and fast backward playing of network stream media |
CN105516618A (en) * | 2014-09-27 | 2016-04-20 | 北京金山安全软件有限公司 | Method and device for making video and communication terminal |
CN107770457A (en) * | 2017-10-27 | 2018-03-06 | 维沃移动通信有限公司 | A kind of video creating method and mobile terminal |
CN107948562A (en) * | 2017-11-30 | 2018-04-20 | 广州市百果园信息技术有限公司 | Video recording method and video recording terminal |
Also Published As
Publication number | Publication date |
---|---|
CN109640019A (en) | 2019-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108683826B (en) | Video data processing method, video data processing device, computer equipment and storage medium | |
US11217279B2 (en) | Method and device for adjusting video playback speed | |
CN109168014A (en) | A kind of live broadcasting method, device, equipment and storage medium | |
CN109840879B (en) | Image rendering method and device, computer storage medium and terminal | |
EP3373586A1 (en) | Method for inverse tone mapping of an image with visual effects | |
CN106937090A (en) | The method and device of a kind of video storage | |
CN109672902A (en) | A kind of video takes out frame method, device, electronic equipment and storage medium | |
CN111899322A (en) | Video processing method, animation rendering SDK, device and computer storage medium | |
CN109640019B (en) | Method for recording and editing long video through mobile terminal | |
CN113709554A (en) | Animation video generation method and device, and animation video playing method and device in live broadcast room | |
CN113457160A (en) | Data processing method and device, electronic equipment and computer readable storage medium | |
CN109788212A (en) | A kind of processing method of segmenting video, device, terminal and storage medium | |
CN105791952A (en) | Screen shooting method and device for streaming media video data, and electronic device | |
WO2021052130A1 (en) | Video processing method, apparatus and device, and computer-readable storage medium | |
CN112218148A (en) | Screen recording method and device, computer equipment and computer readable storage medium | |
CN111294600A (en) | Compression method, decompression method and device for video sequence frame | |
CN110049347B (en) | Method, system, terminal and device for configuring images on live interface | |
CN105681893A (en) | Method and device for decoding stream media video data | |
CN105578224A (en) | Multimedia data acquisition method, device, smart television and set-top box | |
CN114598937A (en) | Animation video generation and playing method and device | |
CN110087142A (en) | Video slicing method, terminal and storage medium | |
KR101199166B1 (en) | A apparatus generating interpolated frames | |
CN110572713B (en) | Transcoding method and processing terminal for adaptive video bandwidth ratio | |
CN112019878B (en) | Video decoding and editing method, device, equipment and storage medium | |
CN114339289B (en) | Video playing processing method |
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 |