I solved this problem by both storing the files in FLAC and in a lossy format (mp3). Everyday a script will be executed to look for modifications in the FLAC file collection and then convert the changes to mp3. The only challenge in this task was to find someone (thanks Robin Bowes) who had done it before and then get it working on my Ubuntu server. It is based on flac2mp3 ticket 96 which supports embeded album art.
Guideline
- Install the libraries required by flac2mp3 (lame, perl, flac). See Requirements
- Place this directory in /usr/bin/
- Edit the convertmusic.sh so it points to your musiccollection and where you want the mp3 files stored
- Edit the top section of flac3mp3.pl if for instance you want higher/lower quality of the converted files
- Test the script by running:
/usr/bin/flac2mp3/convertmusic.sh - Setup a cronjob to execute the conversion once a day by executing:
sudo crontab -e
Add this line:
34 12 * * 1-7 /usr/bin/flac2mp3/convertmusic.sh
And save it (34 12 means that it will be executed 12:34 every day). - Watch it do its job by tailing the log (everything is logged to messages using logger):
sudo tail -f /var/log/messages
And
sudo tail -f /var/log/syslog
flac2mp3
flac2mp3downloads
flac2mp3 ticket 96 (support for album art)
flac2mp3 ticket 96 download
flac2mp3.pl and album art
crontab guideline
flac
lame
logger
Ingen kommentarer:
Send en kommentar