[go: up one dir, main page]

CN119629413A - Multimedia preview method and device - Google Patents

Multimedia preview method and device Download PDF

Info

Publication number
CN119629413A
CN119629413A CN202411373966.XA CN202411373966A CN119629413A CN 119629413 A CN119629413 A CN 119629413A CN 202411373966 A CN202411373966 A CN 202411373966A CN 119629413 A CN119629413 A CN 119629413A
Authority
CN
China
Prior art keywords
player instance
target video
playing
player
instance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411373966.XA
Other languages
Chinese (zh)
Inventor
谢志振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202411373966.XA priority Critical patent/CN119629413A/en
Publication of CN119629413A publication Critical patent/CN119629413A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47205End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for manipulating displayed content, e.g. interacting with MPEG-4 objects, editing locally
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • H04N21/8173End-user applications, e.g. Web browser, game
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • H04N21/8193Monomedia components thereof involving executable data, e.g. software dedicated tools, e.g. video decoder software or IPMP tool

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the application provides a multimedia preview method which is used in an editor provided with a first player instance, and comprises the steps of playing a target video through the first player instance, configuring a second player instance if a play smoothness parameter does not meet a preset standard in the process of playing the target video by the first player instance, wherein the first player instance is used for calling a system bottom layer playing component to play the target video, 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. The technical scheme of the embodiment of the application can solve the problem of poor playing fluency when the editor previews the target video and edits the target video simultaneously, and improves the user experience.

Description

Multimedia preview method and device
Technical Field
Embodiments of the present application relate to the field of multimedia technology, and in particular, to a multimedia preview method, a multimedia preview apparatus, a computer device, a computer readable storage medium, and a computer program product.
Background
With the rapid development of mobile internet technology, multimedia authoring has become an integral part of users' daily lives. The importance of multimedia editors, such as video, in multimedia authoring is becoming increasingly prominent.
At present, when a video is previewed and edited simultaneously in an editor, a clamping condition may occur, which affects user experience.
It should be noted that the foregoing is not necessarily prior art, and is not intended to limit the scope of the present application.
Disclosure of Invention
Embodiments of the present application provide a multimedia preview method, apparatus, computer device, computer readable storage medium, computer program product, to solve or alleviate one or more of the technical problems set forth above.
An aspect of the embodiment of the application provides a multimedia preview method, which is used in an editor configured with a first player instance, and 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 the playing fluency parameter does not meet the 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.
Optionally, switching from the first player instance to the second player instance includes:
pausing or closing the first player instance;
Configuring the second player instance;
And calling the second player instance to play the target video.
Optionally, the method further comprises:
Acquiring a switching frame picture of a first player instance in the process of switching from the first player instance to the second player instance;
and displaying the switching frame picture until the configuration of the second player instance is completed and the playing of the target video is started.
Optionally, the method further comprises:
in the process of playing the target video by the first player instance, recording target playing information aiming at the target video in real time;
Correspondingly, calling the second player instance to play the target video comprises the following steps:
and loading the target playing information into the second player instance so that the second player instance plays the target video according to the target playing information, wherein the target playing information comprises a playing progress.
Optionally, the method further comprises:
Creating a monitoring thread under the condition that the editor starts and plays the target video;
The monitoring thread is used for monitoring the fluency parameter of an operating system, and the editor runs in the operating system.
Optionally, in the iOS system or macOS system environment, the system bottom layer playing component includes Audiotoolbox and the second player instance includes AVPlayer.
Optionally, the fluency parameter is characterized by the presence or absence of a jam, and the monitoring thread is configured to, in the case that the system bottom layer play component is Audiotoolbox:
If the Audiotoolbox returns a result at a preset time interval, determining that no jamming exists in the Audiotoolbox;
and if the Audiotoolbox does not return the result at the preset time interval, determining that the Audiotoolbox is stuck.
Another aspect of an embodiment of the present application provides a multimedia preview apparatus for use in an editor configured with a first player instance, the apparatus comprising:
the playing module is used for playing the target video through the first player instance;
the configuration module is used for configuring a second player example if the playing fluency parameter does not accord with a preset standard in the process of playing the target video by the first player example, wherein the first player example is used for calling a system bottom layer playing component to play the target video, and the second player example does not call the system bottom layer playing component;
And the switching module is used for switching from the first player instance to the second player instance, and playing the target video through the second player instance.
Another aspect of an embodiment of the present application provides a computer apparatus, including:
At least one processor, and
A memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
Another aspect of embodiments of the present application provides a computer-readable storage medium having stored therein computer instructions which, when executed by a processor, implement a method as described above.
Another aspect of embodiments of the application provides a computer program product comprising a computer program which, when executed by a processor, implements a method as described above.
The embodiment of the application adopts the technical scheme and has the advantages that the target video is played by the first player instance preferentially, and the first player instance is used for calling the system bottom layer playing component to play the target video, so that the video preview effect is better. And if the playing fluency is low, switching to a second player example. The second player instance is independent and does not call the system bottom layer playing component, so that balance between video preview effect and fluency is achieved, and certain playing fluency is guaranteed. It can be known that the embodiment of the application solves the problem of poor playing fluency when the editor previews the target video and edits the target video simultaneously, and improves the user experience.
Drawings
The accompanying drawings illustrate exemplary embodiments and, together with the description, serve to explain exemplary implementations of the embodiments. The illustrated embodiments are for exemplary purposes only and do not limit the scope of the claims. Throughout the drawings, identical reference numerals designate similar, but not necessarily identical, elements.
Fig. 1 schematically illustrates an operation environment diagram of a multimedia preview method according to a first embodiment of the present application;
Fig. 2 schematically shows a flowchart of a multimedia preview method according to a first embodiment of the present application;
Fig. 3 schematically shows a flow chart of sub-steps of step S204 in fig. 2;
Fig. 4 schematically shows a new flowchart of a multimedia preview method according to a first embodiment of the present application;
FIG. 5 schematically illustrates a preview of a target video;
Fig. 6 schematically shows a block diagram of a multimedia preview apparatus according to a second embodiment of the present application, and
Fig. 7 schematically shows a hardware architecture diagram of a computer device according to a third embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the descriptions of "first," "second," etc. in the embodiments of the present application are for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present application.
In the description of the present application, it should be understood that the numerical references before the steps do not identify the order in which the steps are performed, but are merely used to facilitate description of the present application and to distinguish between each step, and thus should not be construed as limiting the present application.
First, a term explanation is provided in relation to the present application:
the thread is the minimum unit of operation scheduling of the operating system, is contained in the process, and is the actual operation unit in the process. One thread refers to a single sequential control flow in a process, and multiple threads can be concurrent in a process, each thread executing different tasks in parallel.
Clip SDK (software development kit ) is responsible for exporting and saving video/audio/pictures/text etc. in the editor as a new video.
Audiotoolbox an underlying audio processing framework in the iOS system provides a series of tools for playing, recording, processing audio data, and processing audio file formats.
Ijkplayer multimedia player supporting Android or iOS and other systems, and third-party cross-platform player.
AVPlayer multimedia player provided by iOS system, supporting multiple video formats.
Next, in order to facilitate understanding of the technical solutions provided by the embodiments of the present application by those skilled in the art, the following description is made on related technologies:
With the rapid development of mobile internet technology, multimedia authoring has become an integral part of users' daily lives. The importance of editors in multimedia authoring is becoming increasingly prominent. However, the inventor knows that the clip SDK bottom layer used by the current powder editor can use a Audiotoolbox system bottom layer framework, and when some materials such as audio and video are previewed, the clip SDK bottom layer and the clip SDK bottom layer operate simultaneously, the system is likely to be blocked.
Therefore, the embodiment of the application provides a multimedia preview technical scheme to overcome the problems. See in particular below.
Finally, for ease of understanding, an exemplary operating environment is provided below.
As shown in fig. 1, the running environment diagram includes a service platform 2, clients (4A, 4B), 4N.
The service platform 2 may connect clients (4A, 4B,..4N) over a network.
The service platform 2 may be a single server, a cluster of servers, or a cloud computing service center.
The service platform 2 may provide video read services, video write services, etc. to clients.
The service platform 2 may be located in a data center such as a single venue or distributed among different geographic locations (e.g., among multiple venues). 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 a cable link, a twisted pair cable link, a fiber optic link, combinations thereof, or the like, or wireless links such as cellular links, satellite links, wi-Fi links, and the like.
The clients (4A, 4B,..4N) may be configured to access the content and services of the service platform 2. The clients (4A, 4B, 4N) may include electronic devices that carry or circumscribe a display panel, such as mobile devices, tablet devices, laptop computers, workstations, virtual reality devices, gaming devices, digital streaming media devices, vehicle terminals, smart televisions, set-top boxes, etc., as well as virtualized computing instances. Virtualized computing instances may comprise emulation of virtual machines, such as computer systems, operating systems, servers, and the like. The computing device may load the virtual machine by the computing device based on the virtual image and/or other data defining the particular software (e.g., operating system, dedicated application, server) used for the emulation. 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.
The clients (4A, 4B,..4N) may be associated with one or more users. A single user may also access the service platform 2 using one or more of the clients (4A, 4B,..4N). Clients (4A, 4B,..4N) may travel to various locations and use different networks to access the service platform 2.
The clients (4A, 4B,..4N) may include interfaces. The interface may include a touch pad, touch screen, mouse, keyboard, or other sensing element. For example, the input element may be configured to receive user instructions that may cause the client (4A, 4B,..4N) to perform various operations, such as launching an editor, playing a video, previewing a video, editing a video, and so forth.
The technical scheme of the application is introduced by a plurality of embodiments by taking an editor in the client as an execution subject. It should be understood that these embodiments may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein.
Example 1
Fig. 2 schematically shows a flowchart of a multimedia preview method according to a first embodiment of the present application.
As shown in fig. 2, the multimedia preview method may include steps S200 to S204, in which:
Step S200, playing the target video through the first player instance.
Step S202, if the playing fluency parameter does not meet the preset standard in the process of playing the target video by the first player instance, 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.
Step S204, switching from the first player instance to the second player instance, and playing the target video through the second player instance.
The multimedia preview method provided by the embodiment can be applied to the client (e.g. 4A), and the target video is preferentially played through the first player instance, and the first player instance is used for calling the system bottom layer playing component to play the target video, so that the method has a good video preview effect. And if the playing fluency is low, switching to a second player example. The second player instance is independent and does not call the system bottom layer playing component, so that balance between video preview effect and fluency is achieved, and certain playing fluency is guaranteed. It can be known that the embodiment of the application solves the problem of poor playing fluency when the editor previews the target video and edits the target video simultaneously, and improves the user experience.
Each of steps S200 to S204 and optional other steps are described in detail below with reference to fig. 2.
Step S200, playing the target video through the first player instance.
The target video may be transmitted to the client (e.g., 4A) via a CDN or other means. The target video can be in various formats such as H.264, AV1, MP4, etc. The user starts the editor via the client 4A. The editor loads the first player instance to play the target video. Wherein the target video includes a video stream and audio. The target video can be a local video file, a video from the Internet, a video stored in a cloud, and the like.
The editor may integrate iPlayer (generic playback interface layer) and clip SDKs inside. The first player instance may be a third party player (ijkplayer) that may invoke the system-in-layer components to provide better preview capabilities. iPlayer may use the first player instance as a default player. In addition to the default configuration, iPlayer may also configure the first player instance according to the actual requirements. iPlayer can monitor the performance index of each player instance, such as CPU occupancy rate, memory usage rate, frame rate, etc., in real time through built-in or third party performance monitoring tools. And selecting the player instance with the optimal performance as a first player instance under the condition of system resource permission. The first player instance may be embedded in the editor or may be invoked from outside the editor when desired.
IPlayer may define a basic player operation interface such that a user controls playback, pause, skip, volume control, etc. of a target video through an editor interface. The clip SDK is used to call a system underlying playback component to edit the target video (which may result in a clip if the first player instance calls the underlying component at the same time). Editing the target video may be processing audio in the target video, cropping the target video, adding subtitles and watermarks to the target video, and so on.
Step S202, if the playing fluency parameter does not meet the preset standard in the process of playing the target video by the first player instance, 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.
In the process of playing the target video by the first player instance, the playing fluency parameter can be monitored in real time. A timer (e.g., performed once per second) may also be set to periodically monitor the play fluency parameter. The play fluency parameters may be bit rate, resolution, buffering time, chunking rate, frame rate, etc. Preset criteria may be set for each key parameter. And comparing the real-time monitored playing fluency parameter with a preset standard, and evaluating whether the current playing fluency parameter of the target video meets the standard or not. For example, the click through rate should be above 5% and not reach the standard, the buffer time exceeds 2 seconds and not reach the standard, etc.
The cause of the jamming may be various, such as poor device performance, the first player instance and the clipping SDK calling the system bottom layer playing component at the same time, other APPs in the device occupy more resources, or other causes.
Step S204, switching from the first player instance to the second player instance, and playing the target video through the second player instance.
A smooth transitional effect may be added when switching player instances. For example, animation effects of fading out the first player instance and fading in the second player instance may be added to improve the continuity of playback. If an error occurs when switching to the second player instance, the target video may be reloaded or an error prompt may be displayed and the user may be allowed to select further operations, etc. In addition to automatic switching, the option of the user to manually switch player instances may also be provided, allowing the user to select the appropriate second player instance according to his own needs. In the process of switching player instances, the current playing state can be fed back to the user through a UI prompt (such as displaying a loading animation, popup prompt box, etc.).
In this embodiment, when the smoothness of playing the target video by the first player instance (e.g. ijkplayer) and the clip SDK by calling the system bottom layer playing component at the same time does not reach the standard, the first player instance is switched to the second player instance independent of the system bottom layer component, so that the problem that the playing smoothness parameter of the editor when previewing and editing the target video at the same time is lower than a preset value (e.g. a click) is solved, and the user experience is improved.
In an alternative embodiment, as shown in fig. 3, step S204 may include:
Step S300, suspending 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.
The first player instance may be paused before switching to the second player instance, but the active state of the first player instance is maintained so that errors (e.g., network problems, decoding failure) occur in the second player instance and the first player instance may be rolled back again. The first player instance may also be directly turned off, and when the first player instance is turned off, all resources (e.g., memory, CPU, GPU) occupied by the first player instance may be released in memory so that the resources may be used by the second player instance or other applications, thereby improving system performance.
The second player instance may be an internal plug-in embedded into the editor or an external plug-in that is called from outside the editor when needed. In some embodiments, a pool of player instances may be created, with multiple player instances being created and managed in advance. And dynamically calling the most suitable player instance as a second player instance to switch according to the current playing condition or equipment performance and the like, so that the playing stability and fluency are improved. For example, if the stuck is due to network delay or packet loss, a second player instance with stronger network adaptation capability may be invoked. If the current player instance competes with other applications or system processes for resources such as CPU, memory, etc., resulting in unsmooth playback, a second player instance with higher priority or lower resource consumption may be invoked.
In some embodiments, the second player instance may be configured first and then the first player instance may be paused or turned off. 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, so that the possibility of black screen in the process of switching the player instances is reduced. It is also possible to pause or close the first player instance before configuring the second player instance, thereby reducing the possibility of two player instances occurring simultaneously.
In this embodiment, in the process of playing the target video by the current player instance (the first player instance), when the playing fluency parameter does not meet Fu Yushe standard, a new player instance (the second player instance) is configured to continue playing the target video by suspending or closing the current player instance, so as to improve the playing fluency and user experience.
In an alternative embodiment, as shown in fig. 4, 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 of the first player instance;
Step S402, displaying the switching frame picture until the configuration of the second player instance is completed and the playing of the target video is started.
Since the key frames (I-frames) contain complete image information, they can be decoded and displayed independently without relying on other frames. Therefore, whether available key frames exist near the current playing position of the target video needing to be switched or not can be monitored. If the available key frame exists, the key frame is preferentially selected for decoding, and the picture is acquired as a switching frame picture, so that the switching smoothness and decoding efficiency are improved. In the case where there are multiple key frames, the key frame with the timestamp closest to the current play position is preferentially selected to reduce the delay and jump of the target video play. If no key frame is found, the frame with the timestamp closest to the current playing position and higher visual continuity can be selected for decoding, and the picture is obtained as a switching frame picture, so that the visual discontinuous feeling is reduced as much as possible.
If an error occurs in the switching process or the delay is too long, an error prompt can be provided or a user can select whether to cancel the switching, so that the friendliness and the interactivity of the user interface are maintained.
In this embodiment, the switching frame picture of the first player instance is acquired. And displaying the switching frame picture when the first player example is paused or closed until the second player is configured and starts to play the target video, thereby reducing the possibility of black screen in the process of switching the player examples and improving the continuity of previewing the target video.
In an alternative embodiment, the multimedia preview method may further include:
in the process of playing the target video by the first player instance, recording target playing information aiming at the target video in real time;
correspondingly, step S304 may include:
and loading the target playing information into the second player instance so that the second player instance plays the target video according to the target playing information, wherein the target playing information comprises a playing progress.
The target playing information includes the current playing progress, playing address, playing time, playing volume, playing state (such as pause, stop, fast forward, fast backward, etc.), playing video quality (such as high definition, ultra-definition, blue light, etc.), and user preference setting, etc.
In the process of playing the target video by the first player instance, target playing information aiming at the target video can be recorded in real time and stored in a local equipment memory cache so as to temporarily read and write the target playing information. And after the configuration of the second player instance is completed, the stored target playing information is read from the local memory cache and is loaded to the second player instance. A lifecycle may be set for the target play information. For example, when the user leaves the application or switches to another video, the cached playback information is automatically cleared or updated. The expired or invalid target play information can be cleaned according to the factors such as the cache size, the time stamp and the like, and the occupation of system resources is reduced. Besides storing the target playing information into the memory cache of the local equipment, the target playing information can be synchronized to the cloud server so that the user can recover the target playing information from the cloud when the local equipment fails or data is lost.
In this embodiment, when the first player instance plays the target video, the target playing information is recorded in real time. In the process of switching the second player instance from the first player embodiment, the stored target playing information is loaded, so that the playing progress of the first player instance can be continued at the second player instance, the playing continuity is improved, the playing interruption or repeated playing problem caused by switching the player instance is reduced, and the user experience is improved.
In an alternative embodiment, the multimedia preview method may further include:
And creating a monitoring thread under the condition that the editor starts and plays the target video. The monitoring thread is used for monitoring the fluency parameter of an operating system, and the editor runs in the operating system.
When the clip SDK and the first player instance (e.g., ijkplayer) call the system bottom layer play component at the same time, a situation may occur that the smoothness parameter of the operating system does not meet the preset standard. Thus, the monitoring thread is created and managed by the main thread. The monitoring thread monitors the smoothness parameter of the operating system. When the smoothness parameter is not in accordance with the preset standard, the main thread can be notified by means of event notification, message queue and the like. Different weights can be allocated to different situations according to factors such as severity, duration and the like that the fluency parameter does not meet the preset standard. The main thread decides whether to switch player instances and when to switch according to the weights. If the smoothness parameter seriously fails to meet the preset standard or the switching failure occurs when the target video is previewed, an error report can be automatically generated.
In this embodiment, under the condition of playing the target video, a monitoring thread is created to monitor the fluency parameter of the operating system, so that the main thread is immediately notified to perform corresponding actions when the fluency parameter of the operating system does not meet the preset standard.
In an alternative embodiment, the multimedia preview method may further include, in an iOS system or macOS system environment, the system-under-layer playback component comprising Audiotoolbox and the second player instance comprising AVPlayer.
In an Android system environment, the system bottom layer play component may include a Media Framework. The second player instance may include KMPlayer.
In a hong-and-Monte system environment, the system bottom layer play component may include MediaBox. The second player instance may include AVPlayer.
In an optional embodiment, the multimedia preview method may further include that the smoothness parameter is characterized by presence or absence of a click, and in a case that the system bottom layer playing component is Audiotoolbox, the monitoring thread is configured to:
If the Audiotoolbox returns a result at a preset time interval, determining that no jamming exists in the Audiotoolbox;
and if the Audiotoolbox does not return the result at the preset time interval, determining that the Audiotoolbox is stuck.
For example, the monitoring may be performed at preset time intervals (e.g., every 100 milliseconds). The preset time interval can be dynamically adjusted according to the actual performance of the device and the complexity of the played content so as to achieve a better effect. The monitoring thread periodically monitors whether the API of the system bottom layer play component (such as Audiotoolbox, media Framework, mediaBox, etc.) returns a result at a preset time interval according to the preset time interval. And when the result is not returned in the preset time interval, switching the second player instance (such as AVPlayer, KMPlayer, etc.), so as to improve the fluency. In addition to creating a monitor thread for the system underlying playback component, a monitor thread for resources such as CPU, GPU, memory, disk I/O, etc. may also be created to more accurately locate the source that causes the target video to clip, so that the most appropriate second player instance may be selected according to the source of clip.
In this embodiment, the monitoring thread monitors Audiotoolbox for a return condition to determine Audiotoolbox that a stuck condition exists.
To make the application easier to understand, one exemplary application is provided below.
In this exemplary application, the editor configures the first player instance by default to ijkplayer preview the target video. ijkplayer and the clip SDK call system bottom layer components (such as Audiotoolbox, media Framework, mediaBox, etc.) to implement preview target video and edit target video functions, respectively. When the system bottom layer components are simultaneously called, the system bottom layer components may be blocked. Thus, a monitoring thread is created to monitor whether a system underlying component is stuck. The monitoring thread monitors whether the API of the bottom layer component of the system returns a result at preset time intervals. If the result is not returned at the preset time interval, determining that the bottom layer component of the system generates the blocking. A second player instance (e.g., AVPlayer, KMPlayer, etc.) is switched that does not invoke the underlying components of the system, thereby solving the problem of creating a jam when previewing the target video and editing the target video simultaneously.
Example two
Fig. 6 schematically shows a block diagram of a multimedia preview apparatus according to a second embodiment of the present application, which may be used in an editor configured with a first player instance, and may be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors, to complete the embodiment of the present application. Program modules in accordance with the embodiments of the present application are directed to a series of computer program instruction segments capable of performing the specified functions, and the following description describes each program module in detail. As shown in fig. 6, the apparatus 1000 may include a playing module 1100, a configuring module 1200, and a switching module 1300, where the apparatus includes:
a playing module 1100, configured to play a target video through the first player instance;
the configuration module 1200 is configured to configure a second player instance if the playing fluency parameter does not meet the preset standard in the process of playing the target video by the first player instance, where the first player instance is used to call 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 the switching module 1300 is configured to switch from the first player instance to the second player instance, and play the target video through the second player instance.
As an alternative embodiment, switching from the first player instance to the second player instance includes:
pausing or closing the first player instance;
Configuring the second player instance;
And calling the second player instance to play the target video.
As an alternative embodiment, the apparatus 1000 is further configured to:
Acquiring a switching frame picture of a first player instance in the process of switching from the first player instance to the second player instance;
and displaying the switching frame picture until the configuration of the second player instance is completed and the playing of the target video is started.
As an alternative embodiment, the apparatus 1000 is further configured to:
in the process of playing the target video by the first player instance, recording target playing information aiming at the target video in real time;
Correspondingly, calling the second player instance to play the target video comprises the following steps:
and loading the target playing information into the second player instance so that the second player instance plays the target video according to the target playing information, wherein the target playing information comprises a playing progress.
As an alternative embodiment, the apparatus 1000 further comprises:
Creating a monitoring thread under the condition that the editor starts and plays the target video;
The monitoring thread is used for monitoring the fluency parameter of an operating system, and the editor runs in the operating system.
As an alternative embodiment, in the iOS system or macOS system environment, the system bottom layer play component includes Audiotoolbox and the second player instance includes AVPlayer.
In an optional embodiment, the smoothness parameter is characterized by the presence or absence of a jam, and in the case that the system bottom layer playing component is Audiotoolbox, the monitoring thread is configured to:
If the Audiotoolbox returns a result at a preset time interval, determining that no jamming exists in the Audiotoolbox;
and if the Audiotoolbox does not return the result at the preset time interval, determining that the Audiotoolbox is stuck.
Example III
Fig. 7 schematically shows a hardware architecture diagram of a computer device 10000 adapted to implement a multimedia preview method according to a third embodiment of the present application. In some embodiments, computer device 10000 may be a smart phone, a wearable device, a tablet, a personal computer, a vehicle terminal, a gaming machine, a virtual device, a workstation, a digital assistant, a set top box, a robot, or the like. As shown in fig. 7, the computer device 10000 includes, but is not limited to, a memory 10010, a processor 10020, and a network interface 10030, which can be communicatively linked to each other through a system bus. Wherein:
Memory 10010 includes at least one type of computer-readable storage medium including flash memory, hard disk, multimedia card, card 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, and the like. In some embodiments, memory 10010 may be an internal storage module of computer device 10000, such as a hard disk or memory of 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 provided on the computer device 10000, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), or the like. Of course, the memory 10010 may also include both an internal memory module of the computer device 10000 and an external memory device thereof. In this embodiment, the memory 10010 is typically used for storing an operating system installed on the computer device 10000 and various application software, such as program codes of a multimedia preview method. In addition, the memory 10010 may be used to temporarily store various types of data that have been output or are to be output.
The processor 10020 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other chip in some embodiments. The processor 10020 is typically configured to control 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 configured to execute program codes or process data stored in the memory 10010.
The network interface 10030 may comprise a wireless network interface or a wired network interface, which network interface 10030 is typically 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, establish a data transmission channel and a communication link between the computer device 10000 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a global system for mobile communications (Global System of Mobile communication, abbreviated as GSM), wideband code division multiple access (Wideband Code Division Multiple Access, abbreviated as WCDMA), a 4G network, a 5G network, bluetooth (Bluetooth), wi-Fi, etc.
It should be noted that fig. 7 only shows a computer device having components 10010-10030, but it should be understood that not all of the illustrated components are required to be implemented, and that more or fewer components may be implemented instead.
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 (e.g., the processor 10020) to complete the embodiment of the present application.
Example IV
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, wherein the computer program, when being executed by a processor, implements the steps of the multimedia preview method in the embodiment.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of a computer device, such as a hard disk or a 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 (SD) card, a flash memory card (FLASH CARD), or the like, provided on the computer device. Of course, the computer-readable storage medium may also include both internal storage units of a computer device and external storage devices. In this embodiment, the computer readable storage medium is typically used to store an operating system and various types of application software installed on the computer device, such as program codes of the multimedia preview method in the embodiment. Furthermore, 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.
Example five
The present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the method of the above embodiments.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the application described above may be implemented in a general purpose computer device, they may be concentrated on a single computer device, or distributed over a network of multiple computer devices, they may alternatively be implemented in program code executable by a computer device, so that they may be stored in a storage device for execution by the computer device, and in some cases, the steps shown or described may be performed in a different order than what is shown or described, or they may be separately made into individual integrated circuit modules, or a plurality of modules or steps in them may be made into a single integrated circuit module. Thus, embodiments of the application are not limited to any specific combination of hardware and software.
It should be noted that the foregoing is only a preferred embodiment of the present application, and is not intended to limit the scope of the present application, and all equivalent structures or equivalent processes using the descriptions of the present application and the accompanying drawings, or direct or indirect application in other related technical fields, are included in the scope of the present application.

Claims (11)

1.一种多媒体预览方法,其特征在于,用于配置有第一播放器实例的编辑器中;所述方法包括:1. A multimedia preview method, characterized in that it is 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.根据权利要求1所述的方法,其特征在于,从所述第一播放器实例切换到所述第二播放器实例,包括:2. The method according to claim 1, characterized in that switching from the first player instance to the second player instance comprises: 暂停或关闭所述第一播放器实例;Pause or close the first player instance; 配置所述第二播放器实例;configuring the second player instance; 调用所述第二播放器实例播放所述目标视频。Call the second player instance to play the target video. 3.根据权利要求2所述的方法,其特征在于,所述方法还包括: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.根据权利要求2所述的方法,其特征在于,所述方法还包括: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.根据权利要求1、2、3或4所述的方法,其特征在于,所述方法还包括: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.根据权利要求5所述的方法,其特征在于,在iOS系统或macOS系统环境下,所述系统底层播放组件包括Audiotoolbox,所述第二播放器实例包括AVPlayer。6. The method according to claim 5 is characterized in that, in an iOS system or a macOS system environment, the system bottom-level playback component includes Audiotoolbox, and the second player instance includes AVPlayer. 7.根据权利要求6所述的方法,其特征在于,所述流畅度参数通过存在卡顿或不存在卡顿进行表征;所述系统底层播放组件为Audiotoolbox的情况下,所述监测线程用于: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: 在所述Audiotoolbox以预设时间间隔返回结果的情况下,确定所述Audiotoolbox不存在卡顿;When the Audiotoolbox returns a result at a preset time interval, determining that there is no lag in the Audiotoolbox; 在所述Audiotoolbox未以所述预设时间间隔返回结果的情况下,确定所述Audiotoolbox存在卡顿。If the Audiotoolbox does not return a result within the preset time interval, it is determined that the Audiotoolbox is stuck. 8.一种多媒体预览装置,其特征在于,用于配置有第一播放器实例的编辑器中,所述装置包括:8. A multimedia preview device, characterized in that it is used in an editor configured with a first player instance, the device comprising: 播放模块,用于通过所述第一播放器实例播放目标视频;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. 一种计算机设备,其特征在于,包括:9. A computer device, comprising: 至少一个处理器;及at least one processor; and 与所述至少一个处理器通信连接的存储器;其中:a memory communicatively connected to the at least one processor; wherein: 所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1至7中任一项所述的方法。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.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机指令,所述计算机指令被处理器执行时实现如权利要求1至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.一种计算机程序产品,包括计算机程序,其特征在于,该计算机程序被处理器执行时实现权利要求1至7中任意一项所述方法的步骤。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.
CN202411373966.XA 2024-09-27 2024-09-27 Multimedia preview method and device Pending CN119629413A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411373966.XA CN119629413A (en) 2024-09-27 2024-09-27 Multimedia preview method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411373966.XA CN119629413A (en) 2024-09-27 2024-09-27 Multimedia preview method and device

Publications (1)

Publication Number Publication Date
CN119629413A true CN119629413A (en) 2025-03-14

Family

ID=94891507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411373966.XA Pending CN119629413A (en) 2024-09-27 2024-09-27 Multimedia preview method and device

Country Status (1)

Country Link
CN (1) CN119629413A (en)

Similar Documents

Publication Publication Date Title
US11336953B2 (en) Video processing method, electronic device, and computer-readable medium
US10225613B2 (en) Method and apparatus for video playing processing and television
US10638180B1 (en) Media timeline management
US11490173B2 (en) Switch of audio and video
CN112839238B (en) Screen projection playing method and device and storage medium
CN110636346A (en) Code rate self-adaptive switching method and device, electronic equipment and storage medium
WO2021159770A1 (en) Video playback method, device, apparatus, and storage medium
CN111669645B (en) Video playing method and device, electronic equipment and storage medium
CN104159151A (en) Device and method for intercepting and processing of videos on OTT box
US12382136B2 (en) Methods for generating videos, and related systems and servers
CA3213247A1 (en) Method and system for integrating video content in a video conference session
KR20210126080A (en) Techniques for advancing playback of interactive media titles in response to user selections
CN112584084B (en) Video playing method and device, computer equipment and storage medium
CN114040245A (en) Video playing method and device, computer storage medium and electronic equipment
CN114491096A (en) A kind of multimedia preloading method, apparatus, equipment and storage medium
US10862946B1 (en) Media player supporting streaming protocol libraries for different media applications on a computer system
US12244897B2 (en) Playback optimization method and system
US9633694B2 (en) Full fidelity remote video editing
CN119629413A (en) Multimedia preview method and device
CN112019858B (en) Video playing method and device, computer equipment and storage medium
CN112543374A (en) Transcoding control method and device and electronic equipment
US11336947B2 (en) Audio transitions when streaming audiovisual media titles
CN115086282A (en) Video playing method, device and storage medium
CN118138713B (en) Multi-party call method, device, electronic device, storage medium and product
CN117241088A (en) Video playing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination