Multimedia preview method and device

By switching player instances in the editor to monitor and adjust fluency, the stuttering problem during video preview in the editor is solved, improving the user experience.

CN119629413AActive Publication Date: 2025-03-14SHANGHAI BILIBILI TECH CO LTD

Patent Information

Application Number
CN202411373966.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-03-14
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

When previewing and editing videos at the same time in the editor, there may be lag, affecting the user experience.

Method used

The playback fluency parameters are monitored in real time by in an editor configured with the first player instance. If the fluency does not meet the preset standards, switch to the second player instance, which does not call the underlying playback components of the system to ensure a balance between video preview effect and fluency.

Benefits of technology

It solves the problem of poor playback fluency when the editor previews the target video and edits the target video at the same time, improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629413A_ABST
    Figure CN119629413A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multimedia preview method, which is used in an editor configured with a first player instance. The multimedia preview method comprises the following steps: playing a target video through the first player instance; in the process of playing the target video by the first player instance, if a playing fluency parameter does not conform to a preset standard, configuring a second player instance; wherein the first player instance is used for calling a system bottom layer playing component to play the target video, and the second player instance does not call the system bottom layer playing component; and switching from the first player instance to the second player instance, and playing the target video through the second player instance. According to the technical scheme, the problem that the playing fluency is poor when the editor previews the target video and edits the target video at the same time can be solved, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of multimedia technology, and in particular to a multimedia preview method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the rapid development of mobile Internet technology, multimedia creation has become an indispensable part of users' daily lives. The importance of multimedia editors such as video in multimedia creation is becoming increasingly prominent.

[0003] Currently, when previewing and editing videos in the editor at the same time, there may be lag, affecting the user experience.

[0004] It should be noted that the above content is not necessarily prior art, nor is it intended to limit the scope of patent protection of this application. Summary of the invention

[0005] Embodiments of the present application provide a multimedia preview method, apparatus, computer device, computer-readable storage medium, and computer program product to solve or alleviate one or more of the technical problems raised above.

[0006] One aspect of an embodiment of the present application provides a multimedia preview method for use in an editor configured with a first player instance; the method comprises: Play the target video through the first player instance; During the process of the first player instance playing the target video, if the playback smoothness parameter does not meet the preset standard, a second player instance is configured; wherein the first player instance is used to call the system bottom-level playback component to play the target video, and the second player instance does not call the system bottom-level playback component; Switch from the first player instance to the second player instance, and play the target video through the second player instance.

[0007] Optionally, switching from the first player instance to the second player instance includes: Pause or close the first player instance; configuring the second player instance; Call the second player instance to play the target video.

[0008] Optionally, the method further comprises: In the process of switching from the first player instance to the second player instance, obtaining a switching frame image of the first player instance; The switching frame screen is displayed until the second player instance is configured and starts playing the target video.

[0009] Optionally, the method further comprises: During the process of the first player instance playing the target video, recording target playback information for the target video in real time; Correspondingly, calling the second player instance to play the target video includes: The target playback information is loaded into the second player instance so that the second player instance plays the target video according to the target playback information; wherein the target playback information includes playback progress.

[0010] Optionally, the method further comprises: When the editor is started and the target video is played, creating a monitoring thread; The monitoring thread is used to monitor the fluency parameters of the operating system, and the editor runs in the operating system.

[0011] Optionally, in an iOS system or a macOS system environment, the system underlying playback component includes Audiotoolbox, and the second player instance includes AVPlayer.

[0012] Optionally, the fluency parameter is characterized by the presence or absence of jamming; when the underlying playback component of the system is Audiotoolbox, the monitoring thread is used to: When the Audiotoolbox returns a result at a preset time interval, determining that there is no lag in the Audiotoolbox; If the Audiotoolbox does not return a result within the preset time interval, it is determined that the Audiotoolbox is stuck.

[0013] Another aspect of an embodiment of the present application provides a multimedia preview device, which is used in an editor configured with a first player instance, and the device includes: A playback module, used for playing the target video through the first player instance; A configuration module, configured to configure a second player instance if the playback fluency parameter does not meet a preset standard during the process of the first player instance playing the target video; wherein the first player instance is used to call the system bottom-level playback component to play the target video, and the second player instance does not call the system bottom-level playback component; A switching module is used to switch from the first player instance to the second player instance, and play the target video through the second player instance.

[0014] Another aspect of an embodiment of the present application provides a computer device, including: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein: the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described above.

[0015] Another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method described above is implemented.

[0016] Another aspect of an embodiment of the present application provides a computer program product, including a computer program, which implements the method described above when executed by a processor.

[0017] The embodiment of the present application adopts the above technical solution and may include the following advantages: the target video is played preferentially through the first player instance, because the first player instance is used to call the underlying playback component of the system to play the target video, and has a better video preview effect. If the playback fluency is low, switch to the second player instance. The second player instance is independent and does not call the underlying playback component of the system, thereby achieving a balance between the video preview effect and fluency, and ensuring a certain playback fluency. It can be seen that the embodiment of the present application solves the problem of poor playback fluency when the editor previews the target video and edits the target video at the same time, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0019] Figure 1 The following schematically shows an operating environment diagram of the multimedia preview method according to the first embodiment of the present application; Figure 2 The flowchart of the multimedia preview method according to the first embodiment of the present application is schematically shown; Figure 3 Schematically shows Figure 2 Flow chart of sub-steps of step S204; Figure 4 The newly added flow chart of the multimedia preview method according to the first embodiment of the present application is schematically shown; Figure 5 A preview image of a target video is schematically shown; Figure 6 A block diagram of a multimedia preview device according to Embodiment 2 of the present application is schematically shown; and Figure 7 The hardware architecture diagram of the computer device according to the third embodiment of the present application is schematically shown. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0021] It should be noted that the descriptions involving "first", "second", etc. in the embodiments of the present application are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0022] In the description of the present application, it should be understood that the numerical labels before the steps do not indicate the order in which the steps are executed, but are only used to facilitate the description of the present application and to distinguish each step, and therefore should not be understood as a limitation on the present application.

[0023] First, the following terms are explained: Thread: It is the smallest unit that the operating system can schedule operations on. It is contained in the process and is the actual operation unit in the process. A thread refers to a single sequential control flow in a process. Multiple threads can run concurrently in a process, and each thread executes different tasks in parallel.

[0024] Editing SDK (software development kit): responsible for exporting and saving video / audio / image / text, etc. as a new video in the editor.

[0025] Audiotoolbox: A basic audio processing framework in the iOS system that provides a series of tools for playing, recording, processing audio data, and handling audio file formats.

[0026] ijkplayer: A multimedia player that supports Android or iOS systems, a third-party cross-platform player.

[0027] AVPlayer: A multimedia player provided by the iOS system that supports multiple video formats.

[0028] Secondly, in order to facilitate those skilled in the art to understand the technical solutions provided in the embodiments of the present application, the relevant technologies are described below: With the rapid development of mobile Internet technology, multimedia creation has become an indispensable part of users' daily lives. The importance of editors in multimedia creation is becoming increasingly prominent. However, the applicant learned that the editing SDK used by the current pink version editor uses the underlying system frameworks such as Audiotoolbox. When previewing some materials, such as audio and video, when both are operated at the same time, there is a probability that the system will freeze.

[0029] To this end, the embodiment of the present application provides a multimedia preview technical solution to overcome the above problems. See below for details.

[0030] Finally, for ease of understanding, an exemplary operating environment is provided below.

[0031] like Figure 1 As shown, the operating environment diagram includes: a service platform 2, and clients (4A, 4B, ..., 4N).

[0032] The service platform 2 can be connected to the client terminals ( 4A, 4B, ..., 4N) via the network.

[0033] The service platform 2 may be a single server, a server cluster or a cloud computing service center.

[0034] The service platform 2 can provide video reading services, video writing services, etc. to the client.

[0035] The service platform 2 may be located in a data center such as a single location, or distributed in different geographical locations (e.g., in multiple locations). The service platform 2 may provide services via a network. The network includes various network devices such as routers, switches, multiplexers, hubs, modems, bridges, repeaters, firewalls, proxy devices, and / or the like. The network may include physical links such as coaxial cable links, twisted pair cable links, optical fiber links, combinations thereof, and the like, or wireless links such as cellular links, satellite links, Wi-Fi links, and the like.

[0036] The client (4A, 4B, ..., 4N) may be configured to access the content and services of the service platform 2. The client (4A, 4B, ..., 4N) may include an electronic device carrying or externally connected to a display panel, such as a mobile device, a tablet device, a laptop computer, a workstation, a virtual reality device, a gaming device, a digital streaming device, a vehicle terminal, a smart TV, a set-top box, etc., and may also include a virtualized computing instance. The virtualized computing instance may include a virtual machine, such as a simulation of a computer system, an operating system, a server, etc. The computing device may load a virtual machine based on a virtual image and / or other data defining specific software (e.g., an operating system, a dedicated application, a server) for simulation. As the demand for different types of processing services changes, different virtual machines may be loaded and / or terminated on one or more computing devices.

[0037] The client (4A, 4B, ..., 4N) may be associated with one or more users. A single user may also use one or more of the clients (4A, 4B, ..., 4N) to access the service platform 2. The client (4A, 4B, ..., 4N) may travel to various locations and use different networks to access the service platform 2.

[0038] The client (4A, 4B, ..., 4N) may include an interface. The interface may include a touch pad, a touch screen, a mouse, a keyboard, or other sensing elements. For example, the input element may be configured to receive user instructions, and the user instructions may enable the client (4A, 4B, ..., 4N) to perform various operations, such as starting an editor, playing a video, previewing a video, editing a video, etc.

[0039] The following uses the editor in the client as the execution subject to introduce the technical solution of the present application through multiple embodiments. It should be noted that these embodiments can be implemented in a variety of different forms and should not be interpreted as being limited to the embodiments described here.

[0040] Embodiment 1 Figure 2 The flowchart of the multimedia preview method according to the first embodiment of the present application is schematically shown.

[0041] like Figure 2 As shown, the multimedia preview method may include steps S200 to S204, wherein: Step S200: playing the target video through the first player instance.

[0042] Step S202, during the process of the first player instance playing the target video, if the playback smoothness parameter does not meet the preset standard, a second player instance is configured; wherein the first player instance is used to call the system underlying playback component to play the target video, and the second player instance does not call the system underlying playback component.

[0043] Step S204: Switch from the first player instance to the second player instance, and play the target video through the second player instance.

[0044] The multimedia preview method provided in this embodiment can be applied to the client (such as 4A), and the target video is played preferentially through the first player instance. Since the first player instance is used to call the underlying playback component of the system to play the target video, it has a better video preview effect. If the playback fluency is low, switch to the second player instance. The second player instance is independent and does not call the underlying playback component of the system, thereby achieving a balance between the video preview effect and fluency, and ensuring a certain playback fluency. It can be seen that the embodiment of the present application solves the problem of poor playback fluency when the editor previews the target video and edits the target video at the same time, thereby improving the user experience.

[0045] The following combination Figure 2 , each step in steps S200~S204 and other optional steps are described in detail.

[0046] Step S200 , play the target video through the first player instance.

[0047] The target video can be transmitted to the client (e.g., 4A) via CDN or other means. The target video can be in various formats such as H.264, AV1, MP4, etc. The user starts the editor through the client 4A. The editor loads the first player instance to play the target video. The target video includes a video stream and audio. The target video can be a local video file, a video from the Internet, or a video stored in the cloud.

[0048] iPlayer (universal playback interface layer) and editing SDK can be integrated inside the editor. The first player instance can be a third-party player (ijkplayer) that can call the underlying components of the system to provide better preview performance. iPlayer can use the first player instance as the default player. In addition to the default configuration, iPlayer can also configure the first player instance according to actual needs. iPlayer can monitor the performance indicators of each player instance in real time, such as CPU occupancy, memory usage, frame rate, etc., through built-in or third-party performance monitoring tools. If system resources allow, select the player instance with the best performance as the first player instance. The first player instance can be embedded in the editor or called from outside the editor when needed.

[0049] iPlayer can define basic player operation interfaces, so that users can control the target video's playback, pause, jump, volume control, etc. through the editor interface. The editing SDK is used to call the system's underlying playback component to edit the target video (if the first player instance calls the underlying component at the same time, it may cause lag). Editing the target video can include processing the audio in the target video, cropping the target video, and adding subtitles and watermarks to the target video.

[0050] Step S202 During the process of the first player instance playing the target video, if the playback smoothness parameter does not meet the preset standard, a second player instance is configured; wherein the first player instance is used to call the system's underlying playback component to play the target video, and the second player instance does not call the system's underlying playback component.

[0051] During the process of the first player instance playing the target video, the playback smoothness parameters can be monitored in real time. You can also set a timer (such as once per second) to regularly monitor the playback smoothness parameters. The playback smoothness parameters can be bit rate, resolution, buffering time, stuttering rate, frame rate, etc. You can set a preset standard for each key parameter. Compare the real-time monitored playback smoothness parameters with the preset standards to evaluate whether the current playback smoothness parameters of the target video meet the standards. For example, the stuttering rate should be higher than 5% to be unsatisfactory, and the buffering time should be more than 2 seconds to be unsatisfactory, etc.

[0052] There may be many factors that lead to the above-mentioned lag, such as poor device performance, the first player instance and the editing SDK calling the system's underlying playback components at the same time, other apps in the device occupying more resources, or other factors.

[0053] Step S204 , switch from the first player instance to the second player instance, and play the target video through the second player instance.

[0054] When switching player instances, you can add smooth transition effects. For example, you can add animation effects that fade out the first player instance and fade in the second player instance to improve the continuity of playback. If an error occurs when switching to the second player instance, you can reload the target video or display an error prompt and allow the user to choose further operations. In addition to automatic switching, you can also provide users with the option of manually switching player instances, allowing users to select the appropriate second player instance according to their needs. In the process of switching player instances, you can use UI prompts (such as displaying a loading animation, pop-up prompt boxes, etc.) to feedback the current playback status to the user.

[0055] In this embodiment, when the first player instance (such as ijkplayer) and the editing SDK simultaneously call the system's underlying playback component, causing the first player instance to fail to meet the playback smoothness standard for the target video, a switch is made to a second player instance that does not rely on the system's underlying component, thereby solving the problem of the playback smoothness parameter being lower than a preset value (such as stuttering) when the editor is simultaneously previewing and editing the target video, and improving the user experience.

[0056] In an optional embodiment, if Figure 3 As shown, step S204 may include: Step S300, pausing or closing the first player instance; Step S302, configuring the second player instance; Step S304: calling the second player instance to play the target video.

[0057] Before switching to the second player instance, you can pause the first player instance, but keep it active so that if an error occurs in the second player instance (such as network problems, decoding failure), you can fall back to the first player instance. You can also directly close the first player instance, and when closing the first player instance, you can release all resources occupied by the first player instance in memory (such as memory, CPU, GPU) so that these resources can be used by the second player instance or other applications, thereby improving system performance.

[0058] The second player instance can be an internal plug-in embedded in the editor, or it can be an external plug-in called from outside the editor when needed. In some embodiments, a player instance pool can be established to pre-create and manage multiple player instances. The most suitable player instance is dynamically called as the second player instance for switching according to the current playback status or device performance, thereby improving playback stability and smoothness. For example, if the freeze is caused by network delay or packet loss, a second player instance with stronger network adaptability can be called. If the current player instance competes with other applications or system processes for CPU, memory and other resources, resulting in unsmooth playback, a second player instance with a higher priority or lower resource consumption can be called.

[0059] In some embodiments, the second player instance may be configured first, and then the first player instance may be paused or closed. By configuring the second player instance first, the target video is played in the second player instance immediately after the first player instance is paused or closed, thereby reducing the possibility of a black screen appearing during the player instance switching process. The first player instance may also be paused or closed first, and then the second player instance may be configured, thereby reducing the possibility of two player instances appearing at the same time.

[0060] In this embodiment, when the playback smoothness parameters do not meet the preset standards while the current player instance (first player instance) is playing the target video, the current player instance is paused or closed, and a new player instance (second player instance) is configured to continue playing the target video to improve playback smoothness and user experience.

[0061] In an optional embodiment, if Figure 4 As shown, the multimedia preview method may further include: Step S400, in the process of switching from the first player instance to the second player instance, obtaining a switching frame image of the first player instance; Step S402, displaying the switching frame picture until the second player instance is configured and starts playing the target video.

[0062] Since the key frame (I frame) contains complete image information, it can be decoded and displayed independently without relying on other frames. Therefore, it is possible to monitor whether there are available key frames near the current playback position of the target video that needs to be switched. If there is an available key frame, the key frame is preferentially selected for decoding, and its picture is obtained as the switching frame picture to improve the smoothness of switching and decoding efficiency. In the case of multiple key frames, the key frame with the timestamp closest to the current playback position is preferentially selected to reduce the delay and jump of the target video playback. If no key frame is found, the frame with the timestamp closest to the current playback position and higher visual continuity can be selected for decoding, and its picture is obtained as the switching frame picture to minimize the visual discontinuity.

[0063] If an error occurs during the switching process or the delay is too long, an error prompt can be provided or the user can be allowed to choose whether to cancel the switch to maintain the friendliness and interactivity of the user interface.

[0064] In this embodiment, by obtaining the switching frame image of the first player instance, the switching frame image is displayed when the first player instance is paused or closed until the second player configuration is completed and starts to play the target video, thereby reducing the possibility of a black screen appearing during the switching of player instances and improving the continuity of the preview of the target video.

[0065] In an optional embodiment, the multimedia preview method may further include: During the process of the first player instance playing the target video, recording target playback information for the target video in real time; Correspondingly, step S304 may include: The target playback information is loaded into the second player instance so that the second player instance plays the target video according to the target playback information; wherein the target playback information includes playback progress.

[0066] The target playback information includes the current playback progress, playback address, playback time, playback volume, playback status (such as pause, stop, fast forward, fast rewind, etc.), playback video quality (such as HD, UHD, Blu-ray, etc.), and user preferences of the target video.

[0067] During the process of the first player instance playing the target video, the target playback information for the target video can be recorded in real time and saved to the local device memory cache to temporarily read and write the target playback information. After the second player instance is configured, the saved target playback information is read from the local memory cache and loaded into the second player instance. The life cycle can be set for the target playback information. For example, when the user leaves the application or switches to another video, the cached playback information is automatically cleared or updated. Expired or invalid target playback information can be cleaned up based on factors such as cache size and timestamp to reduce system resource usage. In addition to saving the target playback information to the local device memory cache, the target playback information can also be synchronized to the cloud server so that when the local device fails or data is lost, the user can also restore the target playback information from the cloud.

[0068] In this embodiment, when the first player instance plays the target video, the target playback information is recorded in real time. When switching from the first player embodiment to the second player instance, the saved target playback information is loaded, so that the second player instance can continue the playback progress of the first player instance, thereby improving playback continuity, reducing playback interruption or repeated playback problems caused by switching player instances, and improving user experience.

[0069] In an optional embodiment, the multimedia preview method may further include: When the editor is started and the target video is played, a monitoring thread is created, wherein the monitoring thread is used to monitor the fluency parameters of the operating system in which the editor runs.

[0070] When the editing SDK and the first player instance (such as ijkplayer) call the underlying playback components of the system at the same time, the fluency parameters of the operating system may not meet the preset standards. Therefore, the monitoring thread is created and managed through the main thread. The monitoring thread monitors the fluency parameters of the operating system. When it is detected that the fluency parameters do not meet the preset standards, the main thread can be notified through event notifications, message queues, etc. Different weights can be assigned to different situations based on factors such as the severity and duration of the fluency parameters not meeting the preset standards. The main thread decides whether to switch the player instance and when to switch based on the weight. If the fluency parameters seriously do not meet the preset standards or the switch fails when previewing the target video, an error report can be automatically generated.

[0071] In this embodiment, when the target video is played, a monitoring thread is created to monitor the fluency parameters of the operating system, so that when the fluency parameters of the operating system do not meet the preset standards, the main thread is immediately notified to perform corresponding actions.

[0072] In an optional embodiment, the multimedia preview method may further include: in an iOS system or a macOS system environment, the system underlying playback component includes an Audiotoolbox, and the second player instance includes an AVPlayer.

[0073] In an Android system environment, the underlying playback component of the system may include Media Framework. The second player instance may include KMPlayer.

[0074] In the Hongmeng system environment, the system bottom-level playback component may include MediaBox. The second player instance may include AVPlayer.

[0075] In an optional embodiment, the multimedia preview method may further include: the fluency parameter is characterized by the presence or absence of jamming; when the underlying playback component of the system is Audiotoolbox, the monitoring thread is used to: When the Audiotoolbox returns a result at a preset time interval, determining that there is no lag in the Audiotoolbox; If the Audiotoolbox does not return a result within the preset time interval, it is determined that the Audiotoolbox is stuck.

[0076] Exemplarily, monitoring can be performed at preset time intervals (such as every 100 milliseconds). The preset time interval can also be dynamically adjusted according to the actual performance of the device and the complexity of the playback content to achieve better results. The monitoring thread regularly monitors whether the API of the system's underlying playback components (such as Audiotoolbox, Media Framework, MediaBox, etc.) returns results at preset time intervals according to the preset time interval. When the result is not returned within the preset time interval, switch to the second player instance (such as AVPlayer, KMPlayer, etc.) to improve fluency. In addition to creating monitoring threads for the system's underlying playback components, monitoring threads for resources such as CPU, GPU, memory, disk I / O, etc. can also be created to more accurately locate the root cause of the target video jam, so that the most appropriate second player instance can be selected based on the root cause of the jam.

[0077] In this embodiment, whether there is a freeze in the Audiotoolbox is determined by monitoring the return status of the Audiotoolbox through a monitoring thread.

[0078] In order to make the present application easier to understand, an exemplary application is provided below.

[0079] In this exemplary application, the editor configures the first player instance as ijkplayer by default to preview the target video. Both ijkplayer and the editing SDK will call the underlying system components (such as Audiotoolbox, Media Framework, MediaBox, etc.) to implement the functions of previewing the target video and editing the target video respectively. When the underlying system components are called at the same time, they may cause the underlying system components to freeze. Therefore, a monitoring thread is created to monitor whether the underlying system components freeze. The monitoring thread monitors whether the API of the underlying system components returns results at preset time intervals. If the results are not returned at the preset time interval, it is determined that the underlying system components freeze. Then switch to a second player instance (such as AVPlayer, KMPlayer, etc.) that does not call the underlying system components, thereby solving the problem of freezes when previewing the target video and editing the target video at the same time.

[0080] Embodiment 2 Figure 6 The block diagram of a multimedia preview device according to the second embodiment of the present application is schematically shown. The device can be used in an editor configured with a first player instance and can be divided into one or more program modules. One or more program modules are stored in a storage medium and executed by one or more processors to complete the embodiment of the present application. The program module referred to in the embodiment of the present application refers to a series of computer program instruction segments that can complete specific functions. The following description will specifically introduce the functions of each program module in this embodiment. Figure 6 As shown, the device 1000 may include: a playing module 1100, a configuration module 1200, and a switching module 1300, wherein: used in an editor configured with a first player instance, the device includes: A playing module 1100, configured to play a target video through the first player instance; Configuration module 1200, configured to configure a second player instance if the playback smoothness parameter does not meet a preset standard during the process of the first player instance playing the target video; wherein the first player instance is used to call the system bottom-level playback component to play the target video, and the second player instance does not call the system bottom-level playback component; The switching module 1300 is used to switch from the first player instance to the second player instance, and play the target video through the second player instance.

[0081] As an optional embodiment, switching from the first player instance to the second player instance includes: Pause or close the first player instance; configuring the second player instance; Call the second player instance to play the target video.

[0082] As an optional embodiment, the device 1000 is further used for: In the process of switching from the first player instance to the second player instance, obtaining a switching frame image of the first player instance; The switching frame screen is displayed until the second player instance is configured and starts playing the target video.

[0083] As an optional embodiment, the device 1000 is further used for: During the process of the first player instance playing the target video, recording target playback information for the target video in real time; Correspondingly, calling the second player instance to play the target video includes: The target playback information is loaded into the second player instance so that the second player instance plays the target video according to the target playback information; wherein the target playback information includes playback progress.

[0084] As an optional embodiment, the apparatus 1000 further includes: When the editor is started and the target video is played, creating a monitoring thread; The monitoring thread is used to monitor the fluency parameters of the operating system, and the editor runs in the operating system.

[0085] As an optional embodiment, in an iOS system or a macOS system environment, the system underlying playback component includes Audiotoolbox, and the second player instance includes AVPlayer.

[0086] As an optional embodiment, the fluency parameter is characterized by the presence or absence of jamming; when the underlying playback component of the system is Audiotoolbox, the monitoring thread is used to: When the Audiotoolbox returns a result at a preset time interval, determining that there is no lag in the Audiotoolbox; If the Audiotoolbox does not return a result within the preset time interval, it is determined that the Audiotoolbox is stuck.

[0087] Embodiment 3 Figure 7The hardware architecture diagram of a computer device 10000 suitable for implementing a multimedia preview method according to the third embodiment of the present application is schematically shown. In some embodiments, the computer device 10000 may be a terminal device such as a smart phone, a wearable device, a tablet computer, a personal computer, a vehicle terminal, a game console, a virtual device, a workbench, a digital assistant, a set-top box, a robot, etc. Figure 7 As shown, the computer device 10000 includes but is not limited to: a memory 10010, a processor 10020, and a network interface 10030 that can communicate with each other through a system bus. Among them: The memory 10010 includes at least one type of computer-readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (such as SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 10010 can be an internal storage module of the computer device 10000, such as a hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 can also be an external storage device of the computer device 10000, such as a plug-in hard disk equipped on the computer device 10000, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 10010 can also include both the internal storage module of the computer device 10000 and its external storage device. In this embodiment, the memory 10010 is generally used to store the operating system and various application software installed in the computer device 10000, such as program codes of the multimedia preview method, etc. In addition, the memory 10010 can also be used to temporarily store various data that have been output or will be output.

[0088] In some embodiments, the processor 10020 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chips. The processor 10020 is generally used to control the overall operation of the computer device 10000, such as performing control and processing related to data interaction or communication with the computer device 10000. In this embodiment, the processor 10020 is used to run the program code stored in the memory 10010 or process data.

[0089] The network interface 10030 may include a wireless network interface or a wired network interface, and the network interface 10030 is generally used to establish a communication link between the computer device 10000 and other computer devices. For example, the network interface 10030 is used to connect the computer device 10000 to an external terminal through a network, and to establish a data transmission channel and a communication link between the computer device 10000 and the external terminal. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, etc.

[0090] It should be pointed out that Figure 7 Only a computer device having components 10010 - 10030 is shown, but it should be understood that implementation of all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.

[0091] In this embodiment, the multimedia preview method stored in the memory 10010 may also be divided into one or more program modules and executed by one or more processors (such as the processor 10020) to complete the embodiment of the present application.

[0092] Embodiment 4 An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the multimedia preview method in the embodiment are implemented.

[0093] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the computer-readable storage medium may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device. Of course, the computer-readable storage medium may also include both an internal storage unit of a computer device and an external storage device thereof. In this embodiment, the computer-readable storage medium is generally used to store an operating system and various application software installed on a computer device, such as the program code of the multimedia preview method in the embodiment, etc. In addition, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.

[0094] Embodiment 5 An embodiment of the present application also provides a computer program product, including a computer program, which implements the method in the above embodiment when executed by a processor.

[0095] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present application can be implemented by general-purpose computer devices, they can be concentrated on a single computer device, or distributed on a network composed of multiple computer devices, optionally, they can be implemented by executable program codes of computer devices, so that they can be stored in a storage device and executed by the computer device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present application are not limited to any specific combination of hardware and software.

[0096] It should be noted that the above are only preferred embodiments of the present application, and the patent protection scope of the present application is not limited thereto. Any equivalent structure or equivalent process transformation made using the contents of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A multimedia preview method, characterized in that: Used in an editor configured with a first player instance; the method comprises: Play the target video through the first player instance; During the process of the first player instance playing the target video, if the playback smoothness parameter does not meet the preset standard, a second player instance is configured; wherein the first player instance is used to call the system bottom-level playback component to play the target video, and the second player instance does not call the system bottom-level playback component; Switch from the first player instance to the second player instance, and play the target video through the second player instance.

2. The method according to claim 1, characterized in that Switching from the first player instance to the second player instance includes: Pause or close the first player instance; configuring the second player instance; Call the second player instance to play the target video.

3. The method according to claim 2, characterized in that The method further comprises: In the process of switching from the first player instance to the second player instance, obtaining a switching frame image of the first player instance; The switching frame screen is displayed until the second player instance is configured and starts playing the target video.

4. The method according to claim 2, characterized in that: The method further comprises: During the process of the first player instance playing the target video, recording target playback information for the target video in real time; Correspondingly, calling the second player instance to play the target video includes: The target playback information is loaded into the second player instance so that the second player instance plays the target video according to the target playback information; wherein the target playback information includes playback progress.

5. The method according to claim 1, 2, 3 or 4, characterized in that: The method further comprises: When the editor is started and the target video is played, creating a monitoring thread; The monitoring thread is used to monitor the fluency parameters of the operating system, and the editor runs in the operating system.

6. The method according to claim 5, characterized in that In an iOS system or a macOS system environment, the system underlying playback component includes Audiotoolbox, and the second player instance includes AVPlayer.

7. The method according to claim 6, characterized in that The fluency parameter is characterized by the presence or absence of jamming; when the underlying playback component of the system is Audiotoolbox, the monitoring thread is used to: When the Audiotoolbox returns a result at a preset time interval, determining that there is no lag in the Audiotoolbox; If the Audiotoolbox does not return a result within the preset time interval, it is determined that the Audiotoolbox is stuck.

8. A multimedia preview device, characterized in that: For use in an editor configured with a first player instance, the device comprises: A playback module, used for playing the target video through the first player instance; A configuration module, configured to configure a second player instance if the playback fluency parameter does not meet a preset standard during the process of the first player instance playing the target video; wherein the first player instance is used to call the system bottom-level playback component to play the target video, and the second player instance does not call the system bottom-level playback component; A switching module is used to switch from the first player instance to the second player instance, and play the target video through the second player instance.

9. A computer device, characterized in that: include: at least one processor; and a memory communicatively connected to the at least one processor; wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Intelligent terminal and quick channel switching method and device thereof

    CN104202675A

  • Audio and video player resource management method and device, intelligent television, and storage medium

    CN109068177A

  • Self-adaptive player generation method and self-adaptive player equipment

    CN115297371A

  • Video page switching method and device

    CN116233549A

  • System and method for intelligent web based video playing

    US20240147012A1

Cited By

  • Video playing method and device and storage medium

    CN122093622A