CN111083526B - Video transition method and device, computer equipment and storage medium - Google Patents

Video transition method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111083526B
CN111083526B CN201911403629.XA CN201911403629A CN111083526B CN 111083526 B CN111083526 B CN 111083526B CN 201911403629 A CN201911403629 A CN 201911403629A CN 111083526 B CN111083526 B CN 111083526B
Authority
CN
China
Prior art keywords
video
time period
image
transition time
playing progress
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
CN201911403629.XA
Other languages
Chinese (zh)
Other versions
CN111083526A (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.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201911403629.XA priority Critical patent/CN111083526B/en
Publication of CN111083526A publication Critical patent/CN111083526A/en
Application granted granted Critical
Publication of CN111083526B publication Critical patent/CN111083526B/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/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/23424Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving splicing one content stream with another content stream, e.g. for inserting or substituting an advertisement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234345Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • 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/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/4402Processing 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 reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440245Processing 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 reformatting operations of video signals for household redistribution, storage or real-time display the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a video transition method, a video transition device, computer equipment and a storage medium, and belongs to the technical field of image processing. The method comprises the following steps: the method comprises the steps of obtaining a first transition time period of a first video end and a second transition time period of a second video head, wherein the first video and the second video are videos to be combined, when the first video is played to the first transition time period, at least one first image in the first transition time period is displayed in sequence, the at least one first image is obtained by stretching at least one original image in the first transition time period based on the first video, after the first video is played, at least one second image in the second transition time period based on the second video is displayed in sequence, and the at least one second image is obtained by stretching at least one original image in the second transition time period based on the second video. In the video transition process, the player does not need to play two videos simultaneously, so that the memory of the player is reduced, and the complexity of video coding is reduced.

Description

Video transition method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a video transition method and apparatus, a computer device, and a storage medium.
Background
With the continuous popularization and development of short videos, more and more users begin to make and share short videos on social platforms. When a user makes a short video, the two videos can be merged into a complete video, and in order to enable the two videos to be in natural transition in the playing process, the user can add a video transition effect to the merged video.
Currently, the video transition method is generally: when the player plays the first video close to the end sound, the transition effect that one video moves out of the screen from one side and one video enters the screen from the other side can be displayed, so that the player needs to play the two videos simultaneously in the process of video transition.
However, in the related art, when the video transitions, the player needs to play two videos at the same time, which results in a large memory occupation and high video coding difficulty.
Disclosure of Invention
The embodiment of the application provides a video transition method and device, computer equipment and a storage medium, and can solve the problems that in the related technology, the player occupies a large amount of memory and the video coding difficulty is high. The technical scheme is as follows:
in one aspect, a video transition method is provided, and the method includes:
acquiring a first transition time period of a first video end and a second transition time period of a second video head, wherein the first video and the second video are videos to be combined;
when the first video is played to the first transition time period, sequentially displaying image parts corresponding to a first playing progress in at least one first image according to the first playing progress of the first video, wherein the at least one first image is obtained by stretching at least one original image in the first transition time period based on the first video;
and after the first video is played, sequentially displaying image parts corresponding to a second playing progress in at least one second image according to the second playing progress of the second video, wherein the at least one second image is obtained by stretching at least one original image in a second transition time period based on the second video.
In one possible implementation manner, the acquiring a first transition period of a first video end and a second transition period of a second video end includes:
acquiring a preset transition time period between videos;
acquiring a time period occupied by the preset transition time period at the end of the first video according to the playing sequence of the first video and the second video, and taking the time period as the first transition time period;
and acquiring the time period occupied by the preset transition time period at the leader of the second video as the second transition time period.
In a possible implementation manner, before sequentially displaying, according to a first playing progress of the first video when the first video is played to the first transition time period, image portions corresponding to the first playing progress in at least one first image, the method further includes:
acquiring at least one original image in a first transition time period of the first video;
and stretching the width of at least one original image in the first transition time period by a target multiple to obtain at least one first image in the first transition time period.
In a possible implementation manner, the sequentially displaying, according to a first playing progress of the first video when the first video is played to the first transition time period, image portions corresponding to the first playing progress in at least one first image includes:
when the first video is played to the first transition time period, acquiring at least one original image in the first transition time period;
stretching the width of at least one original image in the first transition time period by a target multiple to obtain at least one first image in the first transition time period;
and sequentially displaying image parts corresponding to the first playing progress in the at least one first image in the first transition time period according to the first playing progress of the first video on the basis of the at least one first image in the first transition time period.
In a possible implementation manner, the sequentially displaying, according to a first playing progress of the first video when the first video is played to the first transition time period, image portions corresponding to the first playing progress in at least one first image includes:
when the first video is played to the first transition time period, determining a first playing progress of the first video according to a current time value of the first video in the first transition time period, an initial time value of the first transition time period and the total duration of the first transition time period;
determining an image part corresponding to the first playing progress in the at least one first image based on the first playing progress;
and sequentially displaying the image parts corresponding to the first playing progress in the at least one first image according to the first playing progress in the first transition time period.
In a possible implementation manner, before the playing of the first video is completed, and image portions corresponding to a second playing progress in at least one second image are sequentially displayed according to the second playing progress of the second video, the method further includes:
acquiring at least one original image in a second transition time period of the second video;
and stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period.
In a possible implementation manner, the sequentially displaying, after the first video is played, image portions corresponding to a second playing progress in at least one second image according to the second playing progress of the second video includes:
when the second video is played to the second transition time period, acquiring at least one original image in the second transition time period;
stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period;
and sequentially displaying image parts corresponding to a second playing progress in at least one second image in the second transition time period according to the second playing progress of the second video on the basis of the at least one second image in the second transition time period.
In a possible implementation manner, the sequentially displaying, after the first video is played, image portions corresponding to a second playing progress in at least one second image according to the second playing progress of the second video includes:
when the second video is played to the second transition time period, determining a second playing progress of the second video according to the current time value of the second video in the second transition time period, the initial time value of the second transition time period and the total duration of the second transition time period;
determining an image part corresponding to the second playing progress in the at least one second image based on the second playing progress;
and sequentially displaying the image part corresponding to the second playing progress in the at least one second image according to the second playing progress in the second transition time period.
In one aspect, a video transition apparatus is provided, the apparatus comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first transition time period of a first video end and a second transition time period of a second video end, and the first video and the second video are videos to be combined;
the first image display module is used for sequentially displaying image parts corresponding to a first playing progress in at least one first image according to the first playing progress of the first video when the first video is played to the first transition time period, wherein the at least one first image is obtained by stretching at least one original image in the first transition time period based on the first video;
and the second image display module is used for sequentially displaying image parts corresponding to a second playing progress in at least one second image according to the second playing progress of the second video after the first video is played, wherein the at least one second image is obtained by stretching at least one original image in a second transition time period based on the second video.
In one possible implementation manner, the obtaining module is configured to:
acquiring a preset transition time period between videos;
acquiring a time period occupied by the preset transition time period at the end of the first video according to the playing sequence of the first video and the second video, and taking the time period as the first transition time period;
and acquiring the time period occupied by the preset transition time period at the leader of the second video as the second transition time period.
In one possible implementation, the apparatus further comprises a stretching module for:
acquiring at least one original image in a first transition time period of the first video;
and stretching the width of at least one original image in the first transition time period by a target multiple to obtain at least one first image in the first transition time period.
In one possible implementation, the first image display module is configured to:
when the first video is played to the first transition time period, acquiring at least one original image in the first transition time period;
stretching the width of at least one original image in the first transition time period by a target multiple to obtain at least one first image in the first transition time period;
and sequentially displaying image parts corresponding to the first playing progress in the at least one first image in the first transition time period according to the first playing progress of the first video on the basis of the at least one first image in the first transition time period.
In one possible implementation, the first image display module is configured to:
when the first video is played to the first transition time period, determining a first playing progress of the first video according to a current time value of the first video in the first transition time period, an initial time value of the first transition time period and the total duration of the first transition time period;
determining an image part corresponding to the first playing progress in the at least one first image based on the first playing progress;
and sequentially displaying the image parts corresponding to the first playing progress in the at least one first image according to the first playing progress in the first transition time period.
In one possible implementation, the stretching module is further configured to:
acquiring at least one original image in a second transition time period of the second video;
and stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period.
In one possible implementation, the second image display module is configured to:
when the second video is played to the second transition time period, acquiring at least one original image in the second transition time period;
stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period;
and sequentially displaying image parts corresponding to a second playing progress in at least one second image in the second transition time period according to the second playing progress of the second video on the basis of the at least one second image in the second transition time period.
In one possible implementation, the second image display module is configured to:
when the second video is played to the second transition time period, determining a second playing progress of the second video according to the current time value of the second video in the second transition time period, the initial time value of the second transition time period and the total duration of the second transition time period;
determining an image part corresponding to the second playing progress in the at least one second image based on the second playing progress;
and sequentially displaying the image part corresponding to the second playing progress in the at least one second image according to the second playing progress in the second transition time period.
In one aspect, a computer device is provided, and the computer device includes a processor and a memory, where at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the operations performed by the video transition method.
In one aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is loaded and executed by a processor to implement the operations performed by the above-mentioned video transition method.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
by acquiring a first transition time period of a first video title and a second transition time period of a second video title, when a first video is played to the first transition time period, at least one first image in the first transition time period is sequentially displayed, and when the first video is played, at least one second image in the second transition time period of a second video is sequentially displayed. According to the method and the device, the image width of the two videos is stretched, the stretched image of the first video is displayed when the first video is played, the stretched image of the second video is displayed after the first video is played, the first video is played and the second video is played in the video transition process of the player, the two videos do not need to be played simultaneously, the memory of the player is reduced, and the complexity of video coding is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of an implementation environment of a video transition method according to an embodiment of the present application;
fig. 2 is a flowchart of a video transition method according to an embodiment of the present application;
fig. 3 is a flowchart of a video transition method according to an embodiment of the present application;
fig. 4 is a flowchart of a video transition method provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a video transition apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a server provided in an embodiment of the present application;
fig. 8 is a schematic diagram of an image stretching according to an embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an implementation environment of a video transition method according to an embodiment of the present application. Referring to fig. 1, the implementation environment includes: the terminal 101 may run an application having a video processing function, such as a video clip application, the terminal may have a camera, a player, and the like, the terminal 101 has a communication function and may access the internet, and the terminal 101 may be a mobile phone, a tablet computer, a desktop computer, a notebook computer, and the like. The server 102 may be a background server for the above-mentioned application, and the server 102 may establish communication with the terminal 101. The server 102 may be a single server or a server group, and if the server is a single server, the server may be responsible for all processing in the following schemes, and if the server is a server group, different servers in the server group may be respectively responsible for different processing in the following schemes, and the specific processing allocation condition may be arbitrarily set by a technician according to actual needs, and is not described herein again.
In the embodiment of the present application, the process of video transition may be performed only by the terminal 101. When a user wants to merge two videos, the terminal 101 may be operated to start a video clip application, and after the terminal 101 acquires the two videos that the user wants to merge, a video transition effect may be added between the two videos, and by using the method provided in the embodiment of the present application, video transition preview is implemented in the video clip application.
Alternatively, the video transition process may be performed by both the terminal 101 and the server 102. When a user wants to merge two videos, the terminal 101 may be operated to start a video clip application, and after the terminal 101 obtains the two videos that the user wants to merge, an effect of video transition may be added between the two videos. When a user wants to preview a video transition, the user operates the terminal 101 to trigger a preview instruction, the terminal 101 sends a preview request to the server 102 after receiving the preview instruction, and the server 102 may stretch at least one original image in the two videos by using the image stretching method provided by the embodiment of the present application to obtain at least one stretched image in the two videos. The server 102 may send the stretched image to the terminal 101, and the terminal 101 plays the video transition on the interface of the video clip application by using an internally installed player, thereby implementing the video transition preview.
Fig. 2 is a flowchart of a video transition method according to an embodiment of the present application. The terminal and the server may both be referred to as a computer device, and this embodiment is described with the computer device as an execution subject, referring to fig. 2, and this embodiment includes:
in step 201, the computer device obtains a first transition time period of a first video end and a second transition time period of a second video end, where the first video and the second video are videos to be merged.
In step 202, when the first video is played to the first transition time period, the computer device sequentially displays, according to the first playing progress of the first video, image portions corresponding to the first playing progress in at least one first image, where the at least one first image is obtained by stretching at least one original image in the first transition time period based on the first video.
In step 203, after the first video is played, the computer device sequentially displays, according to a second playing progress of the second video, image portions corresponding to the second playing progress in at least one second image, where the at least one second image is obtained by stretching at least one original image in a second transition time period based on the second video.
In one possible implementation manner, acquiring a first transition period of a first video end and a second transition period of a second video end includes:
acquiring a preset transition time period between videos;
acquiring a time period occupied by a preset transition time period at the end of a first video according to the playing sequence of the first video and the second video, and taking the time period as a first transition time period;
and acquiring the time period occupied by the preset transition time period at the leader of the second video as the second transition time period.
In a possible implementation manner, before sequentially displaying, according to a first playing progress of the first video, image portions corresponding to the first playing progress in at least one first image when the first video is played to a first transition time period, the method further includes:
acquiring at least one original image in a first transition time period of a first video;
and stretching the width of at least one original image in the first transition time period by a target multiple to obtain at least one first image in the first transition time period.
In one possible implementation manner, when the first video is played to the first transition time period, sequentially displaying, according to a first playing progress of the first video, image portions corresponding to the first playing progress in at least one first image, includes:
when the first video is played to a first transition time period, acquiring at least one original image in the first transition time period;
stretching the width of at least one original image in a first transition time period by a target multiple to obtain at least one first image in the first transition time period;
and sequentially displaying image parts corresponding to the first playing progress in the at least one first image in the first transition time period according to the first playing progress of the first video on the basis of the at least one first image in the first transition time period.
In one possible implementation manner, when the first video is played to the first transition time period, sequentially displaying, according to a first playing progress of the first video, image portions corresponding to the first playing progress in at least one first image, includes:
when the first video is played to a first transition time period, determining a first playing progress of the first video according to a current time value of the first video in the first transition time period, an initial time value of the first transition time period and the total duration of the first transition time period;
determining an image part corresponding to the first playing progress in at least one first image based on the first playing progress;
and sequentially displaying the image parts corresponding to the first playing progress in at least one first image according to the first playing progress in the first transition time period.
In a possible implementation manner, before the playing of the first video is completed and image portions corresponding to the second playing progress in the at least one second image are sequentially displayed according to the second playing progress of the second video, the method further includes:
acquiring at least one original image of a second video in a second transition time period;
and stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period.
In a possible implementation manner, after the first video is played, sequentially displaying, according to a second playing progress of the second video, image portions corresponding to the second playing progress in at least one second image, including:
when the second video is played to a second transition time period, acquiring at least one original image in the second transition time period;
stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period;
and sequentially displaying the image parts corresponding to the second playing progress in the at least one second image in the second transition time period according to the second playing progress of the second video on the basis of the at least one second image in the second transition time period.
In a possible implementation manner, after the first video is played, sequentially displaying, according to a second playing progress of the second video, image portions corresponding to the second playing progress in at least one second image, including:
when the second video is played to the second transition time period, determining a second playing progress of the second video according to the current time value of the second video in the second transition time period, the initial time value of the second transition time period and the total duration of the second transition time period;
determining an image part corresponding to the second playing progress in the at least one second image based on the second playing progress;
and in a second transition time period, sequentially displaying the image parts corresponding to the second playing progress in at least one second image according to the second playing progress.
By acquiring a first transition time period of a first video title and a second transition time period of a second video title, when a first video is played to the first transition time period, at least one first image in the first transition time period is sequentially displayed, and when the first video is played, at least one second image in the second transition time period of a second video is sequentially displayed. According to the method, the image width of the two videos is stretched, the stretched image of the first video is displayed when the first video is played, the stretched image of the second video is displayed after the first video is played, the first video is played and the second video is played in the video transition process of the player, the two videos do not need to be played simultaneously, the memory of the player is reduced, the video coding complexity is reduced, and the double-video transition effect is achieved through single video transition.
When a user wants to merge two videos, the terminal can be operated to start a video clip application program, the two videos are spliced in the video clip application program, and the effect of video transition is added between the two videos, so that the merged video is obtained. In the process of video merging, a user can preview a video transition effect in an interface of a video clip application program, and a player installed in a terminal judges whether to make a transition or not according to a current timestamp of a video in a playing time period in the transition preview process, wherein the current timestamp is a time point corresponding to the current time when the video is played in the playing time period. Fig. 3 is a flowchart of a video transition method according to an embodiment of the present application. The terminal and the server may both be referred to as a computer device, and this embodiment is described with the computer device as an execution subject, referring to fig. 3, and this embodiment includes:
in step 301, a computer device obtains a first transition period for a first video trailer and a second transition period for a second video trailer.
In this embodiment of the application, the first video and the second video are videos to be merged, the first video may be a video with a previous playing sequence set by the user, and the second video may be a video with a next playing sequence set by the user. The first transition time period is a time period for video transition of the first video, and the second transition time period is a time period for video transition of the second video. The first video and the second video are two videos in adjacent playing sequence, and no other video exists between the first video and the second video.
In a possible implementation manner, the process of the computer device acquiring the first transition time period includes: after the computer equipment acquires the preset transition time period between the videos, acquiring the time period occupied by the preset transition time period at the end of the first video according to the playing sequence of the first video and the second video, and taking the time period as the first transition time period. The process of acquiring the second transition time period by the computer device includes: after the computer equipment acquires the preset transition time period between the videos, the time period occupied by the preset transition time period at the leader of the second video is acquired as the second transition time period according to the playing sequence of the first video and the second video.
Specifically, when a user wants to add a transition effect between two videos, the computer device may be operated to start the video clip application, and then the video clip application has tags such as a video tag, an audio tag, a transition special effect, and an overlay material displayed in an interface thereof. The user can click the transition special effect label, the added video label and the video time axis are displayed in the interface of the video clip application program, the user can operate the computer equipment to import the first video, the first video is displayed in the interface and imported to the video time axis, then the second video is imported, and the second video is located at the position, behind the first video, on the video time axis. The user can operate the computer device to click the transition time tag, manually set the total duration of the transition time period, or select the total duration of the default transition time period. After a user sets the transition time period duration, a transition time period is displayed on a video time axis in the interface, and the transition time period covers a part of time period of the first video title and covers a part of time period of the second video title. The computer device may use a time period occupied by the transition time period at the end of the first video as a first transition time period of the first video, and use a time period occupied by the transition time period at the head of the second video as a second transition time period of the second video.
For example, assuming that the duration of the first video is 2s and the duration of the second video is 3s, after the user imports the first video and the second video, a transition time period with a total duration of 300ms may be preset, and then the duration of the transition time period in the time period occupied by the first video end is 150ms, and then the first transition time period of the first video is 1.850s to 2 s. The duration of the transition time period in the time period occupied by the second video leader is 150ms, and then the second transition time period of the second video is 2s to 2.150 s.
In one possible implementation, the process of the computer device acquiring the first video and the second video may be: the computer device may select two videos from the locally stored historical videos, with one video being a first video and the other video being a second video. Or, the computer device may also use the camera to shoot two videos on site, and use one of the shot videos as a first video and another video as a second video, which is not limited in how to obtain the videos in this embodiment of the present application, and it should be noted that, in this embodiment of the present application, only transition between two videos that are adjacent in the playing sequence is taken as an example for description, in some embodiments, transition between multiple videos may also be set at the same time, so that transition between multiple videos can be previewed during previewing, and a transition processing process between every two videos that are adjacent in the playing sequence may use the flow of this embodiment of the present application, which is not described herein again.
In step 302, the computer device determines at least one first image for a first transition period of the first video based on at least one original image for the first transition period, and determines at least one second image for a second transition period of the second video based on at least one original image for the second transition period.
In the embodiment of the application, at least one first image is obtained by stretching at least one original image in a first transition time period based on the first video. The at least one second image is stretched based on the at least one original image during a second transition period of the second video.
In one possible implementation, the process of the computer device determining the first image may include: the computer device can acquire at least one original image in a first transition time period of the first video, and stretch the height and the width of the at least one original image by a target multiple to obtain at least one first image in the first transition time period. The process of the computer device determining the second image may include: the computer device may acquire at least one original image in a second transition time period of the second video, and stretch the height and the width of the at least one original image by a target multiple to obtain at least one second image in the second transition time period. The target multiple is an adjustable parameter, and represents that one image needs to be completely displayed through several video frames in the transition time period.
Specifically, when the computer device determines the first image, after the computer device acquires the first transition time period of the first video, the computer device may acquire at least one original image in the first transition time period of the first video, stretch each original image by the target multiple with the original image having the same height and the same width, obtain an image with the target multiple stretched, use the image as the first image of the first video, and further obtain at least one first image in the first transition time period. When the computer device determines the second image, after the computer device acquires the second transition time period of the second video, the computer device may acquire at least one original image in the second transition time period of the second video, stretch the height and the width of each original image by the target multiple to obtain an image with the target multiple stretched, and use the image as the second image of the second video to further obtain at least one second image in the second transition time period.
For example, according to the above example, the first transition time period of the first video may be 1.850s to 2s, and when the target multiple is 2, the computer device may acquire at least one original image of the first video for the time period of 1.850s to 2 s. And stretching the at least one original image by 2 times with the same height to obtain an image stretched by 2 times, and taking the image as a first image of the first video to further obtain at least one first image of the first video in the range from 1.850s to 2 s. The second transition period of the second video may be 2s to 2.150s, and when the target multiple is 2, the computer device may acquire at least one original image of the second video for a period of 1.850s to 2 s. And stretching the at least one original image by 2 times with the same height to obtain an image stretched by 2 times, and taking the image as a second image of the second video to further obtain at least one second image of the second video in the range of 1.850s to 2 s.
In step 303, when the first video is played to the first transition time period, the computer device sequentially displays, according to the first playing progress of the first video, image portions corresponding to the first playing progress in the at least one first image.
In this embodiment of the application, the first playing progress refers to a playing progress of a first image corresponding to a current time of a first video in a first transition time period. The value range of the progress (progress, upload progress bar) is [0,1], the first transition time period of the first video is 1.850s to 2s in the above example, the corresponding progress is 0 when the current timestamp is 1.850s, and the corresponding progress is 1 when the current timestamp is 2 s.
In one possible implementation, the process of displaying at least one first image of the first video by the computer device may be: the computer equipment acquires at least one first image in a first transition time period, and when the first video is played to the first transition time period, image parts corresponding to a first playing progress in the at least one first image in the first transition time period are sequentially displayed according to the first playing progress of the first video.
Specifically, when the first video is played to the first transition time period, the first playing progress of the first video may be determined according to the current time value of the first video in the first transition time period, the initial time value of the first transition time period, the total duration of the first transition time period, and the progress formula (1).
Figure BDA0002348058520000131
Wherein K is progress, T2For the current time value, T1Is the initial time value, and T is the total time length. According to the first playing progress, an image part corresponding to the first playing progress in the at least one first image can be determined, and in the first transition time period, the image part corresponding to the first playing progress in the at least one first image is sequentially displayed according to the first playing progress.
For example, when the first transition time period of the first video is 1.850s to 2s and the current timestamp is 1.850s, the first playing progress is 0, the first image corresponding to the initial time value of the first transition time period of the first video starts to be displayed, and the image portions corresponding to the first playing progress in the at least one first image are sequentially displayed from left to right according to the first playing progress. When the current timestamp is 2s, the first playing progress is 1, and the display of each first image of the first video in the first transition time period is completed, so that the transition effect of moving from right to left is simulated.
In step 304, after the first video is played, the computer device sequentially displays image portions corresponding to the second playing progress in the at least one second image according to the second playing progress of the second video.
In this embodiment of the application, the second playing progress refers to a playing progress of a second image corresponding to a current time of a second video in a second transition time period.
In one possible implementation, the process of displaying at least one second image of the second video by the computer device may be: after the first video is played, the computer device may acquire at least one second image in a second transition time period, and sequentially display an image portion corresponding to a second playing progress in the at least one second image in the second transition time period according to the second playing progress of the second video.
Specifically, after the first video is played, the second playing progress of the second video may be determined according to the current time value of the second video in the second transition time period, the initial time value of the second transition time period, the total duration of the second transition time period, and the progress formula (1). And according to the second playing progress, determining an image part corresponding to the second playing progress in the at least one second image, and sequentially displaying the image part corresponding to the second playing progress in the at least one second image according to the second playing progress in the second transition time period.
For example, when the second transition time period of the second video is 2s to 2.150s and the current timestamp is 2s, the second playing progress is 0, the second image corresponding to the initial time value starts to be displayed, and the image portions corresponding to the second playing progress in the at least one second image are sequentially displayed from left to right according to the second playing progress. When the current timestamp is 2.150s, the second playing progress is 1, and the display of each second image of the second video in the second transition time period is completed, so that the transition effect of the second video entering the screen from the right side is simulated.
In a specific example, fig. 8 is a schematic diagram of image stretching according to an embodiment of the present application, and as shown in fig. 8, an original image of a first video may be a letter a, an original image of a second video may be a letter B, a height of the original image is unchanged, a width of the original image is stretched by 2 times, an image with a width enlarged by 2 times is obtained, and widths of the letters a and B are both enlarged by 2 times. When the total duration of the transition time period is 4 frames, the duration of the first transition time period of the first video is 2 frames, the progress of the first frame is 0.5, the left half of the letter a of the first video is displayed, the progress of the second frame is 1, the right half of the letter a of the first video is displayed, and the progress from 0 to 1 is just right for completely displaying the first video, that is, completely displaying the letter a. The duration of the second transition time period of the second video is also 2 frames, and the display process of the second video is the same as that of the first video, and is not repeated.
By acquiring a first transition time period of a first video title and a second transition time period of a second video title, when a first video is played to the first transition time period, at least one first image in the first transition time period is sequentially displayed, and when the first video is played, at least one second image in the second transition time period of a second video is sequentially displayed. According to the method, the image width of the two videos is stretched, the stretched image of the first video is displayed when the first video is played, the stretched image of the second video is displayed after the first video is played, the first video is played and the second video is played in the video transition process of the player, the two videos do not need to be played simultaneously, the memory of the player is reduced, the video coding complexity is reduced, and the double-video transition effect is achieved through single video transition.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
In the above steps 301 to 305, taking an example that at least one first image in the first transition time period is obtained first, and when the first video is played to the first transition time period, the at least one first image is directly used for explanation, in this embodiment of the application, the computer device may further determine at least one first image in the first transition time period when the first video is played to the first transition time period, so as to perform a subsequent display process. Fig. 4 is a flowchart of a video transition method according to an embodiment of the present application. Referring to fig. 4, the embodiment includes:
in step 401, the computer device obtains a first transition period of a first video trailer and a second transition period of a second video trailer.
Step 401 is similar to step 301, and will not be described herein again.
In step 402, when the first video is played to the first transition time period, the computer device determines at least one first image based on at least one original image in the first transition time period, and sequentially displays image portions corresponding to the first playing progress in the at least one first image according to the first playing progress of the first video.
In a possible implementation manner, when the first video is played to the first transition time period, the computer device may obtain at least one original image in the first transition time period, stretch the height and the width of the at least one original image by the target multiple to obtain at least one first image in the first transition time period, and sequentially display, according to a first playing progress of the first video, an image portion corresponding to the first playing progress in the at least one first image in the first transition time period.
The process of obtaining at least one first image based on at least one original image in step 402 is the same as that in step 302, and is not described herein again. The process of displaying at least one first image in step 402 is similar to that in step 303, and is not described herein again.
In step 403, after the first video is played, the computer device determines at least one second image based on the at least one original image in the second transition time period, and sequentially displays image portions corresponding to a second playing progress in the at least one second image according to the second playing progress of the second video.
In a possible implementation manner, after the first video is played, the computer device may obtain at least one original image in a second transition time period, stretch the height and the width of the at least one original image by the target multiple to obtain at least one second image in the second transition time period, and sequentially display, according to a second playing progress of the second video, an image portion corresponding to the second playing progress in the at least one second image in the second transition time period.
The process of obtaining at least one second image based on at least one original image in step 403 is the same as that in step 302, and is not described herein again. The process of displaying at least one second image in step 403 is similar to that in step 304, and is not described herein again.
By acquiring a first transition time period of a first video title and a second transition time period of a second video title, when a first video is played to the first transition time period, at least one first image in the first transition time period is sequentially displayed, and when the first video is played, at least one second image in the second transition time period of a second video is sequentially displayed. According to the method, the image width of the two videos is stretched, the stretched image of the first video is displayed when the first video is played, the stretched image of the second video is displayed after the first video is played, the first video is played and the second video is played in the video transition process of the player, the two videos do not need to be played simultaneously, the memory of the player is reduced, the video coding complexity is reduced, and the double-video transition effect is achieved through single video transition.
Fig. 5 is a schematic structural diagram of a video transition apparatus provided in an embodiment of the present application, and referring to fig. 5, the apparatus includes:
an obtaining module 501, configured to obtain a first transition time period of a first video end and a second transition time period of a second video end, where the first video and the second video are videos to be merged;
a first image display module 502, configured to sequentially display, according to a first playing progress of a first video when the first video is played to a first transition time period, image portions corresponding to the first playing progress in at least one first image, where the at least one first image is obtained by stretching at least one original image in the first transition time period based on the first video;
the second image display module 503 is configured to sequentially display, after the first video is played, image portions corresponding to a second playing progress in at least one second image according to the second playing progress of the second video, where the at least one second image is obtained by stretching at least one original image in a second transition time period based on the second video.
In one possible implementation, the obtaining module 501 is configured to:
acquiring a preset transition time period between videos;
acquiring a time period occupied by a preset transition time period at the end of a first video according to the playing sequence of the first video and the second video, and taking the time period as a first transition time period;
and acquiring the time period occupied by the preset transition time period at the leader of the second video as the second transition time period.
In one possible implementation, the apparatus further comprises a stretching module for:
acquiring at least one original image in a first transition time period of a first video;
and stretching the width of at least one original image in the first transition time period by a target multiple to obtain at least one first image in the first transition time period.
In one possible implementation, the first image display module 502 is configured to:
when the first video is played to a first transition time period, acquiring at least one original image in the first transition time period;
stretching the width of at least one original image in a first transition time period by a target multiple to obtain at least one first image in the first transition time period;
and sequentially displaying image parts corresponding to the first playing progress in the at least one first image in the first transition time period according to the first playing progress of the first video on the basis of the at least one first image in the first transition time period.
In one possible implementation, the first image display module 502 is configured to:
when the first video is played to a first transition time period, determining a first playing progress of the first video according to a current time value of the first video in the first transition time period, an initial time value of the first transition time period and the total duration of the first transition time period;
determining an image part corresponding to the first playing progress in at least one first image based on the first playing progress;
and sequentially displaying the image parts corresponding to the first playing progress in at least one first image according to the first playing progress in the first transition time period.
In one possible implementation, the stretching module is further configured to:
acquiring at least one original image of a second video in a second transition time period;
and stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period.
In one possible implementation, the second image display module is configured to:
when the second video is played to a second transition time period, acquiring at least one original image in the second transition time period;
stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period;
and sequentially displaying the image parts corresponding to the second playing progress in the at least one second image in the second transition time period according to the second playing progress of the second video on the basis of the at least one second image in the second transition time period.
In one possible implementation, the second image display module is configured to:
when the second video is played to the second transition time period, determining a second playing progress of the second video according to the current time value of the second video in the second transition time period, the initial time value of the second transition time period and the total duration of the second transition time period;
determining an image part corresponding to the second playing progress in the at least one second image based on the second playing progress;
and in a second transition time period, sequentially displaying the image parts corresponding to the second playing progress in at least one second image according to the second playing progress.
By acquiring a first transition time period of a first video title and a second transition time period of a second video title, when a first video is played to the first transition time period, at least one first image in the first transition time period is sequentially displayed, and when the first video is played, at least one second image in the second transition time period of a second video is sequentially displayed. According to the method, the image width of the two videos is stretched, the stretched image of the first video is displayed when the first video is played, the stretched image of the second video is displayed after the first video is played, the first video is played and the second video is played in the video transition process of the player, the two videos do not need to be played simultaneously, the memory of the player is reduced, the video coding complexity is reduced, and the double-video transition effect is achieved through single video transition.
It should be noted that: in the video transition device provided in the above embodiment, only the division of the above functional modules is used for illustration in the video transition, and in practical applications, the above functions may be distributed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the video transition device provided by the above embodiment and the video transition method embodiment belong to the same concept, and the specific implementation process thereof is described in the method embodiment and is not described herein again.
The computer device provided in the embodiment of the present application may be provided as a terminal, and fig. 6 is a schematic structural diagram of the terminal provided in the embodiment of the present application. The terminal 600 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 600 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 600 includes: a processor 601 and a memory 602.
The processor 601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on. The processor 601 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 601 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, processor 601 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
The memory 602 may include one or more computer-readable storage media, which may be non-transitory. The memory 602 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 602 is used to store at least one instruction for execution by processor 601 to implement the video transition method provided by the method embodiments of the present application.
In some embodiments, the terminal 600 may further optionally include: a peripheral interface 603 and at least one peripheral. The processor 601, memory 602, and peripheral interface 603 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 603 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 604, a touch screen display 605, a camera 606, an audio circuit 607, a positioning component 608, and a power supply 609.
The peripheral interface 603 may be used to connect at least one peripheral related to I/O (Input/Output) to the processor 601 and the memory 602. In some embodiments, the processor 601, memory 602, and peripheral interface 603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 601, the memory 602, and the peripheral interface 603 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
The Radio Frequency circuit 604 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. The radio frequency circuitry 604 communicates with communication networks and other communication devices via electromagnetic signals. The rf circuit 604 converts an electrical signal into an electromagnetic signal to transmit, or converts a received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 604 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency circuitry 604 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: metropolitan area networks, various generation mobile communication networks (2G, 3G, 4G, and 6G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the rf circuit 604 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
The display 605 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 605 is a touch display screen, the display screen 605 also has the ability to capture touch signals on or over the surface of the display screen 605. The touch signal may be input to the processor 601 as a control signal for processing. At this point, the display 605 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display 605 may be one, providing the front panel of the terminal 600; in other embodiments, the display 605 may be at least two, respectively disposed on different surfaces of the terminal 600 or in a folded design; in still other embodiments, the display 605 may be a flexible display disposed on a curved surface or on a folded surface of the terminal 600. Even more, the display 605 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display 605 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The camera assembly 606 is used to capture images or video. Optionally, camera assembly 606 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments, camera assembly 606 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Audio circuitry 607 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 601 for processing or inputting the electric signals to the radio frequency circuit 604 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 600. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 601 or the radio frequency circuit 604 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio circuitry 607 may also include a headphone jack.
The positioning component 608 is used for positioning the current geographic Location of the terminal 600 to implement navigation or LBS (Location Based Service). The Positioning component 608 can be a Positioning component based on the united states GPS (Global Positioning System), the chinese beidou System, the russian graves System, or the european union's galileo System.
Power supply 609 is used to provide power to the various components in terminal 600. The power supply 609 may be ac, dc, disposable or rechargeable. When the power supply 609 includes a rechargeable battery, the rechargeable battery may support wired or wireless charging. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, the terminal 600 also includes one or more sensors 610. The one or more sensors 610 include, but are not limited to: acceleration sensor 611, gyro sensor 612, pressure sensor 613, fingerprint sensor 614, optical sensor 616 and proximity sensor 616.
The acceleration sensor 611 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 600. For example, the acceleration sensor 611 may be used to detect components of the gravitational acceleration in three coordinate axes. The processor 601 may control the touch display 606 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 611. The acceleration sensor 611 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 612 may detect a body direction and a rotation angle of the terminal 600, and the gyro sensor 612 and the acceleration sensor 611 may cooperate to acquire a 3D motion of the user on the terminal 600. The processor 601 may implement the following functions according to the data collected by the gyro sensor 612: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 613 may be disposed on the side bezel of terminal 600 and/or underneath touch display 606. When the pressure sensor 613 is disposed on the side frame of the terminal 600, a user's holding signal of the terminal 600 can be detected, and the processor 601 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 613. When the pressure sensor 613 is disposed at the lower layer of the touch display screen 605, the processor 601 controls the operability control on the UI interface according to the pressure operation of the user on the touch display screen 605. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 614 is used for collecting a fingerprint of a user, and the processor 601 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 614, or the fingerprint sensor 614 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, the processor 601 authorizes the user to perform relevant sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings, etc. The fingerprint sensor 614 may be disposed on the front, back, or side of the terminal 600. When a physical button or vendor Logo is provided on the terminal 600, the fingerprint sensor 614 may be integrated with the physical button or vendor Logo.
The optical sensor 615 is used to collect the ambient light intensity. In one embodiment, processor 601 may control the display brightness of touch display 606 based on the ambient light intensity collected by optical sensor 615. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 606 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 605 is turned down. In another embodiment, the processor 601 may also dynamically adjust the shooting parameters of the camera assembly 606 according to the ambient light intensity collected by the optical sensor 615.
A proximity sensor 616, also known as a distance sensor, is typically disposed on the front panel of the terminal 600. The proximity sensor 616 is used to collect the distance between the user and the front surface of the terminal 600. In one embodiment, when the proximity sensor 616 detects that the distance between the user and the front surface of the terminal 600 gradually decreases, the processor 601 controls the touch display 605 to switch from the bright screen state to the dark screen state; when the proximity sensor 616 detects that the distance between the user and the front surface of the terminal 600 gradually becomes larger, the processor 601 controls the touch display 605 to switch from the breath screen state to the bright screen state.
Those skilled in the art will appreciate that the configuration shown in fig. 6 is not intended to be limiting of terminal 600 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
The computer device provided by the embodiment of the present application may be provided as a server, and fig. 7 is a schematic structural diagram of a server provided by the embodiment of the present application, where the server 700 may generate a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 701 and one or more memories 702, where at least one instruction is stored in the one or more memories 702, and the at least one instruction is loaded and executed by the one or more processors 701 to implement the methods provided by the above method embodiments. Of course, the server 700 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server 700 may also include other components for implementing the functions of the device, which are not described herein again.
In an exemplary embodiment, a computer-readable storage medium, such as a memory, including instructions executable by a processor in a terminal or a server to perform the video transition method in the above embodiments is also provided. For example, the computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. A method for video transition, the method comprising:
acquiring a first transition time period of a first video end and a second transition time period of a second video head, wherein the first video and the second video are videos to be combined;
when the first video is played to the first transition time period, determining a first playing progress of the first video according to a current time value of the first video in the first transition time period, an initial time value of the first transition time period and the total duration of the first transition time period;
determining an image part corresponding to the first playing progress in at least one first image based on the first playing progress;
sequentially displaying image parts corresponding to the first playing progress in the at least one first image according to the first playing progress in the first transition time period, wherein the at least one first image is obtained by stretching at least one original image in the first transition time period based on the first video;
and after the first video is played, sequentially displaying image parts corresponding to a second playing progress in at least one second image according to the second playing progress of the second video, wherein the at least one second image is obtained by stretching at least one original image in a second transition time period based on the second video.
2. The method of claim 1, wherein obtaining a first transition period of a first video trailer and a second transition period of a second video trailer comprises:
acquiring a preset transition time period between videos;
acquiring a time period occupied by the preset transition time period at the end of the first video according to the playing sequence of the first video and the second video, and taking the time period as the first transition time period;
and acquiring the time period occupied by the preset transition time period at the leader of the second video as the second transition time period.
3. The method of claim 1, further comprising:
acquiring at least one original image in a first transition time period of the first video;
and stretching the width of at least one original image in the first transition time period by a target multiple to obtain at least one first image in the first transition time period.
4. The method of claim 1, further comprising:
when the first video is played to the first transition time period, acquiring at least one original image in the first transition time period;
stretching the width of at least one original image in the first transition time period by a target multiple to obtain at least one first image in the first transition time period;
and sequentially displaying image parts corresponding to the first playing progress in the at least one first image in the first transition time period according to the first playing progress of the first video on the basis of the at least one first image in the first transition time period.
5. The method according to claim 1, wherein before the first video is played and image portions corresponding to the second playing progress in at least one second image are sequentially displayed according to the second playing progress of the second video, the method further comprises:
acquiring at least one original image in a second transition time period of the second video;
and stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period.
6. The method according to claim 1, wherein the sequentially displaying, after the first video is played, image portions corresponding to a second playing progress of at least one second image according to the second playing progress of the second video comprises:
when the second video is played to the second transition time period, acquiring at least one original image in the second transition time period;
stretching the width of at least one original image in the second transition time period by a target multiple to obtain at least one second image in the second transition time period;
and sequentially displaying image parts corresponding to a second playing progress in at least one second image in the second transition time period according to the second playing progress of the second video on the basis of the at least one second image in the second transition time period.
7. The method according to claim 1, wherein the sequentially displaying, after the first video is played, image portions corresponding to a second playing progress of at least one second image according to the second playing progress of the second video comprises:
when the second video is played to the second transition time period, determining a second playing progress of the second video according to the current time value of the second video in the second transition time period, the initial time value of the second transition time period and the total duration of the second transition time period;
determining an image part corresponding to the second playing progress in the at least one second image based on the second playing progress;
and sequentially displaying the image part corresponding to the second playing progress in the at least one second image according to the second playing progress in the second transition time period.
8. A video transition apparatus, comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a first transition time period of a first video end and a second transition time period of a second video end, and the first video and the second video are videos to be combined;
the first image display module is used for determining a first playing progress of the first video according to a current time value of the first video in the first transition time period, an initial time value of the first transition time period and the total duration of the first transition time period when the first video is played to the first transition time period; determining an image part corresponding to the first playing progress in at least one first image based on the first playing progress; sequentially displaying image parts corresponding to the first playing progress in the at least one first image according to the first playing progress in the first transition time period, wherein the at least one first image is obtained by stretching at least one original image in the first transition time period based on the first video;
and the second image display module is used for sequentially displaying image parts corresponding to a second playing progress in at least one second image according to the second playing progress of the second video after the first video is played, wherein the at least one second image is obtained by stretching at least one original image in a second transition time period based on the second video.
9. A computer device comprising a processor and a memory, the memory having stored therein at least one instruction that is loaded and executed by the processor to perform operations performed by the video transition method of any of claims 1-7.
10. A computer-readable storage medium having stored therein at least one instruction, which is loaded and executed by a processor to perform operations performed by the video transition method of any one of claims 1 to 7.
CN201911403629.XA 2019-12-31 2019-12-31 Video transition method and device, computer equipment and storage medium Active CN111083526B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911403629.XA CN111083526B (en) 2019-12-31 2019-12-31 Video transition method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911403629.XA CN111083526B (en) 2019-12-31 2019-12-31 Video transition method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111083526A CN111083526A (en) 2020-04-28
CN111083526B true CN111083526B (en) 2021-12-10

Family

ID=70320209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911403629.XA Active CN111083526B (en) 2019-12-31 2019-12-31 Video transition method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111083526B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291589B (en) * 2020-10-29 2023-09-22 腾讯科技(深圳)有限公司 Method and device for detecting structure of video file
CN112702656A (en) * 2020-12-21 2021-04-23 北京达佳互联信息技术有限公司 Video editing method and video editing device
CN114173067A (en) * 2021-12-21 2022-03-11 科大讯飞股份有限公司 Video generation method, device, equipment and storage medium
CN114268741B (en) * 2022-02-24 2023-01-31 荣耀终端有限公司 Transition dynamic effect generation method, electronic device, and storage medium
CN117729426A (en) * 2023-07-05 2024-03-19 荣耀终端有限公司 Mode switching method, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104144301A (en) * 2014-07-30 2014-11-12 厦门美图之家科技有限公司 Method for transition special effects on basis of mixed modes
WO2016059978A1 (en) * 2014-10-14 2016-04-21 ソニー株式会社 Information processing device, information processing method, and program
CN107770457A (en) * 2017-10-27 2018-03-06 维沃移动通信有限公司 A kind of video creating method and mobile terminal
CN108495171A (en) * 2018-04-03 2018-09-04 优视科技有限公司 Method for processing video frequency and its device, storage medium, electronic product
CN109640019A (en) * 2018-12-13 2019-04-16 广州艾美网络科技有限公司 A method of editor's long video is recorded by mobile terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4125140B2 (en) * 2003-01-21 2008-07-30 キヤノン株式会社 Information processing apparatus, information processing method, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104144301A (en) * 2014-07-30 2014-11-12 厦门美图之家科技有限公司 Method for transition special effects on basis of mixed modes
WO2016059978A1 (en) * 2014-10-14 2016-04-21 ソニー株式会社 Information processing device, information processing method, and program
CN107770457A (en) * 2017-10-27 2018-03-06 维沃移动通信有限公司 A kind of video creating method and mobile terminal
CN108495171A (en) * 2018-04-03 2018-09-04 优视科技有限公司 Method for processing video frequency and its device, storage medium, electronic product
CN109640019A (en) * 2018-12-13 2019-04-16 广州艾美网络科技有限公司 A method of editor's long video is recorded by mobile terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
数字剪辑系统下常用特技的非常规用法;胡嘉建;《现代电影技术》;20131111;全文 *

Also Published As

Publication number Publication date
CN111083526A (en) 2020-04-28

Similar Documents

Publication Publication Date Title
CN108401124B (en) Video recording method and device
CN111147878B (en) Stream pushing method and device in live broadcast and computer storage medium
CN111083526B (en) Video transition method and device, computer equipment and storage medium
CN111065001B (en) Video production method, device, equipment and storage medium
CN108965922B (en) Video cover generation method and device and storage medium
CN108449641B (en) Method, device, computer equipment and storage medium for playing media stream
CN109922356B (en) Video recommendation method and device and computer-readable storage medium
CN109144346B (en) Song sharing method and device and storage medium
CN109346111B (en) Data processing method, device, terminal and storage medium
CN110533585B (en) Image face changing method, device, system, equipment and storage medium
CN111880888B (en) Preview cover generation method and device, electronic equipment and storage medium
CN110868636B (en) Video material intercepting method and device, storage medium and terminal
CN110839174A (en) Image processing method and device, computer equipment and storage medium
CN110769313A (en) Video processing method and device and storage medium
CN111586444B (en) Video processing method and device, electronic equipment and storage medium
CN114546227A (en) Virtual lens control method, device, computer equipment and medium
CN109819314B (en) Audio and video processing method and device, terminal and storage medium
CN113032590A (en) Special effect display method and device, computer equipment and computer readable storage medium
CN110868642B (en) Video playing method, device and storage medium
CN113204672A (en) Resource display method and device, computer equipment and medium
CN112616082A (en) Video preview method, device, terminal and storage medium
CN112004134B (en) Multimedia data display method, device, equipment and storage medium
CN108966026B (en) Method and device for making video file
CN109032492B (en) Song cutting method and device
CN111370096A (en) Interactive interface display method, device, equipment and storage medium

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