Announcements
Tournament Broadcast Guide - Part 3: Uploading and Syncing PGN Files Using FTP

Tournament Broadcast Guide - Part 3: Uploading and Syncing PGN Files Using FTP

Avatar of CHESScom
| 0

In Part 2 of this guide, we covered how to set up Portable Game Notation (PGN) files for sharing game data. In this part, we'll go over how to use an FTP client to upload these PGN files to a cloud location so Chess.com and other websites can live broadcast your event.

To simplify this process, we provide a dedicated FTP upload location you can use. Our PGN server is properly set up for this process, and you'll have full access to organize folders and share PGN links with us. Because of this, we believe this is your best option.

Alternatively, you can use another server and send us the PGN links. However, a high-quality relay requires frequent uploads and reads, which is not always the case with other servers. Overall, it's simplest to use the FTP upload location we provide.

Overview

As explained in Part 2, we only need the combined "games.pgn" file for each round. While you can upload every round's PGN file to the exact same location, we don't recommend this approach. When doing so, every new round overwrites the previous one, making the relay more prone to accidental overwrites. 

Instead, we suggest creating one subfolder per round and mirroring the structure that DGT LiveChess creates locally on your computer. Storing past rounds' data on the FTP upload location will allow you to restore corrupt data from previous rounds if needed.

Using our FTP upload location requires an FTP client. The most popular choice is WinSCP (Windows), but alternatives do exist, including DGT LiveChess v1's native FTP client, which will save you some of the steps below and only requires the FTP server credentials to set it up.

Setting Up The FTP Client

The following instructions are for WinSCP, but alternative clients should be similar:

Set up a "New Site" for ease of use later by adding the necessary information. Choose "FTP" as the file protocol. Provide the "Host name" and "Port number" supplied by us (or your vendor); if no port number is specified, use the default (21). Enter the username and password provided by us (or your vendor).

Save the configuration for reference later.

With your destination established and saved, click "Login" to connect to the upload server. Next, you can create subfolders for each round. You can mirror the DGT structure and call them "round-1," "round-2," and so on, or choose your own nomenclature. We prefer a simple numerical sequence, such as "01," "02," "03," etc.

Setting Up The Synchronization Process

Next, set up and start the synchronization process. The FTP client must detect and upload each new version of locally stored PGN files to the cloud, overwriting the previous version. To achieve this, set up automated sync between the local PGN folder and the remote folder used by Chess.com:

Click on "Commands" at the top menu of WinSCP and choose "Synchronize."

In the window that opens, choose the "Local" and "Remote" directories. The "Local" directory should be the specific directory of the current round on your drive, for example, "round-3" for Round 3. The "Remote" directory should be the directory you have specified to host the PGN files of the current round, for example, "round-3."

"Direction" should be set to "Remote." This means that the "Local" directory is the one being monitored for changes, and the data will flow from there to the "Remote" directory.

"Mode" should be set to "Synchronize files." This will ensure that only newer versions of the file are uploaded, avoiding regressions caused by corrupt file uploads.

"Comparison criteria" should be "Modification time," again ensuring that the most recent version of a file will be uploaded.

In "Synchronize options," leave "Preview changes" marked, but do not tick any other box. Mark the "Use same options next time" box to save your settings since you'll need to activate this functionality for every new round.

Click the "Transfer settings" button. In the new mask that opens, go to the "Other" section and type "games.pgn" into the "File mask" field. This will tell the client to only look for updates (and upload the new versions) of the "games.pgn" file and ignore everything else.

Click O.K. on this mask and also on the main window. This will start the synchronization process. Every time a file is updated locally (with new moves), the FTP client will synchronize it with the online location.

Once you've completed this initial configuration, you won't need to repeat several of the steps above. However, you should always double-check that the appropriate settings are in place when you start a new synchronization.

The FTP client constantly provides logs during the process, enabling real-time monitoring. You should monitor these logs, as the process is prone to issues and sometimes needs to be restarted.

Pro Tips

Before each round, remember to adjust the "Local" and "Remote" directories in the FTP client! This is a very common oversight that can lead to incorrect games being uploaded or games being uploaded to the wrong round on the server (and our platform).

It's also important to keep in mind that constantly uploading files to a server can result in performance issues for both the server and the FTP client. Setting up your FTP client to mirror the LiveChess folder structure and updating the entire root folder each time is possible but can worsen these issues. We highly recommend you invest a little extra time to minimize the number of uploads to only the essential "games.pgn" file of the active round. There is no reason to keep earlier or future rounds in sync or to upload all of the individual game files.

Conclusion

As you can see, broadcasting live chess games with PGN files is possible but not as simple. It's tougher for the operator, and many things can go wrong. These issues become more pronounced in blitz games or during time pressure since the frequency of data syncing increases, straining the entire process. That's why we encourage you to use the DGT LiveChess Cloud method discussed in part 1 of this guide whenever you can.


In the next part of our Broadcast Guide, we'll discuss how you can use chess-results.com and Swiss Manager to send us accurate information about your event.

Check out the full guide:

More News

Tournament Broadcast Guide - Part 2: PGN Files

Tournament Broadcast Guide - Part 2: PGN Files

Tournament Broadcast Guide - Part 4: Round Data And Numbering

Tournament Broadcast Guide - Part 4: Round Data And Numbering