Re: Automatically convert flac to mp3 and keep it in sync
I have recently set up something similar.
On a server i would look at ffmpeg for the flac to mp3 conversion. I believe this is possible for these two file types.
This seems to suggest so.
You can monitor directories using incron and incrontab (inotify cron) that can run a script when a file is put,moved,deleted (etc) in a directory.
The only downside with incron is that it is not directory recursive but there work-arounds.
One is to use a recursive version of incron (Search the net. There are a number out there).
Another workaround, that i use, is get incron to monitor a single directory and put symbolic links into that directory.
Incron will pick up when the symbolic link is created passing you the link to the file or a directory to transcode.
You can transcode in a script based on that link and delete the link when finished.
Another smart thing you can do is change the operation (eg transcode type etc) based on the name of the link just like links into busy box do for different commands such as ls, date and chmod
Last edited by matt_symes; May 16th, 2012 at 12:08 AM.
If you believe everything you read, you better not read. ~ Japanese Proverb
If you don't read the newspaper, you're uninformed. If you read the newspaper, you're mis-informed. - Mark Twain