<br><br><div class="gmail_quote">On Jan 8, 2008 10:01 AM, David I. Lehn &lt;<a href="mailto:dlehn@vt.edu">dlehn@vt.edu</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
* Stefan Kost &lt;<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de</a>&gt; [2008-01-08T04:10:44-0500]:<br><div class="Ih2E3d">&gt; Quoting Stefan Kost &lt;<a href="mailto:ensonic@hora-obscura.de">ensonic@hora-obscura.de
</a>&gt;:<br></div><div class="Ih2E3d">&gt; &gt; Quoting Bryen Yunashko &lt;<a href="mailto:byunashko@gmail.com">byunashko@gmail.com</a>&gt;:<br>&gt; &gt;<br>&gt; &gt;&gt; Can anyone send me information on whether gstreamer supports
<br>&gt; &gt;&gt; closed-captioning with gstreamer? &nbsp;Particularly, I&#39;m trying to find it in<br>&gt; &gt;&gt; Totem.<br>&gt; &gt; Could you elaborate a bit what that is? Is it reading out subtitles?<br>&gt; &gt; Any pointers? I want to prepare a list of taks for the next google
<br>&gt; &gt; summer-of-code application. This could be a potential subproject.<br>&gt;<br>&gt; Replying to myself:<br>&gt; <a href="http://en.wikipedia.org/wiki/Closed_captioning" target="_blank">http://en.wikipedia.org/wiki/Closed_captioning
</a><br>&gt;<br>&gt; Bryen, do you have any info about how this differs from subtitles? Do<br>&gt; you have some sample content that has closed captioning tracks that<br>&gt; you could give to the gstreamer developers?<br>
&gt;<br><br></div>When I was active here back in the day (years ago) I was playing with CC<br>code in GStreamer. &nbsp;I think some of my code may have been lost to time<br>though.<br><br>At one point I had GStreamer decoding the CC data from DVDs. &nbsp;It wasn&#39;t
<br>doing full positional on-screen rendering but just dumping the raw text<br>to the console. &nbsp;At the time I was quite thrilled to get that far but<br>moved on to other projects.<br><br>To get it working I made a specific Bin source on the mpeg demuxer (I
<br>think?) to output the &quot;user_data&quot; packets. &nbsp;On a DVD that is how they<br>store the VBI data. &nbsp;I then stole the VBI code from the very excellent<br>tvtime project to do the hard work. &nbsp;I think it&#39;s still in the &quot;bad&quot;
<br>plugins repo in the vbidec plugin. &nbsp;Then you just route the user_data to<br>vbidec and the output of vbidec to a console. &nbsp;(Or close to that...<br>might have been stripping off control codes to just print the text.) &nbsp;It
<br>worked just fine but was mostly just a testing hack for GStreamer, DVD<br>code, Python bindings, and other stuff... all at once. &nbsp;Would be easier<br>today.<br><br>To make this code useful there&#39;s lots of work to be done.
<br><br>- Update vbidec to latest plugin standards and APIs. &nbsp;I&#39;m sure it&#39;s<br> &nbsp;quite bitrotten by now.<br>- Look at status of the &quot;user_data&quot; mpeg fields. &nbsp;I have no idea what it<br> &nbsp;is these days. &nbsp;I think it was ripped out at some point due to the
<br> &nbsp;core not being able to handle multiple bin sources at once properly or<br> &nbsp;something. &nbsp;Might be easier today or already done. &nbsp;This is the<br> &nbsp;easiest way to test CC data. &nbsp;It&#39;s a correct VBI bitstream on any DVD
<br> &nbsp;with CC data. &nbsp;Live video signals would work too but might have errors<br> &nbsp;in the VBI data. &nbsp;Though it&#39;s supposed to handle some level of errors.<br>- Try pushing V4L streams through vbidec. &nbsp;I don&#39;t recall if I ever
<br> &nbsp;tried this. &nbsp;I also can&#39;t remember if you have to strip out the VBI<br> &nbsp;info or if the vbidec code can find that for you.<br>- Take the decoded VBI info and do something more useful with it. &nbsp;There<br> &nbsp;is data in there for display timing, colors, symbols, fonts,
<br> &nbsp;positional info... etc etc. &nbsp;TVTime also supported other type of info.<br> &nbsp;For instance the tv channel/program info (XDS) and the menu system<br> &nbsp;more popular in .eu than .us.<br>- Create something to render the CC data. &nbsp;(Re-use subtitle related
<br> &nbsp;work)<br>- Create something to composite that rendered data stream on top of a<br> &nbsp;video stream properly. &nbsp;(Re-use subtitle related work)<br>- Hook it all up, integrate into DVD and V4L apps and add some controls.<br>
- Check with the <a href="http://tvtime.sourceforge.net" target="_blank">tvtime.sourceforge.net</a> project to see if they have any<br> &nbsp;newer code. &nbsp;Also you might need to rip more code to support more than<br> &nbsp;just CC data. &nbsp;TVTime would be _excellent_ reference code for the
<br> &nbsp;non-GStreamer-specific parts of this task.<br><br>There may be an issue with the vbidec code being in GStreamer at all.<br>It comes from a GPL project. &nbsp;I&#39;m not sure what the licensing issues are<br>these days with that. &nbsp;Might need to convert bits of tvtime into an
<br>external library and keep GStreamer specific parts in gst plugins.<br><br>This would all make an interesting and useful project. &nbsp;With example<br>code like TVTime out there it&#39;s probably not extremely hard either.
<br><br>I had always tried to convince vektor (Billy Biggs) from tvtime fame to<br>just use GStreamer as a base for tvtime but that never happened. &nbsp;They<br>were focused on making the most elite tv app ever and succeeded. &nbsp;Might
<br>be possible at this point to port over pieces of it beyond just the CC<br>related parts. &nbsp;There are some issues with GStreamers frame based<br>algorithms (I assume it&#39;s still like that?) and tvtimes scan-line<br>algorithms. &nbsp;Fun stuff. &nbsp;Good luck.
<br><br>-dave<br><div><div></div><div class="Wj3C7c"><br>-------------------------------------------------------------------------<br></div></div></blockquote></div>Well, Dave certainly gave lots of additional information.&nbsp; :-)&nbsp; Do you need anything additional from me?&nbsp;&nbsp; 
<br><br>I do want to make one thing clear.&nbsp; subtitling and CC are not the same.&nbsp; CC uses a black block background, which myself and many in the US prefer because subtitling uses white font colors which can blend into the media if there&#39;s white or light colors behind it, making the subtitling completely useless for the moment.
<br><br>Also, in the US, all broadcast programming is required under the FCC to broadcast in CC, and all televisions sold in the US are required to have the built-in CC chip.&nbsp; This has been so since the early 90&#39;s.<br>
<br>DVDs come distributed with either CC capabilities, subtitling capabilities, or both.&nbsp; Whenever we have a choice, we typically choose CC.<br><br>I did find a reference on this page that claims gstreamer has built in CC support:
<br><a href="http://www.linuxtv.org/v4lwiki/index.php/Text_capture">http://www.linuxtv.org/v4lwiki/index.php/Text_capture</a>.<br><br>Bryen<br>