================================================================================
 VideoDistanceMarking - VIDEO UPLOAD (scp over SSH) SETUP
 INSTRUCTIONS ONLY - CONTAINS NO REAL KEYS OR PASSWORDS
================================================================================

 After each successful encode, videogen.exe runs upload_video.bat from the
 install root.  That script uploads the finished .mp4 to the tournament
 server with scp (SSH), then pings a "next video" signal CGI.  Upload is no
 longer FTP + .netrc - it is scp with a dedicated, passphrase-less SSH key.

 This file tells you how to create that key and authorize it on the server.
 Do NOT paste a private key or password into this file, into settings.txt,
 or into the install directory.  The private key lives only in your user
 profile's .ssh directory.

--------------------------------------------------------------------------------
 1. GENERATE A DEDICATED, PASSPHRASE-LESS SSH KEY
--------------------------------------------------------------------------------

 The upload runs unattended, so the key must have NO passphrase.  In
 PowerShell or cmd on the venue laptop:

     ssh-keygen -t ed25519 -f "%USERPROFILE%\.ssh\vdm_upload" -C "vdm-upload"

 Press Enter twice when prompted for a passphrase (leave it empty).  This
 creates two files:

     %USERPROFILE%\.ssh\vdm_upload       <- PRIVATE key (never share/commit)
     %USERPROFILE%\.ssh\vdm_upload.pub   <- PUBLIC key  (safe to copy up)

--------------------------------------------------------------------------------
 2. AUTHORIZE THE PUBLIC KEY ON THE SERVER
--------------------------------------------------------------------------------

 Append the CONTENTS of vdm_upload.pub to dave's authorized_keys on the
 upload server (thehansens.com, IP 198.251.70.250):

     ~/.ssh/authorized_keys        (on the server, in dave's home directory)

 One quick way from the laptop (you will be prompted for dave's password
 this one time only):

     type "%USERPROFILE%\.ssh\vdm_upload.pub" | ssh dave@thehansens.com "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"

 Verify the key works (should log in with no password prompt):

     ssh -i "%USERPROFILE%\.ssh\vdm_upload" dave@thehansens.com "echo ok"

--------------------------------------------------------------------------------
 3. UPLOAD SETTINGS (ENVIRONMENT VARIABLES)
--------------------------------------------------------------------------------

 upload_video.bat reads these, each with a built-in default.  You normally
 do not need to set any of them - the defaults match the current server:

     VDM_SSH_KEY      %USERPROFILE%\.ssh\vdm_upload   (private key path)
     VDM_SSH_USER     dave                            (login user)
     VDM_UPLOAD_HOST  thehansens.com                  (server hostname)
     VDM_UPLOAD_PATH  tournament/uploads              (remote dir, relative
                                                       to dave's home)

 Override any of them at the machine or user level only if the server or
 account changes.

--------------------------------------------------------------------------------
 4. IMPORTANT OPERATIONAL NOTE - DAILY DIRECTORY OWNERSHIP
--------------------------------------------------------------------------------

 On the server, tournament/uploads is a SYMLINK to that day's directory:

     videos/0/<MM-DD-YYYY>

 Each tournament day a fresh dated directory is used.  For scp to succeed,
 that day's videos/0/<MM-DD-YYYY> directory MUST be owned by dave.  If it is
 not, every upload fails with:

     scp: ... Permission denied

 Fix it once per day, on the server, as root or via sudo:

     chown dave:dave videos/0/<MM-DD-YYYY>

 (Adjust <MM-DD-YYYY> to the current tournament date.)  After the chown,
 re-run the encode or simply wait for the next jump - the upload will
 succeed.

--------------------------------------------------------------------------------
 5. TURNING UPLOAD OFF
--------------------------------------------------------------------------------

 If a venue has no network, uploads can be skipped entirely.  The finished
 videos still land in the local output directory; only the server copy is
 missing.  See settings.txt / the documentation for the upload toggle.

================================================================================
 REMEMBER: the private key (vdm_upload) is a credential.  Never commit it to
 git, never email it, never copy it into the install directory or this
 package.  Only the .pub half ever leaves the laptop.
================================================================================
