{"id":50127358,"url":"https://github.com/zefir1990/flac2mp3","last_synced_at":"2026-05-23T20:34:38.458Z","repository":{"id":359297592,"uuid":"1245404660","full_name":"zefir1990/flac2mp3","owner":"zefir1990","description":"A clean Python script to recursively convert FLAC files to high-quality MP3 format using ffmpeg.","archived":false,"fork":false,"pushed_at":"2026-05-21T11:17:27.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-21T14:57:20.454Z","etag":null,"topics":["audio-converter","audio-converter-flac-mp3","conversion","flac2mp3","python","python-ffmpeg","python-flac","python-mp3"],"latest_commit_sha":null,"homepage":"https://demensdeum.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zefir1990.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T07:34:03.000Z","updated_at":"2026-05-21T11:17:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zefir1990/flac2mp3","commit_stats":null,"previous_names":["zefir1990/flac2mp3"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zefir1990/flac2mp3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zefir1990%2Fflac2mp3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zefir1990%2Fflac2mp3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zefir1990%2Fflac2mp3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zefir1990%2Fflac2mp3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zefir1990","download_url":"https://codeload.github.com/zefir1990/flac2mp3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zefir1990%2Fflac2mp3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33412082,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T18:09:33.147Z","status":"ssl_error","status_checked_at":"2026-05-23T18:09:31.380Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["audio-converter","audio-converter-flac-mp3","conversion","flac2mp3","python","python-ffmpeg","python-flac","python-mp3"],"created_at":"2026-05-23T20:34:37.961Z","updated_at":"2026-05-23T20:34:38.446Z","avatar_url":"https://github.com/zefir1990.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flac2mp3\n\n[**🇷🇺 Читать на русском**](README.ru.md)\n\nA clean Python script to recursively convert FLAC files to high-quality MP3 format using `ffmpeg`.\n\n## Prerequisites\n\n- **Python 3.x**\n- **ffmpeg** installed and added to your system's PATH.\n\n## Features\n\n- Recursive search for all `.flac` files in a given directory.\n- High-quality Variable Bit Rate (VBR) MP3 encoding using `libmp3lame` (quality level `-q:a 0`).\n- Clean handling of file and folder names containing spaces.\n- Robust subprocess call handling.\n- Multiple export modes:\n  - **In-place**: Saves the `.mp3` file next to its corresponding `.flac` file.\n  - **Save Directory Tree**: Re-creates the source directory structure under a target folder.\n  - **Flattened**: Exports all converted MP3s directly into a single folder.\n  - **Combined**: Allows running both export modes simultaneously, converting once and copying the output file to avoid redundant work.\n- **Skip existing files**: Optionally skip conversion if the output MP3 file already exists, useful for resuming interrupted batch conversions.\n\n## Usage\n\nTo run the script with default settings (recursively convert FLAC files in-place starting from the current directory):\n\n```powershell\npython flac2mp3.py\n```\n\nYou can optionally specify a target directory to scan and export options:\n\n```powershell\npython flac2mp3.py [search_directory] [options]\n```\n\n# Real Life Example\n\nConverting all flacs from D:\\Downloads to D:\\mp3s with 4 parallel threads, saving directories tree:\n\n```powershell\npython .\\flac2mp3.py D:\\Downloads\\ --output-directory-save-directories-tree=D:\\mp3s\\ --parallel-run=4\n```\n\n### Options\n\n- `--output-directory-save-directories-tree=\u003cpath\u003e` (or without `--` prefix: `output-directory-save-directories-tree=\u003cpath\u003e`)\n  \n  Exports MP3 files to `\u003cpath\u003e` while recreating the subfolder structure.\n\n- `--output-directory-without-directories-tree=\u003cpath\u003e` (or without `--` prefix: `output-directory-without-directories-tree=\u003cpath\u003e`)\n  \n  Exports all MP3 files directly into `\u003cpath\u003e`, flattening the subdirectories.\n\n- `--parallel-run=\u003cnumber\u003e` (or without `--` prefix: `parallel-run=\u003cnumber\u003e`)\n  \n  Number of concurrent audio conversions (default: `1`).\n\n- `--skip-output-file-if-exists`\n  \n  Skip conversion if the output MP3 file already exists.\n\n### Examples\n\n#### 1. In-place conversion\nConvert all FLAC files under the current directory, saving the MP3s next to the original files:\n```powershell\npython flac2mp3.py\n```\n\n#### 2. Recreate directory structure elsewhere\nConvert FLAC files from `C:\\Music\\FLAC` and export them to `D:\\Music\\MP3` preserving the subfolder layout:\n```powershell\npython flac2mp3.py C:\\Music\\FLAC output-directory-save-directories-tree=D:\\Music\\MP3\n```\n\n#### 3. Flatten export directory\nConvert FLAC files from `C:\\Music\\FLAC` and dump all generated MP3s into `D:\\Music\\FlatMP3`:\n```powershell\npython flac2mp3.py C:\\Music\\FLAC output-directory-without-directories-tree=D:\\Music\\FlatMP3\n```\n\n#### 4. Combine export modes\nConvert FLAC files and save them to both a structured and a flat directory at the same time:\n```powershell\npython flac2mp3.py C:\\Music\\FLAC output-directory-save-directories-tree=D:\\Music\\MP3 output-directory-without-directories-tree=D:\\Music\\FlatMP3\n```\n\n#### 5. Concurrent conversions\nConvert FLAC files in parallel using 4 concurrent threads:\n```powershell\npython flac2mp3.py parallel-run=4\n```\n\n#### 6. Skip already converted files\nResume an interrupted conversion, skipping files that were already converted:\n```powershell\npython flac2mp3.py C:\\Music\\FLAC --output-directory-save-directories-tree=D:\\Music\\MP3 --skip-output-file-if-exists\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzefir1990%2Fflac2mp3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzefir1990%2Fflac2mp3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzefir1990%2Fflac2mp3/lists"}