{"id":15518962,"url":"https://github.com/darwinawardwinner/rganalysis","last_synced_at":"2025-04-23T04:14:29.224Z","repository":{"id":53526419,"uuid":"1147543","full_name":"DarwinAwardWinner/rganalysis","owner":"DarwinAwardWinner","description":"A script for adding replaygain tags to music files","archived":false,"fork":false,"pushed_at":"2021-03-26T00:54:40.000Z","size":157,"stargazers_count":32,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-23T04:14:23.639Z","etag":null,"topics":["cli","music","python","replay-gain"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DarwinAwardWinner.png","metadata":{"files":{"readme":"README.mkdn","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-12-07T19:37:40.000Z","updated_at":"2024-11-22T12:45:29.000Z","dependencies_parsed_at":"2022-09-21T03:20:22.414Z","dependency_job_id":null,"html_url":"https://github.com/DarwinAwardWinner/rganalysis","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarwinAwardWinner%2Frganalysis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarwinAwardWinner%2Frganalysis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarwinAwardWinner%2Frganalysis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DarwinAwardWinner%2Frganalysis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DarwinAwardWinner","download_url":"https://codeload.github.com/DarwinAwardWinner/rganalysis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250366716,"owners_count":21418772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","music","python","replay-gain"],"created_at":"2024-10-02T10:19:39.969Z","updated_at":"2025-04-23T04:14:29.202Z","avatar_url":"https://github.com/DarwinAwardWinner.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rganalysis.py: Add Replay Gain tags to your whole music library\n\nTo use this script, simply run it on your Music library directory. The\nhelp text (`rganalysis.py --help`) contains (almost) all you need to\nknow:\n\n\u003cpre\u003e\u003ccode\u003e\nusage: rganalysis [-h] [-f] [-i] [-n] [-g (track|album|auto)]\n                  [-b (audiotools|bs1770gain|auto)] [-j 4] [-m] [-q] [-v]\n                  [music_dir [music_dir ...]]\n\nAdd replaygain tags to your music files.\n\npositional arguments:\n  music_dir             Directories in which to search for music files.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -f, --force-reanalyze\n                        Reanalyze all files and recalculate replaygain values,\n                        even if the files already have valid replaygain tags.\n                        Normally, only files missing or inconsistent\n                        replaygain tags will be analyzed.\n  -i, --include-hidden  Do not skip hidden files and directories.\n  -n, --dry-run         Don't modify any files. Only analyze and report gain.\n  -g (track|album|auto), --gain-type (track|album|auto)\n                        Can be \"album\", \"track\", or \"auto\". If \"track\", only\n                        track gain values will be calculated, and album gain\n                        values will be erased. if \"album\", both track and\n                        album gain values will be calculated. If \"auto\", then\n                        \"album\" mode will be used except in directories that\n                        contain a file called \"TRACKGAIN\" or \".TRACKGAIN\". In\n                        these directories, \"track\" mode will be used. The\n                        default setting is \"auto\".\n  -b (audiotools|bs1770gain|auto), --backend (audiotools|bs1770gain|auto)\n                        Gain computing backend to use. Different backends have\n                        different prerequisites.\n  -j 4, --jobs 4        Number of albums to analyze in parallel. The default\n                        is the number of cores detected on your system.\n  -m, --low-memory      Use less memory by processing directories one by one\n                        rather than pre-computing the complete list of files\n                        to be processed. This will disable progress bars, but\n                        will allow rganalysis to run on very large music\n                        collections without running out of memory.\n  -q, --quiet           Do not print informational messages.\n  -v, --verbose         Print debug messages that are probably only useful if\n                        something is going wrong.\n\u003c/pre\u003e\u003c/code\u003e\n\n## Installation\n\nThen you can install this package from Github using `pip`:\n\n    pip install https://github.com/DarwinAwardWinner/rganalysis/archive/master.zip\n\nNote that rganalysis only works with Python 3. If you want progress\nbars in the output, you should also install\n[tqdm](https://pypi.python.org/pypi/tqdm).\n\nLastly, you need to install the prerequisites for at least one\nbackend. Right now there are 2 backends available for computing replay\ngain: one which uses the\n[audiotools](http://audiotools.sourceforge.net/) Python module, and\none which uses the command-line program bs1770gain. You'll need to\ninstall either one or the other to use this script. (If you prefer\nanother tool for computing replay gain, feel free to let me know about\nit, and I will see if I can write a backend for it.)\n\n\n## What is an album?\n\nWhen doing \"album\" or \"audiophile\" Replay Gain tags, one needs to\ncarefully define an album. For example, if you happen to have half an\nalbum in FLAC format and the other half in MP3, they might be at\ndifferent volumes to begin with, so calculating Replay Gain tags on\nthe whole album is a bad thing -- the MP3s will end up too loud and\nthe FLACs too quiet, or vice versa.\n\nAnyway, this script considers two tracks to belong to the same \"track\nset\" for the purposes of calculating audiophile gain if:\n\n* They are in the same directory on the filesystem\n* They are both the same music format (MP3, OGG, FLAC, etc.)\n* They have the same \"album\" tag (preferring the \"albumsort\" tag if\n  present)\n* They have the same \"albumartist\" (preferring the \"albumartistsort\"\n  tag if present, and falling back to \"artistsort\" then \"artist\" if\n  there is no album artist tagged)\n* They have the same \"discnumber\" tag (or lack thereof)\n\nThis means if you have a multi-artist album, you'll need to set the\n\"albumartist\" tag to the same value (e.g. \"Various Artists\") on all\nsongs in the album in order for all the songs to be grouped as a\nsingle album. You can still set a different \"artist\" tag on each song.\n\n## See also\n\n[Transfercoder](https://github.com/DarwinAwardWinner/transfercoder), a\ntool for transferring your music to your portable mp3 player while\nsimultaneously transcoding music formats that the player doesn't\nrecognize.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarwinawardwinner%2Frganalysis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarwinawardwinner%2Frganalysis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarwinawardwinner%2Frganalysis/lists"}