home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Area 51 - Testing Area
Rework TV Graphbuilding CC/Post Process
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="fir3ma5t3r" data-source="post: 842844" data-attributes="member: 60053"><p>I was told Mythtv has eia-708 Closed Caption working and that's where CCExtractor guy got his initial code from. </p><p></p><p>Here's the code </p><p><a href="http://code.mythtv.org/doxygen/cc708decoder_8cpp_source.html" target="_blank">MythTV: cc708decoder.cpp Source File</a></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p>--------------------------------------------------------------------------------------------------------------------------------------</p><p>Message from Zodiak:</p><p></p><p>I just wrote a very long PM to some tester, that I thought might be beneficial for the whole community... </p><p></p><p>Closed captioning is a data stream normally encoded in the analogue NTSC video signal (the notorious line 21). Again, it is part of the analogue picture, just not in the part of the screen, that's normally visible. Every field (half frame) carries 2 bytes of data. Although it may seem simple, the internal stucture of the resulting stream is quite complex. It may contain multiple channels of various kinds of data. It's not a trivial task even to extract CC text for a primary CC1, let alone take into account all the visual effects (e.g., color, text placement or special charcters). This is all part of a standard, that is publically available for a fee. Most modern tv sets just use a specialized microchip that can detect such data in the NTSC signal and use it to [optionaly] render CC, that is then mixed by the video hardware with actual picture. </p><p></p><p>In the digital video world it's a bit different. Although line 21 is just another video scanline, you cannot use standard MPEG2 encoding because it is lossy and will destroy the fine structure the tv needs to extract the 2 bytes from the analogue waveform. That's why the 2 bytes per field have to be carried via different means. In fact they are still carried in the video MPEG stream, although not in the video bits themselves but in so called user_data, that most video decoders usually ignore. </p><p></p><p>What cccp does is that it detects presence of such user_data in the video stream and extracts the byte pairs that are then fed to the Line 21 Decoder filter. The latter one analyzes the 2-byte stream and renders visual representation of the currently selected CC channel, which in turn is mixed with the actual picture (decoded in parallel by you favourite MPEG decoder) by either Overlay Mixer or VMR9. The resulting mixed video picture is then displayed on the monitor. This is how it normally works on computer. </p><p></p><p>Note that even if the videocard has a tvout it's still little different from what you can see on the monitor-- the CCs you see (pardon the pun) are part of the _visible_ tv picture, conveyed to the tv set via NTCS signal. The latter usually contains no data in the line 21. </p><p></p><p>What makes NS2K card unique is that it's smart enough to detect user_data in the MPEG video strem it renders, so it takes the 2 CC bytes and injects them into the line 21 of the NTSC signal it generates for the tv. The tv is then capable of using it as discussed above. </p><p></p><p>Now, what is "Convert to A53"? The thing is that there are several ways to encode CC in the user_data and the NS2K is capable of handling only one such format, particuarly the one specified in the ATSC A53 standard. Even if there is user_data carrying valid CC in the stream but in different format, the NS2K cannot interpret it and thus ignores it, leaving the line 21 empty. That's exactly why you cannot see CC on most channels if you feed the stream straight to the NS2K filter in the graph. If you inclide the cccp, however, and enable the abovementioned option, the cccp will convert all CC formats it's aware of (to be honest, there is only one so far ) to the A53, which makes NS2K feel good again. </p><p></p><p>Of course if you don't use Line 21 decoder and any video mixer in such graph, you will not see the CC's on the computer. There's nothing there that can render and display them-- all CC rendering and mixing is done in the TV set (NOT in the NS2K).</p><p></p><p></p><p>Last edited by zodiak on Thu Nov 11, 2004 1:45 pm, edited 1 time in total.</p></blockquote><p></p>
[QUOTE="fir3ma5t3r, post: 842844, member: 60053"] I was told Mythtv has eia-708 Closed Caption working and that's where CCExtractor guy got his initial code from. Here's the code [url=http://code.mythtv.org/doxygen/cc708decoder_8cpp_source.html]MythTV: cc708decoder.cpp Source File[/url] -------------------------------------------------------------------------------------------------------------------------------------- Message from Zodiak: I just wrote a very long PM to some tester, that I thought might be beneficial for the whole community... Closed captioning is a data stream normally encoded in the analogue NTSC video signal (the notorious line 21). Again, it is part of the analogue picture, just not in the part of the screen, that's normally visible. Every field (half frame) carries 2 bytes of data. Although it may seem simple, the internal stucture of the resulting stream is quite complex. It may contain multiple channels of various kinds of data. It's not a trivial task even to extract CC text for a primary CC1, let alone take into account all the visual effects (e.g., color, text placement or special charcters). This is all part of a standard, that is publically available for a fee. Most modern tv sets just use a specialized microchip that can detect such data in the NTSC signal and use it to [optionaly] render CC, that is then mixed by the video hardware with actual picture. In the digital video world it's a bit different. Although line 21 is just another video scanline, you cannot use standard MPEG2 encoding because it is lossy and will destroy the fine structure the tv needs to extract the 2 bytes from the analogue waveform. That's why the 2 bytes per field have to be carried via different means. In fact they are still carried in the video MPEG stream, although not in the video bits themselves but in so called user_data, that most video decoders usually ignore. What cccp does is that it detects presence of such user_data in the video stream and extracts the byte pairs that are then fed to the Line 21 Decoder filter. The latter one analyzes the 2-byte stream and renders visual representation of the currently selected CC channel, which in turn is mixed with the actual picture (decoded in parallel by you favourite MPEG decoder) by either Overlay Mixer or VMR9. The resulting mixed video picture is then displayed on the monitor. This is how it normally works on computer. Note that even if the videocard has a tvout it's still little different from what you can see on the monitor-- the CCs you see (pardon the pun) are part of the _visible_ tv picture, conveyed to the tv set via NTCS signal. The latter usually contains no data in the line 21. What makes NS2K card unique is that it's smart enough to detect user_data in the MPEG video strem it renders, so it takes the 2 CC bytes and injects them into the line 21 of the NTSC signal it generates for the tv. The tv is then capable of using it as discussed above. Now, what is "Convert to A53"? The thing is that there are several ways to encode CC in the user_data and the NS2K is capable of handling only one such format, particuarly the one specified in the ATSC A53 standard. Even if there is user_data carrying valid CC in the stream but in different format, the NS2K cannot interpret it and thus ignores it, leaving the line 21 empty. That's exactly why you cannot see CC on most channels if you feed the stream straight to the NS2K filter in the graph. If you inclide the cccp, however, and enable the abovementioned option, the cccp will convert all CC formats it's aware of (to be honest, there is only one so far ) to the A53, which makes NS2K feel good again. Of course if you don't use Line 21 decoder and any video mixer in such graph, you will not see the CC's on the computer. There's nothing there that can render and display them-- all CC rendering and mixing is done in the TV set (NOT in the NS2K). Last edited by zodiak on Thu Nov 11, 2004 1:45 pm, edited 1 time in total. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Area 51 - Testing Area
Rework TV Graphbuilding CC/Post Process
Contact us
RSS
Top
Bottom