A subtitle processing method and device

By creating a subtitle playback thread during video playback, obtaining and switching external subtitles, and controlling the synchronous display of the video player, the problem of not being able to obtain subtitles before starting video in the existing technology is solved, and subtitles and videos are realized during video playback The synchronous display improves the user experience.

CN115119030BActive Publication Date: 2024-11-08HISENSE VISUAL TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202110297331.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-19
Publication Date
2024-11-08
Estimated Expiration
2041-03-19

AI Technical Summary

Technical Problem

Existing audio and video players need to obtain external subtitles before the video playback begins, which may not be able to obtain subtitles before the video is started, resulting in users not being able to see subtitles when watching videos, affecting the user experience.

Method used

During the video playback process, by creating a subtitle playback thread, obtaining and switching external subtitles, and controlling the video player to display subtitles and videos simultaneously, to achieve switching and adding subtitles during the video playback process.

Benefits of technology

It realizes the synchronous display of external subtitles and videos during video playback, which improves the user experience and meets the needs of different users for subtitles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115119030B_ABST
    Figure CN115119030B_ABST
Patent Text Reader

Abstract

The present application proposes a subtitle processing method and device for switching or adding external subtitles during video playback. The method includes: during the playback of the current video, obtaining the second subtitle of the current video, the current video uses the first subtitle, and the second subtitle is externally placed on a display device; receiving a switching command for instructing the user to switch subtitles, the switching command is used to instruct the subtitles used by the current video to switch from the first subtitle to the second subtitle; creating a second subtitle playback thread corresponding to the second subtitle, sending the second subtitle to the video player through the second subtitle playback thread, and controlling the first subtitle corresponding to the first subtitle playback thread to stop sending the first subtitle to the video player; controlling the video player to synchronously display the second subtitle and the current video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of display technology, and in particular to a subtitle processing method and device. Background Art

[0002] Subtitles in existing audio and video are generally divided into two types: built-in subtitles and external subtitles. Built-in subtitles are embedded in the audio and video files, and there is no need to save subtitle files separately, but built-in subtitles cannot be adjusted, hidden or replaced. External subtitles are subtitles that are separated from audio and video. When watching videos or listening to audio, different types of subtitles can be loaded as needed, such as Chinese subtitles, English subtitles, Korean subtitles, etc. At present, the processing method of external subtitles is generally that the video player obtains subtitles before the video is played, and controls the synchronous output of the video and subtitles according to the timestamps of the video and subtitles. However, this method requires obtaining external subtitles before the video starts playing. Since the time before starting the playback is short, it may be impossible to obtain subtitles, resulting in the user only being able to see the video but not the subtitles, affecting the user's viewing experience. Summary of the invention

[0003] The embodiments of the present application provide a subtitle processing method and device for switching or adding external subtitles during video playback.

[0004] In a first aspect, an embodiment of the present application provides a subtitle processing method, comprising:

[0005] During the playback of a current video, obtaining a second subtitle of the current video, wherein the current video uses a first subtitle and the second subtitle is externally placed on a display device;

[0006] receiving a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct to switch the subtitles used by the current video from the first subtitles to the second subtitles;

[0007] Creating a second subtitle playback thread corresponding to the second subtitle, sending the second subtitle to the video player through the second subtitle playback thread, and controlling the first subtitle playback thread corresponding to the first subtitle to stop sending the first subtitle to the video player;

[0008] Control the video player to synchronously display the second subtitles and the current video.

[0009] Based on the above scheme, during the current video playback, the external subtitles to be switched are obtained and the corresponding subtitle playback thread is created, so that the external subtitles can be switched during the video playback, and the switched external subtitles can be controlled to be displayed synchronously with the current video. Users can select subtitles to play according to their needs during the video viewing process, which meets the needs of different users for playing different subtitles.

[0010] In a possible implementation, sending the second subtitles to the video player through the second subtitle playback thread includes:

[0011] Controlling the video player to send a switching time to the second subtitle playback thread;

[0012] The second subtitle playback thread is controlled to send the second subtitle to the video player according to the switching time; wherein the start time of the second subtitle is less than or equal to the switching time.

[0013] Based on the above scheme, the switched second subtitle playback thread will output the second subtitle to the video player according to the switching time sent by the video player, and the starting time of the output second letter is less than or equal to the switching time, which can ensure that the second subtitle displayed by the video player is synchronized with the current video, and there will be no problem of mismatch between the picture and the subtitle, thereby ensuring the user's viewing experience.

[0014] In a possible implementation, the method further includes:

[0015] During the playback of the current video, in response to a user's control operation, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a jump seek operation, and a subtitle display and hide operation;

[0016] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0017] The first subtitle playback thread performs the first operation according to the indication information.

[0018] Based on the above scheme, the video player will execute the first operation indicated by the user's control operation and send the indication information of the first operation to the subtitle playback thread. The subtitle playback thread can synchronously execute the first operation according to the indication information, so that the output of the current video and subtitles remains synchronized.

[0019] In a second aspect, an embodiment of the present application provides another subtitle processing method, including:

[0020] During the playback of a current video, a third subtitle of the current video is obtained, the current video uses the first subtitle, and the third subtitle is externally placed on a display device;

[0021] receiving a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct to switch the subtitles used by the current video from the first subtitles to the third subtitles;

[0022] Creating a third subtitle playback thread and a third subtitle display thread corresponding to the third subtitle, controlling the video player to send a synchronization time for controlling the synchronous display of the current video and the third subtitle to the third subtitle display thread; and controlling the third subtitle playback thread to send the third subtitle to the third subtitle display thread;

[0023] The third subtitle display thread displays the third subtitle according to the synchronization time;

[0024] Control a first subtitle display thread corresponding to the first subtitle to stop displaying the first subtitle.

[0025] Based on the above solution, during the current video playback process, the third subtitle that the user needs to switch to is obtained, and a third subtitle display thread and a third subtitle playback thread are created. The third subtitle display thread will display the third subtitle according to the synchronization time sent from the video player. This ensures that the third subtitle and the current video can be displayed synchronously, and a separate subtitle display thread can also reduce the coupling between the subtitle playback thread and the video player.

[0026] In some embodiments, the method further comprises:

[0027] During the playback of the current video, in response to a user's control operation, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a jump seek operation, and a subtitle display and hide operation;

[0028] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0029] The first subtitle playing thread performs the first operation according to the indication information, and sends the first subtitle after performing the first operation to the first subtitle display thread.

[0030] Based on the above scheme, during the current video playback process, the video player will send instruction information for instructing the first subtitle playback thread to perform the first operation to the first subtitle playback thread. The first subtitle playback thread will perform the first operation on the first subtitle according to the instruction information, and send the first subtitle after performing the first operation to the first subtitle display thread. The first subtitle display thread will display the first subtitle after performing the first operation, which can be displayed synchronously with the current video after performing the first operation.

[0031] In a third aspect, an embodiment of the present application provides a display device, including:

[0032] An input interface, used for receiving a current video and a second subtitle of the current video, wherein the current video uses a first subtitle and the second subtitle is externally placed on a display device;

[0033] A controller, configured to receive a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct to switch the subtitles used in the current video from the first subtitles to the second subtitles;

[0034] The controller is further configured to create a second subtitle playback thread corresponding to the second subtitle, send the second subtitle to the video player through the second subtitle playback thread, and control the first subtitle playback thread corresponding to the first subtitle to stop sending the first subtitle to the video player;

[0035] The controller is further used to control the video player to synchronously output the second subtitles and the current video to the display screen;

[0036] A display screen is used to display the second subtitles and the current video.

[0037] In some embodiments, the controller, when sending the second subtitles to the video player through the second subtitle playback thread, is specifically configured to:

[0038] Controlling the video player to send a switching time to the second subtitle playback thread;

[0039] The second subtitle playback thread is controlled to send the second subtitle to the video player according to the switching time; wherein the start time of the second subtitle is less than or equal to the switching time.

[0040] In some embodiments, the controller is further configured to:

[0041] During the playback of the current video, in response to a control operation of the user on the display screen, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a seek operation, and a subtitle display / hide operation;

[0042] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0043] The first subtitle playback thread performs the first operation according to the indication information.

[0044] In a fourth aspect, an embodiment of the present application provides another display device, including:

[0045] An input interface, used for receiving a current video and a third subtitle of the current video, wherein the current video uses a first subtitle and the third subtitle is externally placed on a display device;

[0046] A controller, configured to receive a switching command for instructing a user to switch subtitles, wherein the switching command is configured to instruct the subtitles used in the current video to be switched from the first subtitles to the third subtitles;

[0047] The controller is further used to create a third subtitle playback thread and a third subtitle display thread corresponding to the third subtitle, control the video player to send a synchronization time for controlling the synchronous display of the current video and the third subtitle to the third subtitle display thread; and control the third subtitle playback thread to send the third subtitle to the third subtitle display thread;

[0048] The controller is further configured to control the third subtitle display thread to output the third subtitle to the display screen according to the synchronization time; and control the first subtitle display thread corresponding to the first subtitle to stop outputting the first subtitle to the display screen.

[0049] The display screen is used to display the current video and the third subtitle.

[0050] In some embodiments, the controller is further configured to:

[0051] During the playback of the current video, in response to a control operation of the user on the display screen, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a seek operation, and a subtitle display / hide operation;

[0052] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0053] The first subtitle playing thread performs the first operation according to the indication information, and sends the first subtitle after performing the first operation to the first subtitle display thread.

[0054] In a fifth aspect, an embodiment of the present application provides a subtitle processing device, including:

[0055] A communication unit, configured to receive a current video and a second subtitle of the current video, wherein the current video uses a first subtitle and the second subtitle is externally placed on a display device;

[0056] a processing unit, configured to receive a switching command for instructing a user to switch subtitles, wherein the switching command is configured to instruct the subtitles used in the current video to be switched from the first subtitles to the second subtitles;

[0057] The processing unit is further configured to create a second subtitle playback thread corresponding to the second subtitle, send the second subtitle to the video player through the second subtitle playback thread, and control the first subtitle playback thread corresponding to the first subtitle to stop sending the first subtitle to the video player;

[0058] The processing unit is further used to control the video player to synchronously output the second subtitles and the current video to the display unit.

[0059] A display unit is used to display the second subtitles and the current video.

[0060] In some embodiments, the processing unit, when sending the second subtitles to the video player through the second subtitle playback thread, is specifically configured to:

[0061] Controlling the video player to send a switching time to the second subtitle playback thread;

[0062] The second subtitle playback thread is controlled to send the second subtitle to the video player according to the switching time; wherein the start time of the second subtitle is less than or equal to the switching time.

[0063] In some embodiments, the processing unit is further configured to:

[0064] During the playback of the current video, in response to a user's control operation on the display unit, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a jump seek operation, and a subtitle display and hide operation;

[0065] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0066] The first subtitle playback thread performs the first operation according to the indication information.

[0067] In a sixth aspect, an embodiment of the present application provides another subtitle processing device, comprising:

[0068] A communication unit, configured to receive a current video and a third subtitle of the current video, wherein the current video uses a first subtitle and the third subtitle is externally placed on a display device;

[0069] a processing unit, configured to receive a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct to switch the subtitles used by the current video from the first subtitles to the third subtitles;

[0070] The processing unit is further configured to create a third subtitle playback thread and a third subtitle display thread corresponding to the third subtitle, control the video player to send a synchronization time for controlling the synchronous display of the current video and the third subtitle to the third subtitle display thread; and control the third subtitle playback thread to send the third subtitle to the third subtitle display thread;

[0071] The processing unit is further configured to control the third subtitle display thread to output the third subtitle to the display unit according to the synchronization time; and control the first subtitle display thread corresponding to the first subtitle to stop outputting the first subtitle to the display unit.

[0072] The display unit is used to display the current video and the third subtitle.

[0073] In some embodiments, the processing unit is further configured to:

[0074] During the playback of the current video, in response to a user's control operation on the display unit, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a jump seek operation, and a subtitle display and hide operation;

[0075] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0076] The first subtitle playing thread performs the first operation according to the indication information, and sends the first subtitle after performing the first operation to the first subtitle display thread.

[0077] In the seventh aspect, an embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores computer program instructions, and when the instructions are executed on a computer, the computer executes the method for processing live broadcast data as described in the first aspect to the second aspect.

[0078] The technical effects brought about by any one of the implementation methods in the third to seventh aspects can refer to the technical effects brought about by the corresponding implementation methods in the first to second aspects, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0080] Figure 1A A hardware configuration block diagram of a terminal device provided in an embodiment of the present application;

[0081] Figure 1B A configuration block diagram of a control device 100 provided in an embodiment of the present application;

[0082] Figure 1C A software structure block diagram of a terminal provided in an embodiment of the present application;

[0083] Figure 2 A flowchart of a subtitle processing method provided in an embodiment of the present application;

[0084] Figure 3A A schematic diagram of a display interface including a subtitle switching option provided in an embodiment of the present application;

[0085] Figure 3B A schematic diagram of a display interface for displaying external subtitles provided in an embodiment of the present application;

[0086] Figure 3C A schematic diagram of a display interface for displaying external subtitles to be switched provided in an embodiment of the present application;

[0087] Figure 3D A schematic diagram of a playback process of a video with external subtitles provided in an embodiment of the present application;

[0088] Figure 4 A schematic diagram of a display process of a video with external subtitles provided in an embodiment of the present application;

[0089] Figure 5A A schematic diagram of a display interface including a subtitle adding option provided in an embodiment of the present application;

[0090] Figure 5B A schematic diagram of another display interface for displaying external subtitles provided in an embodiment of the present application;

[0091] Figure 5C A schematic diagram of a display interface for displaying external subtitles to be added provided in an embodiment of the present application;

[0092] Figure 5D A schematic diagram of another playback process of a video with external subtitles provided in an embodiment of the present application;

[0093] Figure 6 A schematic diagram of another display process of a video with external subtitles provided in an embodiment of the present application;

[0094] Figure 7 A schematic diagram of a flow chart of a seek operation performed by a video application provided in an embodiment of the present application;

[0095] Figure 8 A schematic diagram of the structure of a display device provided in an embodiment of the present application;

[0096] Fig. 9 A schematic diagram of the structure of a subtitle processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0097] In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be described in detail in some embodiments in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0098] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0099] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0100] When a current video player plays a source, if the source has external subtitles, it is necessary to set the external subtitles in the player before the video starts playing, and then control the external subtitles to be output synchronously with the video. However, if the video has already started playing, external subtitles cannot be added, so the user needs to obtain external subtitles before the video starts playing. It is impossible to add external subtitles while watching the video, and it is also impossible to switch external subtitles while watching the video. Based on this, an embodiment of the present application provides a subtitle processing method and device, and proposes that multiple independent engines are responsible for the playback and display output of different subtitles. It can enable users to add external subtitles while watching a video, and switch between different subtitles while watching a video.

[0101] Below, in order to facilitate understanding of the solution of the present application, the solution of the present application will be described with multiple embodiments in different scenarios. It should be noted that the solution proposed in the present application can be applied to a terminal device, and the terminal device involved in the present application has a display function, such as a computer, a television, a smart phone or a tablet computer. It should be noted that the terminal device with a display function in the present application can also be called a display device.

[0102] As an example, the structure of the terminal device involved in this application is described in detail below. Figure 1A , which is a schematic diagram of a possible hardware configuration of a terminal device 200. In some embodiments, the terminal device includes at least one of a tuner and demodulator 210, a communicator 220, a detector 230, an external device interface 240, a processor 250, a display component 260, an audio output interface 270, a memory, a power supply, and a user interface 280.

[0103] In some embodiments, the display component 260 includes a display screen component for presenting images, and a driving component for driving image display, a component for receiving image signals output from a processor, and a component for displaying video content, image content, and a menu control interface, as well as a user control user interface (UI) interface, etc.

[0104] In some embodiments, the display component 260 may be at least one of a liquid crystal display, an organic light-emitting diode (OLED) display, and a projection display, and may also be a projection device and a projection screen.

[0105] In some embodiments, the tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals from a plurality of wireless or wired broadcast television signals.

[0106] In some embodiments, the communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a wireless fidelity (Wifi) module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The terminal 200 can transmit data with the target health detection device or the peer device 300 through the communicator 220.

[0107] In some embodiments, the detector 230 is used to collect signals of the external environment or external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.

[0108] In some embodiments, the external device interface 240 may include, but is not limited to, any one or more of the following: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, a camera interface, etc. It may also be a composite input / output interface formed by the above multiple interfaces.

[0109] In some embodiments, the processor 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the processor 250 is located, such as an external set-top box.

[0110] In some embodiments, the processor 250 includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), RAM (Random Access Memory), ROM (Read-Only Memory), a first interface to an nth interface for input / output, a communication bus, etc.

[0111] In some embodiments, the CPU is used to execute operating system and application instructions stored in the memory, and to execute various applications, data and content according to various interactive instructions received from external input, so as to finally display and play various audio and video content. The CPU processor may include multiple processors. For example, it may include a main processor and one or more sub-processors.

[0112] In some embodiments, the graphics processor is used to generate various graphic objects, such as at least one of icons, operation menus, and user input command display graphics. The graphics processor includes an operator, which performs operations by receiving various interactive instructions input by the user and displays various objects according to display attributes; and a renderer, which renders various objects obtained based on the operator, and the rendered objects are used to be displayed on the display component.

[0113] In some embodiments, the video processor is used to receive an external video signal and perform at least one of the following video processing operations, such as decompression, decoding, scaling, noise reduction, frame rate conversion, resolution conversion, and image synthesis, according to a standard codec protocol of the input signal, to obtain a signal that can be directly displayed or played on the terminal 200.

[0114] In some embodiments, the video processor includes at least one of a demultiplexing module, a video decoding module, an image synthesis module, a frame rate conversion module, and a display formatting module. The demultiplexing module is used to demultiplex the input audio and video data stream. The video decoding module is used to process the demultiplexed video signal, including decoding and scaling. The image synthesis module, such as an image synthesizer, is used to superimpose and mix the GUI signal generated by the graphics generator according to the user input or itself with the scaled video image to generate an image signal for display. The frame rate conversion module is used to convert the input video frame rate. The display formatting module is used to receive the video output signal after frame rate conversion and change the signal to conform to the display format signal, such as outputting an RGB data signal.

[0115] In some embodiments, the audio processor is used to receive an external audio signal, perform decompression and decoding according to a standard codec protocol of the input signal, and perform at least one of noise reduction, digital-to-analog conversion, and amplification processing to obtain a sound signal that can be played in a speaker.

[0116] In some embodiments, the user may input a user command in a graphical user interface (GUI) displayed on the display unit 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command by inputting a specific sound or gesture, and the user input interface receives the user input command by recognizing the sound or gesture through a sensor.

[0117] In some embodiments, the "display interface" is a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The commonly used form of user interface is the Graphical User Interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be an interface element such as an icon, window, control, etc. displayed on the display screen of the terminal, where the control can include at least one of the visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc.

[0118] In some embodiments, the user interface 280 is an interface that can be used to receive control input (such as a physical button on the opposite device body, or other interfaces).

[0119] In some embodiments, the system of the peer device may include a kernel, a command parser (shell), a file system, and an application. The kernel, shell, and file system together constitute the basic operating system structure, which allows users to manage files, run programs, and use the system. After power-on, the kernel starts, activates the kernel space, abstracts the hardware, initializes hardware parameters, etc., runs and maintains virtual memory, schedulers, signals, and inter-process communication (IPC). After the kernel starts, the shell and user applications are loaded. After startup, the application is compiled into machine code to form a process.

[0120] In some embodiments, the present application may further include a control device 100, which is configured to control Figure 1A The terminal device 200 shown can receive operation instructions input by the user, and convert the operation instructions into instructions that the terminal device 200 can recognize and respond to, playing the role of an intermediary for the interaction between the user and the terminal device 200. For example, the user operates the channel increase and decrease keys on the control device 100, and the terminal device 200 responds to the channel increase and decrease operations.

[0121] The control device 100 may be a remote controller 100A, including infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, etc., to control the terminal device 200 wirelessly or by wire. The user may input user commands through buttons on the remote controller, voice input, input on the control panel, etc. to control the terminal device 200. For example, the user may input corresponding control commands through the volume plus and minus keys, channel control keys, up / down / left / right movement keys, voice input keys, menu keys, power on / off keys, etc. on the remote controller to realize the function of controlling the terminal device 200.

[0122] The control device 100 may also be a smart device, such as a mobile terminal 100B, a tablet computer, a computer, a laptop computer, etc. For example, an application running on the smart device is used to control the terminal device 200. The application can be configured to provide the user with various controls through an intuitive user interface (UI) on a screen associated with the smart device.

[0123] Figure 1B exemplarily shows a configuration block diagram of the control device 100. Figure 1B As shown, the control device 100 may include a controller 110, a memory 120, a communicator 130, a user input interface 140, an output interface 150, and a power supply 160. It should be understood that Figure 1B It is just an example, the control device 100 may include a Figure 1B More or better components may be used, and this application does not make any specific limitation on this.

[0124] The controller 110 includes a random access memory (RAM) 111, a read only memory (ROM) 112, a processor 113, a communication interface and a communication bus. The controller 110 is used to control the operation and operation of the control device 100, as well as the communication cooperation between internal components and external and internal data processing functions.

[0125] Exemplarily, when an interaction of a user pressing a key arranged on the remote controller 100A or touching a touch panel arranged on the remote controller 100A is detected, the controller 110 may control generation of a signal corresponding to the detected interaction and send the signal to the terminal device 200.

[0126] The memory 120 is used to store various operating programs, data and applications for driving and controlling the control device 100 under the control of the controller 110. The memory 120 can store various control signal instructions input by the user.

[0127] Under the control of the controller 110, the communicator 130 realizes the communication of control signals and data signals with the terminal device 200. For example, the control device 100 sends a control signal (such as a touch signal or a button signal) to the terminal device 200 via the communicator 130, and the control device 100 can receive the signal sent by the terminal device 200 via the communicator 130. The communicator 130 may include an infrared signal interface 131 and a radio frequency signal interface 132. For example, when using an infrared signal interface, the user input command needs to be converted into an infrared control signal according to the infrared control protocol, and sent to the terminal device 200 via the infrared sending module. For another example, when using a radio frequency signal interface, the user input command needs to be converted into a digital signal, and then modulated according to the radio frequency control signal modulation protocol, and then sent to the terminal device 200 by the radio frequency sending terminal.

[0128] The user input interface 140 may include at least one of a microphone 141, a touchpad 142, a sensor 143, a button 144, etc., so that the user can input user instructions about controlling the terminal device 200 to the control device 100 through voice, touch, gesture, pressing, etc.

[0129] The output interface 150 outputs the user command received by the user input interface 140 to the terminal device 200, or outputs the image or voice signal received by the terminal device 200. Here, the output interface 150 may include an LED interface 151, a vibration interface 152 for generating vibrations, a sound output interface 153 for outputting sounds, and a display 154 for outputting images. For example, the remote controller 100A may receive an output signal such as audio, video or data from the output interface 150, and display the output signal in the form of an image on the display 154, output it in the form of an audio in the sound output interface 153, or output it in the form of a vibration in the vibration interface 152.

[0130] The power supply 160 is used to provide operating power support for various components of the control device 100 under the control of the controller 110. The power supply 160 can be in the form of a battery and related control circuits.

[0131] See also Figure 1C , which exemplarily shows a block diagram of the architecture configuration of the terminal device operating system. The operating system architecture is composed of the application layer, the middleware layer and the kernel layer from top to bottom.

[0132] The application layer includes both built-in applications and non-system-level applications. It is responsible for direct interaction with users. The application layer may include multiple applications, such as settings applications, media center applications, etc. These applications can be implemented as web applications, which are executed based on the WebKit engine and can be developed and executed based on HTML5, Cascading Style Sheets (CSS), JavaScript, etc.

[0133] The middleware layer can provide some standardized interfaces to support the operation of various environments and systems. For example, the middleware layer can be implemented as the Multimedia and Hypermedia Information Coding Experts Group (MHEG) middleware related to data broadcasting, as the DLNA middleware related to external device communication, or as the middleware that provides the browser environment for the running of various applications in the terminal.

[0134] The kernel layer provides core system services, such as file management, memory management, process management, network management, system security permission management, etc. The kernel layer can be implemented as a kernel based on various operating systems, for example, a kernel based on the Linux operating system.

[0135] The kernel layer also provides communication between system software and hardware, and provides device driver services for various hardware, such as: providing display drivers for display components, camera drivers for cameras, WiFi drivers for WiFi modules, audio drivers for audio output interfaces, power management drivers for power management (PM) modules, etc.

[0136] The hardware configuration and software structure of different terminals may vary, so the above Figure 1A and Figure 1B All are exemplary descriptions.

[0137] The subtitle processing method proposed in the embodiment of the present application may include the following two scenarios: one is the case where subtitles are switched during video playback; the other is the case where there are no subtitles during video playback and subtitles need to be added. The following describes these two scenarios in detail:

[0138] (I) Switch subtitles

[0139] When playing a video with external subtitles, the terminal device can first create a video player for playing the video to be played, obtain the source of the video to be played from the network or locally, and create a storage space internally, which can be used to store the source of the video to be played, or called a video player context. It should be noted that the source of the video to be played can include audio, video and subtitles, or only audio and video. In this scenario, the source of the video to be played only includes audio, video and subtitles.

[0140] In some embodiments, after the terminal device obtains the source of the video to be played, it can further control the video player to decapsulate and decode the obtained source of the video to be played to obtain the audio data, video data and subtitle data of the video to be played. In some embodiments, the terminal device can store the audio data, video data and subtitle data of the video to be played in the context of the video player, or directly output the audio data of the video to be played to the audio device, and render the video data and subtitle data to the display screen to play the video. For the convenience of description, the currently playing video will be referred to as the current video, and the subtitle data used by the current video will be referred to as the first subtitle.

[0141] The terminal device can search for the external subtitle source of the current video in response to the user's operation of switching subtitles during the process of playing the current video. In some embodiments, the terminal device can create a subtitle playback context for storing external subtitles in response to the operation of switching subtitles, and can obtain the external subtitle source corresponding to the current video from the network according to the source of the current video. For example, the terminal device can change the suffix of the source address of the current video, such as changing the suffix of the video source address such as .avi or .mov to the suffix of the picture or text subtitle address such as .sub or .ass, and search the external subtitle source of the current video on the network according to the address after the suffix is ​​changed. Of course, it is also possible to save multiple types of external subtitle sources corresponding to the current video locally in advance, such as English subtitles, Chinese subtitles, etc., and the terminal device can respond to the operation of switching subtitles and obtain all external subtitle sources of the current video locally. In addition, whether it is an external subtitle obtained from the network or obtained locally, the terminal device can be displayed in the display interface in the form of a list, and of course other forms can be used, which is not specifically limited in this application. It should be noted that the external subtitles obtained by the terminal device can be text type or image type. In some embodiments, the terminal device may also determine the external subtitles to be switched in response to the user's operation. For ease of description, the external subtitles to be switched are referred to as second subtitles hereinafter.

[0142] As a specific embodiment, the terminal device may be configured as follows: Figure 2 The method flow shown completes the switching of subtitles.

[0143] 201. During playback of a current video, a terminal device obtains a second subtitle of the current video.

[0144] The current video uses the first subtitles, and the second subtitles are externally placed on the terminal device. For details, please refer to the method for obtaining external subtitles provided in the above embodiment. It can be obtained from the Internet or locally.

[0145] 202. The terminal device receives a switching command for instructing a user to switch subtitles.

[0146] The switching command is used to instruct the subtitles used in the current video to be switched from the first subtitles to the second subtitles. Specifically, the terminal device can determine the switching command according to the method provided in the above embodiment, that is, through the operation of the user selecting the second subtitle to be switched from multiple external subtitles, determine that the switching command indicates that the first subtitles used in the current video are switched to the second subtitles.

[0147] 203, the terminal device creates a second subtitle playback thread corresponding to the second subtitle, sends the second subtitle to the video player through the second subtitle playback thread, and controls the first subtitle playback thread corresponding to the first subtitle to stop playing the first subtitle to the video player.

[0148] After the terminal device determines to switch the subtitles used in the current video from the first subtitles to the second subtitles, it will create a second subtitle playback thread corresponding to the second subtitles to send the second subtitles to the video player. The terminal device will also control the first subtitle playback thread to stop sending the first subtitles to the video player.

[0149] It should be noted that the video player involved in the present application can also be called a video playback engine, which is used to perform functions such as parsing video data, rendering video data, and rendering subtitle data.

[0150] 204, control the video player to synchronously display the second subtitle and the current video.

[0151] In some other embodiments, after the video application obtains all external subtitle sources of the current video, it can also create a subtitle playback context for storing external subtitles, and can register a subtitle player for playing external subtitles in the video player context of the current video, that is, declare a subtitle player that performs the external subtitle playback function in the video player context, and create a subtitle playback thread for the subtitle player. Exemplarily, the video application will create corresponding subtitle players for multiple external subtitles obtained, each external subtitle has a corresponding subtitle player, and a corresponding subtitle playback context will be created for each external subtitle. For ease of description, the subtitle player corresponding to the first subtitle is referred to as the first subtitle player, and the subtitle player corresponding to the second subtitle is referred to as the second subtitle player. Similarly, the video application can also create a first subtitle playback thread for the first subtitle player and a second subtitle playback thread for the second subtitle player. In some embodiments, after the terminal device completes the creation of the subtitle player, it can also determine whether each subtitle player is in a selected state according to the user's operation of selecting an external subtitle, and notify the corresponding subtitle player, for example, the terminal device determines that the second subtitle player is in a selected state according to the operation of selecting the second subtitle performed by the user in the external subtitle list displayed in the display interface of the terminal device, and notifies the second subtitle player to change its own state to a selected state.

[0152] In some embodiments, the terminal device can also control the video player to send a switching time to each subtitle player, and each subtitle player sends an external subtitle to the video player according to its own state and switching time. For example, when the terminal device determines that the subtitles used in the current video are switched from the first subtitles to the second subtitles, the first subtitle player is notified to change its state to an unselected state, and the second subtitle player is notified to change its state to a selected state, and then when the second subtitle player receives the switching time, it determines that its state is a selected state, sends the second subtitle to the video player, and the start time of the second subtitle sent is less than or equal to the switching time. After receiving the second subtitle, the video player outputs the second subtitle and the current video synchronously to the display screen, and the display screen displays the current video and the second subtitle. As an example, when the second subtitle player outputs the second subtitle to the video player, the second subtitle playback thread created by the video application for it can decapsulate and decode the acquired second subtitle, and then send the decapsulated and decoded second subtitle data to the second subtitle playback context, so that the video player can obtain the second subtitle data from the second subtitle playback context. For example, taking the second subtitle as a text type subtitle, the second subtitle playback thread can first decapsulate and decode a certain number of second subtitles, such as decapsulating and decoding 1-20 subtitles in the second subtitle, and save them in the buffer. After sending the first external subtitle to the second subtitle playback context according to the switching time, the first external subtitle is marked as sent, and the 21st subtitle is continued to be decapsulated and decoded according to the time sequence, and so on.

[0153] The following is a description of the subtitle processing method in this scenario with a specific embodiment.

[0154] In some embodiments: a video application installed in a terminal device is used as an example to perform the operation of switching subtitles in this scenario.

[0155] When a terminal device plays a video with external subtitles, an option for switching subtitles is included in the display interface of the video application. For example, see Figure 3A The display interface shown, Figure 3A The display interface shown includes an option 301 for switching subtitles. The terminal device can respond to the user's operation on option 301 by displaying the addresses of all external subtitle sources of the current video, for example, by a point-and-click operation or a remote control operation. After obtaining the external subtitle source, the terminal device can also display the obtained external subtitles in the display interface, for example, in the form of a list, as shown in FIG. Figure 3B The display interface shown, Figure 3BThe display interface shown includes multiple external subtitles of the current video, and the external subtitles used in the current video can be marked, for example, using different colors or having a "√" mark after the used external subtitles. Figure 3B In the example, the “√” mark is shown after the external subtitles used. As a possible method, the terminal device can also determine the external subtitles to be switched in response to the user's operation of selecting the external subtitles, and display the subtitles to be switched in the display interface. For example, when the subtitles to be switched are the second subtitles, see Figure 3C The display interface shown.

[0156] In some embodiments, the terminal device can notify the subtitle player to change its own state according to the user's operation of selecting external subtitles. For example, when the external subtitles used in the current video are switched from the first subtitles to the second subtitles, the video application will notify the first subtitle player (or notify the first subtitle playback thread) to change its own state to the unselected state, and notify the second subtitle player (or notify the second subtitle playback thread) to change its own state to the selected state. As an example, see Figure 3D , showing the playback process of videos with external subtitles in this scenario. First, when switching subtitles during the playback of the current video, the video application can control the video player to send the switching time to multiple subtitle players (i.e., multiple subtitle playback threads) of the current video. The subtitle playback thread decapsulates and decodes the corresponding subtitles according to its own status and switching time and sends the corresponding subtitles to the video player. For example, the external subtitles used in the current video are switched from the first subtitles to the second subtitles. When the second subtitle player determines that its own status is selected, the second subtitle playback thread can decapsulate and decode the second subtitles, and send the second subtitles to the video player according to the switching time. The start time of the second subtitles is less than or equal to the switching time. After the video player receives the second subtitles, the display thread in the video player renders the second subtitles to the display screen synchronously with the current video.

[0157] In some embodiments: See Figure 4 The flowchart shown shows the display process of a video with external subtitles.

[0158] First, when the video application plays the current video, after obtaining the source of the current video, it can create a video player context through the first interface to store the video source to be played, and can also create a video player corresponding to the current video through the second interface, and can create a video playback thread in the video player through the second interface to read the current video source and decapsulate and decode the current video source, and store the decapsulated and decoded current video data in the video player context. In some embodiments, the video application can also create a video display thread in the video player through the second interface to obtain the decoded video data from the video player context and also to render the video data to the display screen.

[0159] In some embodiments, the external subtitle element to be switched can be determined by referring to the method provided in some embodiments. After the video application determines the external subtitle source to be switched, taking the external subtitle to be switched as the second subtitle as an example, when setting the subtitle source of the second subtitle, the video application can create a second subtitle playback context through a third interface, initialize the playback parameters, and set the acquired subtitle source address of the second subtitle in the second subtitle playback context, and the video application can also register the second subtitle player in the video player context through a fourth interface, and can further create a second subtitle playback thread for the second subtitle player, which is used to read the subtitle source of the second subtitle and decapsulate and decode the subtitle source of the second subtitle, and store the second subtitle after the decapsulation and decoding operations in the second subtitle playback context. For details, see in some embodiments Figure 3D The decapsulation and decoding process shown. After the second subtitle player is registered, first detect the status of the video player. If the video player is in the start-up state, that is, the video player is playing the current video at this time, the second subtitle player can obtain the timestamp of the current video, start the second subtitle playback thread according to the timestamp of the current video, and decapsulate and decode the second subtitles, and store the decoded second subtitles in the second subtitle playback context. For example, the timestamp of the current video is 10:11, and the timestamp of subtitle A in the second subtitle is 10:09-10:20, then the second subtitle playback thread decapsulates and decodes subtitle A, and then stores the decoded subtitle A in the second subtitle playback context. If the video player is not started, there is no other operation, waiting for synchronization with the video player.

[0160] In some embodiments, the synchronization control module in the video display thread can query the corresponding video data from the video player context according to the system timestamp. If the corresponding video data exists, the video data is obtained and output to the corresponding device. In addition, the synchronization control module can also use the timestamp of the video data to query the second subtitle playback context registered in the video player context, obtain the corresponding second subtitles and display the second subtitles. For details, please refer to Figure 3D The video and subtitle synchronous display process shown. It should be noted that when the second subtitle is in text format, the video player will set up a separate window below to display the subtitle in text format; when the second subtitle is in image format, the video player will render the subtitle in image format to the display screen synchronously with the video.

[0161] (ii) Add subtitles

[0162] In this scenario, the video application installed in the terminal device is still used as an example to perform the specific operation of adding subtitles. If the video played by the video application does not have external subtitles, it is necessary to add external subtitles during the video playback process. In the same scenario (one), when the video application plays a video without external subtitles, it is also necessary to obtain the video source and create a video player and a video player context. The difference is that in this scenario, the video player context only stores audio and video, and does not include external subtitles.

[0163] As a method in some embodiments, when a video application plays a video without external subtitles, it can include an option to add subtitles in the display interface of the video playback, for example, see Figure 5A The display interface shown in FIG. 5 includes an option 501 for adding external subtitles. The video application can obtain all external subtitles of the current video in response to the user's operation on option 501, and can display them in the display interface. For example, they can be displayed in the form of a list, such as Figure 5B In some embodiments, the video application can determine the external subtitles that need to be added in response to the user's operation of selecting external subtitles, and display the external subtitles that have been determined to be added in the display interface. For example, see Figure 5CThe display interface shown. For ease of description, the external subtitles that the video application determines to be added are referred to as first subtitles below. After the video application determines to add the first subtitle, it can notify the first subtitle player corresponding to the first subtitle to change its own state to a selected state. In some embodiments, when the video application controls the video player to send the timestamp of the current video to the subtitle player, the first subtitle player confirms that its own state is selected after receiving the timestamp, and sends the first subtitle to the video player according to the timestamp. After receiving the first subtitle, the video player renders the first subtitle and the current video to the display screen. It should be noted that if a frame of video does not have a corresponding subtitle, when the video player sends the timestamp of the frame of video to the first subtitle playback thread, the first subtitle player will send a return value to the video player. For example, the return value can be 0 or any negative number. When the video player receives the return value, it determines that the frame of video has no subtitles and will only output the video. As an example, see Figure 5D , showing the video playback process in this scenario.

[0164] It should be noted that the way to set external subtitles in the above-mentioned scenario (I) and scenario (II) is that the subtitle player sends the corresponding subtitles to the video player according to its own state and the timestamp of the current video. For example, in scenario (I), the second subtitle player determines that its own state is selected, and then sends the second subtitle to the video player according to the timestamp of the current video. In some other embodiments, the embodiments of the present application also provide another method for processing external subtitles, and a subtitle display thread is added to each subtitle to display the external subtitles. As an example, during the current video playback process, a user's switching command is received, and the switching command indicates that the subtitles used in the current video are switched from the first subtitles to the third subtitles. The video application can synchronously create a third subtitle player corresponding to the third subtitle, and create a third subtitle playback thread and a third subtitle display thread for the third subtitle player, and control the video player to send a synchronization time to the third subtitle display thread for controlling the synchronous display of the current video and the third subtitle, for example, it can be the timestamp of the current video.

[0165] For ease of understanding, a specific embodiment is used for illustration below.

[0166] In some embodiments: See Figure 6 , showing the display process of the current video and the third subtitle.

[0167] In some embodiments, when the video application plays the current video, it first creates a video player context through the first interface and creates a video player through the second interface, and then after determining that the subtitle to be switched is the third subtitle, the video application creates a third subtitle playback context through the third interface, and registers the third subtitle player in the video player context through the fourth interface, and can further create a third subtitle playback thread for the third subtitle player. This process can refer to some embodiments in scenario (one), which will not be repeated here. In this scenario, the video application can also further create a third subtitle display thread for the third subtitle player through the fourth interface, and the third subtitle display thread is used to receive the timestamp of the current video and output the corresponding third subtitle according to the timestamp of the current video. For example, the timestamp of the current video received by the third subtitle display thread is 10:11, and it is determined that the timestamp of subtitle A in the third subtitle is 10:09-10:20, then subtitle A will be rendered to the display screen. The use of this method of directly outputting subtitles by the subtitle display thread can reduce the coupling between the subtitle display thread and the video player.

[0168] In some embodiments, during the playback of the current video, the video application controls the video player to execute the first operation indicated by the user control operation in response to the user control operation, and controls the video player to send instruction information for instructing the subtitle playback thread to execute the first operation to the subtitle player corresponding to the subtitles used in the current video, taking the subtitles used in the current video as the first subtitles as an example. The video player sends the instruction information to the first subtitle player, and the first subtitle player executes the first operation according to the instruction information. The first operation can be any one of a pause operation, a play operation, a seek operation, and a subtitle display and hiding operation. Below, the first operation is described as a seek operation as an example.

[0169] As an example, see Figure 7The flowchart shown shows the process of the video player and the first subtitle data performing the seek operation in the process of the video application playing the current video. First, the video application can set the seek parameter to the video player context in response to the user's control operation. Among them, the seek parameter can include the jump position, the timestamp of the jump video frame, and the timestamp of the jump subtitle. In some embodiments, the video player can also send the seek parameter to the first subtitle player. After receiving the seek parameter, the first subtitle player can further set the seek parameter to the corresponding subtitle playback context. After the seek parameter is set, the video player can perform the seek operation according to the seek parameter in the video player context. For example, if the seek parameter indicates to jump to the 30th minute, the video player will decapsulate and decode the video source of the 30th minute and after the 30th minute in chronological order, and output the decoded audio stream to the speaker, and render the decoded video stream to the display screen. The first subtitle player can also perform a seek operation according to the seek parameter in the subtitle playback context. For example, if the seek parameter indicates jumping to the 30th minute, the first subtitle playback thread corresponding to the first subtitle player will decapsulate and decode the first subtitles at and after the 30th minute, and output the decoded first subtitles to the video player.

[0170] In other embodiments, after the first subtitle player receives the seek parameter from the video player, the first subtitle playback thread corresponding to the first subtitle player will decapsulate and decode the corresponding first subtitles according to the seek parameter, and output the decoded first subtitles to the first display thread corresponding to the first subtitle player. The first display thread renders the corresponding first subtitles to the display screen according to the synchronization time sent by the video player for controlling the synchronous display of the current video and the first subtitles.

[0171] Based on the same concept as the above method, Figure 8 As shown, a display device 800 is provided. The display device 800 can execute each step in the above method, which will not be described in detail here to avoid repetition. The display device 800 includes: an input interface 801 , a controller 802 , and a display screen 803 .

[0172] In one possible scenario:

[0173] An input interface 801 is used to receive a current video and a second subtitle of the current video, wherein the current video uses a first subtitle and the second subtitle is externally placed on a display device;

[0174] The controller 802 is used to receive a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct to switch the subtitles used by the current video from the first subtitles to the second subtitles;

[0175] The controller 802 is further configured to create a second subtitle playback thread corresponding to the second subtitle, send the second subtitle to the video player through the second subtitle playback thread, and control the first subtitle playback thread corresponding to the first subtitle to stop sending the first subtitle to the video player;

[0176] The controller 802 is further configured to control the video player to synchronously output the second subtitles and the current video to the display screen 803 .

[0177] Display screen 803 is used to display the second subtitles and the current video.

[0178] In some embodiments, the controller 802, when sending the second subtitles to the video player through the second subtitle playback thread, is specifically configured to:

[0179] Controlling the video player to send a switching time to the second subtitle playback thread;

[0180] The second subtitle playback thread is controlled to send the second subtitle to the video player according to the switching time; wherein the start time of the second subtitle is less than or equal to the switching time.

[0181] In some embodiments, the controller 802 is further configured to:

[0182] During the playback of the current video, in response to a control operation of the user on the display screen 803, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a seek operation, and a subtitle display / hide operation;

[0183] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0184] The first subtitle playback thread performs the first operation according to the indication information.

[0185] In another possible scenario:

[0186] An input interface 801 is used to receive a current video and a third subtitle of the current video, wherein the current video uses a first subtitle and the third subtitle is externally placed on a display device;

[0187] The controller 802 is used to receive a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct the subtitles used in the current video to be switched from the first subtitles to the third subtitles;

[0188] The controller 802 is further configured to create a third subtitle playback thread and a third subtitle display thread corresponding to the third subtitle, control the video player to send a synchronization time for controlling the synchronous display of the current video and the third subtitle to the third subtitle display thread; and control the third subtitle playback thread to send the third subtitle to the third subtitle display thread;

[0189] The controller 802 is further configured to control the third subtitle display thread to output the third subtitle to the display screen 803 according to the synchronization time; and control the first subtitle display thread corresponding to the first subtitle to stop outputting the first subtitle to the display screen 803.

[0190] The display screen 803 is used to display the current video and the third subtitle.

[0191] In some embodiments, the controller 802 is further configured to:

[0192] During the playback of the current video, in response to a control operation of the user on the display screen 803, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a seek operation, and a subtitle display / hide operation;

[0193] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0194] The first subtitle playing thread performs the first operation according to the indication information, and sends the first subtitle after performing the first operation to the first subtitle display thread.

[0195] Based on the same concept as the above method, Fig. 9 As shown, a subtitle processing device 900 is provided. The device 900 can execute each step in the above method, and in order to avoid repetition, it will not be described in detail here. The device 900 includes: a communication unit 901, a processing unit 902, and a display unit 903.

[0196] In one possible scenario:

[0197] The communication unit 901 is used to obtain a second subtitle of the current video during playback of the current video, the current video uses a first subtitle, and the second subtitle is externally placed in a terminal device;

[0198] The processing unit 902 is used to receive a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct to switch the subtitles used by the current video from the first subtitles to the second subtitles;

[0199] The processing unit 902 is further configured to create a second subtitle playback thread corresponding to the second subtitle, send the second subtitle to the video player through the second subtitle playback thread, and control the first subtitle playback thread corresponding to the first subtitle to stop sending the first subtitle to the video player;

[0200] The processing unit 902 is further configured to control the video player to synchronously output the second subtitles and the current video to the display unit 903 .

[0201] The display unit 903 is configured to display the second subtitles and the current video.

[0202] In some embodiments, when sending the second subtitles to the video player through the second subtitle playback thread, the processing unit 902 is specifically configured to:

[0203] Controlling the video player to send a switching time to the second subtitle playback thread;

[0204] The second subtitle playback thread is controlled to send the second subtitle to the video player according to the switching time; wherein the start time of the second subtitle is less than or equal to the switching time.

[0205] In some embodiments, the processing unit 902 is further configured to:

[0206] During the playback of the current video, in response to the user's control operation on the display unit 903, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a jump seek operation, and a subtitle display and hide operation;

[0207] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0208] The first subtitle playback thread performs the first operation according to the indication information.

[0209] Another possible scenario:

[0210] The communication unit 901 is used to obtain a third subtitle of the current video during playback of the current video, the current video uses the first subtitle, and the third subtitle is externally placed in the terminal device;

[0211] The processing unit 902 is configured to receive a switching command for instructing a user to switch subtitles, wherein the switching command is configured to instruct the subtitles used by the current video to be switched from the first subtitles to the third subtitles;

[0212] The processing unit 902 is further configured to create a third subtitle playback thread and a third subtitle display thread corresponding to the third subtitle, control the video player to send a synchronization time for controlling the synchronous display of the current video and the third subtitle to the third subtitle display thread; and control the third subtitle playback thread to send the third subtitle to the third subtitle display thread;

[0213] The processing unit 902 is further configured to control the third subtitle display thread to output the third subtitle to the display unit 903 according to the synchronization time; and control the first subtitle display thread corresponding to the first subtitle to stop outputting the first subtitle to the display unit 903.

[0214] The display unit 903 is used to display the current video and the third subtitle.

[0215] In some embodiments, the processing unit 902 is further configured to:

[0216] During the playback of the current video, in response to the user's control operation on the display unit 903, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a jump seek operation, and a subtitle display and hide operation;

[0217] Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation;

[0218] The first subtitle playing thread performs the first operation according to the indication information, and sends the first subtitle after performing the first operation to the first subtitle display thread.

[0219] An embodiment of the present application also provides a computer storable medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.

[0220] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0221] Although the specific embodiments of the present application are described above, it should be understood by those skilled in the art that these are merely examples, and the scope of protection of the present application is limited by the attached claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present application, but these changes and modifications all fall within the scope of protection of the present application. Although the preferred embodiments of the present application have been described, once those skilled in the art are aware of the basic creative concepts, additional changes and modifications may be made to these embodiments. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0222] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A display device, characterized in that: include: An input interface, used for receiving a current video and a second subtitle of the current video, wherein the current video uses a first subtitle and the second subtitle is externally placed on the display device; A controller, configured to receive a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct to switch the subtitles used in the current video from the first subtitles to the second subtitles; The controller is further used to create a second subtitle playback thread and a second subtitle playback context corresponding to the second subtitle, and when it is determined that the state of the video player is the start state, control the video player to send a switching time to the second subtitle playback thread; Control the second subtitle playback thread to decapsulate and decode the second subtitle to obtain a second target subtitle, and send the second target subtitle to the second subtitle playback context, send the second target subtitle stored in the second subtitle playback context to the video player according to the switching time, and control the first subtitle corresponding to the first subtitle playback thread to stop sending the first subtitle to the video player, wherein the start time of the second target subtitle is less than or equal to the switching time, and the start state is used to indicate that the video player is playing the current video; The controller is further used to control the video player to synchronously output the second target subtitles and the current video to the display screen; A display screen, used to display the second target subtitles and the current video, specifically used to: when the second target subtitles are in text format, display the subtitles in text format through a separately set window; when the second target subtitles are in picture format, display the video obtained by synchronously rendering the subtitles in picture format with the video.

2. The display device according to claim 1, characterized in that The controller is further used for: During the playback of the current video, in response to a control operation of the user on the display screen, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a seek operation, and a subtitle display / hide operation; Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation; The first subtitle playback thread performs the first operation according to the indication information.

3. A display device, characterized in that: include: An input interface, used for receiving a current video and a third subtitle of the current video, wherein the current video uses the first subtitle and the third subtitle is externally placed on the display device; A controller, configured to receive a switching command for instructing a user to switch subtitles, wherein the switching command is configured to instruct the subtitles used in the current video to be switched from the first subtitles to the third subtitles; The controller is further used to create a third subtitle playback thread, a third subtitle playback context and a third subtitle display thread corresponding to the third subtitle, and when it is determined that the state of the video player is the start state, control the video player to send a synchronization time for controlling the synchronous display of the current video and the third subtitle to the third subtitle display thread; and controlling the third subtitle playback thread to decapsulate and decode the third subtitle to obtain a third target subtitle, and sending the third target subtitle to a third subtitle playback context, and sending the third target subtitle stored in the third subtitle playback context to the third subtitle display thread, wherein the start state is used to indicate that the video player is playing the current video; The controller is further used to control the third subtitle display thread to output the third target subtitle to the display screen according to the synchronization time; and control the first subtitle display thread corresponding to the first subtitle to stop outputting the first subtitle to the display screen; The display screen is used to display the current video and the third target subtitles, and is specifically used to: when the third target subtitles are in text format, display the subtitles in text format through a separately set window; when the third target subtitles are in picture format, display the video obtained by synchronously rendering the subtitles in picture format with the video.

4. The display device according to claim 3, characterized in that The controller is further used for: During the playback of the current video, in response to a control operation of the user on the display screen, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a seek operation, and a subtitle display / hide operation; Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation; The first subtitle playing thread performs the first operation according to the indication information, and sends the first subtitle after performing the first operation to the first subtitle display thread.

5. A subtitle processing method, characterized in that: The method is applied to a display device, comprising: During playback of a current video, obtaining a second subtitle of the current video, wherein the current video uses a first subtitle and the second subtitle is externally placed on the display device; receiving a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct to switch the subtitles used by the current video from the first subtitles to the second subtitles; A second subtitle playback thread and a second subtitle playback context corresponding to the second subtitle are created; when it is determined that the state of the video player is the start-up state, the video player is controlled to send a switching time to the second subtitle playback thread; the second subtitle playback thread is controlled to decapsulate and decode the second subtitle to obtain a second target subtitle, and the second target subtitle is sent to the second subtitle playback context; the second target subtitle stored in the second subtitle playback context is sent to the video player according to the switching time, and the first subtitle playback thread corresponding to the first subtitle is controlled to stop sending the first subtitle to the video player, wherein the start time of the second target subtitle is less than or equal to the switching time, and the start-up state is used to indicate that the video player is playing the current video; Controlling the video player to synchronously display the second target subtitles and the current video specifically includes: when the second target subtitles are in text format, controlling the video player to display the subtitles in text format through a separately set window; when the second target subtitles are in picture format, controlling the video player to display the video obtained by synchronously rendering the subtitles in picture format with the video.

6. The method according to claim 5, characterized in that Also includes: During the playback of the current video, in response to a user's control operation, the video player is controlled to perform a first operation indicated by the control operation, wherein the first operation is any one of a pause operation, a play operation, a jump seek operation, and a subtitle display and hide operation; Controlling the video player to send instruction information to the first subtitle playback thread, wherein the instruction information is used to instruct the first subtitle playback thread to perform the first operation; The first subtitle playback thread performs the first operation according to the indication information.

7. A subtitle processing method, characterized in that: The method is applied to a display device, comprising: During the playback of a current video, a third subtitle of the current video is obtained, the current video uses the first subtitle, and the third subtitle is externally placed on the display device; receiving a switching command for instructing a user to switch subtitles, wherein the switching command is used to instruct to switch the subtitles used by the current video from the first subtitles to the third subtitles; A third subtitle playback thread, a third subtitle playback context, and a third subtitle display thread corresponding to the third subtitle are created; when it is determined that the state of the video player is the start-up state, the video player is controlled to send a synchronization time for controlling the synchronous display of the current video and the third subtitle to the third subtitle display thread; and the third subtitle playback thread is controlled to decapsulate and decode the third subtitle to obtain a third target subtitle, and the third target subtitle is sent to the third subtitle playback context, and the third target subtitle stored in the third subtitle playback context is sent to the third subtitle display thread, wherein the start-up state is used to indicate that the video player is playing the current video; The third subtitle display thread displays the third target subtitle according to the synchronization time, specifically comprising: when the third target subtitle is in text format, the third subtitle display thread displays the subtitle in text format through a separately set window according to the synchronization time; when the third target subtitle is in picture format, the third subtitle display thread displays a video obtained by synchronously rendering the subtitle in picture format with the video according to the synchronization time; Control a first subtitle display thread corresponding to the first subtitle to stop displaying the first subtitle.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called by a computer, the computer executes the method according to any one of claims 5 to 7.

Citation Information

Patent Citations

  • System and method for controlling subtitle to switch by Bluetooth

    CN101763875A

  • Display system and display method of blu-ray player disc VSFilter

    CN103117077A

  • Subtitle display method and display equipment

    CN111601142A

  • Video recording and playback apparatus and video recording and playback method

    JP2008288925A

  • Subtitle switching method and device

    WO2016091011A1