Skip to content

21. Archive Not Recording, Won't Play, or Filling the Disk

Troubleshooting issues specific to local stream archiving.

21.1 Common Issues

Issue Description
Archive Not Recording No files appearing in archive directory, recording not working
File Format Issues Archive files won't play or are corrupted
Files Not Named as Expected Archive filenames are unclear or unexpected
Archive Grows Too Large Disk filling up with old archives, storage management
Debug Logs How to check Archive-specific logs and error messages

21.2 Archive Not Recording

21.2.1 Symptoms

  • No files appear in the archive directory, or
  • The whole relay stops at startup with ERROR: ARCHIVE_PATH is not writable by the nginx user.: Twitch and YouTube stop too. See Archive Folder Not Mounted or Not Writable

21.2.2 Possible Causes

21.2.2.1 Archive Not Enabled

Check: Look for archive configuration in logs:

docker compose logs relay | grep -i archive

Solution: Set ARCHIVE_PATH in env/relay.env:

ARCHIVE_PATH=/archive

Recreate the container so it reads the new value:

docker compose up -d --force-recreate

Confirm the service is enabled:

docker compose logs relay | grep -E "service enabled|Skipping|ERROR"

21.2.2.2 Archive Folder Not Mounted or Not Writable

Check:

docker compose logs relay | grep "not writable"
ERROR: ARCHIVE_PATH is not writable by the nginx user.

This error appears both when no host folder is mounted and when the mounted folder is not writable by the container's nginx user (UID 100, GID 101).

Solution:

  1. In docker-compose.yml, mount a host folder at the path set in ARCHIVE_PATH. The volumes: block goes under the relay service:

    services:
      relay:
        image: ghcr.io/jacobsanford/rtmp-multistream:1.x
        build: .
        ports:
          - "1935:1935"
        env_file:
          - ./env/relay.env
        volumes:
          - ./stream_archive:/archive
    
  2. Create the folder and give it to the container's nginx user:

    mkdir -p stream_archive
    sudo chown 100:101 stream_archive
    

    Recordings in this folder are then owned by UID 100, so deleting them from the host requires sudo.

  3. Recreate the container:

    docker compose up -d --force-recreate
    
  4. Confirm the service is enabled:

    docker compose logs relay | grep -E "service enabled|Skipping|ERROR"
    

    The output includes Archive configuration complete, and service enabled.

21.2.2.3 Disk Space

Check: Verify available space:

df -h ./stream_archive

Solution: Free up disk space or use a different directory with more space.

Estimate space needed: - 1080p60 @ 20 Mbps: ~9 GB per hour - 720p60 @ 6 Mbps: ~2.7 GB per hour - 720p30 @ 3 Mbps: ~1.35 GB per hour

21.2.3 Confirm the Fix

Stream for a minute, then list the archive folder. A new file is there and grows while you stream:

ls -l stream_archive

21.3 File Format Issues

Issue: Archive files won't play or are corrupted

Archives are always recorded as FLV (Flash Video). Some players and editors refuse FLV files.

Solution: Convert the archive to MP4 without re-encoding:

ffmpeg -i <ARCHIVE_FILE> -c copy <OUTPUT_FILE>.mp4

Replace <ARCHIVE_FILE> with the archive's file name and <OUTPUT_FILE> with a name for the copy. Confirm the copy by opening <OUTPUT_FILE>.mp4 in your player.

21.4 Files Not Named as Expected

The name is <stream-name>-<unix-time>_<DDMMYYYY>_<HHMMSS>.flv, with the date and time in UTC. See File Naming for an example and how to sort the files.

21.5 Archive Grows Too Large

Issue: Disk filling up with old archives

List the recordings older than 30 days first:

find ./stream_archive -name "*.flv" -mtime +30 -print

If the list is what you expect to lose, delete them. This cannot be undone:

sudo find ./stream_archive -name "*.flv" -mtime +30 -delete

21.6 Debug Logs

For the startup lines every service prints, and which ones mean the container stopped, see Check Service Status. For more detail while streaming, see Increase Log Verbosity.

21.7 See Also