Overview
Haystack provides comprehensive media management capabilities including automatic transcription, multi-format encoding, chapter detection, and CDN delivery. Understanding the media pipeline helps you efficiently manage your content library.Video Hosting Options
Churches can choose how they want to host and play their video content:Haystack Player
Use Haystack’s custom video player powered by Mux
YouTube
Embed YouTube player in your site
Vimeo
Embed Vimeo player in your site
Why Upload to Haystack?
When you upload media to Haystack (even if hosting elsewhere), we:- Transcribe the audio with word-level timestamps
- Index the content for semantic search
- Extract topics, speakers, and key moments
- Generate searchable chapters
- Enable “jump to moment” functionality
Media Assets
Media Assets represent video or audio files attached to items. Each item can have multiple media assets in different formats or qualities.Content Types
Haystack supports two primary content types:Video
Full video content with audio, visual, and subtitle tracks
Audio
Audio-only content for podcasts and audio messages
Media Status Lifecycle
1
created
Media asset record created, awaiting file upload
2
uploaded
File uploaded, awaiting processing
3
processing
Transcoding to multiple formats and bitrates
4
ready
Available for playback and searching
5
error
Processing failed - check error details
Creating Media Assets
To upload a video or audio file to Haystack, use a two-step process:Step 1: Create Media Asset and Get Upload URL
First, create a media asset to get a secure upload URL:itemId(required) - The item this media belongs toexternalUrl(optional) - YouTube or Vimeo URL for playback onlyexternalPlatform(optional) -'youtube'or'vimeo'when using external playback
External URLs are for playback only. Even if you provide a YouTube or Vimeo URL, you must still upload the original video file to Haystack in Step 2 for AI processing (transcription, search, etc.).
Step 2: Upload File to Upload URL
Use the returneduploadUrl to upload your video or audio file:
- Video: MP4, MOV, AVI, MKV, WebM
- Audio: MP3, WAV, AAC, M4A, FLAC
Automatic Transcription
When media is uploaded, Haystack automatically:- Extracts audio from video files
- Transcribes speech using AI speech recognition
- Timestamps every word for precise searching
- Indexes content for semantic search
Transcription Quality
Transcription accuracy depends on:- Audio quality (higher quality = better accuracy)
- Speaker clarity and accent
- Background noise levels
- Language (English is best supported)
Media Chapters
Chapters divide media into logical sections with titles and timestamps. They improve navigation and user experience.Auto-Generated Chapters
Haystack can automatically detect chapter boundaries based on:- Transcript analysis
- Silence detection
- Scene changes (for video)
Manual Chapters
Create chapters manually for precise control:Media Variants
Variants allow you to offer different versions of content for the same item. Each collection has predefined variant types that serve different purposes.Common Variant Types
- Sermon Video - The main sermon message (video)
- Sermon Audio - Audio-only version of the sermon
- Full Service - Complete worship service including music, announcements, etc. (video)
- Podcast - Edited audio version optimized for podcast distribution
How Variants Work
Each item can have multiple media assets, each assigned to a different variant type:Variant Properties
- name - Descriptive name (e.g., “Sermon Video”, “Podcast”)
- contentType - Either “video” or “audio”
- indexable - Whether this variant can be used for search/transcription
- displayOrder - Order shown to users when selecting variants
- collectionId - Variant types are tied to specific collections
Indexing and Search
Only one media asset per item is indexed for search and transcription:- If multiple variants are marked as
indexable, video variants are preferred over audio - The indexed variant is used for transcription, search, and AI features
- All other variants are available for playback but not searchable
Variant types are predefined per collection and cannot be customized by API consumers. Each collection includes video and audio variant types by default.
Playback URLs
Haystack stores the Mux playback ID, which you use to construct playback URLs:muxPlaybackId:
HLS Streaming
All media is delivered via HLS (HTTP Live Streaming) for:- Adaptive bitrate streaming
- Fast startup times
- Reliable playback across devices
Thumbnails
For Haystack Custom Player: When using the Haystack custom player, thumbnails are automatically generated at regular intervals via Mux:Thumbnail availability depends on your chosen video player. Mux-generated thumbnails are only available when using the Haystack custom player.
API Reference
Key endpoints for media management:POST /media/create- Create media asset and get upload URLGET /media/{id}- Get media asset detailsDELETE /media/{id}- Delete media assetPOST /media/chapters- Create a chapterPATCH /media/chapters/{id}- Update a chapterDELETE /media/chapters/{id}- Delete a chapter

