SnapStream Forums

Go Back   SnapStream Forums > User-to-User Troubleshooting & Support Forums > Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-05-2004, 12:21 AM
merrypig's Avatar
...
 
Join Date: Oct 2002
Posts: 4,421
Closed Captioning for BTV/PVR250 users

[Sorry, US NTSC users only atm!]

As an intermediate step to getting closed captions working under BTV I've written a program that will extract CC data from MPG files created by the PVR250. (sorry, that's the only one it supports 'officially')

Essentially, before deleting your original file you run this utilty on the mpg file to obtain a text based file containing just the subtitles.

You then transcode to either divx or wmv format and then when you play it back you will see subtitles overlayed and synchronised with the video.

The subtitle playback is handled by the vsfilter dll. The newest version of which will allow subtitles from wmv and divx (.avi) files to be viewed in BTV. I've also tested the playback in WMP and zoomplayer and both work just fine.

The tool produces SMI and SRT files - originally it was going to just be SRT, but I had more luck with SAMI files! and indeed I recommend you use the SAMI data files first and then try srt if SAMI doesn't work.

The tool plays nice with snapstream! The VERY first thing it does is drop it's runtime priority down to 'idle class' - so it should not get in the way of anything else running on the pc. You can always boost it via task mgr if you're in a hurry.

I've got mine hooked into the archive command on btv for now, but soon I'll put out either some steps to get btv to do it automatically, or a program to poll the video directories and schedule the cc extraction automatically.

There is a pdf that shows how to use/install the program with BTV/PVR250's available from the same website as the download.

You can get it all from

http://www.htpctools.com/mpg2srt


Sorry it's a bit terse atm, sooner or later I'll flesh out the website and find a better home for it.

If you try it, do let me know how you get on. I know it's not 100% right now and the more feedback I get the better I can make it.


NOTE ; this is designed to strip out 'dvd GOP style' captioning data from mpg2 files. it will not strip from vobs, or from any other format video file except a 'dvd stream' as produced by the pvr250. If other mpg2 capture cards (or codecs) can produce a dvd stream with embedded captions then they may work but I have no way to test them.

Soon I 'll publish the source code so anyone can take it and tweak to their liking

Good luck!
__________________
Sleep well Kismet

Last edited by merrypig; 10-05-2006 at 09:54 PM.
Reply With Quote
  #2 (permalink)  
Old 02-05-2004, 09:14 PM
Registered User
 
Join Date: Aug 2003
Location: Baton Rouge
Posts: 35
Thanks for the message!

Unfortunately, I don't use a PVR, so I can't test it out. Hopefully this will become an added feature soon!

Thanks,
Neil
__________________
SS 4.xx Config
Pentium D, 2.66GHz @ 800 MHz FSB
ECS 800MHz FSB Mobo
2GB DDR2 RAM
160GB UDMA/133 7200RPM HDD (System & Analog TV Data)
250GB SATA 7200RPM HDD (SS HDTV Data)
On-board Radeon Xpress 200
DviCo HDTV Tuner Card
Hauppage PVR150 Hardware Tuner
Asus/Philips Tuner/Capture Card
PCM Audio via Optical to Pioneer Elite Rcvr
Fast Ethernet
NEC DVD-R
9-in-1 Media Drive
Win XP Pro SP2
USB-UIRT w/Girder
Motorola 6416 Dual-Tuner DVR
VGA out to Pan AE-900U
Draper 106" Grey Scrn
Reply With Quote
  #3 (permalink)  
Old 02-08-2004, 07:30 AM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
Okay, I've got this installed, but it doesn't seem to be doing anything. The files are generated in the right place with the right names AFAIK, but the .srt files mpg2srt generates are empty, and the .smi contain only:

<SAMI>
<HEAD>
<SAMIParam>
Metrics { time: ms; }
Spec {MSFR:1.0;}
</SAMIParam>
<STYLE type="text/css"><!--
P {margin-top:3pt;
margin-left:5pt;
font-size: 10pt;
font-family: tahoma, sans-serif;
font-weight: normal;
color: white;}
.ENUSCC { name:English Captions; lang:en-US;
font-family:Verdana, Arial;
font-size:8pt;
text-align:left;
samitype:CC; }
--></STYLE>
</HEAD>
<BODY>

Seems this should at least have a </BODY> and </SAMI> tag at the end, to be minimally complete, even if the show doesn't contain any parsable captions?

I did restart BTV before doing the recording, and I added the required registry entry and set the recording to DVD stream. Am I missing something? Do I need to reboot the computer, too? I can't right now, I've got a long-running job that won't finish until tonight... I'll try again later after I reboot my machine, see if that makes any difference.

Is there a minimum version of the PVR-250 drivers that's required? I've got 1.17.390.21219 currently, but can update to the latest if necessary.

Also, this whole batch file thing with only 9 arguments seems a bit dangerous, especially for shows with several words in the name. In doing a few tests, I already had several filenames with 7-8 spaces in them, e.g. "Courage the Cowardly Dog-(The Revenge of the Chicken Fr)-2004-02-08-0.mpg". It seems to me that this argument processing could very easily be handled by mpg2srt.exe itself. That is, assume the first arguments are switches - require /d (and others in the future) to come first. Then concatenate all arguments after that into a single filename. You could even have an optional switch that tells mpg2srt to do this contatenation of all arguments, in case someday you still want to have it process multiple files where each argument is a single file. Anyway, my point is that I think this batch mechanism is risky, unnecessary, and just makes setup less straightforward.

Lastly, is a transcode *necessary* to view captions in BTV? That is, after running mpg2srt, do I have to make a .wmv or .avi (DivX) from the .mpg before I can see captions in BTV playback? Is there anything else I have to do to BTV in order to get CC's to show up?

Anyway, thanks for putting the effort into this. I certainly don't mean to sound unappreciative! I'm happy to provide some "alpha" testing, since CC's are pretty important to me.

Cheers,
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #4 (permalink)  
Old 02-08-2004, 04:20 PM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
Cool, thanks for the info. Okay, I'm making progress - msg2srt itself seems to be working fine after upgrading the Hauppage drivers. I now get captions in both .srt
and .smi files.

However, they're not showing up in BTV on playback. I've tried using all the decoders on my system (default, NVIDIA, Intervideo, Intervideo non-css), and none of them show captions while playing the .mpg.

They *do* show up in WMP9 (which is also using NVIDIA codec) while playing the same .mpg, although in this app it seems that if I move the seek slider, it always restarts the captions from the very beginning - that is, they don't sync with ff/rew. And it seems to load only the .smi; if I delete the .smi file, it doesn't know how to read the .srt.

Any suggestions on what to try next? I'll check whether transcoding to .mwv or .avi makes any difference...

Thanks! This is definitely promising, and the captions are nice-looking, too - a better font display than what I've seen in other apps (back when I had ATI MMC).
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #5 (permalink)  
Old 02-08-2004, 04:57 PM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
BTW, what's "dxva /hwmc"? How do I turn it on/off, and what's the (dis)advantage to it being on/off, aside from any interference with vsfilter?
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #6 (permalink)  
Old 02-08-2004, 05:11 PM
SHS's Avatar
SHS SHS is offline
Registered User
 
Join Date: Jan 2003
Location: Stow, OH
Posts: 767
Send a message via ICQ to SHS
DxVA (DirectX Video Acceleration)
HwMC (Hardware Motion Compensation)
See Amontillado web site on this
http://www.cask-of-amontillado.com/ under Tips & Tricks
Reply With Quote
  #7 (permalink)  
Old 02-08-2004, 05:47 PM
Cayars's Avatar
Senior Beta Tester
 
Join Date: Oct 2003
Location: Southern New Jersey
Posts: 836
Quote:
Originally posted by merrypig

BTW. IF!!! SS will simply hook up the line21 pin on the intervideo decoder to the vmr9 input - then you can avoid all this crap if you stay with mpg files as it can decode them directly on the fly no need to run mpg2srt.. To use wmv or divx tho you'd still need to 'decode' it.

Yea, pretty easy to do in GraphEdit. I bet the holdup on SS's part is the GUI. Trying to work the information into the OSD is probably the hard part.

Carlo
Reply With Quote
  #8 (permalink)  
Old 02-08-2004, 05:55 PM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
Alright, this is weird. Without having made any other changes, when I transcode into .wmv, the CC's show up in BTV on .wmv playback (and they correctly track with ff/rew)! This is good!

Although I really wish they showed up with .mpg's, since 1) I don't normally transcode, and 2) I lose chapter info in .wmv's, right? Does chapter info work in .avi's? I don't remember - again, I don't normally bother with this. Of course, I just tried transcoding into .avi and SS's batch processor crashed... Ugh.

Well, anyway, progress continues, but this is definitely not a straightforward task!
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #9 (permalink)  
Old 02-08-2004, 07:13 PM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
Yeah, well, now I've started using the chapters, it'd be hard to live without them. I'll go ahead and use .wmv transcodes for now.

Definitely let me know if/when you discover any new tricks, I'll be happy to continue testing.

Maybe someone at BTV could offer some clue as to why BTV doesn't like vsfilter with .mpg's... (assuming anyone there is reading this! )
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #10 (permalink)  
Old 02-09-2004, 07:07 AM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
Thanks. SOT: Is BTV smart enough to do chapter generation only on the .wmv after the transcode? And I thought there was an option somewhere to tell it not to do ShowSqueeze until the middle of the night (like there is for SmartSkip), but now I can't find this... Oh well, I'll get it worked out eventually, I'm sure. Hopefully it'll figure out how to do all this in the right order! E.g. start transcode late at night, then afterwards do chapters on .wmv only (not on .mpg)... This is another reason why I didn't want to mess with transcoding before!
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #11 (permalink)  
Old 02-09-2004, 07:38 AM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
Ugh, I hope you can figure out how to get CC's working with .mpg's in BTV. The few samples I tried of generating chapters with .mwv's fared very poorly, where chapters from .mpg's of the same shows worked well. Maybe I need to up the .wmv quality, I'll try that...

Ah, wait, it occurs to me that I might also cheat and generate chapters with .mpg, and just rename the chapter file so that it matches the .wmv. Trying now...

Result: seems to work okay, since the .xml files for chapters aren't format-specific, just time markers. Now I need to figure out how to tell BTV to do chapters on .mpg's, and not on the corresponding .wmv's... Ugh! And I still have to manually rename files. Well, if you get some sort of batch system working for running mpg2srt, I can probably add this chapter .xml file copy to it. Is this something you'll be willing to share?

Cheers,
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #12 (permalink)  
Old 02-10-2004, 05:47 AM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
Okay, BTV is smarter than I thought, at least for automatic transcodes. The trouble I had above was when I ran ShowSqueeze manually, it didn't copy the chapters file. But looking at the log from last night, it turns out that if I let it do its chapter and transcode during off-hours (starts around 2am), it's smart enough to do chapter generation on the .mpg first, then it does actually copy the chapter file when it makes the .mwv afterwards. So this'll work out okay. Now all we need is to do the mpg2srt automatically... But fortunately, that only takes a minute or two.
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #13 (permalink)  
Old 02-11-2004, 09:28 AM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
FYI, I'm getting a non-zero return value (1) from mpg2srt.exe, and I see it outputs e.g.:

Priority set to IDLE_PRIORITY_CLASS
MPG2SRT: v0.2
Processing : J:\SnapStream\andromeda-(the spider's stratagem)-2004-02-07-0.mp
g
Basefilename : andromeda-(the spider's stratagem)-2004-02-07-0
Path : F:\Subtitles\
SRT Output : F:\Subtitles\andromeda-(the spider's stratagem)-2004-02-07-0.srt

SAMI Output : F:\Subtitles\andromeda-(the spider's stratagem)-2004-02-07-0.smi

............Unexpected startcode 00000100 in system layer

Does this last error message mean anything in particular? Seems to be working fine, though. I noticed this as I'm writing a quick python script to generate captions, which I'll schedule to run before the BTV chapter/transcode. I made the mistake of telling BTV to delete the .mpg after transcoding, forgetting that I hadn't run mpg2srt on it yet...
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #14 (permalink)  
Old 02-11-2004, 09:53 AM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
Hmmm... well, so far for me, mpg2srt has pulled out meaningful captions on every .mpg I've recorded (since turning on the InsertCCInDVD, of course). Granted, this hasn't been very many, only 4 or 5 full shows plus a handful of short recording tests. So my impression so far is that it's pretty reliable, thus I'd guess that it's more a TV signal reception issue.

I usually use NVIDIA decoder for BTV mpg playback, doesn't work with that one either.

Yeah, I understand about "real work" - I'm supposed to be writing a presentation now, but this is more fun.
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
  #15 (permalink)  
Old 02-12-2004, 04:02 PM
Average Guy
 
Join Date: Feb 2003
Location: Baltimore
Posts: 137
Okay, after using this a bit more, I see two things, neither of which is a huge problem but might bear some looking at:

1) Like you mentioned, I see that sometimes the captions get off by a couple of seconds by the end of a 1-hour show. I think the captions are always early.

2) It seems once a caption is on the screen, it never gets turned off, only replaced by another one. That is, if there's some conversation, then a long span of silence or whatever non-talking, the latest caption will just stay on the screen forever, until someone starts talking again. I can't say yet whether this happens in all shows, just noticed it when I was watching today. It's not something you pick up on right away, but once you do, it's hard to ignore it...

I have no idea whether this is something mpg2srt controls, or whether it's a function of the vsfilter.dll or what. Any idea? On regular TV, the captions seem to always disappear after a few seconds. Is this controlled by the actual caption info, or is this a function of the viewer only? I have no clue how captions are encoded/transmitted...

Okay, back to "real work" again...
__________________
- Paul (www.chemicalgraphics.com)

AMD Phenom Quad 2.5GHz | Gigabyte MA78GPM-DS2H | 4G 1066 DDR2 | ATI HD4850 GPU | ATI HD650 Tuner | 500+750G SATA 3G/s | Vista HP 32 SP1 | Onkyo TX-SR606 | 7.1 Surround w/ pwr subwoofer | Toshiba 46" LCD
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Closed captioning in Beyond TV 4.6 baluscher Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 1 05-09-2007 01:50 PM
Yes or No: BTV4.3 have Closed Captioning? Lark Beyond TV and Beyond TV Link 1 08-12-2006 08:16 AM
Closed Captioning, again... sesummers SnapStream Discussion 2 01-29-2006 10:03 AM
Closed captioning msmarti58 Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 2 10-15-2005 09:17 AM
Closed Captioning jebilbrey Beyond TV and Beyond TV Link User-to-User Troubleshooting & Support Forum 4 05-13-2002 10:21 AM


All times are GMT -6. The time now is 04:32 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
©2004-2009 Snapstream Media