Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple video systems, and add PAL-M support #728

Merged
merged 2 commits into from
May 23, 2022

Conversation

atsampson
Copy link
Collaborator

CC @oyvindln, who kindly supplied a sample PAL-M VHS capture to test this with...

In the JSON, isSourcePal is replaced by a "system" string. In the library, this is converted to a VideoSystem enum; if "system" is not set, then the system is guessed from isSourcePal and fieldHeight, so the tools will still work with old files.

PAL-M uses PAL colour on a 525-line line standard with fSC being close to but not the same as NTSC -- so in some senses it works like standard PAL, and in some senses like standard NTSC. Adjust all the system-dependent parts of the tools as needed, including filters.

To make testing this easier, it also adds better support for vhs-decode's separate _chroma.tbc files in ld-analyse - it now loads both files if present, and lets you switch between Y, C or Y+C:

palmanalyse

(Note to self to update the JSON docs again if people are happy with this.)

When loading a .tbc file, ld-analyse will now check whether the
corresponding _chroma.tbc file exists. If so, it'll load both of them,
and give you the option of whether to view luma, chroma, or the sum of
the two. (It doesn't decode them separately; that would be doable but
a bit more complicated.)

If you open a _chroma.tbc directly, it'll try to open both files if they
exist, defaulting to the chroma view; otherwise it'll look for the luma
JSON as before.
In the JSON, isSourcePal is replaced by a "system" string. In the
library, this is converted to a VideoSystem enum; if "system" is not
set, then the system is guessed from isSourcePal and fieldHeight, so the
tools will still work with old files.

PAL-M uses PAL colour on a 525-line line standard with fSC being close
to but not the same as NTSC -- so in some senses it works like standard
PAL, and in some senses like standard NTSC. Adjust all the
system-dependent parts of the tools as needed, including filters. This
was tested with a VHS tape decoded by vhs-decode.

I've assumed that closed captions aren't supported on PAL-M, although
there's no particular reason why they couldn't be; if this is needed in
the future then we should probably move the CC fields out of the NTSC
structure.
@atsampson atsampson added enhancement ld-decode-tools An issue only affecting the ld-decode-tools ld-decode An issue only affecting the ld-decode[r] labels May 21, 2022
Copy link
Owner

@happycube happycube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved for my tiny bit of core.py that got changed

Copy link
Collaborator

@simoninns simoninns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Seems like the ld-analyse user-guide is drifting way out of line with the actual code though. Perhaps an issue should be raised for an update?

@simoninns simoninns merged commit 5143756 into happycube:master May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ld-decode An issue only affecting the ld-decode[r] ld-decode-tools An issue only affecting the ld-decode-tools
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants