Summary
Server-side transcode uploaded WebM/Opus recordings to MP3 for playback compatibility on older devices that do not support WebM (pre-2021 iOS, legacy browsers).
Requirements
- ffmpeg as system dependency in Docker image
- Transcode WebM/Opus to MP3 (128kbps mono)
- Extract duration via ffprobe if not already set
- Store MP3 alongside or replacing the original WebM
- Clean up source WebM after successful transcode (optional, could keep both)
Technical notes
- Can run synchronously on upload for simplicity, or as a background task if performance is a concern
- ffmpeg command:
ffmpeg -i input.webm -ac 1 -ab 128k -f mp3 output.mp3
- Duration extraction:
ffprobe -v quiet -show_entries format=duration -of csv=p=0 output.mp3
- Playback view would need to serve the MP3 instead of (or alongside) the WebM
Context
WebM/Opus has broad support in 2026 browsers (Chrome, Firefox, Edge, Safari 14.1+). This is a fallback for edge cases like older donated hospital devices. Not required for MVP launch.
Acceptance criteria
Summary
Server-side transcode uploaded WebM/Opus recordings to MP3 for playback compatibility on older devices that do not support WebM (pre-2021 iOS, legacy browsers).
Requirements
Technical notes
ffmpeg -i input.webm -ac 1 -ab 128k -f mp3 output.mp3ffprobe -v quiet -show_entries format=duration -of csv=p=0 output.mp3Context
WebM/Opus has broad support in 2026 browsers (Chrome, Firefox, Edge, Safari 14.1+). This is a fallback for edge cases like older donated hospital devices. Not required for MVP launch.
Acceptance criteria