This script installs ffmpeg and audiowaveform, tools required for audio processing and waveform generation. It automatically detects your operating system and uses the appropriate package manager.
./scripts/install-audio-tools.sh- macOS: Installs via Homebrew
- Ubuntu/Debian: Installs ffmpeg via apt, builds audiowaveform from source (takes a few minutes)
- Fedora/RHEL/CentOS: Installs via dnf/yum
- Alpine Linux: Installs via apk
- Arch Linux: Installs via pacman
- Windows: Manual installation required (see script output for download links)
- The script requires sudo privileges for package installation
- For Docker deployments, both tools are already included in the container
- If your OS is not supported, install manually:
This script fills the database with test data for development and testing purposes. All dates are relative to the script execution time.
npm run db:seed# Execute inside the running container
docker exec -it <container-name> npm run db:seed
# Or using docker-compose
docker-compose -f docker/docker-compose.yml exec audio-marker npm run db:seed- Users: 4 users (1 admin, 2 regular, 1 disabled)
admin@example.com- Admin useruser1@example.com- Regular user (John Doe)user2@example.com- Regular user (Jane Smith)disabled@example.com- Disabled user
- Audios: 6 audio files (5 public, 1 private) with descriptions
- Markers: Various point markers and section markers with different colors
- Playlists: 3 playlists (2 public, 1 private) with descriptions
- Listen Records: Randomly distributed listen statistics over the past 2 weeks
- Legal Information: Impressum, Privacy Policy, and Terms of Service
- The script uses
upsertfor most entities, so it's safe to run multiple times - Listen records are regenerated on each run (deleted and recreated)
- Audio files are not created - only database records pointing to placeholder paths
- Users still need to sign in via the configured auth provider
This script allows you to create a new admin user or promote an existing user to admin status.
npm run admin:create <email># Using tsx (recommended)
npx tsx scripts/create-admin.ts <email>
# Or using node with tsx loader
node --loader tsx scripts/create-admin.ts <email># Execute inside the running container
docker exec -it <container-name> npm run admin:create <email>
# Or using docker-compose
docker-compose -f docker/docker-compose.yml exec audio-marker npm run admin:create <email>
# Example with actual email
docker exec -it audio-marker npm run admin:create admin@example.comCreate or promote a user to admin:
npm run admin:create admin@example.com- If the user exists: The script will promote them to admin by setting
isAdmin = true - If the user doesn't exist: The script will create a new user with admin privileges
- The user will still need to sign in via the configured authentication provider (Authentik or Email)
- The email will be marked as verified
- Database must be accessible (check
DATABASE_URLenvironment variable) - Valid email address format
The script provides clear feedback:
- ✅ Success messages when user is created or promoted
- ℹ️ Information about the user's status
- ❌ Error messages if something goes wrong
- The script uses Prisma Client to interact with the database
- It's safe to run multiple times on the same email
- The script will automatically disconnect from the database when finished
This script generates waveform peak data for all MP3 files in the uploads directory. Peak data is stored as JSON files alongside the audio files and used for waveform visualization in the UI.
npx tsx scripts/generate-all-peaks.tsdocker exec -it <container-name> npx tsx scripts/generate-all-peaks.ts
# Or using docker-compose
docker-compose -f docker/docker-compose.yml exec audio-marker npx tsx scripts/generate-all-peaks.ts- Scans
data/uploads/for all.mp3files - Generates a
.jsonpeaks file next to each MP3 usingaudiowaveform - Skips files that fail and reports errors without stopping the batch
audiowaveformmust be installed and available inPATH- MP3 files must be located in
data/uploads/
- Safe to re-run; existing peak files will be overwritten
- Useful after migrating audio files or if peak files are missing
This script re-encodes all MP3 files in the uploads directory to CBR (Constant Bit Rate) format. This ensures consistent audio quality and compatibility with the waveform generation toolchain.
npx tsx scripts/reencode-all-audio.tsdocker exec -it <container-name> npx tsx scripts/reencode-all-audio.ts
# Or using docker-compose
docker-compose -f docker/docker-compose.yml exec audio-marker npx tsx scripts/reencode-all-audio.ts- Scans
data/uploads/for all.mp3files - Re-encodes each file to CBR MP3 in-place using
ffmpeg - Skips files that fail and reports errors without stopping the batch
ffmpegmust be installed and available inPATH- MP3 files must be located in
data/uploads/
- The original file is replaced by the re-encoded version
- Run this before generating peaks if uploaded files are in VBR format and causing issues