Skip to main content
Use ScreenCapture’s server exports to capture screenshots and WebM clips. The FiveMesh SDK issues a scoped upload URL for each capture and ScreenCapture sends the file to that URL from the server.

Prerequisites

Create an upload URL

Place this helper in your server Lua file above the capture functions. It gives each capture its own upload URL, folder and MIME restriction. The API key stays in the SDK’s server configuration.

Upload a screenshot

Call this function from your server script with the connected player’s server ID. Pass "blob" to remoteUpload so it sends multipart file data. The callback receives the decoded FiveMesh response.

Upload a video clip

Call this function with the connected player’s server ID. startVideoCaptureUpload records a 10-second WebM clip and uploads it after the recording ends. The FiveMesh response is in result.response.

Verify uploads

Trigger both functions through your capture workflow. Open the public URLs and check for the files under captures/screenshots and captures/clips in the CDN object browser. If a capture fails, check the server console for ScreenCapture errors. For longer clips, leave enough time for recording and transfer before the upload URL expires. If the file exceeds your upload limit, shorten the clip or reduce the capture dimensions.