Offline FreeDB – Example

It’s been quite a while since I released Offline FreeDB. In the meantime I’ve been too busy to go more into detail. Here at last I’ll show to you how to implement the fast Offline FreeDB Java library to query the FreeDB database and find information for almost any disc or bundle of music files you’re looking for.

What’s required?

OFDB source code or a new Java project with latest OFDB library or declared OFDB Maven dependencies.

  pietma releases


About 1 GByte of free disc space for the latest FreeDB file from By today it’s freedb-complete-20151001.tar.bz2.

About 6 more GByte of free disc space for the extracted freedb (.tar) and index.

How to query the library?

Just change paths to the latest FreeDB archive name. During the first run it’ll take 15 minutes to extract and index its content.

Provided track durations are given in seconds and very likewise a folder on your filesystem it’s orders are mixed.

Error fetching: cURL error 28: Connection timed out after 2001 milliseconds

What’s the result?

All results are sorted by total deviation in seconds. They contain deviance like original track number and all information from FreedDB such as titles and artists.

found: 13
time elapsed:560

 .discTotal: 		9
 .tracksTotal: 		9.0
 .track: 		[0.22666666666666666, 1.0533333333333332, 0.6533333333333333, 0.8133333333333334, 1.16, 0.9066666666666666, 0.5733333333333334, 0.7866666666666666, 1.3066666666666666, 0.30666666666666664, 0.9466666666666667, 0.26666666666666666]
 .trackMapping: 	[0, 1, 4, 2, 3, 5, 6, 7, 8, 9, 10, 11]
 .discid: 		970a320c
 .discLength: 		2612 sec.
 .frames: 		[150, 17475, 34350, 48600, 64875, 79575, 96150, 114525, 132750, 152925, 168300, 182325, 195900]
 .trackFrameOffsets: 	[150, 17475, 34350, 48600, 64875, 79575, 96150, 114525, 132750, 152925, 168300, 182325]
 .category: 		null
  .discLength: 		2621 sec.
  .revision: 		7
  .trackFrameOffsets: 	[150, 17492, 34446, 50782, 65569, 79868, 96511, 114929, 133213, 153486, 168884, 182980]
   .name: 		cddbd
   .version: 		v1.5.2PL0
   .comment: 		Copyright (c) Steve Scherf et al.
   .name: 		ExactAudioCopy
   .version: 		v1.0b1
  .compilation: 	false
  .discId: 		a70a3b0c
  .genre: 		Pop
  .artist: 		Colbie Caillat
  .title: 		Coco
  .year: 		2007
  .extendedData: 		YEAR: 2007
   .artist: 		'Colbie Caillat', .title: 'Oxygen', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'The Little Things', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'One Fine Wire', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'Bubbly', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'Feelings Show', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'Midnight Bottle', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'Realize', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'Battle', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'Tailor Made', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'Magic', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'Tied Down', .extendedData: ''
   .artist: 		'Colbie Caillat', .title: 'Capri', .extendedData: ''



Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.