Skip to content

05. Getting the audio

Finding the matching audio for each Primary video, checking that it is the right recording, and filing it.

5.1 Finding audio on SoulSeek

VeeJay gets a song's audio from SoulSeek, controlled through slskd. Only the Primary video of a song gets audio, and VeeJay never extracts audio from a video.

Which file. The formats, in order of preference, are ALAC, FLAC, AAC and MP3. No other file type is accepted, and there is no bitrate floor. Within one format the higher bitrate wins.

Which peer. VeeJay takes a peer whose download starts within 30 seconds, best format first. A peer that queues the download is cancelled and the next peer is tried. When the peers run out, VeeJay returns to the first peer, the one with the lossless file, and accepts its queue. When no peer has a lossless file, it accepts the queue of the first lossy peer. A queued download does not hold up the next song: the song is marked audio pending until the file arrives, and pending audio is collected afterward.

Lidarr. The artist of every Primary video is added to Lidarr, and only after the artist has been verified by the album: the artist must have the album that the song belongs to. When that cannot be verified, the artist is not added. All artists and all albums are monitored. Lidarr is also the fallback source of audio when SoulSeek has no copy. If Lidarr is not connected, the song goes on a Needs audio list for you.

5.2 Checking it is the right recording

Audio is checked before it is filed, and audio that fails any check is not filed.

  1. The song exists in MusicBrainz and in at least one other source.
  2. The audio's length is within one minute of the length that MusicBrainz gives for the recording.
  3. The tags in the file match the database.
  4. The audio fingerprint matches through AcoustID.

The audio is compared only with the recording it should be. It is never compared with a video's length.

5.3 Quality and the better copy

When two copies of the same audio exist, the better one wins: ALAC, then FLAC, then AAC, then MP3, then the higher bitrate, then the larger file. The loser goes to the Trash, never deleted outright, and both names are logged.

5.4 Converting, tagging and lyrics

Converting. FLAC is converted to ALAC after download. A lossy file (AAC or MP3) is kept as it is and never converted, because converting lossy audio to lossless makes the file larger without making it better. The extension is the audio's own: .m4a for ALAC, for FLAC converted to ALAC and for AAC, and .mp3 for MP3.

Tagging. The tags are written from the same database row as the file name. The tags are listed in 8.3.

Lyrics. Only synchronized lyrics are stored, exactly as found, with their [mm:ss] timestamps. A plain-text result is never written.

  • The providers are tried in this order: LRCLIB, then LRCMux, then QQ. The first synchronized result stops the search.
  • The performer and the title are searched, never the album artist for a film, show or game song.
  • A song is looked up once, and the result is shared by every video of that song. A filled field is never looked up again.
  • A result under 300 characters is reported and not written. A song that nothing has lyrics for stays blank, and missing lyrics never fail a download.
  • A web search is used for identity and spelling only, never for the lyric text.

5.5 Pairing audio with video

A video and its audio are one pair when their file names are identical apart from the extension, in the same folder. That is how Plex pairs them. Only a Primary video and its audio form a pair, and a video that carries a disambiguation has no audio. The audio file also carries the YouTube link and ID of its song's Primary video, so the pair can always be rebuilt.

A mismatch is fixed only after you have approved it, and only after the correct album, year, disc and track have been researched. The audio then takes the video's name.