Method, electronic device, and computer-readable storage medium for video redirection
By detecting and replacing the player of the video application as a preset player, the compatibility problem of third-party video applications is solved, and the direct redirection of video resource addresses is realized to the client playback, reducing the burden on the server, and improving user experience and product competitiveness.
Patent Information
- Application Number
- CN202010618024.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-30
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2040-06-30
AI Technical Summary
In the prior art, third-party video applications cannot realize video redirection and separation of desktop streams and video streams due to compatibility issues, resulting in video resources being unable to be directly redirected to client playback.
By detecting whether the player of the video application is the target player, if it is the target player, it is replaced with a preset player, and the video resource address is sent to the client through the dynamic library of the preset player, so that the client can play video information.
It solves the compatibility problem of third-party video applications, realizes direct redirection of video resource addresses to client playback, reduces server burden, and improves user experience and product competitiveness.
Smart Images

Figure CN113873298B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of multimedia terminals and cloud computing, and in particular to a method for video redirection. Background Art
[0002] As big video services mature, users are demanding a higher user experience, hoping for a better UI (User Interface) experience and richer value-added services. Simultaneously, the rapid development of cloud computing and virtualization technologies has led to the emergence of cloud-based set-top boxes (STBs). Cloud-based STBs handle specific services in the cloud, while retaining core decoding capabilities and peripheral interface capabilities. Therefore, optimizing cloud server processing power and the number of concurrent virtual machines (VMs) can significantly reduce costs and improve product competitiveness. Cloud-based video playback is a common scenario where VM resources are heavily utilized. Separating desktop and video streams is an effective solution to this problem.
[0003] Although separating the desktop stream and the video stream and redirecting the video stream to the client can effectively improve the performance of the server, this is only effective for some applications. For some other third-party applications, due to compatibility issues, video redirection and separation of the desktop stream and the video stream cannot be achieved, so the solutions in the relevant technology have great limitations. Summary of the Invention
[0004] The following is a summary of the subject matter described in detail herein. This summary is not intended to limit the scope of the claims.
[0005] Embodiments of the present application provide a video redirection method, an electronic device, and a computer-readable storage medium, which can redirect a video stream directly to a client for playback without modifying the video application itself.
[0006] Upon receiving a start instruction, detecting whether a player of the video application indicated by the start instruction is a target player;
[0007] If the player of the video application is the target player, replacing the player of the video application with a preset player and starting the video application;
[0008] When a play instruction is received, the video resource address indicated by the play instruction is sent to the client through the dynamic library of the preset player, so that the client obtains and plays the video information through the video resource address.
[0009] On the other hand, an embodiment of the present invention provides an electronic device, comprising: a memory for storing programs; a processor for executing the programs stored in the memory, and when the processor executes the programs stored in the memory, the processor is used to execute the video redirection method as described above.
[0010] On the other hand, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the above-mentioned video redirection method.
[0011] The embodiment of the present invention includes: upon receiving a start instruction, detecting whether the player of the video application indicated by the start instruction is the target player; if the player of the video application is the target player, replacing the player of the video application with a preset player, and starting the video application; upon receiving a play instruction, sending the video resource address indicated by the play instruction to the client through the dynamic library of the preset player, so that the client obtains and plays the video information through the video resource address. According to the solution provided by the embodiment of the present invention, when a start instruction for starting a video application is obtained, first, according to the start instruction, detecting whether the player of the video application indicated by the start instruction is the target player, and then, if the player of the video application is the target player, replacing the target player of the video application with the preset player, wherein the target player is a player that cannot support sending information such as the video resource address to the client, so that the client obtains and plays the video information through the video resource address, and the preset player is a player that can support sending information such as the video resource address to the client, so that the client obtains and plays the video information through the video resource address. Since the original player of the video application is replaced, the problem that third-party programs cannot achieve video redirection and separation of desktop stream and video stream due to compatibility is solved. Moreover, when a play instruction is received, the dynamic library of the preset player does not need to play the video information, but only needs to send the corresponding video resource address to the client, and the client obtains and plays the video information through the video resource address. Therefore, the solution provided by the embodiment of the present invention can solve the compatibility problems caused by third-party video applications and redirect the video resource address directly to the client for playback.
[0012] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present invention. The purposes and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation to the technical solution of the present invention.
[0014] Figure 1 1 is a schematic diagram of a system for applying a method for video redirection provided by an embodiment of the present invention;
[0015] Figure 2 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0016] Figure 3 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0017] Figure 4 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0018] Figure 5 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0019] Figure 6 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0020] Figure 7 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0021] Figure 8 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0022] Figure 9 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0023] Figure 10 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0024] Figure 11 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0025] Figure 12 is a flowchart of a video redirection method provided by another embodiment of the present invention;
[0026] Figure 13 This is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0028] It should be understood that in the description of the embodiments of the present invention, "multiple" (or multiple) means more than two, "greater than," "less than," and "exceed" are understood to exclude the number itself, and "above," "below," and "within" are understood to include the number itself. The terms "first," "second," and so on are used solely to distinguish technical features and are not to be construed as indicating or implying relative importance, or implicitly indicating the number of the indicated technical features, or implicitly indicating the order of the indicated technical features.
[0029] The present invention provides a method, electronic device and computer-readable storage medium for video redirection, the method comprising: upon receiving a startup instruction, detecting whether the player of a video application indicated by the startup instruction is a target player; if the player of the video application is the target player, replacing the player of the video application with a preset player and starting the video application; upon receiving a play instruction, sending the video resource address indicated by the play instruction to a client through a dynamic library of the preset player, so that the client obtains and plays video information through the video resource address. According to the solution provided by an embodiment of the present invention, when a startup instruction for starting a video application is obtained, first, according to the startup instruction, detecting whether the player of the video application indicated by the startup instruction is the target player, and then, if the player of the video application is the target player, replacing the target player of the video application with a preset player, wherein the target player is a player that cannot support sending information such as a video resource address to the client, so that the client obtains and plays video information through the video resource address, and the preset player is a player that can support sending information such as a video resource address to the client, so that the client obtains and plays video information through the video resource address. Since the original player of the video application is replaced, the problem that third-party programs cannot achieve video redirection and separation of desktop stream and video stream due to compatibility is solved. Moreover, when a play instruction is received, the dynamic library of the preset player does not need to play the video information, but only needs to send the corresponding video resource address to the client, and the client obtains and plays the video information through the video resource address. Therefore, the solution provided by the embodiment of the present invention can solve the compatibility problems caused by third-party video applications and redirect the video resource address directly to the client for playback.
[0030] The embodiments of the present invention are further described below with reference to the accompanying drawings.
[0031] like Figure 1 As shown, Figure 1 Schematic diagram of a system for applying a method for video redirection provided by an embodiment of the present invention. Figure 1 In this example, the system includes a client 100 and a cloud server 200, which includes a virtual machine 300. Client 100 includes a cloud-based set-top box and a display, responsible for decoding and rendering desktop streams, playing video streams, and so on. Virtual machine 300 includes dynamic libraries for installing various video applications and for setting different preset players. The preset player dynamic libraries include the system default player and modified dynamic libraries of open source players.
[0032] The system and application scenarios described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will appreciate that with the evolution of the system architecture platform and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are equally applicable to similar technical problems.
[0033] It will be understood by those skilled in the art that Figure 1 The structure of the system shown in the figure does not constitute a limitation on the embodiments of the present invention, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0034] exist Figure 1 In the system shown, the client 100, the cloud server 200 and the virtual machine 300 can cooperate to perform the video redirection method.
[0035] Exemplarily, the present invention may include the following modules: Launcher: Android system desktop, responsible for triggering the launch of applications; Framework: Android system framework, responsible for launching applications; Video player: including Android system default player MediaPlayer and open source player; Video application: video application installed on the cloud server; Vdagent: responsible for message interaction between the virtual machine and the front-end server; Front-end server: responsible for data interaction with the client; Virtual machine: which is set on the cloud server.
[0036] Based on the structure of the above system, various embodiments of the video redirection method of the present invention are proposed.
[0037] Figure 2 FIG. 1 shows a flow chart of a video redirection method provided by an embodiment of the present invention. Figure 1 As shown, the video redirection method is applied to a cloud server and includes the following steps S100, S200 and S300.
[0038] S100: Upon receiving a start instruction, detecting whether the player of the video application indicated by the start instruction is a target player.
[0039] Exemplarily, the user connects to the virtual machine 300 of the cloud server 200 and sends a startup instruction for starting a video application to the virtual machine. The virtual machine 300 obtains the startup instruction for starting the video application.
[0040] Exemplarily, a front-end server is further provided, and the user connects to the virtual machine 300 of the cloud server 200 and sends a startup instruction for starting the video application to the virtual machine through the front-end server. The virtual machine 300 obtains the startup instruction for starting the video application.
[0041] Exemplarily, in this embodiment, a user starts a client and starts a video application in a virtual machine, and the virtual machine receives a notification of starting the video application.
[0042] Exemplarily, the player of the video application can be the MPV player, which is a command-line media player that supports a variety of media file formats, audio and video codecs, and subtitle types. Its script function enables the player to perform corresponding operations, and there are a large number of user scripts to choose from on the Wiki. MPV has high-quality video output, with video output based on OpenGL, Vulkan, and D3D11, such as video scaling, color management, frame timing, interpolation, HDR, etc. with high-quality algorithms. For GPU video decoding, MPV can utilize most hardware decoding APIs on the platform, and hardware decoding can be enabled on demand at runtime. It is embeddable and has a simple C API, so that MPV can be used as a library and easily integrated into other applications.
[0043] For example, the video application's player can be VLC Media Player, an open-source, cross-platform multimedia player and framework. Developed in C++, it supports Windows, Linux, Unix, and Mac, as well as iOS and Android mobile platforms. VLC's advantage lies in its maturity. Developed in modern C++, it attracts a wider audience, leading to rapid development. Furthermore, as mobile platforms emerge, it can be ported to iOS, Android, and other operating systems.
[0044] For example, the video player in the application can be SMPlayer, a free media player for Windows and Linux with built-in codecs. SMPlayer does not require any external codecs. Users do not need to bother finding and installing codec packs. One of SMPlayer's features is that it remembers settings for all files it plays.
[0045] S200: If the player of the video application is the target player, replace the player of the video application with a preset player, and start the video application.
[0046] Exemplarily, the Android system FrameWork receives a notification to start a video application, detects that the video application introduces a target player, replaces the player of the video application with a preset player, and starts the video application. The target player is the player used by the video application, which may be the player that comes with the video application. The target player is a player that cannot support sending information such as the video resource address to the client so that the client can obtain and play the video information through the video resource address. The preset player is one or more players pre-set in the virtual machine, which can support sending information such as the video resource address to the client so that the client can obtain and play the video information through the video resource address.
[0047] S300: When a play instruction is received, the video resource address indicated by the play instruction is sent to the client through the dynamic library of the preset player, so that the client obtains and plays the video information through the video resource address.
[0048] For example, in a virtual machine on a cloud server, a player is pre-compiled to enable efficient replacement and invocation of the dynamic library of the preset player when it is subsequently needed. The dynamic library of the preset player includes a dynamic library obtained by modifying the dynamic library of the system default player and the open source player.
[0049] Exemplarily, the dynamic library of the preset player may include the following interfaces: Set player address interface: This interface determines whether the current playback is a network resource (determine whether it starts with http). If it is a network resource, the playback address is transmitted to the client, and the client starts the client's player. If it is a local resource, the original playback process is followed and the playback is performed on the cloud server without separation and redirection processing; Start playback interface: The start playback instruction is transmitted to the client, and the client starts playback; Play position jump interface: The playback position jump instruction is transmitted to the client, and the client performs position jump; Pause interface: The pause instruction is transmitted to the client, and the client pauses playback; Stop interface: The stop instruction is transmitted to the client, and the client stops playback; Player release interface: If the release player instruction is transmitted to the client, the client stops playback and releases the player; Get current playback position interface: The virtual machine may need to know the position where the current video has been played. This interface will obtain the current playback position from the client. The virtual machine can display the data normally when the video is played. The interface for obtaining the total duration of the video is used by the virtual machine. The interface obtains the data of the total duration of the video from the client, and the virtual machine can display the data normally. The interface for obtaining the width of the player is used to transmit the width of the player to the client. The interface for obtaining the height of the player is used to transmit the height of the player to the client. The interface for reporting playback failure errors is used. When the client fails to play the video, the failure message is sent to the virtual machine. When the interface receives the message, the virtual machine is notified of the playback failure, and the virtual machine pops up a playback error message. The interface for reporting playback completion events is used. When the client completes playing the video, the completion message is sent to the virtual machine. When the interface receives the message, the virtual machine is notified of the playback completion, and the virtual machine pops up a playback completion message. The interface for reporting playback progress is used. The client uploads the playback progress regularly. When the interface receives the message, the virtual machine's progress bar moves in real time.
[0050] For example, the system detects whether the video application has introduced an open-source video player and whether the open-source video player has been configured in the virtual machine. If the virtual machine has been adapted, the open-source player dynamic library is redirected to the dynamic library of our preset player, that is, the open-source video player is set as the player preset in the virtual machine. The video resource address indicated by the play instruction is sent to the client through the dynamic library of the preset player, so that the client can obtain and play the video information through the video resource address.
[0051] In another example, a user launches a client and a video application in a virtual machine. The virtual machine receives a notification about the launch of the video application and begins detecting whether the video application has introduced the system's default player and whether the system's default player has been configured in the virtual machine. If the virtual machine has been configured, the open source player dynamic library is redirected to the dynamic library of our preset player, replacing the system's default player with the player preset in the virtual machine. The dynamic library of the preset player sends the video resource address indicated by the playback instruction to the client, so that the client can obtain and play the video information through the video resource address.
[0052] like Figure 3 Specifically, the step S100 of detecting whether the player of the video application indicated by the start instruction is the target player further includes:
[0053] S210: Detect the file name of the player of the video application, and determine whether the player of the video application is a target player according to the file name of the player of the video application.
[0054] like Figure 4 As shown, the steps include:
[0055] S400: Send the user interface to the client, and display the user interface on the client.
[0056] Exemplarily, the user interface may be a user interface displayed on a cloud desktop. When playing a video, there may be an empty playback interface in the user interface, such as a black screen area. The black screen area is used to embed video information. The user interface and the playback interface are combined in the client and displayed in the client.
[0057] like Figure 5 As shown, specifically, in the above step S300, when a play instruction is received, the video resource address indicated by the play instruction is sent to the client through the dynamic library of the preset player, so that the client obtains and plays the video information through the video resource address, which can be achieved through the following steps S320 and S330.
[0058] S320, transmitting the video resource address to the front-end server;
[0059] S330: Transmit the video resource address to the client through the front-end server.
[0060] Exemplarily, the front-end server can be another virtual machine used as an information forwarding relay. The front-end server is responsible for receiving information from the client and sending it to the cloud server. At the same time, the front-end server receives the user interface and video resource address sent by the cloud server and transmits it to the client 100.
[0061] like Figure 6 As shown, the above-mentioned video redirection method further includes the steps of:
[0062] S500, acquiring control information through the control interface of the dynamic library of the preset player;
[0063] S600: Send the control information to the client, so that the client controls the player of the client according to the control information.
[0064] Exemplarily, the dynamic library of the preset player includes: a control interface, configured to obtain control instructions, so that the dynamic library of the preset player determines control information according to the control instructions and sends the control information to the client, so that the client controls the playback status of the video information according to the control information.
[0065] Exemplarily, the control interface includes starting playback, jumping the playback position, pausing, stopping, releasing the player, etc. The control information is sent to the client, and the client's video player performs the corresponding control operation. For example, when the user exits the video playback in the video application, the dynamic library of the preset player of the video player in the virtual machine detects that the video player is about to exit or be destroyed, and transmits the video player exit instruction to the client, and the client's video player exits the video playback according to the control information. Exemplarily, the user clicks on the pause, fast forward, jump and other control instructions in the video application in the virtual machine of the cloud server, and the dynamic library of the preset player of the video player in the virtual machine intercepts these control information and transmits these control information to the client, and the client's video player performs corresponding control operations according to these control information.
[0066] For example, when a user clicks on control information such as pause, fast forward, and jump in a video application, the video player in the virtual machine of the cloud server intercepts these control information and then transmits these control information to the front-end server through the Vdagent module; then, the front-end server sends these control information to the client, and the client's video player performs corresponding control operations.
[0067] For example, when a user exits video playback in a video application, the dynamic library of the preset player on the virtual machine side detects that the player is about to exit or be destroyed, and transmits the player exit instruction to the front-end server through the Vdagent module; the front-end server sends the exit instruction to the client, and the client player exits video playback.
[0068] Exemplarily, the dynamic library of the preset player further includes: a display interface configured to obtain width data and height data of the display interface and send the width information and height information to the client, so that the client adjusts the width and height of the display interface based on the width data and height data. The display interface includes obtaining player width, obtaining player height, etc.
[0069] Exemplarily, the dynamic library of the preset player also includes: a reporting information acquisition interface, which is configured to obtain the reporting information of the client, so that the dynamic library of the preset player adjusts the display content of the user interface according to the reporting information, so that the display content of the user interface displayed in the client matches the video information played in the client. The reporting information acquisition interface includes obtaining the current playback position, obtaining the total length of the video, reporting playback failure errors, reporting playback completion events, reporting playback progress, etc.
[0070] like Figure 7 As shown, the video resource address is sent to the client through the dynamic library of the preset player, including the steps of:
[0071] S700, obtaining a video resource address through the dynamic library of the preset player;
[0072] S800: When it is determined according to the video resource address that the video information to be played is a network resource, the video resource address is sent to the client through the dynamic library of the preset player.
[0073] like Figure 8 As shown, the above-mentioned video redirection method further includes the steps of:
[0074] S900: When it is determined according to the video resource address that the video information to be played is a local resource, the video information is played through the dynamic library of the preset player.
[0075] For example, when a user clicks on adapted playback in a video application, the adapted open source video player or the system's default Mediaplayer receives the playback request and does not play the video. Instead, it intercepts control information such as the playback URL information, player area information, etc. through the dynamic library of the preset player.
[0076] In order to more clearly illustrate the specific steps and processes of the video redirection method in each of the above embodiments, specific examples are given below for illustration.
[0077] Example 1:
[0078] like Figure 9 As shown, Figure 9 FIG. 1 is a flow chart of a method for video redirection provided by another embodiment of the present invention. The method for video redirection includes the following steps:
[0079] Step S501: Modify the player dynamic library of a commonly used open source player to obtain the dynamic library of a preset player, including modifying its playback interface and control interface functions for extracting playback information and playback control commands.
[0080] Step S502: Start process flow optimization to detect whether the video application to be started uses the target player. For example, if the target player is an open source player, the corresponding open source player is integrated with the corresponding preset player in the virtual machine. If integrated, the target player is replaced with the preset player integrated in the virtual machine when the video application is started.
[0081] Step S503: The dynamic library of the preset player obtains application playback data, playback control commands and other information, and sends them together with the desktop stream data to the client. The client is responsible for decoding and rendering the desktop stream and playing the video stream.
[0082] Example 2:
[0083] like Figure 10 As shown, Figure 10 FIG. 1 is a flow chart of a method for video redirection provided by another embodiment of the present invention. The method for video redirection includes the following steps:
[0084] Step S601: Modify the Android system default player MediaPlayer to obtain a dynamic library of a preset player, including modifying the playback interface and control interface functions for extracting playback information and playback control commands.
[0085] Step S602, start process flow optimization, detect whether the video application to be started uses the target player, for example, the target player is the system default player MediaPlayer, and whether the corresponding system default player MediaPlayer has a corresponding preset player integrated in the virtual machine. If integrated, the target player will be replaced with the preset player that has been integrated in the virtual machine when the video application is started.
[0086] Step S603: The dynamic library of the preset player obtains application playback data, playback control commands and other information, and sends them together with the desktop stream data to the client. The client is responsible for decoding and rendering the desktop stream and playing the video stream.
[0087] Example 3:
[0088] like Figure 11 As shown, Figure 11 FIG. 1 is a flow chart of a method for video redirection provided by another embodiment of the present invention. The method for video redirection includes the following steps:
[0089] Step S801: The user connects to the Android cloud-based set-top box and starts the video application through the Launcher.
[0090] Step S802: The Android system FrameWork receives a notification to start a video application and begins to detect whether the video application has introduced a target player. For example, if the target player is an open source player, it determines whether the open source player virtual machine has been adapted. If the virtual machine has been adapted, it redirects the open source player dynamic library to the dynamic library of the adapted preset player and starts the video application.
[0091] Step S803: The user clicks on the adapted play button in the video application. The dynamic library of the adapted preset player receives the play request and does not play the video. Instead, the intercepted play URL information and player region information are transmitted to the front-end server via the Vdagent module.
[0092] Step S804: The front-end server sends the desktop stream and video play command to the client, and the client is responsible for decoding and rendering the desktop stream and playing the video stream.
[0093] Step S805: The user clicks on a control command such as pause, fast forward, or jump in the video application. The dynamic library of the preset player intercepts the command and transmits the control command to the front-end server through the Vdagent module.
[0094] Step S806: The front-end server sends the control instruction to the client, and the client player performs corresponding control operations.
[0095] Step S807: When the user exits the video playback in the video application, the dynamic library of the preset player detects that the player is about to be exited or destroyed, and transmits the player exit instruction to the front-end server through the Vdagent module;
[0096] Step S808: The front-end server sends an exit instruction to the client, and the client player exits video playback.
[0097] As described above, with the help of the technical solution provided by the present invention, the video playback is redirected to the client's video player for playback, which does not affect the interface display and can effectively reduce the burden on the server. At the same time, it improves the user experience on the smoothness and low-latency cloud set-top box, thereby improving the competitiveness of the product.
[0098] Example 4:
[0099] like Figure 12 As shown, Figure 12 FIG. 1 is a flow chart of a method for video redirection provided by another embodiment of the present invention. The method for video redirection includes the following steps:
[0100] Step S901: The user connects to the Android cloud-based set-top box and starts the video application through the Launcher.
[0101] Step S902: The Android system's FrameWork receives a notification to start a video application and begins to detect whether the video application references a target player, for example, the system default player MediaPlayer, and whether it has been configured. If the target player has been adapted in the virtual machine, the system default player dynamic library is redirected to the dynamic library of the adapted preset player, and the video application is started.
[0102] Step S903: The user clicks "Adapt Play" in the video application. The dynamic library of the preset player receives the play request and does not play the video. Instead, it transmits the intercepted play URL information and player region information to the front-end server through the Vdagent module.
[0103] Step S904: The front-end server sends the desktop stream and the video play command to the client, and the client is responsible for decoding and rendering the desktop stream and playing the video stream.
[0104] Step S905: The user clicks on a control command such as pause, fast forward, or jump in the video application. The dynamic library of the preset player intercepts the command and transmits the control command to the front-end server through the Vdagent module.
[0105] Step S906: The front-end server sends the control instruction to the client, and the client player performs corresponding control operations.
[0106] Step S907: When the user exits the video playback in the video application, the dynamic library of the preset player detects that the player is about to be exited or destroyed, and transmits the player exit instruction to the front-end server through the Vdagent module;
[0107] Step S908: The front-end server sends an exit instruction to the client, and the client player exits video playback.
[0108] As described above, with the help of the technical solution provided by the present invention, the video playback is redirected to the client's video player for playback, which does not affect the interface display and can effectively reduce the burden on the server. At the same time, it improves the user experience on the smoothness and low-latency cloud set-top box, thereby improving the competitiveness of the product.
[0109] Figure 13 FIG. 4 shows an electronic device 40 provided by an embodiment of the present invention. Figure 13 As shown, the electronic device 40 includes but is not limited to:
[0110] Memory 42, for storing programs;
[0111] The processor 41 is configured to execute the program stored in the memory 42 . When the processor 41 executes the program stored in the memory 42 , the processor 41 is configured to execute the above-mentioned video redirection method.
[0112] The processor 41 and the memory 42 may be connected via a bus or other means.
[0113] Memory 42, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs, such as the terminal selection method described in the embodiments of the present invention. Processor 41 implements the terminal selection method described above by executing the non-transitory software programs and instructions stored in memory 42.
[0114] The memory 42 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store the terminal selection method for executing the above-mentioned method. In addition, the memory 42 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 42 may optionally include a memory remotely located relative to the processor 41, and these remote memories may be connected to the processor 41 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0115] The non-transient software program and instructions required to implement the above-mentioned terminal selection method are stored in the memory 42. When executed by one or more processors 41, the above-mentioned terminal selection method is executed, for example, Figure 2 The method steps S100 to S300 described in Figure 3 The method step S210 described in Figure 4 The method step S400 described in Figure 5 Method steps S320 to S330 described in, Figure 6 The method steps S500 to S600 described in Figure 7 The method steps S700 to S800 described in Figure 8 The method step S900 described in Figure 9 The method steps S501 to S503 described in Figure 10 The method steps S601 to S603 described in Figure 11 The method steps described in steps S801 to S808, Figure 12 Method steps S901 to S908 described in .
[0116] An embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are used to execute the above-mentioned video redirection method.
[0117] In one embodiment, the storage medium stores computer executable instructions, which are executed by one or more control processors, for example, by a processor in the above electronic device, so that the one or more processors can execute the above cloud computing service method, for example, execute Figure 2 The method steps S100 to S300 described in Figure 3 The method step S210 described in Figure 4 The method step S400 described in Figure 5 Method steps S320 to S330 described in, Figure 6 The method steps S500 to S600 described in Figure 7 The method steps S700 to S800 described in Figure 8 The method step S900 described in Figure 9 The method steps S501 to S503 described in Figure 10 The method steps S601 to S603 described in Figure 11 The method steps described in steps S801 to S808, Figure 12 Method steps S901 to S908 described in .
[0118] The embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0119] Those skilled in the art will appreciate that all or some of the steps and systems in the method disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those skilled in the art, the term computer storage media is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data) and is volatile and non-volatile, removable, and non-removable. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technology, CD-ROM, digital versatile disks (DVD), or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage, or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0120] Embodiments of the present invention are described herein, including preferred embodiments known to the inventor for performing the present invention. After reading the above description, variations of these described embodiments will become apparent to those skilled in the art. The inventors expect that the skilled person will adopt such variations as appropriate, and the inventors intend to practice the embodiments of the present invention in a manner different from that specifically described herein. Therefore, as permitted by applicable law, the scope of the present invention includes all modifications and equivalents of the subject matter recited in the claims appended hereto. In addition, the scope of the present invention encompasses any combination of the above-mentioned elements in all possible variations thereof, unless otherwise indicated herein or otherwise clearly contradicted by the context.
Claims
1. A method for video redirection, comprising: Upon receiving a start instruction, detecting whether a player of the video application indicated by the start instruction is a target player; If the player of the video application is the target player, the player of the video application is replaced with a preset player, and the video application is started; wherein the target player is a player that cannot support sending the video resource address to the client so that the client obtains and plays the video information through the video resource address; and the preset player is a player that can support sending the video resource address to the client so that the client obtains and plays the video information through the video resource address; When a play instruction is received, the video resource address indicated by the play instruction is sent to the client through the dynamic library of the preset player, so that the client obtains and plays the video information through the video resource address.
2. The video redirection method according to claim 1, characterized in that: The step of sending the video resource address indicated by the play instruction to the client through the dynamic library of the preset player includes: Obtain the video resource address through the dynamic library of the preset player; When it is determined according to the video resource address that the video information to be played is a network resource, the video resource address is sent to the client through the dynamic library of the preset player.
3. The video redirection method according to claim 2, characterized in that: Also includes: When it is determined according to the video resource address that the video information to be played is a local resource, the video information is played through the dynamic library of the preset player.
4. The video redirection method according to claim 1, characterized in that: The detecting whether the player of the video application indicated by the start instruction is the target player includes: The file name of the player of the video application is detected, and whether the player of the video application is a target player is determined according to the file name of the player of the video application.
5. The video redirection method according to claim 1, characterized in that: Also includes: Send the user interface to the client and display the user interface on the client.
6. The video redirection method according to claim 5, characterized in that: Also includes: The control instruction is obtained through the dynamic library of the preset player, and the dynamic library of the preset player determines control information according to the control instruction and sends the control information to the client, so that the client controls the playback status of the video information according to the control information.
7. The video redirection method according to claim 6, characterized in that: Also includes: The width data and height data of the playback interface in the user interface are obtained through the dynamic library of the preset player, so that the dynamic library of the preset player sends the width data and the height data to the client, so that the client determines the display area of the video information according to the width data and the height data.
8. The video redirection method according to claim 7, characterized in that: Also includes: The client's reporting information is obtained through the dynamic library of the preset player, so that the dynamic library of the preset player adjusts the display content of the user interface according to the reporting information, so that the display content of the user interface displayed in the client matches the video information played in the client.
9. An electronic device, characterized in that: include: Memory, used to store programs; a processor, configured to execute the program stored in the memory; when the processor executes the program stored in the memory, the processor is configured to perform: The method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that Computer-executable instructions are stored, and the computer-executable instructions are used to perform: The method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Web player plug-in redirection method, server and client
CN104125198A
Method and system for playing online videos by using virtual machine
CN105163140A