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

Sync detection error ntsc-j vhs tape #109

Open
Infrid opened this issue Oct 5, 2023 · 4 comments
Open

Sync detection error ntsc-j vhs tape #109

Infrid opened this issue Oct 5, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Infrid
Copy link

Infrid commented Oct 5, 2023

There is something that upsets the sync algorithm, I've been discussed about this problem on discord for a while, seems worth to open an issue here.

This Japanese tape has been transferred with DoD by Mighty @harrypm , so I assume at this stage everything was done correctly 😅, at some point there is a very visible sync issue

ac3-mission00-sync-error.mp4

command used

./decode.py vhs --debug -f 40 --tape_format vhs --system NTSC --recheck_phase --threads 8 debug/ac3-mission00-sample-sync-error.ldf debug/ac3-sample-plain

Things are a bit better if I append --level_detect_divisor 6 but still not optimal result

ac3-sample-level_detect_divisor6.mp4

./decode.py vhs --debug -f 40 --tape_format vhs --system NTSC --recheck_phase --threads 8 --level_detect_divisor 6 debug/ac3-mission00-sample-sync-error.ldf debug/ac3-sample-plain

You can find the sample .LDF file here https://mega.nz/folder/p4RSAIAA#LzBCNH_NkIac-Ob-CodvHA

I am using the latest version of the decoder from vhs_decode branch

To be fair, @harrypm managed to pull out a stable image eventually using this command

decode.exe vhs --debug --tape_format vhs --system ntsc --recheck_phase --chroma_trap --threads 8 --high_boost 6

ac3-decode-no-error.mp4

but that version doesn't retain the detail I wanted and it was a compromise to fix another problem on high frequencies. I can give you details on that, but it's not related to this sync error.

thanks!

@Infrid Infrid added the bug Something isn't working label Oct 5, 2023
@Infrid Infrid changed the title Sync detection error ntsc-j vha tape Sync detection error ntsc-j vhs tape Oct 5, 2023
@Infrid
Copy link
Author

Infrid commented Oct 6, 2023

Additional notes from the chat, especially for me, so they won't get lost in discord

hmm something is screwing with level detection on those frames for whatever reason, if you use
--use_saved_levels
it doesn't happen

@Infrid
Copy link
Author

Infrid commented Oct 6, 2023

thank you so much, here a before/after comparison for the users out there!

ac3-mission00-sync-error.mp4
ac3-mission00-sync-fix.mp4

@oyvindln
Copy link
Owner

oyvindln commented Oct 6, 2023

Something in the signal causes the vsync serration algorithm to interpret something as vertical sync that isn't, and detect the completely wrong levels, and something with the fallback/failsafe logic is failing. I'm not entirely sure what but looking at it I think some of this code needs a bit of rework.

If you just want to decode it for now running with ----use_saved_levels should bypass the problem since it just re-uses the detected levels from the first good field.

@harrypm
Copy link
Collaborator

harrypm commented Oct 7, 2023

Note of Discord Chain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants