CN100591140C - Method for displaying subtitling in video - Google Patents
Method for displaying subtitling in video Download PDFInfo
- Publication number
- CN100591140C CN100591140C CN 200610076558 CN200610076558A CN100591140C CN 100591140 C CN100591140 C CN 100591140C CN 200610076558 CN200610076558 CN 200610076558 CN 200610076558 A CN200610076558 A CN 200610076558A CN 100591140 C CN100591140 C CN 100591140C
- Authority
- CN
- China
- Prior art keywords
- video data
- video
- data
- caption
- parameter
- 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.)
- Expired - Fee Related
Links
Landscapes
- Television Systems (AREA)
Abstract
The invention relates to a method of displaying caption in video that comprises: step 1, the first video dada in PS format is pretreated to generate the second video data in PS format; step 2, decoding the second video data to generate the third video data in ES format, and parameters of the second video data; step 3, the third video data and the first caption in ES format are multiplexed to generate the forth video data in ES format. The first caption data in ES format coded by the second caption data in word format based on parameter of said second video data is between Step 2 and step 3. The fifth video data which is packaged to TS format by the forth video data in ES format is included after step 3. So the invention does not decode video data in PS format, but also packages analysis and codes multiplexed data to realize the displaying caption in video conveniently.
Description
Technical field
The present invention relates to a kind of method that shows captions in video, especially a kind of in digital video broadcasting (Digital Video Broadcasting is called for short DVB) system, video shows the method for captions.
Background technology
Real-time multiplexing captions in TS (Transport Stream transmits stream) stream, promptly finding shows captions in video usually, as intercutting that real time new is heard, implementation method is much as follows usually:
At first the TS stream to input carries out real-time decoding, and output is based on the yuv data of frame; Simultaneously the captions of real-time insertion are finished type matrix according to the coding of character and extract, handle as required with the yuv data that needs to replace in caption data and the TS stream then, finish multiplexingly, and then, export TS and flow these data recompiles.This method is very loaded down with trivial details, and time cost and Financial cost are all very high.
In present DVB system, realize that the method for real-time multiplexing captions in the TS stream also has:
Utilize DVB-SUB EN 300 743 standards: the realization of this standard is as type attribute a kind of and a kind of program like video, the audio class with captions, in TS stream, for captions distribute a type label, distribute a PID who is different from video, audio frequency for caption stream simultaneously.After receiver (for example set-top box) is received TS stream, if this set-top box is supported DVB-SUB EN 300 743 standards, so it correctly the type of identification caption from the pairing PID of this captions type, extract caption data simultaneously, show then.But for the receiving equipment of not supporting DVB-SUB EN 300 743 standards, captions also can't correctly show.
Utilize the sky bag among the TS to carry out the caption data transmission:, in TS stream, can insert a lot of empty bags usually in order to satisfy certain bit rate (bit rate).So-called empty bag, promptly PID is the TS bag of 0X1FFF, its entrained data only is that conduct is filled and without any practical significance, therefore can be replaced.Therefore, when finding to be the empty bag of TS,, and then send just with the padding data in the empty bag of caption data replacement TS.This method is simple relatively, and to the consumption minimum of resource, but there are two shortcomings in this method: the firstth, and this method also seriously relies on receiving system and because this method is non-target, so receiving equipment must customize; The secondth, if the sky bag deficiency that exists in the TS stream, the caption data that then carries might be incomplete or off and on.
Summary of the invention
The objective of the invention is the defective that shows the method for captions at existing in video, a kind of method that shows captions in video is provided, can be convenient and simple be implemented in shows captions in the video.
For achieving the above object, the invention provides a kind of method that in video, shows captions, comprise the steps:
Step 1 is carried out preliminary treatment to first video data of PS form, generates second video data of PS form;
Step 2, this second video data of decoding generates the 3rd video data of ES form, and obtains the parameter of this second video data;
Step 3 is carried out first caption data of the 3rd video data and ES form according to this parameter multiplexingly, generates the 4th video data of ES form.
The step 1 of technique scheme is specially: step 11, with first video data decoding of PS form; Step 12 to decoded first video data encoding, changes the macro block in P frame and nethermost three sticks of B two field picture into intraframe coding, generates second video data of PS form.In the described step 2, the 3rd video data that this second video data of decoding generates the ES form is specially: this second video data of decoding generates the video data of PES form, generates the 3rd video data of ES form then according to the video data of this PES form; The parameter that obtains this second video data is specially: the size that obtains height, width, progressive-sequence parameter and the image sets of this second video data.
And also comprise step between described step 2 and the step 3: with second subtitle data encoding of text formatting is first caption data of ES form.Described step 3 is specially: step 31, the 3rd video data and first caption data are alignd according to image sets; Step 42 is replaced the piece of the 3rd video data correspondence position with nethermost three sticks of every two field picture in first caption data, these packing data is generated the 4th video data of ES form.Also comprise after the described step 3: the 5th video data that the 4th video data of ES form is packaged as the TS form.
Therefore, the present invention shows captions in video method replaces nethermost of the image in the video data with caption data, therefore realized showing in video captions very easily.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Description of drawings
Fig. 1 shows the flow chart of embodiment of the method for captions in video for the present invention.
Embodiment
The present invention utilizes nethermost of image in nethermost (Slice) substitution video of caption data data to be implemented in to show captions in the video.
Detailed step is as follows:
Step 1 is carried out preliminary treatment to first video data of PS (Program Stream, program flow) form, generates second video data of PS form;
Step 2 is resolved the 3rd video data that this second video data generates ES (Elementary Stream, video-frequency basic flow, the i.e. coded data directly exported of encoder) form, and obtains the parameter of this second video data;
Step 3 is carried out first caption data of the 3rd video data and ES form according to this parameter multiplexingly, generates the 4th video data of ES form.
As shown in Figure 1, show the flow chart of embodiment of the method for captions for the present invention in video, detailed step is as follows:
Step 101 is with first video data decoding of PS form;
Step 102 to decoded first video data encoding, changes the macro block in P frame and nethermost three sticks of B two field picture into intraframe coding, generates second video data of PS form.
Step 103, resolve the video data of this second video data generation PES form, generate the 3rd video data of ES form then according to the video data of this PES form, obtain the size of height, width, progressive-sequence parameter and the GOP (Group Of Picture, image sets) of this video data;
If this value of progressive-sequence parameter is set to " 1 ", Bian Ma video sequence only contains frame figure line by line so; If this value is set to " 0 ", then Bian Ma video sequence can comprise frame figure and field pattern simultaneously, and frame figure can be a frame line by line or interlacing;
Step 104: is first caption data of ES form according to the parameter of above-mentioned second video data with second subtitle data encoding of text formatting;
Step 105 is alignd the 3rd video data and first caption data according to above-mentioned GOP;
Step 106 is replaced the piece of the 3rd video data correspondence position with nethermost three sticks of every two field picture in first caption data, these packing data is generated the 4th video data of ES form;
When carrying out the replacement of Slice data, for the data after guaranteeing to replace can operate as normal when the decoding, therefore when realizing the coding of caption information from second caption data of text formatting to ES form first caption data, some coding parameters must satisfy following condition:
The height of first caption data that generates, width must be identical with height, the width of input the 3rd video data;
The value of the progressive-sequence parameter of first caption data that generates must be identical with the 3rd video data of input;
The GOP size of first caption data that generates must be identical with the 3rd video data of input;
Step 107 is packaged as the 4th video data of ES form the 5th video data of TS form.
Carrying out the Slice data when replacing, the slice that can occur being replaced might be in different bags, and the middle bag that other type might be arranged, for example audio pack; After the replacement, if run into the s1ice that strides bag, then all data being placed on first wraps, the length adjustment of last bag is the length (having wrapped because the data of this slice have moved on to first) that raw footage deducts the slice that carries, middle Bao Ze is made as 0 with its load length, but reservation packet header is because there is PTs (Presentation timestamp, predetermined demonstration time) the inside.
Replace the back in order to guarantee audio-visual synchronization, allow anything but to change Bao Xu, also do not allow to increase or the deletion bag.
The present invention does not decode to the video data of PS form and only is that this video data is wrapped analysis, nor the data after multiplexing are encoded once more.Therefore captions have been realized in video, showing very easily.Therefore compare with traditional film titler implementation method, the present invention can move on to most computing load on the preprocessing server, thereby has greatly reduced the computing pressure to the front end system server.And do not rely on set-top box, easy care, easily expansion.
It should be noted last that, above embodiment is only unrestricted in order to technical scheme of the present invention to be described, although the present invention is had been described in detail with reference to preferred embodiment, those of ordinary skill in the art is to be understood that, can make amendment or be equal to replacement technical scheme of the present invention, and not break away from the spirit and scope of technical solution of the present invention.
Claims (5)
1, a kind of method that in video, shows captions, comprising following steps:
Step 1, first video data to the PS form carries out preliminary treatment, generate second video data of PS form, wherein said step 1 is specially: step 11, with first video data decoding of PS form, step 12 is to decoded first video data encoding, change the macro block in P frame and nethermost three sticks of B two field picture into intraframe coding, generate second video data of PS form;
Step 2, this second video data of decoding generates the 3rd video data of ES form, and obtains the parameter of this second video data;
Step 3, carry out first caption data of the 3rd video data and ES form multiplexing according to this parameter, generate the 4th video data of ES form, wherein said step 3 is specially: step 31, the 3rd video data and first caption data are alignd according to image sets, step 32 is replaced the piece of the 3rd video data correspondence position with nethermost three sticks of every two field picture in first caption data, these packing data is generated the 4th video data of ES form.
2, the method that in video, shows captions according to claim 1, in the wherein said step 2, the 3rd video data that this second video data generates the ES form of decoding is specially: this second video data of decoding generates the video data of PES form, generates the 3rd video data of ES form then according to the video data of this PES form.
3, the method that in video, shows captions according to claim 1, in the wherein said step 2, the parameter that obtains this second video data is specially: the size that obtains height, width, progressive_sequence parameter and the image sets of this second video data.
4, the method that shows captions in video according to claim 3 also comprises step between wherein said step 2 and the step 3: is first caption data of ES form according to the parameter of above-mentioned second video data with second subtitle data encoding of text formatting.
5, the method that shows captions in video according to claim 1 also comprises after the wherein said step 3: the 5th video data that the 4th video data of ES form is packaged as the TS form.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200610076558 CN100591140C (en) | 2006-04-30 | 2006-04-30 | Method for displaying subtitling in video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200610076558 CN100591140C (en) | 2006-04-30 | 2006-04-30 | Method for displaying subtitling in video |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101064851A CN101064851A (en) | 2007-10-31 |
CN100591140C true CN100591140C (en) | 2010-02-17 |
Family
ID=38965511
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200610076558 Expired - Fee Related CN100591140C (en) | 2006-04-30 | 2006-04-30 | Method for displaying subtitling in video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100591140C (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104113749B (en) * | 2009-01-08 | 2016-10-26 | Lg电子株式会社 | 3D caption signal sending method and 3D caption presentation method |
CN101883270A (en) * | 2010-06-10 | 2010-11-10 | 上海海事大学 | Method for inserting related media in independent video streams |
CN103108214B (en) * | 2013-01-29 | 2015-08-12 | 辛欣 | A kind ofly the TS of carrying information is wrapped to the method identified in empty bag replacement process |
-
2006
- 2006-04-30 CN CN 200610076558 patent/CN100591140C/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN101064851A (en) | 2007-10-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2177037B1 (en) | Preserving captioning through video transcoding | |
CN100393128C (en) | Encoding device and method, decoding device and method and coding system and method | |
CN102835047B (en) | The link information about multiple vision point video stream is used to send the method and apparatus of digital broadcasting stream and the method and apparatus of receiving digital broadcast stream | |
US8886022B2 (en) | Picture interdependencies signals in context of MMCO to assist stream manipulation | |
CN102396221B (en) | Support for blocking trick mode operations | |
CN100452830C (en) | Digital video information processing device and method | |
US7555009B2 (en) | Data processing method and apparatus, and data distribution method and information processing apparatus | |
US6980731B1 (en) | Data transmitting method and data transmitter | |
CN105340277A (en) | Encoding device, encoding method, transmission device, decoding device, decoding method, and reception device | |
CN106331853B (en) | Multimedia de-encapsulation method and device | |
CN104575547A (en) | Multi-media file making method, as well as multi-media file playing method and system | |
US6834083B1 (en) | Data transmitting method and data transmitter | |
CN108353196B (en) | Transmission device, transmission method, reception device, and reception method | |
CN100591140C (en) | Method for displaying subtitling in video | |
US20140147088A1 (en) | Transmission device, receiving/playing device, transmission method, and receiving/playing method | |
CN102907107A (en) | Receiving device and output method | |
CN105163169B (en) | A kind of method and system for the data encapsulation format being suitable for transmission | |
JP6715910B2 (en) | Subtitle data processing system, processing method, and program for television programs simultaneously distributed via the Internet | |
CN115052170B (en) | Method and device for on-cloud broadcasting guide based on SEI time code information | |
CN104038816A (en) | Method and system for video synchronization | |
CN107615768A (en) | Dispensing device, sending method, reception device and method of reseptance | |
US20120269256A1 (en) | Apparatus and method for producing/regenerating contents including mpeg-2 transport streams using screen description | |
CN109743627A (en) | Playback method based on AVS+ Video coding digital movie packet | |
JP6958645B2 (en) | Transmitter, transmitter, receiver and receiver | |
JP4967402B2 (en) | Multiplexed stream conversion apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20100217 Termination date: 20130430 |