fsphil / hacktv

Analogue TV transmitter for the HackRF
GNU General Public License v3.0
729 stars 86 forks source link

SECAM #6

Closed ghost closed 5 years ago

ghost commented 6 years ago

Does this support SECAM?

It would be more interesting if it did, as the standard is quite obscure and I still don't have any idea how the color is modulated...

fsphil commented 6 years ago

Not yet, but it's on my TODO list. SECAM colour is encoded by frequency modulating the colour sub-carrier with the U and V signals, alternating between them each line.

ghost commented 6 years ago

I know that, but do you have any detailed documentation? Or just the subcarrier frequencies and deviations (which would also be very helpful)?

fsphil commented 6 years ago

There is a lot of good information here: http://www.radios-tv.co.uk/Pembers/World-TV-Standards/Colour-Standards.html#SECAM

ghost commented 6 years ago

How could I miss that?! Thanks, it's really useful!

Potomac commented 5 years ago

Hello Fsphil,

Did you make progress about secam implementation ?

You can add it in hackTV as experimental option, not for using directly with hackRF device, but just for generating on hard-disk a secam baseband file from a video file (h264) with ffmpeg, something like :

$ hacktv -o baseband.bin -m secam example.mkv

For the moment nobody has managed to create a secam software encoder/decoder, it would be great if you can implement secam software algorithm (even if it is not perfect),

thanks again for this wonderful software

fsphil commented 5 years ago

I did a few tests and was able to get colour, but it was very poor. I could add it, maybe with a warning about how bad it is :)

Potomac commented 5 years ago

Thanks, it's a good news if you can implement as an experimental feature,

it would be great also to have 2 secam versions about color identification (secam L) :

more information here : https://www.radios-tv.co.uk/Pembers/World-TV-Standards/Colour-Standards.html#SECAM

Zcooger commented 5 years ago

Hello, for your information both color reference signals can be transmitted simultaneously (as it was done during transition period), so there is no need for 2 separate SECAM versions. However getting SECAM in HackRF is awesome news.

Potomac commented 5 years ago

@Zcooger : yes both methods can be transmitted simultaneously, but it will trigger a problem : the VBI space will be "eat" a little by the field identification method (called "green bottles", "les bouteilles" in french), which can be a problem if you want to transmit complex teletext, VBI data,

that's why a "line identification" mode can be interesting to solve this problem,

we can create 3 modes :

fsphil commented 5 years ago

I've just pushed very basic SECAM support. It will produce colour but it's not very good.

Uses line identification.

Potomac commented 5 years ago

@fsphil : It's great, thanks :+1:

Do you plan to add "color field identification" feature for secam ?

fsphil commented 5 years ago

Do you think it's needed? Are there TVs that require it?

Potomac commented 5 years ago

@fsphil : in France there are people who collect old secam TV sets (built before 1980), these TVs work only with field identification,

on these TV the only solutions for displaying color are to use old VHS secam cassettes (from 1970's/80's) or hardware which converts scart signal (secam video composite) to secam L with color field identification, not easy to find on ebay and the price can be high : http://dicovisuel.blogspot.com/2015/10/adaptateur-peritel-cgv-canal.html

I think a software solution with hackTV/hackRF would be great, and maybe not difficult to implement in the source code (just add "9 bottles" signal on VBI lines of the secam signal)

Potomac commented 5 years ago

@fsphil : here is a python program with interesting algorithms about pal, secam, ntsc, d2mac and filters : https://github.com/kFYatek/color_modem

perhaps you can re-use some algorithms here to improve secam (and other standards) in hacktv