I want to be able to add date / time to the egress...
# ask-ai
m
I want to be able to add date / time to the egress recording
t
Thanks for reaching out, Sam. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your request about adding date/time to egress recordings. Short answer: • LiveKit does not provide a built‑in toggle to burn visible date/time stamps into egress recordings. • You can add visible timestamps either by rendering them into the video during egress (custom compositor / browser-based layout) or by post-processing the recorded file (e.g., with FFmpeg). Two practical approaches you can choose from 1) Render timestamps during egress (live overlay) • Use a browser-based compositor or custom layout page with the Egress Template / Universal Egress approach. Load a small web page in the compositor that displays the current date/time (updated via JavaScript) and position it as an overlay in your layout. This will record the timestamp as part of the video output. • This gives you an accurate live stamp that matches the recorded frames and works for live recordings where you want the timestamp baked in immediately. 2) Post-process the recorded file (FFmpeg) • After egress finishes, run a post-processing step that draws date/time text onto the video using FFmpeg. You can use the file’s metadata timestamps (e.g.,
startedAt
,
endedAt
,
createdAt
from egress/webhook events) to compute the correct time for each frame or to stamp a single capture time. • FFmpeg examples can add a static timestamp or a running clock; I can provide exact FFmpeg commands if you want to go this route. Questions to help me give exact steps • Do you need a running clock (updated every frame) visible during the whole recording, or just a single timestamp (e.g., recording start time) in a corner? • Do you prefer the timestamp to be in local time or UTC? • Are you planning to use LiveKit’s Universal Egress/browser compositor or do you want a post-processing pipeline (FFmpeg)? • If post-processing, which OS or environment will run the FFmpeg job (Linux, macOS, serverless, etc.)? If you tell me which option you prefer and answer those questions, I’ll give a step-by-step example (including a sample HTML overlay for the compositor or an FFmpeg command to burn timestamps into the video). Sources: Backup Egress Recordings | Universal Egress | Universal Egress
m
A running clock would be amazing
t
Great — I’ll walk you through a simple, reliable way to get a running clock burned into your egress recordings by rendering the clock in a browser-based compositor during egress. Overview • Use a browser compositor (Universal Egress / Egress Template using a headless Chrome) that loads a custom web page which displays a running date/time. • The compositor captures that page as an overlay and outputs it in the recorded video, so the clock is baked into the egress file in real time. What you’ll need • Egress configured to use a browser-based layout (template/compositor). • A small web page (HTML + CSS + JS) that shows a running clock and provides a transparent background so it overlays the video. • A layout configuration for the compositor that positions the clock on the video (corner, size, opacity). Sample overlay page (HTML + JS) • This example shows a running clock in the bottom-right corner. Save as e.g.,
clock_overlay.html
.
Copy code
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<style>
  html,body { margin:0; padding:0; width:100%; height:100%; background:transparent; overflow:hidden; }
  #clock {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 6px 10px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 18px;
    border-radius: 6px;
    backdrop-filter: blur(2px);
  }
</style>
</head>
<body>
  <div id="clock">—</div>

  <script>
    function pad(n){ return n < 10 ? '0'+n : n; }
    function updateClock(){
      const d = new Date();
      // Example format: 2026-03-02 14:05:07
      const ts = d.getFullYear() + '-' + pad(d.getMonth()+1) + '-' + pad(d.getDate())
        + ' ' + pad(d.getHours()) + ':' + pad(d.getMinutes()) + ':' + pad(d.getSeconds());
      document.getElementById('clock').textContent = ts;
    }
    updateClock();
    setInterval(updateClock, 1000);
  </script>
</body>
</html>
Notes about the page • Background is transparent so the compositor can overlay it on top of the video. • You can adjust font, size, position, color, and opacity. • If you want local timezone, the page uses the compositor environment’s timezone (usually UTC on server environments) — you can convert or format time as needed in JavaScript. How to use this with the browser compositor 1. Host the HTML page where the compositor can load it (static file server or embed it in the compositor instance). 2. Configure your egress compositor to include this page as an overlay layer. The compositor should render the meeting/video plus this page on top. 3. When you start egress, the compositor will record the combined output with the running clock baked in. Alternative: pass timestamps from the server • If you prefer the server to drive the clock (e.g., to ensure a specific timezone or sync with
startedAt
), the compositor page can accept query params or a small JSON payload from your egress job and render based on that. Example: load
clock_overlay.html?tz=America/Los_Angeles
and use Intl APIs to render in that timezone. Post-processing fallback • If you cannot use a compositor, you can achieve a running clock with FFmpeg post-processing, but that adds complexity for perfectly syncing a running clock with the original frames. The compositor approach is simpler and ensures the timestamp matches the recorded frames. Questions to make this exact for you • Are you using LiveKit’s Universal Egress/browser compositor or another egress workflow? (If unclear, tell me how you currently start egress.) • Do you want timezone conversion (local vs UTC) or any specific timestamp format? • Where would you host the overlay page (public URL, packaged with the compositor, or served from your app)? • Do you want the clock visible for the entire recording or only during certain segments? If you confirm those details, I’ll provide: • A ready-to-use overlay page that uses a specific timezone or format you want. • Example compositor layout configuration (placement and sizing). • If needed, an FFmpeg fallback command for post-processing. Would you like the overlay formatted for a particular timezone or style (e.g., larger, different corner, 12-hour clock with AM/PM)?