CN107484035B - Closed caption display method, apparatus and computer readable storage medium - Google Patents
Closed caption display method, apparatus and computer readable storage medium Download PDFInfo
- Publication number
- CN107484035B CN107484035B CN201710709566.5A CN201710709566A CN107484035B CN 107484035 B CN107484035 B CN 107484035B CN 201710709566 A CN201710709566 A CN 201710709566A CN 107484035 B CN107484035 B CN 107484035B
- Authority
- CN
- China
- Prior art keywords
- closed caption
- display
- information
- closed
- pes data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/488—Data services, e.g. news ticker
- H04N21/4884—Data services, e.g. news ticker for displaying subtitles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/431—Generation of visual interfaces for content selection or interaction; Content or additional data rendering
- H04N21/4312—Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/434—Disassembling of a multiplex stream, e.g. demultiplexing audio and video streams, extraction of additional data from a video stream; Remultiplexing of multiplex streams; Extraction or processing of SI; Disassembling of packetised elementary stream
- H04N21/4343—Extraction or processing of packetized elementary streams [PES]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Television Systems (AREA)
Abstract
The invention discloses a closed caption display method. The closed caption display method comprises the following steps: analyzing the received PES data of the packed elementary streams to obtain corresponding closed caption information; constructing a corresponding display control according to the closed caption information; and drawing and displaying the corresponding closed captions according to the display control. The invention also discloses a closed caption display device and a computer readable storage medium. The invention can improve the accuracy of closed caption display, thereby improving the user experience.
Description
Technical Field
The present invention relates to the field of subtitle display technologies, and in particular, to a method and an apparatus for displaying closed subtitles, and a computer-readable storage medium.
Background
Closed Caption (CC) is an essential component of digital television, and it will display the original text translation of the dialogue and sound effect of the program on the screen, so as to facilitate deaf patients and people with hearing impairment to obtain more video information as normal people, and enjoy more perfect video viewing experience.
The closed caption decoding and displaying system is mainly realized by adopting a special decoding chip or software, but various problems often occur when the closed caption displaying function is used at present, for example, the display position of the closed caption is not accurate, the size of the closed caption display character has problems, and the like, so that the user experience is influenced.
Disclosure of Invention
The invention mainly aims to provide a closed caption display method, a closed caption display device and a computer readable storage medium, aiming at improving the accuracy of closed caption display.
In order to achieve the above object, the present invention provides a closed caption display method, including:
analyzing the received PES data of the packed elementary streams to obtain corresponding closed caption information;
constructing a corresponding display control according to the closed caption information;
and drawing and displaying the corresponding closed captions according to the display control.
Optionally, before the step of parsing the received packetized elementary stream PES data to obtain corresponding closed caption information, the method includes:
receiving a closed caption display instruction triggered by a user, and calling back corresponding PES data according to the closed caption display instruction;
checking whether group information of the PES data meets a preset requirement through a preset program, and executing the following steps when the group information meets the preset requirement: and analyzing the received PES data of the packed elementary streams to obtain closed caption information.
Optionally, the step of parsing the received packetized elementary stream PES data to obtain corresponding closed caption information includes:
constructing corresponding closed caption control information according to the received PES data of the packed elementary stream;
and analyzing the closed caption control information to obtain corresponding closed caption information.
Optionally, the step of drawing and displaying the corresponding closed captions according to the display control includes:
drawing corresponding closed captions according to the display control;
and transmitting the closed captions to the corresponding display area for display through the corresponding line drawing interface and the corresponding drawing interface.
Optionally, after the step of parsing the received packetized elementary stream PES data to obtain corresponding closed caption information, the method includes:
and storing the closed caption information into a data buffer area.
Optionally, the step of constructing a corresponding display control according to the closed caption information includes:
and calling the closed caption information from the data cache region, and constructing a corresponding display control according to the closed caption information.
Further, to achieve the above object, the present invention also provides a closed caption display device including: a memory, a processor, and a closed caption display program stored on the memory and executable on the processor, the closed caption display program when executed by the processor implementing the steps of:
analyzing the received PES data of the packed elementary streams to obtain corresponding closed caption information;
constructing a corresponding display control according to the closed caption information;
and drawing and displaying the corresponding closed captions according to the display control.
Optionally, the closed caption display program further implements the following steps when executed by the processor:
receiving a closed caption display instruction triggered by a user, and calling back corresponding PES data according to the closed caption display instruction;
checking whether group information of the PES data meets a preset requirement through a preset program, and executing the following steps when the group information meets the preset requirement: and analyzing the received PES data of the packed elementary streams to obtain closed caption information.
Optionally, the closed caption display program further implements the following steps when executed by the processor:
constructing corresponding closed caption control information according to the received PES data of the packed elementary stream;
and analyzing the closed caption control information to obtain corresponding closed caption information.
Optionally, the closed caption display program further implements the following steps when executed by the processor:
drawing corresponding closed captions according to the display control;
and transmitting the closed captions to the corresponding display area for display through the corresponding line drawing interface and the corresponding drawing interface.
Optionally, the closed caption display program further implements the following steps when executed by the processor:
and storing the closed caption information into a data buffer area.
Optionally, the closed caption display program further implements the following steps when executed by the processor:
and calling the closed caption information from the data cache region, and constructing a corresponding display control according to the closed caption information.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a closed caption display program which, when executed by the processor, realizes the steps of:
analyzing the received PES data of the packed elementary streams to obtain corresponding closed caption information;
constructing a corresponding display control according to the closed caption information;
and drawing and displaying the corresponding closed captions according to the display control.
Analyzing received PES data of a packed elementary stream to obtain corresponding closed caption information; constructing a corresponding display control according to the closed caption information; and drawing and displaying the corresponding closed captions according to the display control. Through the method, the received PES data of the packed elementary stream is analyzed to obtain the corresponding closed caption information, then the corresponding display control is constructed according to the closed caption information, the construction process of the display control comprises the calculation of the position, the size and the like of the closed caption information display, the accuracy of the closed caption display is improved, and the corresponding closed caption is drawn and displayed through the control. Therefore, the method and the device can improve the accuracy of closed caption display, thereby improving the user experience.
Drawings
Fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a closed caption display method according to a first embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a detailed flow of parsing received packetized elementary stream PES data to obtain corresponding closed caption information according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a detailed flow of drawing and displaying a corresponding closed caption according to the display control in the embodiment of the present invention;
FIG. 5 is a flowchart illustrating a closed caption display method according to a second embodiment of the present invention;
fig. 6 is a flowchart illustrating a closed caption display method according to a third embodiment of the invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the prior art, various problems often occur when the closed caption display function is used, for example, the display position of the closed caption is inaccurate, the size of the closed caption display character is problematic, and the like, so that the user experience is affected.
In order to solve the technical problem, the invention provides a closed caption display method, which analyzes received Packetized Elementary Stream (PES) data to obtain corresponding closed caption information; constructing a corresponding display control according to the closed caption information; and drawing and displaying the corresponding closed captions according to the display control. Through the method, the received PES data of the packed elementary stream is analyzed to obtain the corresponding closed caption information, then the corresponding display control is constructed according to the closed caption information, the construction process of the display control comprises the calculation of the position, the size and the like of the closed caption information display, the accuracy of the closed caption display is improved, and the corresponding closed caption is drawn and displayed through the control. Therefore, the method and the device can improve the accuracy of closed caption display, thereby improving the user experience.
Referring to fig. 1, fig. 1 is a schematic terminal structure diagram of a hardware operating environment according to an embodiment of the present invention.
The terminal of the embodiment of the invention can be an intelligent television, and can also be a terminal device with a display and play function, such as a PC, a smart phone, a tablet computer, a portable computer and the like.
As shown in fig. 1, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the terminal may further include a camera, a Radio Frequency (RF) circuit, a sensor, an audio circuit, a Wi-Fi module, and the like. Such as light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor that may adjust the brightness of the display screen according to the brightness of ambient light, and a proximity sensor that may turn off the display screen and/or the backlight when the mobile terminal is moved to the ear. As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile terminal is stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer and tapping) and the like for recognizing the attitude of the mobile terminal; of course, the mobile terminal may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which are not described herein again.
Those skilled in the art will appreciate that the terminal structure shown in fig. 1 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a closed caption display program.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to call the closed caption display program stored in the memory 1005 and perform the following operations:
analyzing the received PES data of the packed elementary streams to obtain corresponding closed caption information;
constructing a corresponding display control according to the closed caption information;
and drawing and displaying the corresponding closed captions according to the display control.
Further, the processor 1001 may call the closed caption display program stored in the memory 1005, and also perform the following operations:
receiving a closed caption display instruction triggered by a user, and calling back corresponding PES data according to the closed caption display instruction;
checking whether group information of the PES data meets a preset requirement through a preset program, and executing the following steps when the group information meets the preset requirement: and analyzing the received PES data of the packed elementary streams to obtain closed caption information.
Further, the processor 1001 may call the closed caption display program stored in the memory 1005, and also perform the following operations:
constructing corresponding closed caption control information according to the received PES data of the packed elementary stream;
and analyzing the closed caption control information to obtain corresponding closed caption information.
Further, the processor 1001 may call the closed caption display program stored in the memory 1005, and also perform the following operations:
drawing corresponding closed captions according to the display control;
and transmitting the closed captions to the corresponding display area for display through the corresponding line drawing interface and the corresponding drawing interface.
Further, the processor 1001 may call the closed caption display program stored in the memory 1005, and also perform the following operations:
and storing the closed caption information into a data buffer area.
Further, the processor 1001 may call the closed caption display program stored in the memory 1005, and also perform the following operations:
and calling the closed caption information from the data cache region, and constructing a corresponding display control according to the closed caption information.
Referring to fig. 2, fig. 2 is a flowchart illustrating a closed caption display method according to a first embodiment of the invention.
In an embodiment of the present invention, the closed caption display method includes:
step S10, analyzing the received PES data to obtain the corresponding closed caption information;
in the embodiment of the invention, the closed caption display method is mainly used for displaying the closed captions when the hearing-impaired people watch videos, so that more video information can be obtained as normal people, and more perfect video watching experience can be enjoyed. The closed caption display method is completed by terminal equipment with a display and play function, and specifically, the terminal can be an intelligent television, or a PC, a smart phone, a tablet computer, a portable computer and the like. The present embodiment is described by taking an intelligent electronic device as an example.
In the embodiment of the invention, when the PES data of the packed elementary stream is received, the PES data is analyzed to obtain the corresponding closed caption information. The PES (packetized Elementary Stream) data is a packetized Elementary Stream PES Stream formed by dividing an Elementary Stream ES (Elementary Stream) into packets with different lengths as needed and adding a Packet header. ES is a data stream directly from the encoder, and may be a general term for other encoded data streams such as encoded video data stream, audio data stream, or closed caption data stream. In this embodiment, the PES data is a data stream formed by processing the closed caption ES stream by a PES packetizer, and in this process, operations such as packetizing, and adding header information to the ES stream are completed. Note that the PES data may pass through a PS (program Stream) Stream or a TS (Transport Stream) Stream during transmission. The PS stream consists of a plurality of PS packets, and one PS packet consists of a plurality of PES packets, and since the lengths of the PS packets are variable, once the synchronization information of a certain PS packet is lost, the receiver enters an out-of-step state, thereby causing a serious information loss event, and therefore, the PS stream is generally used when the communication environment is good and the transmission error code is low. The TS stream is composed of TS packets with fixed length (188 bytes), and the TS packet is a repackage of PES packets, because the TS stream adopts a packet structure with fixed length, when the transmission error code destroys the synchronous information of a certain TS packet, the receiver can detect the synchronous information in the TS packet behind the TS packet at a fixed position, thereby recovering the synchronization and avoiding the information loss, therefore, the TS stream is generally adopted when the channel environment is severe and the transmission error code is high.
Specifically, referring to fig. 3, fig. 3 is a schematic detailed flow chart illustrating a process of parsing received packetized elementary stream PES data to obtain corresponding closed caption information according to an embodiment of the present invention, where step S10 includes:
step S11, constructing corresponding closed caption control information from the received packetized elementary stream PES data;
step S12, parsing the closed caption control information to obtain corresponding closed caption information.
In an embodiment of the invention, when packetized elementary stream PES data is received, corresponding closed caption control information is constructed from the PES data. It should be noted that the construction of the control information is based on the closed caption standard, and the closed caption of some languages and the language code and display mechanism corresponding to each language are described. And then analyzing the closed caption control information to obtain corresponding closed caption information. The closed caption information includes closed caption content, language of closed caption, display position, display effect, font size and color, etc.
Step S20, constructing a corresponding display control according to the closed caption information;
in the embodiment of the invention, when closed caption information is obtained, a corresponding display control is constructed according to the closed caption information, wherein the display control refers to a control for displaying the closed caption by calculating the display position, the font size and the like of each piece of closed caption information to typeset the closed caption, and determining the display color parameter and the display effect parameter of the closed caption.
Specifically, the display position of the closed caption information is determined according to the display screen of the smart television, and the display position is determined according to different screen display scales, such as 16: 9,4: 3, etc., divide the screen into a different number of cells. For example, the display screen of the smart television is 16: and 9, dividing the display screen into 210 cells in the horizontal direction and 75 cells in the vertical direction, so as to describe the display position of the closed caption according to the number of rows and columns of the display screen, and obtain the display position parameter of the closed caption.
The font size is calculated according to the size of the display screen of the intelligent television, so that the font size parameter of the closed caption is obtained. For example, when closed captions are displayed, according to the caption closed standard ARIB STD-B24, a line may have a maximum of 42 words, when the screen resolution of the smart tv is 1280 × 720, the width of the maximum font cannot exceed 1280/42 to 30 pixels, the height of the maximum font cannot exceed 720/16 to 45 pixels, and the ratio between the large, medium and small fonts cannot exceed 1.5. In particular embodiments, the user may also select the display size of the closed captioning.
In addition, the construction of the display control also needs to determine the display color parameter and the display effect parameter of the closed caption according to the closed caption information. The determination of the closed caption display color parameters comprises determination of the foreground color, the background color and the transparency of the font, wherein the foreground color refers to the color of the character characters in the closed caption, the background color refers to the color of a rectangle surrounding the characters, so that the displayed character characters can be highlighted from the video background, and the transparency comprises 4 types of opacity, flicker, transparency and translucency. Further, the display parameters and the display mode of the closed captions are determined according to the display effect corresponding to the closed captions content, and the display effect may include a roll up scroll mode, a wipe on word-by-word display mode, a pop bounce mode, and the like. In the roll up mode, subtitles are displayed word by word from left to right, 2, 3 or 4 lines can be displayed simultaneously, so that a viewer can see clearly the displayed content of the closed subtitles conveniently, a line just displayed cannot be removed immediately, after a line change control word is received, only the first line is erased, and the rest lines are sequentially scrolled upwards by one line; a paint on mode, which is displayed word by word from left to right, only displays one line, and is erased after staying for a period of time; and in the pop on mode, all received code words are stored, and when a display instruction is received, a line of subtitles are displayed simultaneously.
In the embodiment of the invention, the display position and the font size of the closed caption are calculated by the method to obtain the display position parameter and the font size parameter of the closed caption, and the display color parameter and the display effect parameter of the closed caption are determined according to the closed caption information, so that the display control corresponding to the closed caption is constructed according to the parameters.
And step S30, drawing and displaying the corresponding closed captions according to the display control.
When the display control corresponding to each closed caption is constructed, reading the display position parameter, font size parameter, display color parameter, display effect parameter and the like of the closed caption in the display control, drawing the corresponding closed caption according to the parameters, and transmitting the drawn closed caption to the display screen of the smart television for display.
Referring to fig. 4, fig. 4 is a detailed flowchart illustrating a process of drawing and displaying a corresponding closed caption according to the display control according to the embodiment of the present invention, where step S30 includes:
step S31, drawing corresponding closed captions according to the display control;
and step S32, transmitting the closed captions to the corresponding display area through the corresponding line drawing interface and the corresponding word drawing interface for display.
In the embodiment of the present invention, when a display control corresponding to each closed caption is constructed, the corresponding closed caption is drawn according to the display position parameter, the font size parameter, the display color parameter, the display effect parameter, and the like of the closed caption in the display control, wherein drawing of the closed caption may include drawing a line surrounding the closed caption and characters of the closed caption, and further, the drawn closed caption is transmitted to the corresponding display region through the corresponding line drawing interface and the corresponding drawing interface for display. The corresponding display area may be a television screen, the line drawing interface is used to transmit drawn lines surrounding closed captions, and the word drawing interface is used to transmit drawn characters of the closed captions.
Analyzing received PES data of a packed elementary stream to obtain corresponding closed caption information; constructing a corresponding display control according to the closed caption information; and drawing and displaying the corresponding closed captions according to the display control. Through the method, the received PES data of the packed elementary stream is analyzed to obtain the corresponding closed caption information, then the corresponding display control is constructed according to the closed caption information, the construction process of the display control comprises the calculation of the position, the size and the like of the closed caption information display, the accuracy of the closed caption display is improved, and the corresponding closed caption is drawn and displayed through the control. Therefore, the method and the device can improve the accuracy of closed caption display, thereby improving the user experience.
Referring to fig. 5, fig. 5 is a flowchart illustrating a closed caption display method according to a second embodiment of the present invention.
Based on the first embodiment shown in fig. 2, the closed caption display method further includes:
step S40, receiving a closed caption display instruction triggered by a user, and calling back corresponding PES data according to the closed caption display instruction;
step S50, checking whether the group information of the PES data meets a preset requirement through a preset program, and if the group information meets the preset requirement, executing the steps of: and analyzing the received PES data of the packed elementary streams to obtain closed caption information.
In the embodiment of the invention, when a closed caption display instruction triggered by a user is received, the corresponding PES data needs to be called back according to the closed caption display instruction, whether the group information of the PES data meets the preset requirement is checked, and the correctness of the PES data is ensured, so that a foundation is laid for improving the accuracy of closed caption display corresponding to the PES data.
In the embodiment of the invention, when a closed caption display instruction triggered by a user is received, the corresponding PES data is called back according to the closed caption display instruction. The mode of the user triggering the closed caption display instruction can be pressing a remote control or a closed caption starting key on the smart television. It should be noted that there are certain interfaces between software modules, and from the aspect of calling, they can be divided into three categories: synchronous calls, callbacks, and asynchronous calls. The callback is a bidirectional calling mode, that is, the called party also calls the interface of the other party when the interface is called. In addition, for a general structured language, the callback can be implemented by a callback function. The callback function is also a function or procedure, but it is a special function implemented by the caller itself for use by the callee. Therefore, in a specific implementation process, when a closed caption display instruction triggered by a user is received, the corresponding PES data can be called back through a callback function according to the closed caption display instruction;
further, whether the group information of the PES data meets a preset requirement is checked through a preset program. Wherein the group information includes management group information and sentence group information. The preset requirement is mainly set according to the subtitle hiding standard ARIB STD-B24, so that it is checked whether the group information of the PES data meets the preset requirement, and it is mainly checked whether the actual length of the PES data group information and the length described in the field are consistent in segments according to the subtitle hiding standard. When the actual length of the PES data group information is consistent with the length segment described in the field, that is, the group information of the PES data meets the preset requirement, executing the following steps: and analyzing the received PES data of the packed elementary streams to obtain closed caption information.
Referring to fig. 6, fig. 6 is a flowchart illustrating a closed caption display method according to a third embodiment of the invention.
Based on the first embodiment shown in fig. 2, the closed caption display method further includes:
step S60, saving the closed caption information to the data buffer.
At this time, step S20 includes:
step S21, retrieving the closed caption information from the data buffer area, and constructing a corresponding display control according to the closed caption information.
In the embodiment of the invention, when the closed caption information is obtained by analysis, the closed caption information is stored in the data cache region. When a closed caption display instruction is received again next time, corresponding closed caption information can be directly called out in the data cache region, the corresponding PES data does not need to be called back again, the PES data is analyzed to obtain the corresponding closed caption information, and the display speed of the closed caption is improved. Certainly, in the specific implementation process, in order to prevent the cache from occupying too much system resources, the closed caption information cached in the data cache region may be cleared when the preset time is exceeded.
Furthermore, the closed caption information is called from the data cache region, and a corresponding display control is constructed according to the closed caption information.
The present invention also proposes a computer-readable storage medium having stored thereon a closed caption display program which, when executed by the processor, implements the steps of:
analyzing the received PES data of the packed elementary streams to obtain corresponding closed caption information;
constructing a corresponding display control according to the closed caption information;
and drawing and displaying the corresponding closed captions according to the display control.
Further, when executed by the processor, the closed caption display program is further configured to:
receiving a closed caption display instruction triggered by a user, and calling back corresponding PES data according to the closed caption display instruction;
checking whether group information of the PES data meets a preset requirement through a preset program, and executing the following steps when the group information meets the preset requirement: and analyzing the received PES data of the packed elementary streams to obtain closed caption information.
Further, when executed by the processor, the closed caption display program is further configured to:
constructing corresponding closed caption control information according to the received PES data of the packed elementary stream;
and analyzing the closed caption control information to obtain corresponding closed caption information.
Further, when executed by the processor, the closed caption display program is further configured to:
drawing corresponding closed captions according to the display control;
and transmitting the closed captions to the corresponding display area for display through the corresponding line drawing interface and the corresponding drawing interface.
Further, when executed by the processor, the closed caption display program is further configured to:
and storing the closed caption information into a data buffer area.
Further, when executed by the processor, the closed caption display program is further configured to:
and calling the closed caption information from the data cache region, and constructing a corresponding display control according to the closed caption information.
The specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the closed caption display method described above, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (8)
1. A closed caption display method, characterized by comprising the steps of:
analyzing the received PES data of the packed elementary streams to obtain corresponding closed caption information;
constructing a corresponding display control according to the closed caption information, wherein the display control is constructed according to a display position parameter and a font size parameter which are obtained by calculation and a display color parameter and a display effect parameter of the closed caption which are determined and obtained based on the closed caption information;
drawing and displaying the corresponding closed captions according to the display control;
wherein, the step of analyzing the received packetized elementary stream PES data to obtain the corresponding closed caption information comprises:
constructing corresponding closed caption control information according to the received PES data of the packed elementary stream;
and analyzing the closed caption control information to obtain corresponding closed caption information.
2. The closed caption display method as claimed in claim 1, wherein the step of parsing the received packetized elementary stream PES data to obtain the corresponding closed caption information is preceded by:
receiving a closed caption display instruction triggered by a user, and calling back corresponding PES data according to the closed caption display instruction;
checking whether group information of the PES data meets a preset requirement through a preset program, and executing the following steps when the group information meets the preset requirement: and analyzing the received PES data of the packed elementary streams to obtain closed caption information.
3. The closed caption display method as claimed in claim 1, wherein the step of drawing and displaying the corresponding closed caption according to the display control includes:
drawing corresponding closed captions according to the display control;
and transmitting the closed captions to the corresponding display area for display through the corresponding line drawing interface and the corresponding drawing interface.
4. The closed caption display method as claimed in claim 1, wherein the step of parsing the received packetized elementary stream PES data to obtain corresponding closed caption information comprises:
and storing the closed caption information into a data buffer area.
5. The closed caption display method as claimed in claim 4, wherein the step of constructing the corresponding display control according to the closed caption information comprises:
and calling the closed caption information from the data cache region, and constructing a corresponding display control according to the closed caption information.
6. A closed caption display device, characterized in that the closed caption display device comprises: a memory, a processor, and a closed caption display program stored on the memory and executable on the processor, the closed caption display program when executed by the processor implementing the steps of:
analyzing the received PES data of the packed elementary streams to obtain corresponding closed caption information;
constructing a corresponding display control according to the closed caption information, wherein the display control is constructed according to a display position parameter and a font size parameter which are obtained by calculation and a display color parameter and a display effect parameter of the closed caption which are determined and obtained based on the closed caption information;
drawing and displaying the corresponding closed captions according to the display control;
the closed caption display program when executed by the processor further implements the steps of:
constructing corresponding closed caption control information according to the received PES data of the packed elementary stream;
and analyzing the closed caption control information to obtain corresponding closed caption information.
7. The closed caption display device of claim 6 wherein the closed caption display program when executed by the processor further performs the steps of:
receiving a closed caption display instruction triggered by a user, and calling back corresponding PES data according to the closed caption display instruction;
checking whether group information of the PES data meets a preset requirement through a preset program, and executing the following steps when the group information meets the preset requirement: and analyzing the received PES data of the packed elementary streams to obtain closed caption information.
8. A computer-readable storage medium having stored thereon a closed caption display program which, when executed by a processor, performs the steps of:
analyzing the received PES data of the packed elementary streams to obtain corresponding closed caption information;
constructing a corresponding display control according to the closed caption information, wherein the display control is constructed according to a display position parameter and a font size parameter which are obtained by calculation and a display color parameter and a display effect parameter of the closed caption which are determined and obtained based on the closed caption information;
drawing and displaying the corresponding closed captions according to the display control;
the closed caption display program when executed by the processor further implements the steps of:
constructing corresponding closed caption control information according to the received PES data of the packed elementary stream;
and analyzing the closed caption control information to obtain corresponding closed caption information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710709566.5A CN107484035B (en) | 2017-08-17 | 2017-08-17 | Closed caption display method, apparatus and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710709566.5A CN107484035B (en) | 2017-08-17 | 2017-08-17 | Closed caption display method, apparatus and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107484035A CN107484035A (en) | 2017-12-15 |
CN107484035B true CN107484035B (en) | 2020-09-22 |
Family
ID=60601545
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710709566.5A Active CN107484035B (en) | 2017-08-17 | 2017-08-17 | Closed caption display method, apparatus and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107484035B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111385630B (en) * | 2018-12-29 | 2022-07-29 | 深圳Tcl数字技术有限公司 | Processing method, device and storage medium for closed caption data |
CN112752164B (en) * | 2019-10-30 | 2023-02-17 | 深圳Tcl数字技术有限公司 | Closed caption display method, intelligent terminal and storage medium |
CN111464876B (en) * | 2020-03-31 | 2022-04-29 | 安徽听见科技有限公司 | Translation text subtitle stream type display method, device and equipment |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7561178B2 (en) * | 2005-09-13 | 2009-07-14 | International Business Machines Corporation | Method, apparatus and computer program product for synchronizing separate compressed video and text streams to provide closed captioning and instant messaging integration with video conferencing |
US8941779B2 (en) * | 2012-03-21 | 2015-01-27 | Sony Corporation | Non-closed caption data transport in standard caption service |
US8528017B2 (en) * | 2010-07-20 | 2013-09-03 | Sony Corporation | Carriage of closed data through digital interface using packets |
GB2485140A (en) * | 2010-10-26 | 2012-05-09 | Sony Corp | A Method and Apparatus For Inserting Object Data into a Stereoscopic Image |
US9444862B2 (en) * | 2012-09-29 | 2016-09-13 | Intel Corporation | Dynamic media content output for mobile devices |
US9485525B1 (en) * | 2014-04-15 | 2016-11-01 | Google Inc. | Systems and methods for using closed captions for television viewership measurement |
CN105320684B (en) * | 2014-07-28 | 2019-03-01 | 中国传媒大学 | The method for interchanging data of closed caption |
-
2017
- 2017-08-17 CN CN201710709566.5A patent/CN107484035B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN107484035A (en) | 2017-12-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111541930B (en) | Live broadcast picture display method and device, terminal and storage medium | |
CN109379641A (en) | A kind of method for generating captions and device | |
WO2017016339A1 (en) | Video sharing method and device, and video playing method and device | |
EP2334063A1 (en) | Picture output device and picture output method | |
CN107484035B (en) | Closed caption display method, apparatus and computer readable storage medium | |
EP3561691A1 (en) | Method and apparatus for displaying webpage content | |
EP3522546A1 (en) | Epg information extension method and device, and computer readable storage medium | |
EP3461136B1 (en) | Video playing method and device | |
US11924520B2 (en) | Subtitle border-crossing processing method and apparatus, and electronic device | |
US20140195248A1 (en) | Interactive server, display apparatus, and control method thereof | |
US20240005625A1 (en) | Image processing method and apparatus, electronic device and storage medium | |
AU2021378007A9 (en) | Trending display method and apparatus for electronic device, and storage medium | |
WO2015043442A1 (en) | Method, device and mobile terminal for text-to-speech processing | |
EP3211903A1 (en) | Preview playing method and device | |
KR20220124797A (en) | Method and apparatus for displaying caption information, electronic device and computer readable medium | |
CN105704582A (en) | Browser-based subtitle displaying method and device | |
KR20160104022A (en) | Methods, systems, and media for remote rendering of web content on a television device | |
US20170161871A1 (en) | Method and electronic device for previewing picture on intelligent terminal | |
CN111988654B (en) | Video data alignment method and device and electronic equipment | |
CN111698550B (en) | Information display method, device, electronic equipment and medium | |
CN108401173B (en) | Mobile live broadcast interactive terminal, method and computer readable storage medium | |
CN111711857A (en) | Multi-channel video playing method, terminal and readable storage medium | |
CN113891168B (en) | Subtitle processing method, subtitle processing device, electronic equipment and storage medium | |
WO2023142370A1 (en) | Screen mirroring display method and apparatus, and electronic device and readable storage medium | |
CN107291468B (en) | Method for playing power-on/power-off animation, terminal and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |