[MEncoder-users] ATSC closed captioning
David Liontooth
lionteeth at cogweb.net
Mon Nov 8 05:27:22 CET 2010
Thanks!
On 11/07/2010 01:16 PM, Reimar Döffinger wrote:
> On Sun, Nov 07, 2010 at 11:24:38AM -0800, Scott W. Larson wrote:
>> The biggest problem is that the caption data arrives with the frames
>> associated with the captions. That means they'll be out of order as they
>> arrive so you have to put them back in order. My code stored them in a
>> linked list in pts order and sent them to the existing EIA-608 caption
>> code when the frames were displayed.
Hi Scott, I'm happy to see you're here still. Functionality that is not
quite perfect would surely be better than nothing?
> In the long-term it would probably be best if libavcodec could extract
> the user data and return it in an AVFrame along with the decoded image.
As part of the image? Or separately, so that it could optionally be
redirected to a separate file? I'm thinking of the case where file is
recorded, and someone later wants no captions, or a different language,
or wants to transcode first. Having the option to create a text file
would be great; mplayer of course supports .srt.
Anyway, I'm having no luck with this:
mencoder -cache 2048 dvb://CBS-HD -ovc copy -oac copy -o "$(date
+%F_%H%M)-CBS-HD-men-cc.mpeg" -subcc -endpos 15
MPlayer SVN-r31918
TS file format detected.
VIDEO MPEG2(pid=49) AUDIO A52(pid=52) NO SUBS (yet)! PROGRAM N. 0
VIDEO: MPEG2 1920x1080 (aspect 3) 29.970 fps 16578.0 kbps (2072.2
kbyte/s)
[V] filefmt:29 fourcc:0x10000002 size:1920x1080 fps:29.970 ftime:=0.0334
Is this supposed to work? Or only when watching live? I'm currently
running remotely, but am happy to test.
zvbi-atsc-cc does a good job extracting ATSC closed captions, though
there appears to be a bug writing them to file. And of course it ties up
the device, so you can't record the video.
Dave
>> Unfortunately I found some bugs in the existing caption code and had to
>> make some improvements. Since I don't have any other EIA-608 test cases,
>> I had no idea if I was breaking things. The code was really old but for
>> all I know it had been working perfectly for earlier caption systems.
> Yes, it worked really badly for me, and as said I couldn't really
> find a way to reconcile it with any specs or anything I could find.
>
>> Also back in 2005, if you submitted code here that had a superfluous
>> cast or needlessly initialized a variable, you were publicly declared an
>> idiot even if everything worked. I already know I'm an idiot, thank you
>> very much!
> I don't know what exactly was going on, however review comments really
> shouldn't be taken personally, there are very few people reviewing code
> and they get to see the same "mistakes" over and over get tired of
> explaining everything, so it can easily sound worse than it was meant...
>
>> I still have the old patch if anyone wants to do anything with it. It
>> has lots of comments.
> I suspect the reordering code etc. is likely to not be in a way
> I'd like to have for maintainabilty reasons, however the bugfixes
> would be interesting, should make it easier for me to figure out
> which parts of the code I just don't get vs. where the code is broken.
>
>>> Unfortunately I haven't been able to match any specification
>>> up with the data that is actually in those streams, and I
>>> have neither enough samples nor do I care enough to reverse-engineer
>>> the format.
>> No need to reverse engineer. All ATSC specs are published and
>> well-documented, either in the documents at atsc.org or on wikipedia.
>> Even I was able to figure out how to display the EIA-608 data.
> Well, the part how you find the EIA-608 part was rather unclear to me.
> I think I figured it out now though.
>
>> The
>> CEA-708 captions would require serious graphic support since it can
>> create text windows, change font colors, and draw captions aligned with
>> nine different screen locations.
> I doubt much of that is really necessary for something that works for
> most people.
> However already just reassembling the packets across frames sounds
> like a pain, particularly within the current code.
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
More information about the MEncoder-users
mailing list