Video zoom playing method and device, electronic equipment and storage medium
By adjusting the video size in the video playback area according to the zoom conditions and playback duration, the zoom amplification playback of the target video is solved, and the problem that the fixed area playback cannot attract users' attention is increased, the video depth and dynamic effects are increased, and the user experience is improved.
Patent Information
- Application Number
- CN202411101935.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, when playing recommended videos in a fixed area, it is impossible to attract user attention, and the key content in the video cannot be highlighted, affecting the user experience.
By dynamically adjusting the size of the video playback area according to the zoom conditions and playback duration of the target video in the preset video playback area, the target video changes with the change of the video playback area during zoom playback, and the zoom amplification playback is achieved, and according to the The zoom playback duration continuously adjusts the area size of the video playback area to achieve smooth and coherent zoom animation effects.
It increases the depth of the video picture, injects vividness and dynamic effects into the static picture, highlights the key content in the target video, and achieves smooth and coherent zoom animation effects, improving the user experience.
Smart Images

Figure CN119071555A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a video zoom playback method, device, electronic device and storage medium. Background Art
[0002] With the development of video software, in order to improve user experience and enable users to easily and quickly determine the TV series they want to watch or recommend advertisements of interest to users, multiple TV series or advertisements are generally recommended to users in a fixed area of the video software in the form of being displayed in turn on the software interface. Each TV series or advertisement corresponds to a recommended video. When the recommended TV series or advertisement is displayed on the interface of the video software, the corresponding recommended video is played in the fixed area, so that users can better understand the recommended content.
[0003] However, for the above method of playing recommended videos in a fixed area, since it is arranged together with other film and television drama content, it cannot attract user attention and cannot highlight the key content in the video, which results in the inability to achieve the desired recommendation effect and affects the user experience. Summary of the invention
[0004] The present application provides a video zoom playback method, device, electronic device and storage medium to solve the problem that the method of playing recommended videos in a fixed area in the prior art cannot attract the user's attention because it is arranged together with other film and television drama screen contents, and cannot highlight the key content in the video, which leads to the technical problem that the desired recommendation effect cannot be achieved and affects the user experience.
[0005] In a first aspect, the present application provides a video zoom playback method, the method comprising:
[0006] When the target video meets the preset zoom condition and is zoomed in the preset video playback area, determine the current zoom playback time of the target video from the beginning of zoom playback in the video playback area to the current time, and the total zoom playback time of the target video in the video playback area; wherein the video playback area is larger than the display area of the target video before zooming;
[0007] Determining the size of the video playback area based on the current zoom playback duration and the total zoom playback duration;
[0008] The video playback area is adjusted according to the area size to obtain a target video playback area, and the target video is controlled to perform zoom playback in the target video playback area.
[0009] As a possible implementation manner, before determining the zoom playback time length of the target video from the beginning of the zoom playback in the video playback area to the current zoom playback time length, the method further includes:
[0010] When the target video meets the zoom condition and starts zooming and playing in the video playing area, recording the starting system time when the target video starts zooming and playing in the video playing area;
[0011] The determining of the current zoom playback duration of the target video from the beginning of zoom playback in the video playback area to the current zoom playback duration includes:
[0012] Obtain the current system time and the start system time when the target video starts zooming and playing in the video playing area;
[0013] The current system time is subtracted from the start system time to obtain the current zoom playback duration of the target video.
[0014] As a possible implementation manner, determining the size of the video playback area based on the current zoom playback duration and the total zoom playback duration includes:
[0015] Determining a change ratio of the height of the video playback area to the zoom playback duration according to the current zoom playback duration and the total zoom playback duration;
[0016] Based on the change ratio, determining a current height of the video playback area;
[0017] Determining the current width of the video playback area according to the current height and a preset scale factor;
[0018] The area size corresponding to the current height and the current width is determined as the area size of the video playback area.
[0019] As a possible implementation manner, determining the change ratio of the height of the video playback area to the zoom playback duration according to the current zoom playback duration and the total zoom playback duration includes:
[0020] Determining a current playback ratio of the target video according to the current zoom playback duration and the total zoom playback duration;
[0021] The current playback ratio is calculated using a preset formula to determine the change ratio of the height of the video playback area to the zoom playback duration.
[0022] As a possible implementation, the current playback ratio is calculated by a preset formula to determine the change ratio of the height of the video playback area to the zoom playback duration, including:
[0023] Determine whether the current playback ratio is less than a preset ratio threshold;
[0024] If the current playback ratio is less than the preset ratio threshold, the playback ratio is calculated using a first preset formula to determine a change ratio between the height of the video playback area and the zoom playback duration;
[0025] If the current playback ratio is greater than or equal to the preset ratio threshold, the playback ratio is calculated using a second preset formula to determine the change ratio of the height of the video playback area to the zoom playback duration.
[0026] As a possible implementation manner, determining the current playback ratio of the target video according to the current zoom playback duration and the total zoom playback duration includes:
[0027] According to the change process of the video playback area, the total zoom playback duration is divided into at least two one-way zoom playback durations, and the one-way zoom playback duration refers to the duration corresponding to the one-way change of the video playback area;
[0028] Determine the start duration and the end duration corresponding to each of the one-way zoom playback durations, and the target one-way zoom playback duration to which the current zoom playback duration belongs;
[0029] Determine a duration difference between the current zoom playback duration and the start duration of the target one-way zoom playback duration;
[0030] The ratio of the duration difference to the target one-way zoom playback duration is determined as the current playback ratio of the target video.
[0031] As a possible implementation manner, determining the current height of the video playback area based on the change ratio includes:
[0032] Obtaining the initial height and final height of the video playback area corresponding to the target one-way zoom playback duration;
[0033] Determine a current height change value of the video playback area based on the initial height, the final height, and the change ratio;
[0034] The sum of the initial height and the height change value is determined as the current height of the video playback area.
[0035] As a possible implementation manner, determining the current height change value of the video playback area based on the initial height, the final height, and the change ratio includes:
[0036] Determine the height difference between the final height and the initial height;
[0037] The height difference value and the change ratio are subjected to a preset operation to obtain a current height change value of the video playback area.
[0038] As a possible implementation method, it also includes:
[0039] During the zoom playback of the target video in the video playback area, determining whether the target video is paused;
[0040] When it is determined that the target video is paused, obtaining a first zoom playback time length that has been played in the video playback area when the target video is paused;
[0041] When the target video is replayed, obtaining the second zoom playback duration of the target video from when it is replayed in the video playback area to the current time;
[0042] Determining a total zoom playback duration of the first zoom playback duration and the second zoom playback duration;
[0043] Determining a new area size of the video playback area based on the total zoom playback duration and the total zoom playback duration;
[0044] The video playback area is adjusted according to the new area size to obtain a new target video playback area, and the target video is controlled to start zoom playback in the new target video playback area from a playback node corresponding to the total zoom playback duration.
[0045] As a possible implementation manner, it is determined that the target video meets the preset zoom condition in the following manner:
[0046] When it is detected that the target video is completely output on the preset visualization interface and the number of times the target video is zoomed is less than a preset number threshold, it is determined that the target video meets the zoom condition;
[0047] The step of determining whether the target video is paused includes:
[0048] When it is detected that the visualization interface is triggered, it is determined that the target video is paused.
[0049] In a second aspect, the present application provides a video zoom playback device, the device comprising:
[0050] A first determination module is used to determine the current zoom playback time of the target video from the beginning of zoom playback in the video playback area to the current time, and the total zoom playback time of the target video when the target video meets the preset zoom condition and is zoomed in the preset video playback area; wherein the video playback area is larger than the display area of the target video before zooming;
[0051] A second determination module, configured to determine the size of the video playback area based on the current zoom playback duration and the total zoom playback duration;
[0052] The adjustment module is used to adjust the video playback area according to the area size to obtain a target video playback area, and control the target video to perform zoom playback in the target video playback area.
[0053] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, wherein the processor is used to execute a video zoom playback program stored in the memory to implement the video zoom playback method described in any one of the first aspects.
[0054] In a fourth aspect, the present application provides a storage medium storing one or more programs, which can be executed by one or more processors to implement the video zoom playback method described in any one of the first aspects.
[0055] The technical solution provided by the embodiment of the present application determines the current zoom playback time of the target video from the beginning of zoom playback in the video playback area to the current time, and the total zoom playback time of the target video when the target video meets the preset zoom condition and is played in a preset video playback area with zoom, wherein the above-mentioned video playback area is larger than the display area before the target video is zoomed, and the area size of the video playback area is determined based on the above-mentioned current zoom playback time and the above-mentioned total zoom playback time, and the above-mentioned video playback area is adjusted according to the above-mentioned area size to obtain the target video playback area, and the target video is controlled to be zoomed and played in the above-mentioned target video playback area. This technical solution, when the target video meets the zoom condition, zooms and plays the target video in a video playback area that is larger than the target video display area, and dynamically adjusts the size of the video playback area according to the zoom playback duration, so that the target video can change with the change of the video playback area during zoom playback. The zoom and enlarged playback of the target video during the target video playback process not only increases the sense of depth of the video picture, injects vividness and dynamic effects into the static picture, and can highlight the key content of the target video, but also continuously adjusts the area size of the video playback area according to the zoom playback duration, which can make the zoom animation effect smoother and more coherent, and render the scene in real time, so that the target video can be smoothly and coherently zoomed and played during the target video playback process, thereby increasing the sense of depth of the video picture, injecting vividness and dynamic effects into the static picture, and highlighting the key content of the target video. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0057] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art texts are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0058] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0059] Figure 1 A flowchart of an embodiment of a video zoom playback method provided in an embodiment of the present application;
[0060] Figure 2A schematic diagram of a video playback area provided in an embodiment of the present application;
[0061] Figure 3 A flowchart of another video zoom playback method provided in an embodiment of the present application;
[0062] Figure 4 A flowchart of another embodiment of a video zoom playback method provided in an embodiment of the present application;
[0063] Figure 5 A block diagram of an embodiment of a video playback device provided in an embodiment of the present application;
[0064] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Obviously, the embodiments described in the text are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0066] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0067] In order to solve the problem that the method of playing recommended videos in a fixed area in the prior art cannot attract the user's attention and cannot highlight the key content in the video because it is arranged together with other film and television drama screen contents, which leads to the inability to achieve the desired recommendation effect and affects the technical problem of user experience, the present application provides a video zoom playback method, device, electronic device and storage medium, which can zoom and play the target video in a video playback area larger than the target video display area when the target video meets the zoom condition, and dynamically adjust the size of the video playback area according to the zoom playback duration, so that the target video can change with the change of the video playback area during zoom playback. The target video is zoomed and enlarged during the playback of the target video, which not only increases the depth of the video picture, injects vividness and dynamic effects into the static picture, and can highlight the key content in the target video, but also continuously adjusts the area size of the video playback area according to the zoom playback duration, which can make the zoom animation effect smoother and more coherent, and render the scene in real time, so that the target video is smoothly and coherently zoomed and enlarged during the playback of the target video, thereby increasing the depth of the video picture, injecting vividness and dynamic effects into the static picture, and highlighting the key content in the target video.
[0068] The video zoom playback method provided by the present application is further explained below with reference to specific embodiments in conjunction with the accompanying drawings. The embodiments do not constitute a limitation on the embodiments of the present invention.
[0069] join Figure 1 , is a flow chart of an embodiment of a video zoom playback method provided in an embodiment of the present application. Figure 1 As shown, the process may include the following steps:
[0070] Step 101. When the target video meets the preset zoom condition and is played with zoom in the preset video playback area, determine the current zoom playback time of the target video from the beginning of zoom playback in the video playback area to the current time, and the total zoom playback time of the target video in the video playback area, wherein the above-mentioned video playback area is larger than the display area before the target video is zoomed.
[0071] The target video may be a video to be recommended to the user in the video playback software, which may be a video clip of a film or TV series, or an advertisement video in the video playback software, and the embodiment of the present application does not impose any limitation on this.
[0072] The above-mentioned zoom conditions refer to the conditions that must be met when the target video needs to be zoomed and enlarged for playback. For example, when the target video can be fully displayed on the interface of the video playback software, the target video can be zoomed and played. Furthermore, when the target video can be fully displayed on the interface of the video playback software, and when it is played in its own display area to the feature that needs to be enlarged, the target video can be zoomed and played starting from the duration corresponding to the feature. Furthermore, when the number of times the target video is zoomed and played in a historical time period does not exceed a preset number threshold, the target video can be zoomed and played.
[0073] The above-mentioned video playback area refers to the area in the video playback software used to zoom and play the target video, and the corresponding area size may be larger than the area size of the display area before the target video is zoomed.
[0074] Furthermore, in order to highlight the playback content of the target video, the video playback area may be an area located at the top layer of the interface layer with the horizontal screen center of the corresponding interface of the video playback software as the center point, for example, see Figure 2 , is a schematic diagram of a video playback area provided in an embodiment of the present application. Figure 2 As shown, Figure 2 Area 21 may be the display area before the target video is zoomed, area 22 may be the above-mentioned video playback area, and area 23 may be the display interface where the target video is located. The above-mentioned video playback area 22 may be located in the topmost area of the interface layer, and the horizontal screen center of the corresponding interface of the video playback software is the center point.
[0075] In addition, the above-mentioned video playback area can also be other areas in the video playback software interface, and the embodiment of the present application does not limit this.
[0076] The above-mentioned current zoom playback duration refers to the playback progress of the target video when it is played in the video playback area at the current moment, that is, the duration corresponding to the current moment in the progress bar of the target video from the start of zoom playback of the target video in the above-mentioned video playback area.
[0077] The total zoom playback time refers to the total time the target video needs to be played in the above video playback area, that is, the total time from the start of the target video playback in the above video playback area to the end of the playback in the video playback area.
[0078] In one embodiment, the execution subject of the embodiment of the present application may determine the target video to be recommended in real time or at a fixed time, and determine whether the target video meets the preset zoom condition. Optionally, when it is determined that the target video meets the preset zoom condition, the target video may be controlled to be zoomed in the video playback area. Among them, since the above-mentioned video playback area is larger than the display area of the target video before zooming, the zoom playback of the target video is achieved by controlling the target device to play in the video playback area.
[0079] As an optional implementation, the execution subject of the embodiment of the present application may have a database for storing videos to be recommended, based on which, the execution subject of the embodiment of the present application may determine the target video from the above database. Further, in order to save resources, the execution subject of the embodiment of the present application may determine a preset number of videos to be recommended to be played as target videos according to the playback order of the videos to be recommended in the database.
[0080] As another optional implementation, the execution subject of the embodiment of the present application may monitor in real time the display area for displaying the video to be recommended, and determine the video to be recommended located in the display area as the target video.
[0081] As an optional implementation, the execution subject of the embodiment of the present application may detect whether the target video is completely output on the preset visualization interface when determining whether the target video meets the preset zoom condition. Optionally, when determining that the target video is completely output on the visualization interface, it may be determined that the target video meets the zoom condition.
[0082] Furthermore, in order to prevent the target video from being zoomed and played too many times, thereby affecting the user experience, the execution entity of the embodiment of the present application can determine the number of times the target video is zoomed and played when it is determined that the target video is completely output in the visual interface, and determine that the target video meets the zoom condition when the number is less than a preset number threshold.
[0083] As another optional implementation method, in order to highlight the specific content of the target video, the executing entity of the embodiment of the present application may determine the start playback node corresponding to the characteristic content that needs to be highlighted in the target video, and when it is detected that the target video is played to the start playback node corresponding to the specific content, it is determined that the target video meets the zoom condition.
[0084] Furthermore, in order to prevent the target video from being zoomed in and played too many times, thereby affecting the user experience, the execution entity of the embodiment of the present application can determine the number of times the target video is zoomed in and played when it is determined that the target video is played to the start playback node corresponding to the specific content, and determine that the target video meets the zoom condition when the number is less than a preset number threshold.
[0085] Furthermore, the execution entity of the embodiment of the present application can use CADisplayLink to realize the playback of the target video in the video playback area. CADisplayLink can inform the execution entity of the embodiment of the present application each time the screen is refreshed. The execution entity of the embodiment of the present application can use the video zoom playback method provided by the present application to determine the height of the video playback area, and update the height of the video playback area and the positions of other elements of the interface, thereby ensuring the smoothness of the target video in the video playback area and the synchronous update logic.
[0086] Based on the above content, when it is determined that the target video meets the zoom conditions and is zoomed in the preset video playback area, the current zoom playback duration of the target video from the start of zoom playback in the video playback area to the current zoom playback in the video playback area can be determined, as well as the total zoom playback duration of the target video in the video playback area.
[0087] As an optional implementation method, for the total zoom playback time of the target video, when determining the target video, the executing entity of the embodiment of the present application can determine the total zoom playback time that the target video needs to be played in the video playback area based on the video information of the target video, and store the total zoom playback time to a preset storage medium, so that each time the total zoom playback time needs to be determined, the total zoom playback time of the target video can be directly obtained from the storage medium.
[0088] As an optional implementation, when the target video just meets the zoom condition and starts zooming in the video playback area, the execution subject of the embodiment of the present application can record the start system time when the target video starts zooming in the video playback area. The start system time here is expressed in seconds after the system is started, which is an absolute time relative to the system and has sub-second accuracy.
[0089] As an exemplary implementation, the execution subject of the embodiment of the present application can use the CACurrentMediaTime() function to obtain the above-mentioned start system time. The above-mentioned CACurrentMediaTime() function is a C function of the Core Animation framework, which is used to obtain the current absolute time, which is different from the system wall clock time (such as the time provided by NSDate). The time returned by CACurrentMediaTime() is not affected by changes in system time (such as daylight saving time adjustment or user manual change of device time), so it is continuous and monotonically increasing, which makes it an ideal choice for measuring time intervals, especially suitable for applications that require highly stable and accurate timing such as animation or performance measurement.
[0090] Based on the above-recorded start system time, the executing entity of the embodiment of the present application can obtain the current system time and the above-recorded start system time when determining the current zoom playback duration of the target video in the video playback area.
[0091] Afterwards, the current system time and the start system time may be subtracted to obtain the current zoom playback duration of the target video.
[0092] As an exemplary implementation, when the current system time and the start system time are both recorded absolute times relative to the system (such as seconds), the current system time and the start system time can be directly subtracted to obtain the current zoom playback duration.
[0093] Step 102: Determine the size of the video playback area based on the current zoom playback duration and the total zoom playback duration.
[0094] Step 103: adjust the video playback area according to the area size to obtain a target video playback area, and control the target video to perform zoom playback in the target video playback area.
[0095] The following is a unified description of step 102 and step 103:
[0096] The above-mentioned area size refers to the size of the video playback area when the target video is currently playing in the video playback area, which may include but is not limited to parameters such as the shape, width, and height of the video playback area. Furthermore, since the shapes of existing devices and video playback software windows are rectangular, and users are generally accustomed to playing videos in a rectangular area, in order to increase user experience, the shape of the above-mentioned video playback area can be rectangular, and in order to attract user attention, the rectangle can be the starting point of the top edge of the screen, and the horizontal coordinate of the center point is fixed to the vertical center line of the screen.
[0097] In one embodiment, the execution entity of the embodiment of the present application can determine the area size of the current video playback area in real time according to the current zoom playback time and the total zoom playback time of the target video in the video playback area, thereby adjusting the video playback area according to the area size to obtain the target video playback area, and control the target video to perform zoom playback in the target video playback area.
[0098] Furthermore, when controlling the target video to be played in the target video playback area, the ratio of the target video playback screen to the area size of the target video playback area can be controlled to be fixed (for example, the ratio is 1). Since the area size of the video playback area changes in real time with the zoom playback duration of the target video, and the ratio of the target video playback screen to the area size of the target video playback area is fixed, the target video can be zoomed and played as the video playback area changes, thereby achieving a smooth and coherent zoom animation effect and real-time rendering scene while enlarging the playback of the target video.
[0099] As for how to determine the size of the video playback area based on the current zoom playback time and the total zoom playback time, it can be found in the following. Figure 3 The process shown is explained and will not be described in detail here.
[0100] In one embodiment, since the target video may be paused during the zoom playback of the video playback area (for example, the user exits the current playback page, or triggers the video playback interface to pause the target video), the execution entity of the embodiment of the present application can determine whether the target video is paused during the zoom playback of the target video in the video playback area, so that when the target video is continued to be played, the previous playback progress can be continued to prevent excessive repeated playback of content from affecting the user experience.
[0101] As an exemplary implementation, when determining whether the target video meets the preset zoom condition, if it is detected that the target video is completely output in the preset visual interface and the number of times the target video is zoomed is less than the preset number threshold, it can be determined that the target video meets the zoom condition. Based on this, when it is detected that the above-mentioned visual interface is triggered, it can be determined that the target video is paused. The above-mentioned trigger can be a trigger operation of the user on any interface of the visual interface, and the trigger operation can include but is not limited to: single-click operation, double-click operation, sliding operation, and long press operation.
[0102] Optionally, when it is determined that the target video is paused, the first zoom playback duration that has been played in the video playback area when the target video is paused can be obtained. The first zoom playback duration refers to the duration that the target video has been played from the beginning of zoom playback in the video playback area to the time when the target video is paused in the video playback area.
[0103] Afterwards, when it is detected that the target video is replayed, the second zoom playback duration of the target video from being replayed in the video playback area to the current time can be obtained. Since the current time may not be the time when the target video is replayed, the duration from when the target video is paused to the current time can be calculated, that is, the second zoom playback duration. It is understandable that if the current time is the time when the target video is replayed, the second zoom playback duration can be zero.
[0104] Afterwards, the first zoom play duration and the second zoom play duration can be added to obtain the total zoom play duration, where the total zoom play duration is the total duration of the target video from the beginning of the playback in the video playback area to the current zoom play, which can be used as the current zoom play duration of the target video currently zoomed in the video playback area. It can be understood that the difference between the total playback duration here and the current zoom play duration determined in step 101 is that the total playback duration is not the continuous playback of the target video, and the pause zoom play duration has passed in the middle, but does not include the duration of the target video being paused.
[0105] On this basis, the executing entity of the embodiment of the present application can determine the new area size of the video playback area based on the above-mentioned total zoom playback time and the total zoom playback time, and adjust the video playback area according to the new area size to obtain a new target video playback area, so as to control the target video to start zoom playback in the new target video playback area from the playback node corresponding to the above-mentioned total zoom playback time.
[0106] As for how to determine the new area size of the video playback area based on the total playback time and the total zoom playback time, the total playback time can be used as the current zoom playback time and the method of determining the area size of the duration playback area based on the current zoom playback time and the total zoom playback time. That is, the total playback time is used as the current zoom playback time. For reference Figure 3 The process shown is determined and will not be repeated here.
[0107] In addition, in order to save system resources, the execution subject of the embodiment of the present application can use a timer to periodically Figure 1 The process shown refreshes the area size of the video playback area to achieve timed changes in zoom playback of the target video.
[0108] The technical solution provided by the embodiment of the present application determines the current zoom playback time of the target video from the beginning of zoom playback in the video playback area to the current time, and the total zoom playback time of the target video when the target video meets the preset zoom condition and is played in a preset video playback area with zoom, wherein the above-mentioned video playback area is larger than the display area before the target video is zoomed, and the area size of the video playback area is determined based on the above-mentioned current zoom playback time and the above-mentioned total zoom playback time, and the above-mentioned video playback area is adjusted according to the above-mentioned area size to obtain the target video playback area, and the target video is controlled to be zoomed and played in the above-mentioned target video playback area. This technical solution, when the target video meets the zoom condition, zooms and plays the target video in a video playback area that is larger than the target video display area, and dynamically adjusts the size of the video playback area according to the zoom playback duration, so that the target video can change with the change of the video playback area during zoom playback. The zoom and enlarged playback of the target video during the target video playback process not only increases the sense of depth of the video picture, injects vividness and dynamic effects into the static picture, and can highlight the key content of the target video, but also continuously adjusts the area size of the video playback area according to the zoom playback duration, which can make the zoom animation effect smoother and more coherent, and render the scene in real time, so that the target video can be smoothly and coherently zoomed and played during the target video playback process, thereby increasing the sense of depth of the video picture, injecting vividness and dynamic effects into the static picture, and highlighting the key content of the target video.
[0109] See also Figure 3 , which is a flow chart of an embodiment of another video zoom playback method provided in an embodiment of the present application. Figure 3 The process shown in Figure 1 Based on the process shown in FIG. 1 , it is described how to determine the size of the video playback area based on the current zoom playback time and the total zoom playback time. Figure 3 As shown, the process may include the following steps:
[0110] Step 301: Determine the change ratio of the height of the video playback area to the zoom playback duration according to the current zoom playback duration and the total zoom playback duration.
[0111] The above-mentioned change ratio refers to the change parameter between the height of the video playback area and the zoom playback duration. The change parameter here can be a linear parameter or a non-linear parameter. That is, the height of the video playback area can change linearly or non-linearly with the change of the zoom playback duration. The embodiment of the present application does not impose any restrictions on this.
[0112] In one embodiment, the execution subject of the embodiment of the present application can determine the change ratio of the height of the video playback area to the zoom playback time according to the current zoom playback time of the target video and the total zoom playback time of the target video. The height of the video playback area can change linearly or nonlinearly with the increase of the zoom playback time, so as to realize the continuous zoom playback of the target video during the playback of the target video.
[0113] As an optional implementation method, the current playback ratio of the target video can be determined based on the current zoom playback time and the total zoom playback time, that is, the ratio of the current playback time of the target video in the video playback area to the total zoom playback time or the one-way zoom playback time.
[0114] As an exemplary implementation, the current playback ratio may be the ratio of the current playback time of the target video in the video playback area to the one-way zoom playback time. In particular, since the zoom playback process of the target video in the video playback area generally starts from the beginning of playback to the end of playback, and the corresponding area size is the same when the playback starts and ends, that is, after the video playback area realizes the zoom playback of the target video, its area size should be restored to its original size at the moment when the zoom playback of the target video ends. Therefore, the change process of the video playback area may include at least one change cycle, and the process of a change cycle is from small to large, and then from large to small.
[0115] Based on this, the execution subject of the embodiment of the present application can divide the total zoom playback time into at least two one-way zoom playback times according to the change process of the video playback area. The above-mentioned one-way zoom playback time refers to the time corresponding to the one-way change of the video playback area. For example, the total zoom playback time of the target video in the video playback area is 30 minutes. If the change process of the video playback area includes a change cycle, the total zoom playback time can be divided into two one-way zoom playback times, which are the first 15 minutes and the last 15 minutes of the target video in the video playback area; if the change process of the video playback area includes two change cycles, the total zoom playback time can be divided into four one-way zoom playback times, which are: 0 to 7.5 minutes, 7.5 to 15 minutes, 15 minutes to 22.5 minutes, and 22.5 to 30 minutes.
[0116] Afterwards, the start duration and end duration corresponding to each one-way zoom playback duration, as well as the target one-way zoom playback duration to which the current zoom playback duration belongs can be determined. For example, the total zoom playback duration of the above-mentioned target video is 30 minutes, and the total zoom playback duration is divided into two one-way zoom playback durations: the first 15 minutes and the last 15 minutes. Based on this, it can be determined that the start duration of the first 15 minutes is 0 minutes and the end duration is 15 minutes, and the start duration of the last 15 minutes is 15 minutes and the end duration is 30 minutes. Continuing to assume that the current zoom playback duration is 7 minutes, it can be determined that the target one-way zoom playback duration to which the current zoom playback duration belongs is the one-way zoom playback duration corresponding to the first 15 minutes. Among them, the start duration and end duration mentioned here are both at the end time node corresponding to the zoom playback duration of the target video.
[0117] Afterwards, the duration difference between the current zoom playback duration and the start duration of the target one-way zoom playback duration can be determined, and the ratio of the duration difference to the target one-way zoom playback duration can be determined as the current playback ratio of the target video. It can be understood that when the total zoom playback duration is evenly divided into several one-way zoom playback durations according to the above description, the target one-way zoom playback duration here is equal to the other one-way zoom playback durations, but the total zoom playback duration can also be randomly divided or divided into several one-way zoom playback durations according to preset rules. In this case, the target one-way zoom playback duration and the other one-way zoom playback durations are not equal.
[0118] As another exemplary implementation, the current playback ratio may be the ratio of the current playback duration of the target video in the video playback area to the total zoom playback duration. That is, the current zoom playback duration ratio may be obtained by directly dividing the current zoom playback duration by the total zoom playback duration.
[0119] Based on this, in order to prevent the video playback area from including two or more change cycles (that is, getting bigger, getting smaller, then getting bigger, and then getting smaller), which would lead to a decrease in user experience, the executing entity of the embodiment of the present application can set the change process of the video playback area to a change cycle, that is, the video playback area includes a change from the starting area size to the maximum area size, and then from the maximum area size to the starting area size.
[0120] At this point, the current playback ratio of the target video in the video playback area can be determined.
[0121] After determining the current playback ratio of the target video, the execution subject of the embodiment of the present application can calculate the current playback ratio through a preset formula to determine the change ratio of the height of the video playback area and the zoom playback duration.
[0122] As an optional implementation, the preset formula may be that the change ratio is equal to the current playback ratio. Therefore, the current playback ratio may be directly determined as the change ratio of the height of the video playback area to the zoom playback duration.
[0123] As another optional implementation, the execution subject of the embodiment of the present application may determine whether the current playback ratio is less than a preset ratio threshold. The preset ratio threshold may be a pre-set ratio threshold, which may be 0.5 or other values, and the embodiment of the present application does not limit this.
[0124] Optionally, if the current playback ratio is less than the above-mentioned preset ratio threshold, the change ratio of the height of the video playback area and the zoom playback duration is determined according to a first preset formula.
[0125] Optionally, if the current playback ratio is greater than or equal to the above-mentioned preset ratio threshold, the change ratio of the height of the video playback area and the zoom playback duration is determined according to a second preset formula.
[0126] Among them, the above-mentioned first preset formula and the second preset formula are both preset formulas. Furthermore, in order to enable the video playback area to quickly reach the maximum area so that the user can watch the target video more carefully, the change ratio determined by the above-mentioned first preset formula increases with the increase of the zoom playback time, and its growth rate is greater than the change ratio determined by the second preset formula.
[0127] As an exemplary implementation, when the current playback ratio is the ratio of the current zoom playback duration of the target video to the determined one-way zoom playback duration, the first preset formula may be as shown in the following formula (I):
[0128] P=2*P0*P0 Formula (I)
[0129] Among them, the above is the change ratio of the height of the video playback area and the zoom playback duration; the above is the current playback ratio of the target video in the video playback area.
[0130] The second preset formula can be shown as follows:
[0131] P=1-2*(1-P0)*(1-P0) Formula (II)
[0132] Among them, the above is the change ratio of the height of the video playback area and the zoom playback duration; the above is the current playback ratio of the target video in the video playback area.
[0133] It can be understood that the first preset formula and the second preset formula are both proportional functions, that is, the ratio of the height of the video playback area to the zoom playback duration increases as the current zoom playback duration increases. Therefore, the first preset formula and the second preset formula can be proportional functions, and the first preset formula and the second preset formula in the embodiment of the present application are not limited to the above formula (1) and formula (2).
[0134] As another exemplary implementation, when the current playback ratio is the ratio of the current zoom playback duration of the target video to the total zoom playback duration, the first preset formula may be as shown in the following formula (III):
[0135] P=P0 Formula (III)
[0136] Among them, the above is the change ratio of the height of the video playback area and the zoom playback duration; the above is the current playback ratio of the target video in the video playback area.
[0137] The second preset formula can be shown as the following formula (IV):
[0138] P=1-P0 Formula (IV)
[0139] Among them, the above is the change ratio of the height of the video playback area and the zoom playback duration; the above is the current playback ratio of the target video in the video playback area.
[0140] It can be understood that the first preset formula at this time is a positive proportional function, that is, the ratio of the height of the video playback area to the zoom playback duration increases as the current zoom playback duration increases, and the second preset formula is a negative proportional function, that is, the ratio of the height of the video playback area to the zoom playback duration decreases as the current zoom playback duration increases. Therefore, the first preset formula is a positive proportional function, and the second preset formula is a negative proportional function. The first preset formula and the second preset formula are not limited to the above formula (three) and formula (four) in the embodiment of the present application.
[0141] Step 302: Based on the above change ratio, determine the current height of the video playback area.
[0142] The current height of the video playback area refers to a height value corresponding to the current area size of the determined video playback area.
[0143] In one embodiment, since the above-mentioned change ratio is a change parameter of the height of the video playback area and the zoom playback duration, the execution subject of the embodiment of the present application can determine the current height of the video playback area based on the above-mentioned change ratio.
[0144] As an optional implementation, when the current playback ratio is the ratio of the current zoom playback duration to the one-way zoom playback duration, the initial height and final height of the video playback area corresponding to the target one-way zoom playback duration can be obtained. Since the height change of the video playback area is different in each one-way zoom playback duration, the final height of each one-way zoom playback duration can be the initial height of the next one-way zoom playback duration, and the initial height of the first one-way zoom playback duration and the final height of the last one-way zoom playback duration are both the initial height of the video playback area.
[0145] As another optional implementation, when the above-mentioned current playback ratio is the ratio of the current zoom playback time to the total zoom playback time, the initial height and final height of the video playback area corresponding to the total zoom playback time can be obtained. The final height here is the highest height of the video playback area during the entire process of playing the target video. It can be understood that the initial height and final height of the video playback area corresponding to the total zoom playback time are both one, and the initial height is the height of the video playback area when the target video starts to play in the video playback area.
[0146] Afterwards, the current height change value of the video playback area can be determined based on the initial height, final height, and change ratio, and the sum of the initial height value and the height change value can be determined as the current height of the video playback area.
[0147] As an exemplary implementation, the height difference between the final height and the initial height can be determined, and the height difference and the change ratio are subjected to a preset operation to obtain the current height change value of the video playback area. The preset operation can be a multiplication operation or other operations, which is not limited in the present application embodiment.
[0148] Step 303: Determine the current width of the video playback area according to the current height and a preset proportionality factor.
[0149] Step 304: determine the area size corresponding to the current height and current width as the area size of the video playback area.
[0150] The following is a unified description of step 303 and step 304:
[0151] The above-mentioned ratio coefficient is the ratio of the height to the width in the preset video playback area. In order to adapt to the user's viewing habits, the ratio coefficient can be a preset fixed value to ensure that the overall ratio remains unchanged when the video playback area changes.
[0152] In the embodiment of the present application, after determining the current height corresponding to the video playback area, the execution subject of the embodiment of the present application can determine the current width of the video playback area according to the current height and the preset proportionality coefficient. Afterwards, the area size corresponding to the current height and the current width can be determined as the area size of the video playback area.
[0153] The technical solution provided by the embodiment of the present application determines the change ratio of the height of the video playback area to the zoom playback time according to the current zoom playback time and the total zoom playback time, determines the current height of the video playback area based on the above change ratio, determines the current width of the video playback area according to the above current height and a preset proportional coefficient, and determines the area size corresponding to the above current height and current width as the area size of the video playback area. This technical solution determines the current height of the video playback area according to the playback progress of the target video, and thus can determine the area size of the video playback area corresponding to the current zoom playback time based on the current height, thereby realizing the rapid and accurate determination of the current height of the video playback area at the current moment, thereby realizing the dynamic change of the area size of the video playback area according to the playback progress of the target video, and improving the user experience.
[0154] See also Figure 4 , is a flow chart of another embodiment of a video zoom playback method provided in an embodiment of the present application. Figure 4 As shown, the process may include the following steps:
[0155] First of all, it is necessary to clarify the timing of starting, pausing, resuming, and ending the zoom playback of the target video. Usually, the animation starts when the user enters the interface where the animation is located and the video area is exposed. When the pre-specified number of animation executions is further met, the animation can be started; the timing of pausing the animation is usually when the user slides or clicks the interface, the video area is no longer visible, and the animation that was originally executed needs to be paused; the timing of resuming the animation is when the user operates the interface, the video area is visible, and the previous video has not been completed, then the previously terminated animation is resumed; the timing of ending the animation is usually when the normal playback of the animation ends or other times specified by the product manager, such as when the user clicks the video area to enter the playback details interface.
[0156] The following is a detailed description of the implementation steps combined with user operations:
[0157] (1) The user enters the video interface and meets the animation start conditions, and the animation starts:
[0158] For the animation module, the total duration of the animation, the maximum height of the animation maxHeight, and the height following zoom playback duration change function height = f(time) are all input items and known items, so when starting to execute the animation module, you need to:
[0159] 1. Record start time startTime:
[0160] startTime = CACurrentMediaTime(), CACurrentMediaTime() is a C function of the CoreAnimation framework, which is used to obtain the current absolute time. This time is expressed in seconds since the system was started, and has sub-second accuracy. It provides a high-precision time value, suitable for animation and other scenes that require high-precision timing.
[0161] Among them, unlike the system's wall clock time (such as the time provided by NSDate), the time returned by CACurrentMediaTime() is not affected by changes in system time (such as daylight saving time adjustment or the user manually changing the device time), so it is continuous and monotonically increasing, which makes it an ideal choice for measuring time intervals, especially in applications that require highly stable and accurate timing, such as animation or performance measurement. When using CADisplayLink to implement animation, developers often use CACurrentMediaTime() to calculate the time difference between frames to ensure the smoothness of the animation and synchronized update logic.
[0162] 2. Start the CADisplayLink timer. For a 60HZ screen refresh rate, this timer is called back to the business party every 1 / 60 seconds, and the business party refreshes the height of the zoom playback area once;
[0163] (2) The animation executes normally:
[0164] Since the timer is started, the timing of each screen refresh can be obtained. At this time, according to the current time and the startTime in step 1, the percentage of currentTime relative to the total duration can be obtained:
[0165] NSTimeInterval currentTime=CACurrentMediaTime()-startTime;
[0166] progress=(currentTime–startTime) / duration;
[0167] According to the progress value, the height value of the stretch / shrink of the video playback area at the current time can be obtained. For example, the height follows the change function of the zoom playback duration height = f(time) is changeHeightRatio = (progress<0.5)? 2*progress*progress:(1.0-2*(1-progress)*(1-progress)); thus, the height of the video playback area and the layout of other elements of the interface can be updated according to changeHeightRatio.
[0168] Among them, changeHeightRatio is the ratio value of the height change when the timing changes. For example, during the zooming process, the video area height = initial height + (maximum height - initial height) * the ratio value of the height change over time.
[0169] For example, suppose the height of the target video at the start of the video playback area is 1m, the maximum height of the video playback area during the zoom playback animation is 2m, and the one-way duration of the zoom playback animation is 2 seconds, that is, it takes 2 seconds to expand from 1m to 2m, and it takes 2 seconds to shrink from 2m to 1m. Assuming that the start time starts from 0, for a linear animation such as changeHeightRatio = progress, the height is 1.25m at 0.5s, 1.5m at 1s, and 1.75m at 1.5s;
[0170] For the above nonlinear animation:
[0171] When the time becomes 0.5 seconds:
[0172] progress=(0.5–0) / 2=0.25. For the expansion animation, it means that 25% of the time progress has passed. The height to be stretched is 2*progress*progress*(maximum height–initial height)=2*0.25*0.25*(2–1)=0.125 meters. When the time is 0.5 seconds, the height of the video area is: initial height 1m + height to be stretched 0.125m, which is 1.125 meters.
[0173] When the time becomes 1 second:
[0174] progress=(1–0) / 2=0.5. For the expansion animation, it means that 50% of the time progress has passed. The height to be stretched is 2*progress*progress*(maximum height – initial height)=2*0.5*0.5*(2–1)=0.5 meters. When the time is 1 second, the height of the video area is: initial height 1m + height to be stretched 0.5m, which is 1.5 meters.
[0175] When the time becomes 2 seconds:
[0176] progress=(2–0) / 2=1. For the expansion animation, when 100% of the time progress has passed, the height to be stretched is (1.0-2*(1-progress)*(1-progress))*(maximum height – initial height)=(1.0-2*(1-1)*(1-1))*(2–1)=1 meter. When the time is 2 seconds, the height of the video area is: initial height 1m + height to be stretched 1m, which is 2 meters. That is, at this moment the animation reaches its maximum height.
[0177] When the time becomes 3 seconds:
[0178] For the zoom-out animation, the initial time is 2 seconds, and the initial height is 2 meters: progress = (3-2) / 2 = 0.5. For the collapse animation, 50% of the time has passed, and the height to be reduced is (1.0-2*(1-progress)*(1-progress))*(maximum height-final reduced height) = (1.0-2*(1-0.5)*(1-0.5))*(2-1) = 0.5 meters. When the time is 3 seconds, the height of the video area is: initial height 2m-height to be reduced 0.5m, which is 1.5 meters.
[0179] When the time becomes 4 seconds:
[0180] progress=(4–2) / 2=1. For the collapse animation, when 100% of the time progress has passed, the height that needs to be reduced is (1.0-2*(1-progress)*(1-progress))*(maximum height – final reduced height)=(1.0-2*(1-1)*(1-1))*(2–1)=1 meter. When the time is 3 seconds, the height of the video area is: initial height 2m – height that needs to be reduced 1m, which is 1 meter. That is, at this moment the animation reaches its final end and is restored to a height of 1m.
[0181] (3) The video area of the user sliding interface is no longer visible and the animation is paused:
[0182] Pause the CADisplayLink timer and record the actual animation execution duration pauseTime during the pause, pauseTime = CACurrentMediaTime() – startTime;
[0183] (4) The video area becomes visible when the user slides the interface, and the animation resumes:
[0184] According to the current animation recovery time, calculate the execution percentage of the current animation. The steps are the same as step 2, where currentTime = CACurrentMediaTime() (current time) – startTime (pause start time) + pauseTime. However, in step 2, it has not been paused yet, so pauseTime is 0. In fact, the calculation formula is the same;
[0185] (5) Animation ends:
[0186] If the animation ends normally or meets other pre-defined end conditions, the CADisplayLink timer is stopped and the related interface status is restored.
[0187] The technical solution provided in the embodiment of the present application realizes a zoom effect on the target video by enlarging the core area of the target video in a preset video playback area. This effect can be used for content promotion, strengthening operations, and increasing revenue.
[0188] See also Figure 5 , is a block diagram of an embodiment of a video playback device provided in an embodiment of the present application. Figure 5 As shown, the device may include:
[0189] The first determination module 51 is used to determine the current zoom playback time of the target video from the beginning of zoom playback in the video playback area to the current time, and the total zoom playback time of the target video when the target video meets the preset zoom condition and is zoomed in the preset video playback area; wherein the video playback area is larger than the display area of the target video before zooming;
[0190] A second determining module 52, configured to determine the size of the video playback area based on the current zoom playback duration and the total zoom playback duration;
[0191] The adjustment module 53 is used to adjust the video playback area according to the area size to obtain a target video playback area, and control the target video to perform zoom playback in the target video playback area.
[0192] like Figure 6As shown, it is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, including a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64.
[0193] Memory 63, used for storing computer programs;
[0194] In one embodiment of the present application, the processor 61 is used to execute the program stored in the memory 63 to implement the video zoom playback method provided by any of the above method embodiments, including:
[0195] When the target video meets the preset zoom condition and is zoomed in the preset video playback area, determine the current zoom playback time of the target video from the beginning of zoom playback in the video playback area to the current time, and the total zoom playback time of the target video in the video playback area; wherein the video playback area is larger than the display area of the target video before zooming;
[0196] Determining the size of the video playback area based on the current zoom playback duration and the total zoom playback duration;
[0197] The video playback area is adjusted according to the area size to obtain a target video playback area, and the target video is controlled to perform zoom playback in the target video playback area.
[0198] An embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the video zoom playback method provided in any of the aforementioned method embodiments are implemented.
[0199] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0200] Through the text of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.
[0201] It should be understood that the terms used in the text are only for the purpose of the specific example implementation of the text, and are not intended to be limited. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used in the text can also be represented to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of the stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or their combinations. The method steps, processes, and operations of the text in the text are not interpreted as necessarily requiring them to be performed in the specific order of the text or description, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps can be used.
[0202] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A video zoom playback method, It is characterized in that The method comprises: When the target video meets the preset zoom condition and is zoomed in the preset video playback area, determine the current zoom playback time of the target video from the beginning of zoom playback in the video playback area to the current time, and the total zoom playback time of the target video in the video playback area; wherein the video playback area is larger than the display area of the target video before zooming; Determining the size of the video playback area based on the current zoom playback duration and the total zoom playback duration; The video playback area is adjusted according to the area size to obtain a target video playback area, and the target video is controlled to perform zoom playback in the target video playback area.
2. The method according to claim 1, It is characterized in that Before determining the zoom playback time length of the target video from the beginning of the zoom playback in the video playback area to the current zoom playback time length, the method further includes: When the target video meets the zoom condition and starts zooming and playing in the video playing area, recording the starting system time when the target video starts zooming and playing in the video playing area; The determining of the current zoom playback duration of the target video from the beginning of zoom playback in the video playback area to the current zoom playback duration includes: Obtain the current system time and the start system time when the target video starts zooming and playing in the video playing area; The current system time is subtracted from the start system time to obtain the current zoom playback duration of the target video.
3. The method according to claim 1, It is characterized in that The determining the size of the video playback area based on the current zoom playback duration and the total zoom playback duration includes: Determining a change ratio of a height of the video playback area to the zoom playback duration according to the current zoom playback duration and the total zoom playback duration; Based on the change ratio, determining a current height of the video playback area; Determining the current width of the video playback area according to the current height and a preset scale factor; The area size corresponding to the current height and the current width is determined as the area size of the video playback area.
4. The method according to claim 3, It is characterized in that The determining, according to the current zoom playback duration and the total zoom playback duration, a change ratio of the height of the video playback area to the zoom playback duration includes: Determining a current playback ratio of the target video according to the current zoom playback duration and the total zoom playback duration; The current playback ratio is calculated using a preset formula to determine the change ratio of the height of the video playback area to the zoom playback duration.
5. The method according to claim 4, It is characterized in that The calculating the current playback ratio by a preset formula to determine the change ratio of the height of the video playback area to the zoom playback duration includes: Determine whether the current playback ratio is less than a preset ratio threshold; If the current playback ratio is less than the preset ratio threshold, the playback ratio is calculated using a first preset formula to determine a change ratio between the height of the video playback area and the zoom playback duration; If the current playback ratio is greater than or equal to the preset ratio threshold, the playback ratio is calculated using a second preset formula to determine the change ratio of the height of the video playback area to the zoom playback duration.
6. The method according to claim 4, It is characterized in that The determining the current playback ratio of the target video according to the current zoom playback duration and the total zoom playback duration includes: According to the change process of the video playback area, the total zoom playback duration is divided into at least two one-way zoom playback durations, and the one-way zoom playback duration refers to the duration corresponding to the one-way change of the video playback area; Determine the start duration and the end duration corresponding to each of the one-way zoom playback durations, and the target one-way zoom playback duration to which the current zoom playback duration belongs; Determine a duration difference between the current zoom playback duration and the start duration of the target one-way zoom playback duration; The ratio of the duration difference to the target one-way zoom playback duration is determined as the current playback ratio of the target video.
7. The method according to claim 6, It is characterized in that The determining the current height of the video playback area based on the change ratio includes: Obtaining the initial height and final height of the video playback area corresponding to the target one-way zoom playback duration; Determine a current height change value of the video playback area based on the initial height, the final height, and the change ratio; The sum of the initial height and the height change value is determined as the current height of the video playback area.
8. The method according to claim 7, It is characterized in that The determining, based on the initial height, the final height, and the change ratio, a current height change value of the video playback area includes: Determine the height difference between the final height and the initial height; The height difference value and the change ratio are subjected to a preset operation to obtain a current height change value of the video playback area.
9. The method according to claim 1, It is characterized in that Also includes: During the zoom playback of the target video in the video playback area, determining whether the target video is paused; When it is determined that the target video is paused, obtaining a first zoom playback time length that has been played in the video playback area when the target video is paused; When the target video is replayed, obtaining the second zoom playback duration of the target video from when it is replayed in the video playback area to the current time; Determining a total zoom playback duration of the first zoom playback duration and the second zoom playback duration; Determining a new area size of the video playback area based on the total zoom playback duration and the total zoom playback duration; The video playback area is adjusted according to the new area size to obtain a new target video playback area, and the target video is controlled to start zoom playback in the new target video playback area from a playback node corresponding to the total zoom playback duration.
10. The method according to claim 9, It is characterized in that Determine that the target video meets the preset zoom condition in the following manner: When it is detected that the target video is completely output on the preset visualization interface and the number of times the target video is zoomed is less than a preset number threshold, it is determined that the target video meets the zoom condition; The step of determining whether the target video is paused includes: When it is detected that the visualization interface is triggered, it is determined that the target video is paused.
11. A video zoom playback device, It is characterized in that The device comprises: A first determination module is used to determine the current zoom playback time of the target video from the beginning of zoom playback in the video playback area to the current time, and the total zoom playback time of the target video when the target video meets the preset zoom condition and is zoomed in the preset video playback area; wherein the video playback area is larger than the display area of the target video before zooming; A second determination module, configured to determine the size of the video playback area based on the current zoom playback duration and the total zoom playback duration; The adjustment module is used to adjust the video playback area according to the area size to obtain a target video playback area, and control the target video to perform zoom playback in the target video playback area.
12. An electronic device, It is characterized in that include: A processor and a memory, wherein the processor is used to execute a video zoom playback program stored in the memory to implement the video zoom playback method according to any one of claims 1 to 10.
13. A storage medium, It is characterized in that The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the video zoom playback method according to any one of claims 1 to 10.
