oyvindln / vhs-decode

Software defined VHS decoder - Fork (maybe temporary) of the ld-decode Laserdisc rf decoder

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Betamax: Black lines at dark-to-light transitions

davidvankemenade opened this issue · comments

Checklist

  • [ X ] I have searched the issues page for any duplicate issues open or closed and confirmed that this bug has not been reported before.
  • [ X ] I have tested the issue with the current build.
  • [ X ] I have attached log files, uploaded sample data, and commands used so that the issue can be easily reproduced by the developers.

Bug Description

VHS-decode introduces horizonal black lines in areas where there are sharp dark-to-light transitions.

Steps to Reproduce

  1. Download the sample capture (16-bits from DdD): https://we.tl/t-n3Rh8mQ1pg (didn't fit on Google Drive anymore)
  2. Decode with decode.exe from https://github.com/oyvindln/vhs-decode/releases/tag/0.2.2

Expected Behavior

The video should look like this, captured using a video card:
betamax mp4_snapshot_00 15 810
Video: https://youtu.be/211JiC1RNNo

Actual Behavior

Black lines are visible in the BBC2 ident and to a lesser extent in the "Nine O'Clock News" caption. The rest of the video seems fine:
BBC2 mkv_snapshot_00 18 929
Video: https://youtu.be/U4otlOEF_-c

Environment

  • Decode version: Windows exe 0.2.2
  • Operating System: Windows 10

Additional Information

N/A

I've tweaked the rf filter params to improve things a bit in the last commit though I didn't find any settings that gave an ideal setup on all sections on this sample so while the updated settings improve things quite significantly on this sample quite a bit they still give some streaks in some sections. It seems even your conventional playback does end up with some streaking though so maybe the tape is not in ideal condition int he first place and might not be the ideal one target to optimize the defaults towards.

Maybe at some point in the future vhs-decode will be able to be a bit more adaptive with parameters but for now I'll attach a json with some tweaked settings that give slightly less streaking than the new default settings for this specific recording you can use with the --params_file command line option since I did a bunch of testing anyhow or you can tinker a little with or use without the current build without needing to update. I suggest also trying using the --sd option to make use of the sub-deemphasis filtering that's supposed to be used on betamax (still needs a little tuning but it's not too off) to help make the result look a bit closer to what it's supposed to look like.

Thanks for looking into this @oyvindln. Your rf filter tweaks do improve things significantly indeed.

You're right that some streaking is caused by the source tape, which is from 1983.

Adding sub-deemphasis filtering through --sd provides further improvement, reducing ringing around hard edges (e.g. the logo around frame 240).

I can't see the json file you mentioned. Am I overlooking something or did you forget to attach it? ;-)

The streaking isn't "burned in" from what I can see in so in theory it can be possible to recover it better in the future with more optimal filtering/demodulation algorithms it's just tricky for both hardware in player and software due to tape age/wear it seems.
Attached here, I tried to attach it to the previous comment but broswer didn't apply it last time.
betamax_bbc.json

Thanks for sending the json, and great to hear that the streaking may be eliminated further at some point in the future. It's good to have the raw digital copy of the tape for future further-enhanced decoding.

Would you be happy to roll the enhanced rf filter params into the forthcoming Windows release (#115)?