Log in Register FAQ Memberlist Search pcHDTV Forum Index
pcHDTV Forum

pcHDTV Forum Index -> General pcHDTV topics -> Question: Closed Caption? Goto page Previous  1, 2, 3, 4
Post new topic  Reply to topic View previous topic :: View next topic 
PostPosted: Wed Oct 12, 2005 10:44 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




I don't think that's the bug. If something on your system slows down the playback and mplayer drops a frame with a caption, it will lose two bytes. I think that's what's happened here.

Now the bug I'm dealing with doesn't seem to be a bug. I've hunted for the missing two bytes by printing out all the bytes they could be hiding in and they're not there. I suspect stations aren't sending them or are screwing them up.

Here's are the packets sorted by PTS of a caption from Lost last week. The caption is "I GUESS YOU WON'T BE COMING BACK"
Code:
22791.486: 0x14 0x20 <- Resume caption loading
22791.520: 0x14 0x2E <- Erase caption that's on the screen
22791.553: 0x14 0x52 <- Line 14 indent 4 columns (PAC)
22791.586: G U
22791.619: E S
22791.652: S
22791.686: Y O
22791.719: U
22791.752: W O
22791.787: 0x00 0x00 <- Mysterious packet with null bytes!
22791.820: T
22791.854: B E
22791.887: 0x14 0x20 <- Resume loading captions again
22791.920: 0x14 0x70 <- Line 15 Indent 0 columns (PAC)
22791.953: C O
22791.986: M I
22792.020: N G
22792.053:   B
22792.086: A C
22792.119: K


So the "'T" characters are nowhere to be found.

Remember that real ATSC receivers use DTVCC and the EIA-608 is for people who are hooking up NTSC TV's or VCR's to them and expecting them to do the captioning. I doubt there are a lot of of people doing that.

Maybe I can extract some basic text from the DTVCC stream to prove this.
View user's profile Send private message
PostPosted: Wed Oct 12, 2005 11:09 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




Well well well, it looks like DTVCC captions have the same problem. Here's the caption from the DTVCC packets:

Code:
22791.570: 0x92 0x00 <- Set pen location to 0
22791.586: G U
22791.619: E S
22791.652: S
22791.686: Y O
22791.719: U
22791.752: W O
22791.820: T
22791.854: B E
22791.920: 0x00 0x3F <- Dunno
22791.920: 0x01 0x1F <- Dunno
22791.920: 0x05 0x03 <- Dunno
22791.920: 0x10 0x90 <- ETXT1 + Set pen color?
22791.920: 0x91 0x3F <- more pen color
22791.920: 0x98 0x1B <- Define a window?
22791.920: A 0x02X   <- more attributes?
22791.936: 0x92 0x01 <- more attributes?
22791.953: C O
22791.986: M I
22792.020: N G
22792.053:   B
22792.086: A C
22792.119: K


The same bytes are missing!

I'm going to turn on the captioning on my cable box, watch some HD channels and see if some characters go missing.
View user's profile Send private message
mplayer aka red-headed-stepchild?
PostPosted: Sat Oct 15, 2005 5:10 pm Reply with quote
Guest
 




Scott Larson wrote:
Have you asked about this on the mplayer-users list? It may be easy to fix but no one knows about the problem.


The mplayer developers are too arrogant for me to stomach. I'll keep using xine because it works and keep smacking on mplayer because it doesn't. BTW, there is nothing special about my setup. CT5880, aka SoundBlaster 128PCI, is about as simple as it gets. If mplayer can't hang, it gets abuse and deletion.
PostPosted: Sun Oct 16, 2005 11:00 am Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




I had a Soundblaster 128 several years ago but it was before it was supported in Linux, so I replaced it with an older cheaper Soundblaster card. And it's still sitting here, believe it or not! Like I said in my three or four sound card configurations I've never had bad a52 packets ever cause any noise at all with mplayer and I've never read of anyone having this problem either. It's very likely a driver issue.

The mplayer developers are the weakest link in the application by far. Just read the past month of arguing and name-calling and you can see how Open Source doesn't always work. The never-ending thread of supporting SubRip format files from Windows machines was just ridiculous. In the real world we wouldn't hesitate to put two lines of code in our product if our customers would benefit from it. These guys think they'll go to hell if mplayer supports "Windows format text files" in Linux so they've chosen to make mplayer unable to parse files with cr/lf endings. Also in the real world, we programmers usually discuss and debate issues like adults instead of screaming "SHUT THE **** UP" at each other like the mplayer developers do.

Their reaction to my simple patch to have mplayer update the length of the file (like xine does) as it's being appended to was also typical. They claimed that stream->fd might not be a file descriptor so they rejected by "hack" and told me to go through a complicated process of adding special calls to have another layer do the exact same code. I pointed out that the comment in stream.h says it is a file descriptor and nothing else and nowhere in the code is it used as anything but a file descriptor but they just ignored what I said and repeated the same wrong "it's not always a file descriptor" excuse. So don't expect that that fix to show up in an mplayer build any time soon!
View user's profile Send private message
PostPosted: Tue Oct 18, 2005 8:14 am Reply with quote
Guest
 




Hey Scott...

Can you tell me why PTS packets are arriaving twice?

e.g When I get a new caption signal, 2 of them come in every time with 0.03 seconds between each other. Same for carridge return. Should I be considering the latter of the 2? average them out? (I know 0.03s doesn't really matter, but I like to be exact)
PostPosted: Wed Oct 19, 2005 11:19 am Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




I don't know what a PTS packet is (packets have PTS's but aren't PTS's themselves). The caption code doesn't involve signals. I'm not sure what you're asking here.
View user's profile Send private message
PostPosted: Wed Jan 10, 2007 1:57 am Reply with quote
ericwi
 
Joined: 10 Jan 2007
Posts: 3




Hey, Scott:

I really appreciate your effort, unfortunately, I couldn't figure it out, I use an old air2pc tuner card with over the air signal, when I recompilied mplayer with your patch, it didn't show anything about the closed captioning on screen as well as the stderr output, no "CC", though I can use mythtv to get both VBI CC and ASTC CC, I guess the tuner card works, so it must be something wrong about mplayer, any suggestions? thank you very much

eric
View user's profile Send private message
PostPosted: Wed Jan 10, 2007 2:04 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




With mplayer you need to hit the "v" key to turn the subtitles on. Worst case you can turn on all the debugging in the patch which will print a lot of information about what is or isn't going on.
View user's profile Send private message
PostPosted: Wed Jan 10, 2007 2:36 pm Reply with quote
ericwi
 
Joined: 10 Jan 2007
Posts: 3




yes, I tried, but it didn't work, and I also checked the code from the mpeg header, it did show some CC data with "47 41 39 34 03", so I don't understand why, here is the output from mplayer http://mian.homedns.org/1.out and code for mpeg http://mian.homedns.org/code.out. thanks a lot
View user's profile Send private message
PostPosted: Thu Jan 11, 2007 5:19 pm Reply with quote
Scott Larson
 
Joined: 15 Oct 2003
Posts: 713
Location: Portland, OR




I can't get anything out of those two links.
View user's profile Send private message
PostPosted: Thu Jan 11, 2007 6:01 pm Reply with quote
ericwi
 
Joined: 10 Jan 2007
Posts: 3




weird, I checked, it works now, I uploaded a sample mpeg I recorded right now, and the output from mplayer could you please use your mplayer to look at it, I can find CC from the code, but my mplayer doesn't show it on screen and stderr, thanks
View user's profile Send private message
Question: Closed Caption?
  pcHDTV Forum Index -> General pcHDTV topics
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 4 of 4  
Goto page Previous  1, 2, 3, 4
  
  
 Post new topic  Reply to topic  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin