Multimedia preview method and apparatus

By switching player instances in the multimedia editor to resolve stuttering issues during video preview and editing, smoothness was improved, thus enhancing the user experience.

CN119629413BActive Publication Date: 2025-11-11SHANGHAI BILIBILI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In multimedia editors, video previews and editing are prone to stuttering, which affects the user experience.

Method used

By configuring the first player instance to call the system's underlying playback component to play videos, and monitoring the smoothness parameters in real time, the system switches to a second player instance that does not rely on the system's underlying components for playback when the smoothness does not meet the preset standards.

Benefits of technology

Improved playback smoothness during video preview and editing, enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119629413B_ABST
    Figure CN119629413B_ABST
Patent Text Reader

Abstract

This application provides a multimedia preview method for use in an editor configured with a first player instance. The method includes: playing a target video through the first player instance; if, during the playback of the target video by the first player instance, the playback smoothness parameter does not meet a preset standard, configuring a second player instance; wherein the first player instance is used to call a system-level playback component to play the target video, while the second player instance does not call the system-level playback component; switching from the first player instance to the second player instance, and playing the target video through the second player instance. The technical solution of this application can solve the problem of poor playback smoothness when the editor simultaneously previews and edits a target video, improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates 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 Technology

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

[0003] Currently, there may be stuttering when previewing and editing videos simultaneously in the editor, which affects 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] This application provides 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 mentioned above.

[0006] One aspect of this application provides a multimedia preview method for use in an editor configured with a first player instance; the method includes:

[0007] Play the target video using the first player instance;

[0008] If the playback smoothness parameter does not meet the preset standard during the playback of the target video by the first player instance, 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, while the second player instance does not call the system's underlying playback component;

[0009] Switch from the first player instance to the second player instance, and play the target video through the second player instance.

[0010] Optionally, switching from the first player instance to the second player instance includes:

[0011] Pause or close the first player instance;

[0012] Configure the second player instance;

[0013] The second player instance is invoked to play the target video.

[0014] Optionally, the method further includes:

[0015] During the process of switching from the first player instance to the second player instance, the switching frame of the first player instance is obtained;

[0016] The switching frame screen is displayed until the second player instance is configured and starts playing the target video.

[0017] Optionally, the method further includes:

[0018] During the playback of the target video by the first player instance, the target playback information for the target video is recorded in real time.

[0019] Correspondingly, invoking the second player instance to play the target video includes:

[0020] 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.

[0021] Optionally, the method further includes:

[0022] When the editor is started and the target video is playing, a monitoring thread is created;

[0023] The monitoring thread is used to monitor the smoothness parameters of the operating system, and the editor runs on the operating system.

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

[0025] Optionally, the smoothness parameter is characterized by the presence or absence of stuttering; when the underlying playback component of the system is Audiotoolbox, the monitoring thread is used for:

[0026] If the Audiotoolbox returns results at a preset time interval, it is determined that the Audiotoolbox does not experience any lag.

[0027] If the Audiotoolbox fails to return results at the preset time interval, it is determined that the Audiotoolbox is experiencing lag.

[0028] Another aspect of this application provides a multimedia preview device for use in an editor configured with a first player instance, the device comprising:

[0029] The playback module is used to play the target video through the first player instance;

[0030] The configuration module is used to configure a second player instance if the playback smoothness parameter does not meet the preset standard during the playback of the target video by the first player instance; wherein, the first player instance is used to call the underlying system playback component to play the target video, and the second player instance does not call the underlying system playback component;

[0031] The 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.

[0032] Another aspect of this application provides a computer device, including:

[0033] At least one processor; and

[0034] A memory that is communicatively connected to the at least one processor;

[0035] Wherein: the memory stores instructions that can be executed by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described above.

[0036] Another aspect of this application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the method described above.

[0037] Another aspect of this application provides a computer program product including a computer program that, when executed by a processor, implements the method described above.

[0038] The embodiments of this application employing the above technical solution may include the following advantages: The target video is preferentially played through a first player instance, which, because it calls the system's underlying playback components to play the target video, provides a better video preview effect. If the playback smoothness is low, the system switches to a second player instance. The second player instance is independent and does not call the system's underlying playback components, thus achieving a balance between video preview effect and smoothness, ensuring a certain level of playback smoothness. Therefore, the embodiments of this application solve the problem of poor playback smoothness when the editor simultaneously previews and edits the target video, improving the user experience. Attached Figure Description

[0039] The accompanying drawings exemplify embodiments and form part of the specification, serving together with the textual description to explain exemplary implementations of the embodiments. The illustrated embodiments are for illustrative purposes only and do not limit the scope of the claims. Throughout the drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0040] Figure 1 The diagram illustrates the operating environment of the multimedia preview method according to Embodiment 1 of this application.

[0041] Figure 2 A flowchart illustrating a multimedia preview method according to Embodiment 1 of this application is shown schematically;

[0042] Figure 3 Schematic illustration Figure 2 Flowchart of the sub-steps in step S204;

[0043] Figure 4 The diagram illustrates a new flowchart of the multimedia preview method according to Embodiment 1 of this application;

[0044] Figure 5 A preview image of the target video is shown schematically;

[0045] Figure 6 A block diagram of a multimedia preview device according to Embodiment 2 of this application is schematically shown; and

[0046] Figure 7 A schematic diagram of the hardware architecture of a computer device according to Embodiment 3 of this application is shown. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0048] It should be noted that the descriptions involving "first," "second," etc., in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

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

[0050] First, a definition of the terminology used in this application is provided:

[0051] A thread is the smallest unit of computation that an operating system can schedule. It is contained within a process and is the actual unit of operation within a process. A thread refers to a single, sequential flow of control within a process. Multiple threads can run concurrently within a process, each executing different tasks in parallel.

[0052] Editing SDK (Software Development Kit): In the editor, it is responsible for exporting and saving videos / audio / images / text, etc., as a new video.

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

[0054] ijkplayer: A multimedia player that supports Android and iOS systems; a third-party cross-platform player.

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

[0056] Secondly, to facilitate understanding of the technical solutions provided in the embodiments of this application by those skilled in the art, the relevant technologies are described below:

[0057] 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 increasingly prominent. However, this applicant has learned that the current pink-version editor uses a clipping SDK that relies on underlying system frameworks such as Audiotoolbox. When previewing certain materials, such as audio and video, simultaneous operation of both may cause the system to freeze.

[0058] Therefore, this application provides a multimedia preview technology solution to overcome the above problems. See below for details.

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

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

[0061] Service platform 2 can connect to clients (4A, 4B, ..., 4N) via the network.

[0062] Service platform 2 can be a single server, a server cluster, or a cloud computing service center.

[0063] Service platform 2 can provide video reading services, video writing services, etc. to clients.

[0064] Service platform 2 may be located in a data center, such as a single location, or distributed across different geographical locations (e.g., multiple locations). 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 similar devices. The network may include physical links, such as coaxial cable links, twisted-pair cable links, fiber optic links, or combinations thereof, or wireless links, such as cellular links, satellite links, Wi-Fi links, etc.

[0065] Clients (4A, 4B, ..., 4N) can be configured to access the content and services of service platform 2. Clients (4A, 4B, ..., 4N) can include electronic devices with built-in or external display panels, such as mobile devices, tablets, laptops, workstations, virtual reality devices, gaming devices, digital streaming media devices, vehicle terminals, smart TVs, set-top boxes, etc., and can also include virtualized computing instances. Virtualized computing instances can include virtual machines, such as simulations of computer systems, operating systems, servers, etc. The computing device can load the virtual machine based on the virtual image and / or other data defining specific software (e.g., operating system, dedicated applications, servers) used for simulation. As the demand for different types of processing services changes, different virtual machines can be loaded and / or terminated on one or more computing devices.

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

[0067] The client (4A, 4B, ..., 4N) may include an interface. This interface may include a touchpad, touchscreen, mouse, keyboard, or other sensing elements. For example, the input element may be configured to receive user commands that cause the client (4A, 4B, ..., 4N) to perform various operations, such as launching an editor, playing a video, previewing a video, editing a video, etc.

[0068] The technical solutions of this application are described below using the editor in the client as the execution subject through multiple embodiments. It should be understood that these embodiments can be implemented in many different forms and should not be construed as being limited to the embodiments described herein.

[0069] Example 1

[0070] Figure 2 A flowchart illustrating a multimedia preview method according to Embodiment 1 of this application is shown schematically.

[0071] like Figure 2 As shown, the multimedia preview method may include steps S200~S204, wherein:

[0072] Step S200: Play the target video through the first player instance.

[0073] Step S202: During the playback of the target video by the first player instance, if the playback smoothness parameter does not meet the preset standard, then 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.

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

[0075] The multimedia preview method provided in this embodiment can be applied to a client (e.g., 4A). The target video is preferentially played through a first player instance, which, by calling the system's underlying playback components, provides a better video preview effect. If the playback smoothness is low, the method switches to a second player instance. The second player instance is independent and does not call the system's underlying playback components, thus achieving a balance between video preview effect and smoothness, ensuring a certain level of playback smoothness. Therefore, this embodiment solves the problem of poor playback smoothness when the editor simultaneously previews and edits the target video, improving the user experience.

[0076] The following combination Figure 2 The steps in steps S200 to S204, as well as other optional steps, are described in detail.

[0077] Step S200 The target video is played through the first player instance.

[0078] The target video can be transmitted to the client via CDN or other methods (e.g., 4A). The target video can be in various formats such as H.264, AV1, and MP4. The user launches the editor through the 4A client. The editor loads the first player instance to play the target video. The target video includes both 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, etc.

[0079] The editor can integrate iPlayer (a general playback interface layer) and the editing SDK. The primary player instance can be a third-party player (ijkplayer) that can call underlying system components to provide better preview performance. iPlayer can use the primary player instance as the default player. Besides the default configuration, iPlayer can also configure the primary player instance according to actual needs. iPlayer can use built-in or third-party performance monitoring tools to monitor the performance metrics of each player instance in real time, such as CPU usage, memory usage, and frame rate. It selects the player instance with the best performance as the primary player instance, provided system resources allow. The primary player instance can be embedded in the editor or invoked from outside the editor when needed.

[0080] iPlayer allows you to define basic player operation interfaces, enabling users to control playback, pause, skip, and volume control of the target video through the editor interface. The editing SDK is used to call the system's underlying playback components to edit the target video (if the first player instance calls this underlying component simultaneously, it may cause stuttering). Editing the target video can include processing the audio, cropping the video, and adding subtitles and watermarks.

[0081] Step S202 If the playback smoothness parameter does not meet the preset standard during the playback of the target video by the first player instance, 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.

[0082] During the playback of the target video in the first player instance, playback smoothness parameters can be monitored in real time. A timer (e.g., executing once per second) can also be set to periodically monitor playback smoothness parameters. Playback smoothness parameters can include bitrate, resolution, buffering time, stuttering rate, and frame rate. Preset standards can be set for each key parameter. The real-time monitored playback smoothness parameters are compared with these preset standards to assess whether the target video's current playback smoothness parameters meet the standards. For example, a stuttering rate higher than 5% is considered unacceptable, as is a buffering time exceeding 2 seconds.

[0083] There may be a variety of reasons for the above-mentioned lag, such as poor device performance, the first player instance and the editing SDK calling the underlying system playback components at the same time, other apps on the device consuming a lot of resources, or other reasons.

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

[0085] When switching player instances, smooth transition effects can be added. For example, fade-out animations of the first player instance and fade-in animations of the second player instance can be added to improve playback continuity. If an error occurs when switching to the second player instance, the target video can be reloaded or an error message can be displayed, allowing the user to choose further actions. In addition to automatic switching, users can also be given the option to manually switch player instances, allowing them to choose the appropriate second player instance according to their needs. During the player instance switching process, UI prompts (such as displaying loading animations, pop-up dialog boxes, etc.) can provide feedback to the user on the current playback status.

[0086] In this embodiment, when the first player instance (such as ijkplayer) and the editing SDK simultaneously call the system's underlying playback components, causing the first player instance to play the target video with substandard smoothness, the system switches to a second player instance that does not rely on the system's underlying components. This solves the problem of playback smoothness parameters being lower than preset values ​​(such as stuttering) when the editor is simultaneously previewing and editing the target video, and improves the user experience.

[0087] In optional embodiments, such as Figure 3 As shown, step S204 may include:

[0088] Step S300: Pause or close the first player instance;

[0089] Step S302: Configure the second player instance;

[0090] Step S304: Invoke the second player instance to play the target video.

[0091] Before switching to the second player instance, you can pause the first player instance while keeping it active so that if an error occurs in the second player instance (such as a network problem or decoding failure), you can revert to the first player instance. Alternatively, you can directly shut down the first player instance, releasing all resources (such as memory, CPU, and GPU) it uses in memory so that these resources can be used by the second player instance or other applications, thereby improving system performance.

[0092] The second player instance can be an internal plugin embedded in the editor or an external plugin invoked from outside the editor when needed. In some embodiments, a player instance pool can be established, pre-creating and managing multiple player instances. The most suitable player instance is dynamically selected as the second player instance based on the current playback status or device performance, thereby improving playback stability and smoothness. For example, if stuttering is caused by network latency or packet loss, a second player instance with stronger network adaptability can be invoked. If the current player instance competes with other applications or system processes for CPU, memory, or other resources, resulting in unsmooth playback, a second player instance with higher priority or lower resource consumption can be invoked.

[0093] In some embodiments, the second player instance can be configured first, and then the first player instance can be paused or closed. By configuring the second player instance first, the target video can be played immediately in the second player instance after the first player instance is paused or closed, thereby reducing the possibility of a black screen during player instance switching. Alternatively, the first player instance can be paused or closed first, and then the second player instance can be configured, thereby reducing the possibility of two player instances operating simultaneously.

[0094] In this embodiment, when the playback smoothness parameter does not meet the preset standard during the playback of the target video in the current player instance (first player instance), the current player instance is paused or closed, and a new player instance (second player instance) is configured to continue playing the target video, so as to improve playback smoothness and user experience.

[0095] In optional embodiments, such as Figure 4 As shown, the multimedia preview method may further include:

[0096] Step S400: During the process of switching from the first player instance to the second player instance, the switching frame of the first player instance is acquired;

[0097] Step S402: Display the switching frame screen until the second player instance is configured and starts playing the target video.

[0098] Because keyframes (I-frames) contain complete image information and can be decoded and displayed independently without relying on other frames, it's possible to monitor whether there are available keyframes near the current playback position where the target video needs to be switched. If a usable keyframe exists, it is prioritized for decoding, and its image is used as the switching frame to improve the smoothness of the switch and decoding efficiency. If multiple keyframes exist, the keyframe with the timestamp closest to the current playback position is prioritized to reduce playback delays and jumps in the target video. If no keyframe is found, the frame with the timestamp closest to the current playback position and high visual continuity can be selected for decoding, and its image can be used as the switching frame to minimize visual discontinuity.

[0099] If an error occurs or the delay is too long during the switching process, an error message can be provided or the user can choose whether to cancel the switch to maintain the user interface's friendliness and interactivity.

[0100] In this embodiment, the switching frame of the first player instance is acquired. This switching frame is displayed when the first player instance is paused or closed until the second player is configured and begins playing the target video. This reduces the possibility of a black screen during player instance switching and improves the continuity of the target video preview.

[0101] In an optional embodiment, the multimedia preview method may further include:

[0102] During the playback of the target video by the first player instance, the target playback information for the target video is recorded in real time.

[0103] Correspondingly, step S304 may include:

[0104] 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.

[0105] The target playback information includes the current playback progress of the target video, playback address, playback time, playback volume, playback status (such as pause, stop, fast forward, rewind, etc.), playback video quality (such as high definition, ultra-high definition, Blu-ray, etc.), and user preference settings.

[0106] During the playback of the target video in the first player instance, target playback information for the target video can be recorded in real time and saved to the local device's memory cache for temporary reading and writing. 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. A lifecycle 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 can be automatically cleared or updated. Expired or invalid target playback information can be cleaned up based on factors such as cache size and timestamps, reducing system resource consumption. In addition to saving the target playback information to the local device's memory cache, the target playback information can also be synchronized to a cloud server so that users can recover the target playback information from the cloud in case of local device failure or data loss.

[0107] In this embodiment, target playback information is recorded in real time while the first player instance is playing the target video. During the switching from the first player instance to the second player instance, the saved target playback information is loaded, allowing the second player instance to continue the playback progress from the first player instance. This improves playback continuity, reduces playback interruptions or repetitive playback issues caused by switching player instances, and enhances the user experience.

[0108] In an optional embodiment, the multimedia preview method may further include:

[0109] When the editor is launched and the target video is playing, a monitoring thread is created. This monitoring thread is used to monitor the smoothness parameters of the operating system, on which the editor runs.

[0110] When the editing SDK and the primary player instance (such as ijkplayer) simultaneously call the system's underlying playback components, situations may arise where the operating system's smoothness parameters do not meet preset standards. Therefore, a monitoring thread is created and managed by the main thread. This monitoring thread monitors the operating system's smoothness parameters. When a smoothness parameter is detected to be inconsistent with the preset standards, it notifies the main thread via event notifications, message queues, etc. Different weights can be assigned to different situations based on factors such as the severity and duration of the smoothness parameter inconsistency. The main thread then determines whether and when to switch player instances based on these weights. If a severe discrepancy in smoothness parameters occurs during target video preview, or if switching fails, an error report can be automatically generated.

[0111] In this embodiment, when playing the target video, a monitoring thread is created to monitor the smoothness parameters of the operating system, so that the main thread is immediately notified to take corresponding actions when the smoothness parameters of the operating system do not meet the preset standard.

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

[0113] In the Android system environment, the underlying playback component can include the Media Framework. A second player instance can include KMPlayer.

[0114] In the HarmonyOS environment, the underlying playback component can include MediaBox. A second player instance can include AVPlayer.

[0115] In an optional embodiment, the multimedia preview method may further include: the smoothness parameter is characterized by the presence or absence of stuttering; when the underlying playback component of the system is Audiotoolbox, the monitoring thread is used for:

[0116] If the Audiotoolbox returns results at a preset time interval, it is determined that the Audiotoolbox does not experience any lag.

[0117] If the Audiotoolbox fails to return results at the preset time interval, it is determined that the Audiotoolbox is experiencing lag.

[0118] For example, monitoring can be performed at preset time intervals (e.g., every 100 milliseconds). The preset time interval can also be dynamically adjusted based on the actual performance of the device and the complexity of the playback content to achieve optimal results. The monitoring thread periodically monitors whether the APIs of the underlying system playback components (such as Audiotoolbox, Media Framework, MediaBox, etc.) return results at the preset time intervals. If no result is returned at the preset time interval, a second player instance (such as AVPlayer, KMPlayer, etc.) is switched to improve smoothness. In addition to creating monitoring threads for the underlying system playback components, monitoring threads for resources such as CPU, GPU, memory, and disk I / O can also be created to more accurately pinpoint the root cause of the target video stuttering, allowing the most suitable second player instance to be selected based on the root cause of the stuttering.

[0119] In this embodiment, the presence of lag in Audiotoolbox is determined by monitoring the return status of Audiotoolbox through a monitoring thread.

[0120] To make this application easier to understand, an exemplary application is provided below.

[0121] In this exemplary application, the editor defaults to configuring the first player instance as ijkplayer to preview the target video. Both ijkplayer and the editing SDK call underlying system components (such as Audiotoolbox, Media Framework, MediaBox, etc.) to respectively implement the functions of previewing and editing the target video. When these underlying system components are called simultaneously, it may cause lag. Therefore, a monitoring thread is created to monitor whether the underlying system components are experiencing lag. The monitoring thread monitors whether the APIs of the underlying system components return results at preset time intervals. If results are not returned at the preset time intervals, it is determined that the underlying system components are experiencing lag. Then, a second player instance (such as AVPlayer, KMPlayer, etc.) that does not call the underlying system components is switched, thereby resolving the lag problem when simultaneously previewing and editing the target video.

[0122] Example 2

[0123] Figure 6 The diagram schematically illustrates a multimedia preview device according to Embodiment 2 of this application. This 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 embodiments of this application. The program module referred to in the embodiments of this application refers to a series of computer program instruction segments capable of performing a specific function. The following description will specifically introduce the functions of each program module in this embodiment. For example... Figure 6 As shown, the device 1000 may include: a playback module 1100, a configuration module 1200, and a switching module 1300, wherein: in an editor configured with a first player instance, the device includes:

[0124] Playback module 1100 is used to play the target video through the first player instance;

[0125] The configuration module 1200 is used to configure a second player instance if the playback smoothness parameter does not meet the preset standard during the playback of the target video by the first player instance; 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.

[0126] 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.

[0127] As an optional embodiment, switching from the first player instance to the second player instance includes:

[0128] Pause or close the first player instance;

[0129] Configure the second player instance;

[0130] The second player instance is invoked to play the target video.

[0131] As an optional embodiment, the device 1000 is further used for:

[0132] During the process of switching from the first player instance to the second player instance, the switching frame of the first player instance is obtained;

[0133] The switching frame screen is displayed until the second player instance is configured and starts playing the target video.

[0134] As an optional embodiment, the device 1000 is further used for:

[0135] During the playback of the target video by the first player instance, the target playback information for the target video is recorded in real time.

[0136] Correspondingly, invoking the second player instance to play the target video includes:

[0137] 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.

[0138] As an optional embodiment, the device 1000 further includes:

[0139] When the editor is started and the target video is playing, a monitoring thread is created;

[0140] The monitoring thread is used to monitor the smoothness parameters of the operating system, and the editor runs on the operating system.

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

[0142] As an optional embodiment, the smoothness parameter is characterized by the presence or absence of stuttering; when the underlying playback component of the system is Audiotoolbox, the monitoring thread is used for:

[0143] If the Audiotoolbox returns results at a preset time interval, it is determined that the Audiotoolbox does not experience any lag.

[0144] If the Audiotoolbox fails to return results at the preset time interval, it is determined that the Audiotoolbox is experiencing lag.

[0145] Example 3

[0146] Figure 7 This illustration schematically depicts a hardware architecture diagram of a computer device 10000 suitable for implementing a multimedia preview method according to Embodiment 3 of this application. In some embodiments, the computer device 10000 may be a smartphone, wearable device, tablet computer, personal computer, in-vehicle terminal, game console, virtual machine, workbench, digital assistant, set-top box, robot, or other terminal device. 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 and be linked with each other via a system bus. Wherein:

[0147] The memory 10010 includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., 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 may be an internal storage module of a computer device 10000, such as the hard disk or memory of the computer device 10000. In other embodiments, the memory 10010 may also be an external storage device of the computer device 10000, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 10000. Of course, the memory 10010 may also include both the internal storage module and the external storage device of the computer device 10000. In this embodiment, the memory 10010 is typically used to store the operating system and various application software installed on the computer device 10000, such as the program code for a multimedia preview method. In addition, the memory 10010 can also be used to temporarily store various types of data that have been output or will be output.

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

[0149] Network interface 10030 may include a wireless network interface or a wired network interface, which is typically used to establish a communication link between computer device 10000 and other computer devices. For example, network interface 10030 is used to connect computer device 10000 to an external terminal via a network, establishing a data transmission channel and communication link between computer device 10000 and the external terminal. The network may be an intranet, the Internet, Global System for Mobile Communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or other wireless or wired networks.

[0150] It should be pointed out that, Figure 7 Only computer devices with components 10010-10030 are shown; however, it should be understood that it is not required to implement all of the shown components, and more or fewer components may be implemented instead.

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

[0152] Example 4

[0153] This application also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the steps of the multimedia preview method in the embodiments.

[0154] In this embodiment, the computer-readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (e.g., 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 computer-readable storage medium may be an internal storage unit of a computer device, such as the hard disk or memory of the computer device. In other embodiments, the computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device. Of course, the computer-readable storage medium may include both the internal storage unit and the external storage device of the computer device. In this embodiment, the computer-readable storage medium is typically used to store the operating system and various application software installed on the computer device, such as the program code of the multimedia preview method in the embodiment. In addition, the computer-readable storage medium can also be used to temporarily store various types of data that have been output or will be output.

[0155] Example 5

[0156] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the methods described in the above embodiments.

[0157] Obviously, those skilled in the art should understand that the modules or steps of the embodiments of this application described above can be implemented using general-purpose computer devices. They can be centralized on a single computer device or distributed across a network of multiple computer devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computer device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of this application are not limited to any particular combination of hardware and software.

[0158] It should be noted that the above are merely preferred embodiments of this application and do not limit the scope of patent protection of this application. Any equivalent structural or procedural changes made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of this application.

Claims

1. A multimedia preview method, characterized in that, In an editor configured with a first player instance; the method includes: Play the target video using the first player instance; If the playback smoothness parameter does not meet the preset standard during the playback of the target video by the first player instance, 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, while the second player instance does not call the system's underlying 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; Configure the second player instance; The second player instance is invoked to play the target video.

3. The method according to claim 2, characterized in that, The method further includes: During the process of switching from the first player instance to the second player instance, the switching frame of the first player instance is obtained; 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 includes: During the playback of the target video by the first player instance, the target playback information for the target video is recorded in real time. Correspondingly, invoking 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 includes: When the editor is started and the target video is playing, a monitoring thread is created; The monitoring thread is used to monitor the smoothness parameters of the operating system, and the editor runs on the operating system.

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

7. The method according to claim 6, characterized in that, The smoothness parameter is characterized by the presence or absence of stuttering; when the underlying playback component of the system is Audiotoolbox, the monitoring thread is used for: If the Audiotoolbox returns results at a preset time interval, it is determined that the Audiotoolbox does not experience any lag. If the Audiotoolbox fails to return results at the preset time interval, it is determined that the Audiotoolbox is experiencing lag.

8. A multimedia preview device, characterized in that, In an editor for configuring a first player instance, the device includes: The playback module is used to play the target video through the first player instance; The configuration module is used to configure a second player instance if the playback smoothness parameter does not meet the preset standard during the playback of the target video by the first player instance; wherein, the first player instance is used to call the underlying system playback component to play the target video, and the second player instance does not call the underlying system playback component; The 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 to enable the at least one processor to perform the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 7.

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

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