Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
24th September 2024, 13:47 | #1 | Link |
Registered User
Join Date: Jul 2010
Posts: 175
|
Help extracting encoded closed captions from VHS
I just bought a PAL VHS from UK and it seems to have encoded closed captions. Here's a sample:
https://mega.nz/file/JQxS0QJa#akbOgH...zKYMxJ-Q5J2ht8 The encoded CC line can be seen on top. This is a lossless video and audio file. I've been reading and for NTSC videotapes the CC seems to be on line 21, but being a PAL VHS I don't know if the line number has changed. How can I extract that data? Can I do it with my USB capture device and a PC? Do I need some advanced hardware? I've read something about GraphEdit and GraphStudioNext, but, apart from being completely lost with those apps, I don't know if I'm missing something. Thanks in advance. |
24th September 2024, 19:04 | #2 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,671
|
Could be line 22 UK subs EIA-608 aside from teletext, or ceefax ?
https://en.wikipedia.org/wiki/Teletext https://news.ycombinator.com/item?id=34106832 https://joeclark.org/access/captioning/econcc.html Anything that captures this line is good, decoding comes later. As long as played from a S-VHS player your capturing device should see it. Seems simple as bread: 16 positions flip bitwise. https://superuser.com/questions/1221...losed-captions
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 24th September 2024 at 19:23. |
24th September 2024, 19:25 | #3 | Link | |
Registered User
Join Date: Jul 2010
Posts: 175
|
Quote:
We're of course not talking about hardcoded subs, but a hidden signal (I don't know exactly how it works) that can be seen on the top of the video. This is the point where I get lost. Do I need a special VCR to decode (not show or see) the signal? Can my capture device decode/grab it? Will my simple VCR scart output work? I tried with GraphEdit but the one I downloaded does not have the required DirectShow filter, but at this point I'm starting to think that maybe my VCR or output connector may not be compatible with this signal type. I've also read something about GraphEdit needing the live video capture from the VCR, meaning that my FFMPEG generated file has no CC data signal anymore, apart from that weird white blinking line on top. I definetely need more info about this, do I need some special VCR or mandatory composite or S-Video output? Do I need a special adapter? And most importantly, apart from that, how do I actually extract that information? I'm afraid this VHS is one of a kind and there is no DVD or BD with this data, nor subtitles online whatsoever. I hope you guys will clarify some things for me. Thanks in advance, as usual. |
|
24th September 2024, 20:19 | #4 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,671
|
It is already in the capture, so your chain did not miss it. Now follows decoding.
This can be even be written as AviSynth script, (crop to line 0, crop 17? times), return Y-values, assign 17 bits and decode) if it does not exist already somewhere else.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
24th September 2024, 20:24 | #5 | Link | |
Registered User
Join Date: Jul 2010
Posts: 175
|
Quote:
I could crop the top part and resize it or something like that, but I'm loss at the decode part. On the other hand, what would I actually get? Hardcoded subs in an output video? Thanks! |
|
24th September 2024, 20:42 | #6 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,671
|
Decoding means to implement a EIA-608 decoder. I have none at hand.
Then render results to what you prefer, text is also possible. https://forum.doom9.org/showthread.php?t=183190
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." |
24th September 2024, 20:48 | #7 | Link | |
Registered User
Join Date: Jul 2010
Posts: 175
|
Quote:
|
|
24th September 2024, 20:55 | #8 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,671
|
The link only is about text import/export.
BTW, FrameEvaluate() seems the way to go. Below just for fun, not real decoding. Code:
LWLibavVideoSource("C:\1.mkv") ConvertToYV24() Crop(0,0,-0,-575) Crop(237,0,-20,-0) bw=27 #barwidth #17 Bars ? c0=Crop(bw*0,0,bw,0) c1=Crop(bw*1,0,bw,0) c2=Crop(bw*2,0,bw,0) c3=Crop(bw*3,0,bw,0) c4=Crop(bw*4,0,bw,0) c5=Crop(bw*5,0,bw,0) c6=Crop(bw*6,0,bw,0) c7=Crop(bw*7,0,bw,0) c8=Crop(bw*8,0,bw,0) c9=Crop(bw*9,0,bw,0) c10=Crop(bw*10,0,bw,0) c11=Crop(bw*11,0,bw,0) c12=Crop(bw*12,0,bw,0) c13=Crop(bw*13,0,bw,0) c14=Crop(bw*14,0,bw,0) c15=Crop(bw*15,0,bw,0) c16=Crop(bw*16,0,bw,0) return(StackVertical(c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16))
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 24th September 2024 at 21:59. |
24th September 2024, 22:00 | #9 | Link | |
Registered User
Join Date: Jul 2010
Posts: 175
|
Quote:
About the script you provided, I don't really get it. I only see white lines. I know you said it's for fun only and not real decoding, but I have no idea on how to decode those images. I've searched for avisynth VHS CC decoders but I found nothing. |
|
24th September 2024, 22:39 | #10 | Link |
Registered User
Join Date: Jul 2010
Posts: 175
|
I've been trying all days with tools and instructions from here:
http://www.theneitherworld.com/mcpoo...SCC_TOOLS.HTML But the more I read, the less I understand, especially the capturing part. It seems like I would need some special hardware to capture. And also GraphEdit doesn't work, probably Win10 is too advanced for it. |
25th September 2024, 13:29 | #11 | Link |
Big Bit Savings Now !
Join Date: Feb 2007
Location: close to the wall
Posts: 1,671
|
BTW, for placing and tapping the "CC Decoder filter" on capture: GraphStudioNext:
https://github.com/cplussharp/graph-...s/tag/v0.7.3.1 Microsoft tells that it was a filter available within DirectShow from Win2000 trough WinXP, but removed from Vista on. Well, DirectShow has not ceased to exist. Aside from capturing in realtime it still can be dedoded using a frameserver, the file with the bitflipping line 0 is already there. Unfortunately I have no time now for a walkthrough, but here is just a preview how the bitsetting function could look like: (appended from above, last line commented out: #return(StackVertical...) Code:
global th=63 function bitset (c0){file = "C:\bit0.txt" b0=FrameEvaluate(c0, "AverageLuma() < th ? 0 : 1") c0= WriteFile(c0, file, "b0") return c0} bitset(c0) For now I haven't had time to fix the syntax, it may be just a wrong variable. Still no decoding, but at least a start for a willing user to hack upon. Byte pair format is defined in EIA/CEA-608-B.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain) "Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..." Last edited by Emulgator; 25th September 2024 at 14:00. |
25th September 2024, 14:31 | #12 | Link |
Registered User
Join Date: Jul 2010
Posts: 175
|
I'm totally loss by that code :S
EDIT Actually, I get the part where you said my file already contains the CC. I understand that I need to decode it. But I have literally no idea about it. I thought some tool would be available already, because otherwise I have a total lack of knowledge to write my own decoder Last edited by eXtremeDevil; 25th September 2024 at 14:35. |
Thread Tools | Search this Thread |
Display Modes | |
|
|