{"id":20755609,"url":"https://github.com/deepakness/mpga-to-mp3","last_synced_at":"2026-04-28T03:31:09.903Z","repository":{"id":202900190,"uuid":"708379262","full_name":"deepakness/mpga-to-mp3","owner":"deepakness","description":"Bulk Convert MPGA Audio Files to MP3","archived":false,"fork":false,"pushed_at":"2023-10-22T13:08:31.000Z","size":280,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T04:27:41.568Z","etag":null,"topics":["audio-converter","mp3","mpga"],"latest_commit_sha":null,"homepage":"https://deepakness.com/blog/mpga-to-mp3/","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/deepakness.png","metadata":{"files":{"readme":"README.md","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,"governance":null}},"created_at":"2023-10-22T11:48:55.000Z","updated_at":"2023-10-22T13:07:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"61cbccf9-bf31-498f-a13c-f59b2f341814","html_url":"https://github.com/deepakness/mpga-to-mp3","commit_stats":null,"previous_names":["deepakness/mpga-to-mp3"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakness%2Fmpga-to-mp3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakness%2Fmpga-to-mp3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakness%2Fmpga-to-mp3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepakness%2Fmpga-to-mp3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepakness","download_url":"https://codeload.github.com/deepakness/mpga-to-mp3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243061570,"owners_count":20230013,"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":["audio-converter","mp3","mpga"],"created_at":"2024-11-17T09:26:28.262Z","updated_at":"2025-12-26T03:53:24.103Z","avatar_url":"https://github.com/deepakness.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bulk Convert MPGA Audio Files to MP3\n\nPython code to easily convert `.mpga` audio files to `.mp3` format in bulk. The code can handle 100s and even 1000s of MPGA audio files to MP3 saved on your local computer.\n\n![Bulk Convert MPGA Audio Files to MP3](/screenshot.jpg)\n\nHere's how you can run the code on your computer:\n\n## 1. Create the `app.py` file\n\nOpen the folder where all your `.mpga` files are stored in the VS Code and create a file `app.py` in the same folder and copy paste the following code inside the file:\n\n```python\nimport os\nimport shutil\nfrom pydub import AudioSegment\n\ndef convert_mpga_to_mp3(file_path):\n    try:\n        # Load the .mpga file\n        song = AudioSegment.from_file(file_path, \"mp3\")\n\n        # Convert to mp3 and export\n        new_file_path = file_path.rstrip(\".mpga\") + \".mp3\"\n        song.export(new_file_path, format=\"mp3\")\n\n        print(f\"Converted {file_path} to {new_file_path}\")\n\n        return new_file_path\n    except Exception as e:\n        print(f\"Failed to convert {file_path} due to error: {e}\")\n        return None\n\n\n# Get all mpga files in the current directory\nmpga_files = [f for f in os.listdir('.') if f.endswith('.mpga')]\n\n# Create an 'mp3' directory if it doesn't exist\nif not os.path.exists('mp3'):\n    os.makedirs('mp3')\n\n# Convert all mpga files\nfor file_path in mpga_files:\n    new_file_path = convert_mpga_to_mp3(file_path)\n    if new_file_path is not None:\n        # Move the mp3 file to the 'mp3' directory\n        try:\n            shutil.move(new_file_path, 'mp3/')\n            print(f\"Moved {new_file_path} to mp3/ directory\")\n        except Exception as e:\n            print(f\"Failed to move {new_file_path} due to error: {e}\")\n```\n\n## 2. Install the `pydub` library\n\nOpen the terminal and run the following command to install the `pydub` library:\n\n```\npip install pydub\n```\n\n## 3. Run the code\n\nNow, run the code by running the following command:\n\n```\npython app.py\n```\n\n\u003e Note that, depending upon the Python version and setup on your computer, you may need to use `pip3` and `python3` instead of `pip` and `python` when running the code.\n\nAfter running the code, your audio files will start getting converted from `.mpga` to `.mp3` file format and the `.mp3` files are saved inside `/mp3` folder inside the main folder.\n\nYou can learn more about the process in [this blog post](https://deepakness.com/blog/mpga-to-mp3/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakness%2Fmpga-to-mp3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepakness%2Fmpga-to-mp3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepakness%2Fmpga-to-mp3/lists"}