Posts
Audio posts
A sound is a post of its own kind, node.medium.video-service.audio.v1: a
voice note, a song, a talk, a podcast episode. It has an audience, replies,
likes and a place in feeds like any post, and a player of its own in the
web app, at /audio/<id>. It is made and kept by video-service, which has
the worker and ffmpeg, and is sent as a video is (roadmap rows 137 and 184,
Audio and video from everywhere (opens in a new tab)).
Its routes are in the API reference: Audio posts, and, shared with videos, video-service.
Posting one
It is posted where videos may be (VIDEO_UPLOADS), unless AUDIO_UPLOADS
is off, and recorded in the composer only where AUDIO_RECORDING is
on.
- Chosen as a file, or recorded in the web app's composer, which records M4A or WebM as the browser does, in stereo.
- Sent as a video is, in parts straight to storage, through the same
routes (Sending a video). What the browser
says the file is decides: MP3, M4A and AAC, Ogg and Opus, WAV, FLAC and
WebM sound make an audio post; the upload keeps its kind
(
video_uploads.kind). - Held to
AUDIO_MAX_BYTESandAUDIO_MAX_SECONDS(500 MB and an hour unless said), and toVIDEO_DAILY_UPLOADSwith videos.
What the worker does
It reads the file by its first bytes, as it reads a video, wants a sound in it, and keeps one file:
- AAC at 128 kbit/s in an M4A (
audio.m4a), made to start at once, with nothing else of the file. - At an even loudness, the loudness podcasts are made at (-16 LUFS,
peaks under -1.5 dB, ffmpeg's
loudnorm), so that a quiet voice note is heard as easily as any sound (the user, 2026-11-29). - Labelled an M4A in its first bytes (
ftyp M4A, ffmpeg'sipodmuxer): Mastodon goes by them, and took the generic MP4 label for a video with no picture, a file of no known kind. - Its waveform measured: 100 numbers from 0 to 255, each the loudest
moment of its share of the sound (
encode.Peaks). - Its cover and listening card made, below.
The post
It has a title, words and the rest as a video post has; its meta holds
audio, sent by the API as audio: { duration, url, type, cover, peaks, card }, its files at /videos/:id/files/<name>, answered as a video's
are. A sound from before the waveform was measured has no peaks. A
profile's audio posts are GET /videos/:owner_id/?type=audio, under an
Audio tab.
Covers
In order, the first there is:
- A cover its author gave it later, kept by identity-image-service as
any post's cover is (
POST /covers/:id/), sent with it ascover_urls. - A cover chosen while it was sent:
POST /videos/uploads/:id/cover, before the upload is complete (JPEG, PNG, WebP or GIF, at most 15 MB). It is kept beside the upload ascover-given, and made by the worker its cover in place of a picture the file carries, so that it is there when the post first goes out. The web app makes a photo ready first, a camera's HEIC made a JPEG and its longest side 2048 pixels. - The picture the file carries, an album's cover (
cover.jpg, a JPEG no wider than 1600 pixels). - Its author's profile photo, where it has none of these.
The listening card
card.jpg, 1200 × 630: one picture for wherever a link to it goes and the
sound cannot. Its cover, the file's picture or its author's photo, square,
on flat dark grey, with a round play button over it and how long it plays
in large type (DejaVu Sans, the one font the images that draw it carry).
The worker draws it before the post is made. It is named by the picture it
was drawn from (videos.CardKey), so a new cover makes a new one, which
the API draws when it is first asked for. Older ones stay beside the sound
until the post goes.
Elsewhere
- To the fediverse: a note with Mastodon's
Audioattachment, its title first, and its square picture as the attachment'sicon(picture.jpg: its cover, the file's picture or its author's photo). Mastodon shows it beside its own player, cut to a square from its middle, so a wide picture is not sent. - To Bluesky, which takes no sound: its words with a card that leads to it here, "Listen on · 0:20", its title under that and its listening card the card's picture.
- Anywhere else a link goes, its listening card is the page's picture (Web shell).
See Federation.
Downloading and removing
- Downloaded as a video is, its M4A, where downloading is allowed (Downloading).
- Kept and removed as a video's files are: named for the nightly file sweep, removed with the post, with its profile, and in the download.
Endpoints
Most are a video's (Endpoints). What is a sound's:
| Endpoint | Who | What |
|---|---|---|
POST /videos/:owner_id/uploads |
signed in, may post there | Begin one, the file a sound |
POST /videos/uploads/:id/cover |
the uploader | Its cover, before it is complete |
GET /videos/:owner_id/?type=audio |
anybody | A profile's audio posts |
GET /videos/:id/files/:name |
whoever may see it | audio.m4a, cover.jpg, picture.jpg or card.jpg |
POST, PUT, DELETE /covers/:id/ |
whoever may edit it | A cover of its author's, later |
Settings
| Setting | What it does |
|---|---|
AUDIO_UPLOADS |
off lets no sound be posted, chosen or recorded, where videos may be; on unless said. Read by graph-grpc-service, video-service and auth-service |
AUDIO_RECORDING |
on offers a microphone in the composer; off unless said, and never where audio posts are off. Read by auth-service, which tells the web app |
AUDIO_MAX_BYTES, AUDIO_MAX_SECONDS |
The largest file taken, and the longest sound: 500 MB and an hour unless said. Read by video-service and video-worker |
In full: Configuration.
What is not built
- Sound from other networks played here: phase 3 of Audio and video from everywhere (opens in a new tab); a sound from Mastodon leads to its page until then.
- A sound as a video on Bluesky: its cover as a still picture with the sound, in place of the listening card (anahita-web's roadmap row 188).
From anahitasocial/anahita-services, 2026-11-30.
Written by Claude, reviewed by Rastin Mehr · About this