Compare commits

...

1 Commits

Author SHA1 Message Date
Vincent Riquer
a034f1b721 README: convert to markdown 2025-01-22 22:45:28 +01:00

View File

@ -1,14 +1,12 @@
AtOM: Anything to Ogg and Mp3 # AtOM: Anything to Ogg and Mp3
URL: https://forge.riquer.fr/p/AtOM/ URL: https://forge.riquer.fr/p/AtOM/
Author: Vincent Riquer <vincent+prog.atom@riquer.fr> Author: Vincent Riquer <vincent+prog.atom@riquer.fr>
Copyright/left: 2012-2013,2015,2025 Vincent Riquer - GPLv3 (see doc/GPL-3) Copyright/left: 2012-2013,2015,2025 Vincent Riquer - GPLv3 (see doc/GPL-3)
except: transogg: WTFPL 2.0 except: transogg: WTFPL 2.0
============ ## Dependencies
Dependencies ### Required:
------------
Required:
* bash (>= 4.0) * bash (>= 4.0)
http://www.gnu.org/software/bash/bash.html http://www.gnu.org/software/bash/bash.html
* SoX * SoX
@ -16,7 +14,7 @@ Required:
* SQLite * SQLite
http://www.sqlite.org/ http://www.sqlite.org/
Optional: ### Optional:
* vorbis-tools * vorbis-tools
http://www.vorbis.com/ http://www.vorbis.com/
* ogginfo (Ogg Vorbis metadata) * ogginfo (Ogg Vorbis metadata)
@ -40,12 +38,9 @@ Optional:
* ffprobe (ID3v2, Musepack, Windows Media and video metadata) * ffprobe (ID3v2, Musepack, Windows Media and video metadata)
* ffmpeg (Windows Media and video decoding) * ffmpeg (Windows Media and video decoding)
================== ## Using the software
Using the software
------------------
Configuration: ### Configuration:
--------------
On first run, AtOM will ask a set of questions to help you create a On first run, AtOM will ask a set of questions to help you create a
configuration file. configuration file.
You can run atom -S at any time to re-run the setup. It will be prefilled with You can run atom -S at any time to re-run the setup. It will be prefilled with
@ -54,16 +49,14 @@ your current configuration.
If, however, you still want to make changes manually, please read doc/config. If, however, you still want to make changes manually, please read doc/config.
There are a lot of comments in the generated config file too. There are a lot of comments in the generated config file too.
Preparing data: ### Preparing data:
---------------
Nothing specific needs to be done. You can edit ypur tags, rename files, move Nothing specific needs to be done. You can edit ypur tags, rename files, move
them around how you see fit. However, make sure you setup your tag editor them around how you see fit. However, make sure you setup your tag editor
to *do* update the files' timestamps: though it was initially plan to make this to *do* update the files' timestamps: though it was initially plan to make this
optional, using checksums or tags, it was abandoned due to the huge amount of optional, using checksums or tags, it was abandoned due to the huge amount of
IO required. IO required.
Running: ### Running:
--------
Make sure your configuration is correct by running Make sure your configuration is correct by running
$ atom -C $ atom -C
This will produce a human-readable dump of your current configuration. This will produce a human-readable dump of your current configuration.
@ -77,8 +70,7 @@ If, for whatever reason, you need to force the regeneration of a destination,
after changing the quality settings for example, run after changing the quality settings for example, run
$ atom -F <destination name> $ atom -F <destination name>
Running as a cronjob: ### Running as a cronjob:
---------------------
If you want to run AtOM as a cronjob, atom -q will give you a cleaner output, If you want to run AtOM as a cronjob, atom -q will give you a cleaner output,
more suitable for mail or logfile output. You may also want to limit the size of more suitable for mail or logfile output. You may also want to limit the size of
each batch with -B <batch size>. AtOM will not create or update more than each batch with -B <batch size>. AtOM will not create or update more than
@ -88,11 +80,8 @@ For example:
#m h dom mon dow command #m h dom mon dow command
0 5 * * * atom -B 1000 -q 0 5 * * * atom -B 1000 -q
================= ## Technical details
Technical details ### I. Source scan
-----------------
I. Source scan
--------------
After reading its configuration file, AtOM uses find to get a list of all files After reading its configuration file, AtOM uses find to get a list of all files
in the source directory. in the source directory.
Each file is checked against the database. If it's already there, and its last Each file is checked against the database. If it's already there, and its last
@ -101,16 +90,14 @@ If its mtime has changed, mime-type scan is attempted. It is updated in the
database, along with last_seen. database, along with last_seen.
If the file is new, its mime-type is scanned, and it is added to the database. If the file is new, its mime-type is scanned, and it is added to the database.
II. Obsolete files ### II. Obsolete files
------------------
Using the last_seen field, AtOM removes from destinations each files which are Using the last_seen field, AtOM removes from destinations each files which are
not present anymore in the source directory. AtOM never touches files not not present anymore in the source directory. AtOM never touches files not
present in its database (unless there is a filename conflict, in which case your present in its database (unless there is a filename conflict, in which case your
file *WILL* be overwritten). If you wish to clear unknown files from your file *WILL* be overwritten). If you wish to clear unknown files from your
destinations, have a look at toys/cleandestinations. destinations, have a look at toys/cleandestinations.
III. Reading metadata ### III. Reading metadata
---------------------
AtOM then tries to read metadata from each new or changed file. It also re-reads AtOM then tries to read metadata from each new or changed file. It also re-reads
metadata from files scanned with an older version of AtOM, if the parser for metadata from files scanned with an older version of AtOM, if the parser for
that format has changed. The actual data read depends on the format, but at the that format has changed. The actual data read depends on the format, but at the
@ -118,8 +105,7 @@ very least, AtOM should identify the sampling rate, bitrate and number of
channels. Unknown file types are scanned with ffprobe, so you may still have channels. Unknown file types are scanned with ffprobe, so you may still have
some luck, depending on your FFmpeg setup. some luck, depending on your FFmpeg setup.
IV. Task creation ### IV. Task creation
-----------------
For every destination files having their last change field different from their For every destination files having their last change field different from their
corresponding source file entry, we create one or more tasks, to generate or corresponding source file entry, we create one or more tasks, to generate or
update (overwrite) the destination file. AtOM tries to generate as few tasks as update (overwrite) the destination file. AtOM tries to generate as few tasks as
@ -138,8 +124,7 @@ The steps required for each file depend on the format and destination parameters
decoded/resampled file) to 3 (if format can't be decoded using sox and decoded/resampled file) to 3 (if format can't be decoded using sox and
resampling/normalization is required) tasks. resampling/normalization is required) tasks.
V.1 Running tasks #### V.1 Running tasks
-----------------
While running tasks, AtOM responds to the following keypresses: While running tasks, AtOM responds to the following keypresses:
+/- Increase/decrease max-load +/- Increase/decrease max-load
q Quit (will skip all following steps) q Quit (will skip all following steps)
@ -151,14 +136,12 @@ T:<last task>/<task count> (F:<failed tasks>)
<pct>% <remaining time> (A:<average task duration>s/task) <pct>% <remaining time> (A:<average task duration>s/task)
ETA:<estimated time of arrival> ETA:<estimated time of arrival>
V.2 Renaming files #### V.2 Renaming files
------------------
If rename pattern (or FAT32 compatibility) for one or more destinations has If rename pattern (or FAT32 compatibility) for one or more destinations has
changed, files already transcoded will be renamed. Otherwise, this step is changed, files already transcoded will be renamed. Otherwise, this step is
skipped. skipped.
VI. Copies ### VI. Copies
----------
During that stage, files which mime-types matched copy_mime-type directives are During that stage, files which mime-types matched copy_mime-type directives are
copied (symlinked where possible) to the destination. copied (symlinked where possible) to the destination.
When a rename pattern is defined and impacts path, files that are not in the When a rename pattern is defined and impacts path, files that are not in the
@ -166,23 +149,18 @@ same directories as files which have been successfully transcoded are ignored,
as AtOM cannot guess what the destination path should be. Otherwise, files are as AtOM cannot guess what the destination path should be. Otherwise, files are
copied with their name and path unchanged. copied with their name and path unchanged.
VII. Obsolete files 2 ### VII. Obsolete files 2
-------------------
Whenever a file is transcoded, if it was already present in the database but its Whenever a file is transcoded, if it was already present in the database but its
name changed, following a rename pattern change, the old file is removed during name changed, following a rename pattern change, the old file is removed during
that stage. that stage.
==== ## Toys
Toys
----
AtOM requires a database to function. Now that we have a database containing AtOM requires a database to function. Now that we have a database containing
various information about our media files, why not use it? various information about our media files, why not use it?
AtOM comes with a small set of tools in the toys/ directory. These are AtOM comes with a small set of tools in the toys/ directory. These are
documented in toys/README. documented in toys/README.
======================== # Shameless Self Promotion
Shameless Self Promotion
------------------------
I am the author of free (Creative Commons CC-By-SA) music which you can stream I am the author of free (Creative Commons CC-By-SA) music which you can stream
for free, or buy to get high quality and bonuses from Bandcamp for free, or buy to get high quality and bonuses from Bandcamp
(http://djblackred.bandcamp.com). If you like electronic music taking its (http://djblackred.bandcamp.com). If you like electronic music taking its
@ -190,14 +168,12 @@ inspiration from Trance, Drum & Bass, Ambient and (rarely) Free Jazz, please
check it out! check it out!
Downloads are available in FLAC, Ogg, MP3, and more, and includes the "source Downloads are available in FLAC, Ogg, MP3, and more, and includes the "source
code" (sequencer files and the likes) for most tracks. code" (sequencer files and the likes) for most tracks.
I am receiving 85% of the money you'll spend, so you won't be feeding some I am receiving 80% of the money you'll spend, so you won't be feeding some
greedy BigCorp producer or distributor. greedy BigCorp producer or distributor.
And if you don't like it, you can still spread the word to friends who may like. And if you don't like it, you can still spread the word to friends who may like.
You can see this as a way to thank me for this piece of code. You can see this as a way to thank me for this piece of code.
===== # Legal
Legal
-----
Some of the format and/or tool names cited above are trademarks belonging to Some of the format and/or tool names cited above are trademarks belonging to
their rightful owners. AtOM and its authors are not linked in any way to their rightful owners. AtOM and its authors are not linked in any way to
those companies or individuals. Said companies do not endorse nor support those companies or individuals. Said companies do not endorse nor support