CN109819343A - A kind of method for processing caption, device and electronic equipment - Google Patents

A kind of method for processing caption, device and electronic equipment Download PDF

Info

Publication number
CN109819343A
CN109819343A CN201910014655.7A CN201910014655A CN109819343A CN 109819343 A CN109819343 A CN 109819343A CN 201910014655 A CN201910014655 A CN 201910014655A CN 109819343 A CN109819343 A CN 109819343A
Authority
CN
China
Prior art keywords
subtitle
caption
target
information
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910014655.7A
Other languages
Chinese (zh)
Inventor
李波
严志康
张灵晶
李晗
樊东康
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen SDMC Technology Co Ltd
Original Assignee
Shenzhen SDMC Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen SDMC Technology Co Ltd filed Critical Shenzhen SDMC Technology Co Ltd
Priority to CN201910014655.7A priority Critical patent/CN109819343A/en
Publication of CN109819343A publication Critical patent/CN109819343A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses provide a kind of method for processing caption, device and electronic equipment, processing of the method for subtitle in digital cable broadcast standard television system platform, the standard platform is embedded with SCTE-27 subtitle and parallel standard caption resolver, the described method includes: obtaining caption information, the caption information includes subtitle type information;Judge the subtitle type information judge whether corresponding subtitle type is target subtitle in the subtitle type information by the preconfigured sub- parsing module of description for judging target word curtain-like type, wherein the target subtitle is SCTE-27 subtitle;If corresponding subtitle type is target subtitle in the subtitle type information, chooses and the target subtitle is parsed corresponding to the SCTE-27 caption parser of the target subtitle;The target subtitle frame information for display is obtained according to parsing result.SCTE-27 subtitle can be embedded in digital cable broadcast standard television system platform and be used.

Description

A kind of method for processing caption, device and electronic equipment
Technical field
The present invention relates to multimedia making fields, and more specifically, it relates to a kind of method for processing caption, device and electronics Equipment.
Background technique
Currently, the electronic products such as mobile phone, DTV, PC are when playing video, the display of these electronic products It can be seen that subtitle corresponding with video is played on panel.In some radio data system standard platforms, these radio and television System standard platform is all corresponding with corresponding subtitle, for example, in digital cable broadcast standard television system (DVB-C) platform, Used subtitle is DVB subtitle.And with the rapid development and actual demand of electronic product industry, people need some flat Platform adds other kinds of subtitle and is used with switching, for example, can add in digital cable broadcast standard television system platform Other kinds of target subtitle so that the original DVB subtitle of digital cable broadcast standard television system platform with it is other kinds of Target subtitle can switch use, still, add other kinds of target in digital cable broadcast standard television system platform When subtitle, there are problems that target subtitle is embedded in digital cable broadcast standard television system platform.
Summary of the invention
The purpose of the present invention is in view of the above-mentioned drawbacks of the prior art, provide a kind of method for processing caption, device and Electronic equipment solves the problems, such as that target subtitle is embedded in digital cable broadcast standard television system platform.
The purpose of the present invention is achieved through the following technical solutions:
In a first aspect, providing a kind of method for processing caption, the method is flat for digital cable broadcast standard television system The processing of subtitle in platform, the standard platform are embedded with SCTE-27 subtitle and parallel standard caption resolver, the method Include:
Caption information is obtained, the caption information includes subtitle type information;
By the preconfigured sub- parsing module of description for judging target word curtain-like type to the subtitle type information Judged judge whether corresponding subtitle type is target subtitle in the subtitle type information, wherein the target subtitle For SCTE-27 subtitle;
If corresponding subtitle type is target subtitle in the subtitle type information, chooses and correspond to the target subtitle SCTE-27 caption parser the target subtitle is parsed;
The target subtitle frame information for display is obtained according to parsing result.
Optionally, it if corresponding subtitle type is standard caption in the subtitle type information, chooses described in corresponding to The standard caption resolver of standard caption parses the standard caption;
The standard caption frame information for display is obtained according to parsing result;
It is described the standard caption frame information for display is obtained according to parsing result after, further includes:
It executes and shows the standard caption frame information.
Optionally, caption data format and simple bitmap format are provided in advance in the SCTE-27 caption parser, When the SCTE-27 caption parser that the selection corresponds to the target subtitle parses the target subtitle, comprising:
The target subtitle is parsed according to the caption data format, obtains the knot for indicating target caption frame Structure information;And
The target subtitle is parsed according to the simple bitmap format, is obtained for indicating retouching for target caption frame Information is stated, background mode information, font color information and the shade effect of target caption frame are included at least in the description information Fruit information.
Optionally, simple bitmap compressed encoding is provided in the SCTE-27 caption parser in advance, the selection corresponds to When the SCTE-27 caption parser of the target subtitle parses the target subtitle, further includes:
It is solved according to transmission data of the simple bitmap compressed encoding to the bitmap pixels information of the target subtitle Compression processing obtains the bitmap pixels information for being used for displaying target caption frame.
Optionally, when the target subtitle frame information obtained for display, comprising:
According to the structural information, description information and the bitmap pixels information, the target caption frame letter is obtained Breath;
After the acquisition target subtitle frame information, further includes:
The target subtitle frame information is stored in during subtitle lines up.
Optionally, it is described by the target subtitle frame information be stored in subtitle line up in after, line up to subtitle is stored in In the target subtitle frame information execute display when, comprising:
Read be stored in subtitle line up in the target subtitle frame information;
According to the target subtitle frame information, the Presentation Time Stamp of the target subtitle frame information is obtained;And according to institute Target subtitle frame information is stated, the Presentation Time Stamp that the target subtitle frame information corresponds to video is obtained;
The Presentation Time Stamp of the target subtitle frame information is matched with the Presentation Time Stamp of the video;
The Presentation Time Stamp by the target subtitle frame information carries out matching it with the Presentation Time Stamp of the video Afterwards, further includes:
If the Presentation Time Stamp of the target subtitle frame information is matched with the Presentation Time Stamp of the video, by the mesh Marking-up curtain frame information executes display.
Second aspect, provides a kind of captions process device, and described device includes:
Module is obtained, for obtaining caption information, the caption information includes subtitle type information;
Judgment module, for by preconfigured for judging the sub- parsing module of description of target word curtain-like type to described Subtitle type information is judged judge whether corresponding subtitle type is target subtitle in the subtitle type information, wherein The target subtitle is SCTE-27 subtitle;
First parsing module is chosen if being target subtitle for corresponding subtitle type in the subtitle type information SCTE-27 caption parser corresponding to the target subtitle parses the target subtitle;
First execution module, for obtaining the target subtitle frame information for display according to parsing result.
Optionally, described device further include:
Second parsing module is chosen if being standard caption for corresponding subtitle type in the subtitle type information Standard caption resolver corresponding to the standard caption parses the standard caption;
Second execution module, for obtaining the standard caption frame information for display according to parsing result;
Second display module shows the standard caption frame information for executing.
The third aspect provides a kind of electronic equipment, comprising: memory, processor and is stored on the memory and can The computer program run on the processor, the processor realize the embodiment of the present invention when executing the computer program Step in the method for processing caption of offer.
Fourth aspect provides a kind of computer readable storage medium, meter is stored on the computer readable storage medium Calculation machine program, the computer program realize the step in method for processing caption provided in an embodiment of the present invention when being executed by processor Suddenly.
Bring of the present invention is the utility model has the advantages that obtain caption information, the caption information includes subtitle type information;By pre- What is first configured is used to judge that the sub- parsing module of description of target word curtain-like type judges the subtitle type information, judges institute State whether corresponding subtitle type in subtitle type information is target subtitle, wherein the target subtitle is SCTE-27 subtitle; If corresponding subtitle type is target subtitle in the subtitle type information, the SCTE- for corresponding to the target subtitle is chosen 27 caption parsers parse the target subtitle;The target subtitle frame information for display is obtained according to parsing result. SCTE-27 subtitle can be embedded in digital cable broadcast standard television system platform and be used.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of method for processing caption provided in an embodiment of the present invention;
Fig. 2 is the structure chart of the sub- parsing module of description of the embodiment of the present invention;
Fig. 3 is the structure chart of caption data format in the target resolver of the embodiment of the present invention;
Fig. 4 is the structure chart of simple bitmap format in the target resolver of the embodiment of the present invention;
Fig. 5 is the structure chart of the decompression algorithm of the simple bitmap compressed encoding of the embodiment of the present invention;
Fig. 6 is the flow chart of target caption frame display logic provided in an embodiment of the present invention;
Fig. 7 is a kind of captions process device schematic diagram provided in an embodiment of the present invention;
Fig. 8 is another captions process device schematic diagram provided in an embodiment of the present invention;
Fig. 9 is another captions process device schematic diagram provided in an embodiment of the present invention;
Figure 10 is another captions process device schematic diagram provided in an embodiment of the present invention.
Specific embodiment
The preferred embodiment of the present invention is described below, those of ordinary skill in the art will be according to described below with this The relevant technologies in field are realized, and can be more clearly understood that innovation and bring benefit of the invention.
The present invention provides a kind of method for processing caption, device and electronic equipments.
The purpose of the present invention is achieved through the following technical solutions:
In a first aspect, referring to Figure 1, Fig. 1 is a kind of process signal of method for processing caption provided in an embodiment of the present invention Figure, as shown in Figure 1, the described method comprises the following steps:
101, caption information is obtained, the caption information includes subtitle type information.
In the step, above-mentioned caption information can be acquired by receiving terminal, and receiving terminal can be digital electricity Depending on etc., it is compressed data by receiving the caption information that terminal receives, it is not possible to be directly used in the display of subtitle, need to pass through It receives terminal to judge subtitle type, after selecting corresponding caption parser to parse caption information, could obtain To the caption frame for display.In embodiments of the present invention, due to being flat at digital cable broadcast standard television system (DVB-C) In platform be embedded in SCTE-27 subtitle carry out using, and the original standard caption of digital cable broadcast standard television system platform be DVB Subtitle, allows SCTE-27 subtitle and DVB subtitle to switch use, and SCTE-27 subtitle can be with the switching use of DVB subtitle Refer to that two kinds of subtitles can mutually be switched into enforcement in terminal and use, certainly, when carrying out caption frame display using SCTE-27 subtitle, It is shown with regard to carrying out caption frame without using DVB subtitle.It is understood that connecing when digital cable broadcast standard television system platform When receipts terminal receives caption information, the subtitle type of the caption information can be SCTE-27 subtitle and two kinds of subtitles of DVB subtitle At this moment one of subtitle type in type can carry out subtitle class according to the subtitle type information for including in caption information The selection of type judges, for example, it is SCTE-27 subtitle type that caption information, which includes subtitle type information, then by the caption information Caption data can be parsed by SCTE-27 caption parser, obtain the SCTE-27 caption frame for display.
It should be noted that above-mentioned SCTE-27 subtitle can also be known as Digicipher II (DCII), it is U.S.'s word Curtain standard, SCTE-27 subtitle and digital cable broadcast standard television system platform digital television standard (DVB, DigitalVideo Broadcasting) subtitle is similar, but the display logic of both subtitles and data structure have differences, And the display logic and data architectural difference of both subtitles are known to those skilled in the art, just do not do excessive repeat.
102, the sub- parsing module of description by preconfigured for judging target word curtain-like type is to the subtitle type Information is judged judge whether corresponding subtitle type is target subtitle in the subtitle type information, wherein the target Subtitle is SCTE-27 subtitle.
The sub- parsing module of the description above is attached to Program Map Table (PMT, ProgramMap Table) parsing module In, as a privately owned sub- parsing module of description in Program Map Table parsing module, sub- parsing module and program map are described Table parsing module is used cooperatively, and Program Map Table parsing module can be used for obtaining Process flowchart symbol relevant to caption information (PID, Process Identifier), subtitle type etc., according to subtitle type, Process flowchart symbol can be used for controlling corresponding word The operation of curtain-like type, for example, will be given if the subtitle type that Program Map Table parsing module is got is SCTE-27 subtitle One corresponding PID of SCTE-27 subtitle runs SCTE-27 subtitle.And it is attached in Program Map Table parsing module The sub- parsing module of description can be used for judging whether the subtitle type of the corresponding display of caption information that terminal receives is target Subtitle, step 102 can be found in Fig. 2 in the structure for the sub- parsing module of description mentioned, as shown in Fig. 2, the corresponding word of target subtitle Curtain flow pattern (streamtype) is 0x82, and describing sub- parsing module can be that 0x82 is by subtitle flow pattern to judge subtitle type SCTE-27 subtitle, Program Map Table parsing module can then obtain the Process flowchart symbol (PID) of SCTE-27 subtitle, to complete The parsing and drafting of SCTE-27 subtitle.Certainly, in other some embodiments, the subtitle flow pattern of target subtitle is not limited to 0x82 can also be other.
Further, SCTE-27 subtitle be built-in in digital cable broadcast standard television system platform and with the platform Original DVB subtitle switching uses, and when the DVB subtitle in standard platform is run, DVB subtitle is mainly completed by three parts Subtitle parsing and drafting.Firstly, receiving acquisition caption data by interface calling layer;Again by data analytic sheaf to getting Caption data parsed, draw out the caption frame being displayed for;Finally, caption frame is carried out by image presentation layer Display.Since SCTE-27 subtitle is similar with DVB subtitle, the interface calling layer of SCTE-27 subtitle can continue to use connecing for DVB subtitle Mouth calling layer, but some parameters can be increased for distinguishing with DVB subtitle, increasing some parameters can be intended to indicate that The parameters such as data flow, the subtitle pixel of SCTE-27 subtitles appearances;The data analytic sheaf of SCTE-27 subtitle is then according to SCTE-27 word Curtain specification developed, need it is independent with the data analytic sheaf of DVB subtitle, SCTE-27 subtitle carry out subtitle parsing when, can The caption frame data that are displayed for will be converted to specified format and be stored in during subtitle lines up after parsing, here specified Initial position, font size, font color etc. when can be caption frame display of format format;The figure of SCTE-27 subtitle As presentation layer can copy the image presentation layer of DVB subtitle to be designed, it is divided into two different logic processing modules, for example, with DVB subtitle and SCTE-27 subtitle can show that a frame semanteme is " I likes my motherland " subtitle, but the corresponding word of two kinds of subtitles Initial position, font size, font color etc. when curtain frame display can be different, so as to by the image of SCTE-27 subtitle Presentation layer can copy the image presentation layer of DVB subtitle to be designed, and be divided into two different logic processing modules to be designed.
It should be noted that above-mentioned SCTE-27 subtitle is properly termed as target subtitle, DVB subtitle is properly termed as standard word Curtain.
If 103, corresponding subtitle type is target subtitle in the subtitle type information, chooses and correspond to the target The SCTE-27 caption parser of subtitle parses the target subtitle.
102 pairs of subtitle type informations judge through the above steps, it can be determined that go out the corresponding word of subtitle type information Curtain-like type is target subtitle or standard caption, if the subtitle type got is target subtitle, it is necessary to selection and target word The corresponding SCTE-27 caption parser of curtain, can solve the caption data of target subtitle by SCTE-27 caption parser Analysis.It is integrated into CoreTV in addition, the display function of SCTE-27 subtitle can be used as a module, is in identical with DVB subtitle Grade, and SCTE-27 subtitle and DVB subtitle are mutually indepedent, by the sub- parsing module of description in CoreTV to two kinds of subtitles Selection logic is handled, and can determine specifically used subtitle type.
104, the target subtitle frame information for display is obtained according to parsing result.
In the step, the available solution parsed to caption data of the SCTE-27 caption parser to target subtitle Analysis is available for the SCTE-27 word of display as a result, according to SCTE-27 caption parser to the parsing result of caption data Curtain frame.
Optionally, the method also includes:
If corresponding subtitle type is standard caption in the subtitle type information, chooses and correspond to the standard caption Standard caption resolver the standard caption is parsed;
The standard caption frame information for display is obtained according to parsing result;
It is described the standard caption frame information for display is obtained according to parsing result after, further includes:
It executes and shows the standard caption frame information.
It is the explanation to above-mentioned steps 103 and another situation of step 104, i.e. SCTE-27 word in the alternative embodiment Curtain and DVB subtitle are can to switch use, after 102 pairs of subtitle type informations judge through the above steps, can determine word The corresponding subtitle type of curtain type information is target subtitle or the digital cable broadcast standard television system platform Central Plains of insertion Some standard captions, if the subtitle type got is the standard caption in wired broadcasting standard television system platform, it is necessary to Standard caption resolver corresponding with standard caption is chosen, it can be to the standard word that terminal receives by standard caption resolver The caption data of curtain is parsed, the parsing result of available standard caption, so as to get the standard for display Caption frame, and display is executed to standard caption frame, it that is to say and display is executed to DVB caption frame, DVB caption frame is shown as this field Known to technical staff, excessive repeat just is not done.
Optionally, caption data format and simple bitmap format are provided in advance in the SCTE-27 caption parser, When the SCTE-27 caption parser that the selection corresponds to the target subtitle parses the target subtitle, comprising:
The target subtitle is parsed according to the caption data format, obtains the knot for indicating target caption frame Structure information;And
The target subtitle is parsed according to the simple bitmap format, is obtained for indicating retouching for target caption frame Information is stated, background mode information, font color information and the shade effect of target caption frame are included at least in the description information Fruit information.
When being parsed to target subtitle, it is necessary first to obtain the structural information of target caption frame, the knot of target caption frame Structure information can be used to indicate that the subtitle frame of target caption frame, for example, it is that " I likes me that target caption frame, which needs content to be shown, Motherland ", correspondingly, being corresponding with the subtitle frame of " I likes my motherland " in the structural information of target caption frame, pass through SCTE- Preconfigured caption data format (Subtitle Message Format) is to the subtitle of target subtitle in 27 caption parsers Data are parsed, the structural information of available target caption frame, and the data structure of caption data format is as shown in Figure 3;Its It is secondary, need to obtain the description information of target caption frame, the description information of target caption frame can be used to indicate that target caption frame Subtitle style, for example, it is " I likes my motherland " that target caption frame, which needs content to be shown, correspondingly, if target caption frame The subtitle frame of " I likes my motherland " is corresponding in structural information, description information can carry out pattern to the subtitle frame and retouch It states, for example, by background mode information, font color information and hatching effect information in description information, it can be to " I likes The subtitle frame of my motherland " carries out pattern description, for example, pass through the structural information and description information of target caption frame, it can So that the caption frame of " I likes my motherland " is white font and showing with hatching effect with black background mode, font Show effect, it can by simple bitmap format preconfigured in SCTE-27 caption parser (Simple Bitmap Format) The caption data of target subtitle is parsed, the structural information of available target caption frame, the data of simple bitmap format Structure is as shown in Figure 4.
Optionally, simple bitmap compressed encoding is provided in the SCTE-27 caption parser in advance, the selection corresponds to When the SCTE-27 caption parser of the target subtitle parses the target subtitle, further includes:
It is solved according to transmission data of the simple bitmap compressed encoding to the bitmap pixels information of the target subtitle Compression processing obtains the bitmap pixels information for being used for displaying target caption frame.
After being parsed to the caption data of target subtitle, available structural information and description to target caption frame Information, but the complete target caption frame of a frame, also required to the bitmap pixels information of display, bitmap pixels information can be used for Indicate that the bitmap pixels of target caption frame, bitmap pixels information data have used a set of compression algorithm in transmission, worked as bit image When prime information data are received by terminal, need to be unziped it processing according to the data compression algorithm, to obtain bitmap Pixel Information passes through simple bitmap compressed encoding (Simple Message preconfigured in SCTE-27 caption parser Compression Coding) can the bitmap pixels Information Compression data to target subtitle unzip it, to obtain bitmap The decompression algorithm of Pixel Information, simple bitmap compressed encoding is as shown in Figure 5.In addition, different terminals use identical target word When curtain resolver is parsed, the bitmap pixels information got be can be different, for example, DTV A and DTV B All the data information of target subtitle is parsed using identical target caption parser, if the display screen of DTV A It is 40 inches, the display screen of DTV B is 60 inches, then DTV A is to target caption parser to target subtitle After data information is parsed, the target caption frame got is adaptable to 40 inches of display screen, and DTV B is to mesh After mark caption parser parses the data information of target subtitle, the target caption frame got is adaptable to 60 inches Show screen.
Optionally, when the target subtitle frame information obtained for display, comprising:
According to the structural information, description information and the bitmap pixels information, the target caption frame letter is obtained Breath;
After the acquisition target subtitle frame information, further includes:
The target subtitle frame information is stored in during subtitle lines up.
By the complete target caption frame of the available frame of above-mentioned alternative embodiment step, the complete mesh of a frame is got It after marking caption frame, needs for the frame target caption frame to be stored in during subtitle lines up, target caption frame is stored in during subtitle lines up It sequentially can successively be stored.It is understood that in order to avoid caption information and the unmatched feelings of video information Target caption frame can be parsed in advance and be stored in during subtitle lines up by condition, and the reading for subsequent target caption frame is aobvious Show.
Optionally, it is described by the target subtitle frame information be stored in subtitle line up in after, line up to subtitle is stored in In the target subtitle frame information execute display when, comprising:
Read be stored in subtitle line up in the target subtitle frame information;
According to the target subtitle frame information, the Presentation Time Stamp of the target subtitle frame information is obtained;And according to institute Target subtitle frame information is stated, the Presentation Time Stamp that the target subtitle frame information corresponds to video is obtained;
The Presentation Time Stamp of the target subtitle frame information is matched with the Presentation Time Stamp of the video;
The Presentation Time Stamp by the target subtitle frame information carries out matching it with the Presentation Time Stamp of the video Afterwards, further includes:
If the Presentation Time Stamp of the target subtitle frame information is matched with the Presentation Time Stamp of the video, by the mesh Marking-up curtain frame information executes display.
In the optional embodiment, above-mentioned video can refer to the current video of broadcasting corresponding with target subtitle, pass through The Presentation Time Stamp of above-mentioned target subtitle frame information and the Presentation Time Stamp of video, can be used for judging target caption frame with Whether current video synchronizes, if target caption frame is synchronous with current video, target caption frame and current video are executed display Onto the display screen of terminal.When target caption frame and current video are executed and shown, need to calculate the aobvious of target caption frame Show the period, for example, the caption frame semanteme that a frame target caption frame is shown is " I likes my motherland ", " I likes mine for corresponding sending The current video of the video actions of motherland " can be to be played by continuous 20 frame image/video frame and obtain, the frame target caption frame Corresponding video frame is 20 frames, and 20 frame presentation of video frames can start to broadcasting to terminate the time used and be considered as that " I likes my ancestral The Subtitle Demonstration period of state " target caption frame.
For the display logic for further clearly describing target caption frame in above-mentioned alternative embodiment, Fig. 6, Fig. 6 are referred to It is the flow chart of target caption frame display logic provided in an embodiment of the present invention, as shown in fig. 6, process is as follows: opening subtitle can To be interpreted as the instruction that pmt table parsing module gets unlatching target subtitle, the response of pmt table parsing module is available to arrive target The corresponding PID of subtitle;Read parsing after be stored in subtitle line up in target caption frame, judge target caption frame PTS (display Timestamp) whether matched with the PTS of current video, if matching, converts subtitling format, if mismatching, reads subtitle and line up The next frame target caption frame of middle storage;Subtitling format is converted as the parameter mentioned in above-mentioned steps 102;Creating subtitle bitmap can To get the message bit pattern for displaying target caption frame;What drafting subtitle can be understood as drawing is that subtitle is being shown Screen display;The Subtitle Demonstration period is calculated as mentioned in above-mentioned alternative embodiment, contextual relation can be understood as subtitle and line up The connection of the adjacent two frames target caption frame of middle storage, for example, the previous frame in adjacent two frames target caption frame is playing It has been shown that, next frame are display to be played, by contextual relation, after can determining that previous frame target caption frame plays, and next frame Target subtitle can play out;The corresponding video frame of target caption frame shown does not play, the frame target caption frame It can continue to show on a display screen, it, will screen if the corresponding video frame of target caption frame shown has played The target caption frame that shows on curtain is destroyed, and is read next frame target caption frame and is carried out drafting and shows.
It should be noted that DVB subtitle is the mpeg data stream of standard, the mode of filtering is complete according to PES filtering Data packet, and SCTE-27 subtitle is embedded in what DVB-C platform used, SCTE-27 caption data can be regarded as private data Format storage needs given filter Table ID (table mark) according to rule when filtering the data of SCTE-27 subtitle, selectivity Data needed for filtering.Because of test code streams problem, code stream machine can be set to 256QAM to filter to obtain data.SCTE-27 word Curtain is synchronous with video content in display, can be synchronized by the corresponding PTS comparison of the two, at this point, PTS/ in code stream machine The mode of PCR can be set to non-loop mode, be the every PTS meeting for playing a video of code stream machine because under loop mode Persistently add up, and the PTS of SCTE-27 subtitle is stored in privately owned form, can not be added up, so just will appear under loop mode The problem that PTS can not be corresponded to.
The color of bitmap obtained after parsing is YCbCr mode in above-mentioned SCTE-27 subtitle, and in DVB-C platform Figure layer for display is RGB mode, needs that bitmap color is first converted to RGB mode from YCbCr mode, so that the subtitle drawn It can be shown in figure layer.In addition, subtitle original coordinates can be converted, sat with obtaining being adapted to the display of terminal screen Mark.It is understood that subtitle original coordinates are subtitle position in original display region, but the size in original display region can To be unfixed, for example, the size in original display region can be 720*480, or 1920*1080, and show and sit Target display area size is if 960*720, at this moment, can be by the corresponding subtitle bitmap of subtitle original coordinates according to corresponding ratio To zooming in and out, the position for being adapted to display area size is calculated, to draw out the subtitle being displayed for.
By above-mentioned flow diagram shown in FIG. 1 and multiple optional embodiments, SCTE-27 subtitle number may be implemented According to parsing, SCTE-27 caption data can be to be obtained by filtration by demultiplexer (DEMUX, De-Multiplexer), is passed through After caption data is obtained by filtration in demultiplexer, the caption data after parsing is shown on the screen of terminal by drawing.At this In inventive embodiments, the special efficacy of some subtitles can be got by the description information of caption frame, for example, character in subtitle Transparency, the background color of subtitle, subtitle profile and caption shadow and other effects.
Second aspect, as shown in fig. 7, providing a kind of captions process device, 600 device includes:
Module 601 is obtained, for obtaining caption information, the caption information includes subtitle type information;
Judgment module 602, for passing through the preconfigured sub- parsing module pair of description for being used to judge target word curtain-like type The subtitle type information is judged judge whether corresponding subtitle type is target subtitle in the subtitle type information, Wherein, the target subtitle is SCTE-27 subtitle;
First parsing module 603 selects if being target subtitle for corresponding subtitle type in the subtitle type information The SCTE-27 caption parser corresponding to the target subtitle is taken to parse the target subtitle;
First execution module 604, for obtaining the target subtitle frame information for display according to parsing result.
Optionally, as shown in figure 8,600 device further include:
Second parsing module 605 selects if being standard caption for corresponding subtitle type in the subtitle type information The standard caption resolver corresponding to the standard caption is taken to parse the standard caption;
Second execution module 606, for obtaining the standard caption frame information for display according to parsing result;
Second display module 607 shows the standard caption frame information for executing.
Optionally, caption data format and simple bitmap format are provided in advance in the SCTE-27 caption parser, The SCTE-27 caption parser for corresponding to the target subtitle of choosing is when parsing the target subtitle, and described the One parsing module 603 is also used to:
The target subtitle is parsed according to the caption data format, obtains the knot for indicating target caption frame Structure information;And
The target subtitle is parsed according to the simple bitmap format, is obtained for indicating retouching for target caption frame Information is stated, background mode information, font color information and the shade effect of target caption frame are included at least in the description information Fruit information.
Optionally, simple bitmap compressed encoding is provided in the SCTE-27 caption parser in advance, the selection corresponds to When the SCTE-27 caption parser of the target subtitle parses the target subtitle, first parsing module 603 It is also used to:
It is solved according to transmission data of the simple bitmap compressed encoding to the bitmap pixels information of the target subtitle Compression processing obtains the bitmap pixels information for being used for displaying target caption frame.
Optionally, as shown in figure 9, when the acquisition is used for the target subtitle frame information of display, first execution module 604 are also used to:
According to the structural information, description information and the bitmap pixels information, the target caption frame letter is obtained Breath;
First execution module 604 includes:
Subtitle lines up unit 6041, for the target subtitle frame information to be stored in during subtitle lines up.
Optionally, as shown in Figure 10, it is described by the target subtitle frame information be stored in subtitle line up in after, to storage When the target subtitle frame information in subtitle is lined up executes display, described device further includes the first display module 608, described First display module 608 is used for the display of target caption frame;
Include: in first display module 608
Reading unit 6081, for read be stored in subtitle line up in the target subtitle frame information;
First acquisition unit 6082, for obtaining the target subtitle frame information according to the target subtitle frame information Presentation Time Stamp;
Second acquisition unit 6083, for obtaining the target subtitle frame information pair according to the target subtitle frame information Answer the Presentation Time Stamp of video;
Matching unit 6084, for by the display time of the Presentation Time Stamp of the target subtitle frame information and the video Stamp is matched;
Execution unit 6085, if for the Presentation Time Stamp of the target subtitle frame information and the display time of the video Stamp matching, then execute display for the target subtitle frame information.
The third aspect, the embodiment of the present invention provide a kind of electronic equipment, comprising: memory, processor and are stored in described On memory and the computer program that can run on the processor, the processor are realized when executing the computer program Step in method for processing caption provided in an embodiment of the present invention.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, the computer-readable storage medium Computer program is stored in matter, the computer program is realized when being executed by processor at subtitle provided in an embodiment of the present invention Step in reason method.
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, and it cannot be said that A specific embodiment of the invention is only limited to these instructions.General technical staff of the technical field of the invention is come It says, without departing from the inventive concept of the premise, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to this hair Bright protection scope.

Claims (10)

1. a kind of method for processing caption, processing of the method for subtitle in digital cable broadcast standard television system platform, The standard platform is embedded with SCTE-27 subtitle and parallel standard caption resolver, which is characterized in that the method packet It includes:
Caption information is obtained, the caption information includes subtitle type information;
The subtitle type information is carried out by the preconfigured description sub- parsing module for judging target word curtain-like type Judgement, judges whether corresponding subtitle type is target subtitle in the subtitle type information, wherein the target subtitle is SCTE-27 subtitle;
If corresponding subtitle type is target subtitle in the subtitle type information, chooses and correspond to the target subtitle SCTE-27 caption parser parses the target subtitle;
The target subtitle frame information for display is obtained according to parsing result.
2. the method as described in claim 1, which is characterized in that the method also includes:
If corresponding subtitle type is standard caption in the subtitle type information, the mark for corresponding to the standard caption is chosen Quasi- caption parser parses the standard caption;
The standard caption frame information for display is obtained according to parsing result;
It is described the standard caption frame information for display is obtained according to parsing result after, further includes:
It executes and shows the standard caption frame information.
3. method according to claim 2, which is characterized in that be provided with subtitle in advance in the SCTE-27 caption parser Data format and simple bitmap format, the SCTE-27 caption parser for corresponding to the target subtitle of choosing is to described When target subtitle is parsed, comprising:
The target subtitle is parsed according to the caption data format, the structure for indicating target caption frame is obtained and believes Breath;And
The target subtitle is parsed according to the simple bitmap format, the description for indicating target caption frame is obtained and believes It ceases, background mode information, font color information and the hatching effect letter of target caption frame is included at least in the description information Breath.
4. method as claimed in claim 3, which is characterized in that be provided in advance in the SCTE-27 caption parser simple Bits compression coding, described choose carry out the target subtitle corresponding to the SCTE-27 caption parser of the target subtitle When parsing, further includes:
It is unziped it according to transmission data of the simple bitmap compressed encoding to the bitmap pixels information of the target subtitle Processing obtains the bitmap pixels information for being used for displaying target caption frame.
5. method as claimed in claim 4, which is characterized in that when the target subtitle frame information obtained for display, packet It includes:
According to the structural information, description information and the bitmap pixels information, the target subtitle frame information is obtained;
After the acquisition target subtitle frame information, further includes:
The target subtitle frame information is stored in during subtitle lines up.
6. method as claimed in claim 5, which is characterized in that described the target subtitle frame information is stored in subtitle to line up In after, when executing display to the target subtitle frame information that stores in subtitle is lined up, comprising:
Read be stored in subtitle line up in the target subtitle frame information;
According to the target subtitle frame information, the Presentation Time Stamp of the target subtitle frame information is obtained;And according to the mesh Marking-up curtain frame information obtains the Presentation Time Stamp that the target subtitle frame information corresponds to video;
The Presentation Time Stamp of the target subtitle frame information is matched with the Presentation Time Stamp of the video;
After the Presentation Time Stamp by the target subtitle frame information is matched with the Presentation Time Stamp of the video, also Include:
If the Presentation Time Stamp of the target subtitle frame information is matched with the Presentation Time Stamp of the video, by the target word Curtain frame information executes display.
7. a kind of captions process device, which is characterized in that described device includes:
Module is obtained, for obtaining caption information, the caption information includes subtitle type information;
Judgment module, for by preconfigured for judging the sub- parsing module of description of target word curtain-like type to the subtitle Type information is judged judge whether corresponding subtitle type is target subtitle in the subtitle type information, wherein described Target subtitle is SCTE-27 subtitle;
First parsing module chooses correspondence if being target subtitle for corresponding subtitle type in the subtitle type information The target subtitle is parsed in the SCTE-27 caption parser of the target subtitle;
First execution module, for obtaining the target subtitle frame information for display according to parsing result.
8. device as claimed in claim 7, which is characterized in that described device further include:
Second parsing module chooses correspondence if being standard caption for corresponding subtitle type in the subtitle type information The standard caption is parsed in the standard caption resolver of the standard caption;
Second execution module, for obtaining the standard caption frame information for display according to parsing result;
Second display module shows the standard caption frame information for executing.
9. a kind of electronic equipment characterized by comprising memory, processor and be stored on the memory and can be in institute The computer program run on processor is stated, the processor is realized when executing the computer program as in claim 1 to 6 Step in described in any item method for processing caption.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes such as method for processing caption described in any one of claims 1 to 6 when the computer program is executed by processor In step.
CN201910014655.7A 2019-01-08 2019-01-08 A kind of method for processing caption, device and electronic equipment Pending CN109819343A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910014655.7A CN109819343A (en) 2019-01-08 2019-01-08 A kind of method for processing caption, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910014655.7A CN109819343A (en) 2019-01-08 2019-01-08 A kind of method for processing caption, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN109819343A true CN109819343A (en) 2019-05-28

Family

ID=66604139

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910014655.7A Pending CN109819343A (en) 2019-01-08 2019-01-08 A kind of method for processing caption, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN109819343A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438514A (en) * 2021-04-26 2021-09-24 深圳Tcl新技术有限公司 Subtitle processing method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1599436A (en) * 2003-09-17 2005-03-23 Lg电子株式会社 Digital broadcast receiver and method for processing captionthereof
CN1846436A (en) * 2003-09-05 2006-10-11 汤姆森许可贸易公司 Auxiliary information processing system
CN1890967A (en) * 2003-12-08 2007-01-03 汤姆逊许可公司 Digital/analog closed caption display system in a television signal receiver
US20090249392A1 (en) * 2008-03-28 2009-10-01 Lg Electronics Inc. Digital broadcast receiver and method for processing caption thereof
US20110122314A1 (en) * 2009-11-24 2011-05-26 General Instrument Corporation System for generating closed captioning compatible with legacy and newer set-top boxes
CN103269447A (en) * 2013-04-22 2013-08-28 深圳市视维科技有限公司 Method for achieving multi-national languages on set top boxes
CN107005733A (en) * 2014-12-19 2017-08-01 索尼公司 Dispensing device, sending method, reception device and method of reseptance
CN107736032A (en) * 2015-06-30 2018-02-23 索尼公司 Reception device, method of reseptance, transmitting device and transmission method
CN109151609A (en) * 2018-09-25 2019-01-04 青岛海信电器股份有限公司 A kind of the subtitle methods of exhibiting and its device of compatible different platform

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1846436A (en) * 2003-09-05 2006-10-11 汤姆森许可贸易公司 Auxiliary information processing system
CN1599436A (en) * 2003-09-17 2005-03-23 Lg电子株式会社 Digital broadcast receiver and method for processing captionthereof
CN101860699A (en) * 2003-09-17 2010-10-13 Lg电子株式会社 Digital broadcasting transmitter and method for processing caption thereof
CN101867748A (en) * 2003-09-17 2010-10-20 Lg电子株式会社 Digital broadcasting transmitter and method for processing caption thereof
CN1890967A (en) * 2003-12-08 2007-01-03 汤姆逊许可公司 Digital/analog closed caption display system in a television signal receiver
US20090249392A1 (en) * 2008-03-28 2009-10-01 Lg Electronics Inc. Digital broadcast receiver and method for processing caption thereof
US20110122314A1 (en) * 2009-11-24 2011-05-26 General Instrument Corporation System for generating closed captioning compatible with legacy and newer set-top boxes
CN103269447A (en) * 2013-04-22 2013-08-28 深圳市视维科技有限公司 Method for achieving multi-national languages on set top boxes
CN107005733A (en) * 2014-12-19 2017-08-01 索尼公司 Dispensing device, sending method, reception device and method of reseptance
CN107736032A (en) * 2015-06-30 2018-02-23 索尼公司 Reception device, method of reseptance, transmitting device and transmission method
CN109151609A (en) * 2018-09-25 2019-01-04 青岛海信电器股份有限公司 A kind of the subtitle methods of exhibiting and its device of compatible different platform

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113438514A (en) * 2021-04-26 2021-09-24 深圳Tcl新技术有限公司 Subtitle processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN102026017B (en) Efficient test method for video decoding
US10511803B2 (en) Video signal transmission method and device
US10965904B2 (en) Display method and display device, television and storage medium
US8184127B2 (en) Apparatus for and method of generating graphic data, and information recording medium
US7554563B2 (en) Video display control apparatus and video display control method
CN1413028A (en) Interactive video equipment and its caption superposition method
CN106791865A (en) The method of the self adaptation form conversion based on high dynamic range video
CN103618869B (en) Many picture video joining methods and device
CN110784730A (en) Live video data transmission method, device, equipment and storage medium
CN106454256B (en) A kind of real-time joining method of more videos and device
CN106804011A (en) The method and system of loading caption file during a kind of broadcasting video
US8139079B2 (en) Color gamut component analysis apparatus, method of analyzing color gamut component, and color gamut component analysis program
CN107852517A (en) Transmitting device, transmission method, reception device and method of reseptance
CN106899878A (en) A kind of adjustable video and graph compound method and system of transparency based on OMAP chips
CN106027886A (en) Method and system for implementing synchronous frames of panoramic video
CN112788329A (en) Video static frame detection method and device, television and storage medium
CN103414936B (en) Caption presentation method and device
CN109819343A (en) A kind of method for processing caption, device and electronic equipment
KR100434380B1 (en) Conversion system of color space of osd and the method
US9842572B2 (en) Methods and apparatus for displaying video including variable frame rates
CN108965983A (en) It can closed caption data analytic method, smart television, storage medium and device
CN115063800A (en) Text recognition method and electronic equipment
CN112165631B (en) Media resource processing method and device, storage medium and electronic equipment
CN108769768B (en) DVB subtitle synchronization method and system
CN108134938A (en) Videoscanning mode detects, correcting method and video broadcasting method and device

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190528