Binarix128
Member
Offline
Gender:
View
Posts
View Gallery
220V AC 50Hz, NTSC
|
I wonder how can I encode subtitles from a video file from a computer to a composite video output, for it to be recognized by a TV as closed captions or to store it in a VHS tape. The problem is that HDMI does not support closed captions, only on screen subtitles, and if HDMI happens to support them, I really doubt that my HDMI to AV converter could encode them. There are laptops with native s video outputs, could they work if I play a video with subtitles file? I have DVD movies with subtitles in them, but my DVD player does not display them in line 21, so I cannot burn a DVD with subtitles file.
|
|
|
Logged
|
|
Medved
Member
Online
Gender:
View
Posts
View Gallery
|
I wonder how can I encode subtitles from a video file from a computer to a composite video output, for it to be recognized by a TV as closed captions or to store it in a VHS tape. The problem is that HDMI does not support closed captions, only on screen subtitles, and if HDMI happens to support them, I really doubt that my HDMI to AV converter could encode them. There are laptops with native s video outputs, could they work if I play a video with subtitles file? I have DVD movies with subtitles in them, but my DVD player does not display them in line 21, so I cannot burn a DVD with subtitles file.
The question is, whether the NTSC generator is able to include that line 21 into the "active picture", so if it allows to map this line into a frame RAM (so allow the SW to control its content as any other part of the picture) and not into the "border" (the part that has just the hard wired black in it). You may look into the configuration, where you may possibly adjust the pixel size of the active frame area. If yes, it is just a question of the player SW, if it is able to generate the required signal there (as a white-dark spot sequence). If the NTSC generating HW allows to map the line 21 into the frame buffer, I would guess there would be some SW able to generate the captions there. Otherwise I think it could be quite nice mcu project (I think ATMega running on selected crystal to allow an easy SW synchronization may do the job)...
|
|
|
Logged
|
No more selfballasted c***
|
Binarix128
Member
Offline
Gender:
View
Posts
View Gallery
220V AC 50Hz, NTSC
|
Not my HDMI to AV converter, nor my computer HDMI output, nor the video player can be configured in such a way to include the 21 in the active video pixels.
Are you speaking about a dedicated circuit to generate line 21? A digital video stabilizer (which passthrough all the active picture lines, and generates its own blanking intervals and lines, used back in the day to bypass Macrovision) modded to generate its line 21 from the live input of an usb, ps2 or COM keyboard, should work perfectly. I wonder if it could be done with arduino or esp32.
|
|
|
Logged
|
|
Medved
Member
Online
Gender:
View
Posts
View Gallery
|
Not my HDMI to AV converter, nor my computer HDMI output, nor the video player can be configured in such a way to include the 21 in the active video pixels.
Are you speaking about a dedicated circuit to generate line 21? A digital video stabilizer (which passthrough all the active picture lines, and generates its own blanking intervals and lines, used back in the day to bypass Macrovision) modded to generate its line 21 from the live input of an usb, ps2 or COM keyboard, should work perfectly. I wonder if it could be done with arduino or esp32.
With Arduino yes, but you would have to likely replace the crystal, so you will be able to get some whole number division factors... And you would have to program it directly in C and assembler, not via the standard Arduino compiler, as that adds a lot of ballast (mainly timing wise). The esp32 I don't know.
|
|
|
Logged
|
No more selfballasted c***
|
Binarix128
Member
Offline
Gender:
View
Posts
View Gallery
220V AC 50Hz, NTSC
|
With Arduino yes, but you would have to likely replace the crystal, so you will be able to get some whole number division factors... And you would have to program it directly in C and assembler, not via the standard Arduino compiler, as that adds a lot of ballast (mainly timing wise). The esp32 I don't know.
I could burn the program into the chip by the arduino board and the compiler, and then operate it in a separated board with a dedicated crystal, burning it by other way would be too complicated. I wonder if the arduino chip supports an USB or PS2 keyboard interface, and make a buffer of the characters, for write captions in real time. I also wonder if a circuit that shifts to another composite video input when it detects a certain color burst phase shift, given by a potenciometer or trimmer could be done in an arduino based circuit. But for that both composite video signals must be in sync, which could be pretty tricky. There are many things that could be done with composite video, but creating a circuit for that could be tricky.
|
|
|
Logged
|
|
Medved
Member
Online
Gender:
View
Posts
View Gallery
|
I could burn the program into the chip by the arduino board and the compiler, and then operate it in a separated board with a dedicated crystal, burning it by other way would be too complicated. I wonder if the arduino chip supports an USB or PS2 keyboard interface, and make a buffer of the characters, for write captions in real time.
I also wonder if a circuit that shifts to another composite video input when it detects a certain color burst phase shift, given by a potenciometer or trimmer could be done in an arduino based circuit. But for that both composite video signals must be in sync, which could be pretty tricky.
There are many things that could be done with composite video, but creating a circuit for that could be tricky.
"Arduino chip" is nothing else than an ATMEGA328 (or some similar AVR). The problem is, once you connect a different crystal, the UART communicaton with the USB chip on the arduino board will fall apart, so even the Arduino downloader won't work anymore. But you may actually use an Arduino board to work as the ATMEGA ISP programmer device (there are plenty of sketches for this function) and program another ATMEGA chip from it. So you may take an ATMega chip, with the crystal corresponding to the NTSC. I don't know the subtitles format, does it really need sync with the color burst, or V/H is just enough?
|
|
|
Logged
|
No more selfballasted c***
|
Binarix128
Member
Offline
Gender:
View
Posts
View Gallery
220V AC 50Hz, NTSC
|
"Arduino chip" is nothing else than an ATMEGA328 (or some similar AVR). The problem is, once you connect a different crystal, the UART communicaton with the USB chip on the arduino board will fall apart, so even the Arduino downloader won't work anymore. But you may actually use an Arduino board to work as the ATMEGA ISP programmer device (there are plenty of sketches for this function) and program another ATMEGA chip from it. So you may take an ATMega chip, with the crystal corresponding to the NTSC.
I don't know the subtitles format, does it really need sync with the color burst, or V/H is just enough?
So I write the program on the arduino board, and then I take the ATMega out and I wire it in a proto board with a different crystal, sounds simple though. What crystal should be used? Divisible by the H sync, by the V sync or the entire bandwidth? The caption encoding is simple, just a straight stream of binary info over line 21, one line for each character, the character output is given by a chart. Now the thing is to use a keyboard to write the captions. The color burst sync was for another thing, a crude analog video "chroma keyer".
|
|
|
Logged
|
|
Medved
Member
Online
Gender:
View
Posts
View Gallery
|
You need to synchronize to all V, H and be able to generate the correct data timing, all that with sufficient margin for enough instruction between the edges. The data is UART based (start, 7 or 8 data, optional parity, stop), or a long stream of bits? Did not found the timing...
The question is, if it would be possible to use the HW serial interface, or better to go bitbang with SW timing... As I'm writing it, I would more lean towards interrupt triggered routine generating the data for the single line by the SW timed bitbang and let the serial interface do the UART thing from the computer (via some USB - serial converter chip). I would let the video signal original just past the color burst of the line 21 and after it take over the signal, send the data burst and then, before the H pulse, switch back to the original.
I think there should be some player SW available to let you redirect the CC data to the COM, where the title injector will be sitting...
|
|
|
Logged
|
No more selfballasted c***
|