{"id":24528894,"url":"https://github.com/stephenjacobsio/transcode-py","last_synced_at":"2026-05-18T22:04:06.379Z","repository":{"id":273458691,"uuid":"919781538","full_name":"stephenjacobsio/transcode-py","owner":"stephenjacobsio","description":"A Python-based tool for efficient media transcoding, directory scanning, and metadata extraction. Leverages FFmpeg for H.264/AAC conversion with clean architecture principles and extensibility.","archived":false,"fork":false,"pushed_at":"2025-01-21T02:56:14.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T03:24:53.430Z","etag":null,"topics":["clean-architecture","clean-code","cli","ffmpeg","ffmpeg-script","h264","media-transcode","metadata-extraction","open-source","python"],"latest_commit_sha":null,"homepage":"","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/stephenjacobsio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2025-01-21T02:10:07.000Z","updated_at":"2025-01-21T03:07:39.000Z","dependencies_parsed_at":"2025-01-21T03:35:07.728Z","dependency_job_id":null,"html_url":"https://github.com/stephenjacobsio/transcode-py","commit_stats":null,"previous_names":["stephenjacobsio/transcode-py"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenjacobsio%2Ftranscode-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenjacobsio%2Ftranscode-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenjacobsio%2Ftranscode-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenjacobsio%2Ftranscode-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenjacobsio","download_url":"https://codeload.github.com/stephenjacobsio/transcode-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243764705,"owners_count":20344465,"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":["clean-architecture","clean-code","cli","ffmpeg","ffmpeg-script","h264","media-transcode","metadata-extraction","open-source","python"],"created_at":"2025-01-22T07:24:46.538Z","updated_at":"2026-05-18T22:04:01.333Z","avatar_url":"https://github.com/stephenjacobsio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TranscodePy\n\nTranscodePy is a Python-based media transcoding tool that recursively scans directories for media files, displays metadata, and optionally transcodes files exceeding a configurable size threshold. It leverages FFmpeg for transcoding operations and follows clean architecture principles.\n\n## Features\n\n- **Recursive Directory Scanning**: Finds media files in specified directories.\n- **Metadata Extraction**: Retrieves file size, format, and other details.\n- **Configurable Transcoding**: Converts media files to H.264/AAC in MKV format.\n- **Dry-Run Mode**: Simulates the transcoding process without making changes.\n- **Clean Code Architecture**: Designed for maintainability and extensibility.\n\n## Requirements\n\n- Python 3.8+\n- FFmpeg installed and available in your PATH\n\n## Installation\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/stephenjacobsio/transcode-py.git  \\\n   cd transcode-py\n   ```\n\n2. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## Usage\n\nRun the tool using the CLI:\n\n```bash\npython src/main.py \u003cpath\u003e [options]\n```\n\n### Arguments\n\n| Argument              | Description                                              |\n|-----------------------|----------------------------------------------------------|\n| `\u003cpath\u003e`              | Path to the file or directory to scan/transcode.         |\n\n### Options\n\n| Option                | Description                                              |\n|-----------------------|----------------------------------------------------------|\n| `-t`, `--threads`     | Number of CPU threads for FFmpeg (default: 2).           |\n| `-y`, `--overwrite`   | Overwrite output files if they already exist.            |\n| `--dry-run`           | Simulate transcoding without making changes.             |\n| `--size-threshold`    | Minimum file size (in GB) to consider for transcoding.   |\n\n## Example\n\nTo scan a directory and transcode files larger than 6GB:\n\n```bash\npython src/main.py /path/to/media --threads 4 --size-threshold 6.0\n```\n\nTo perform a dry run:\n\n```bash\npython src/main.py /path/to/media --dry-run\n```\n\n## Testing\n\nRun unit tests with:\n\n```bash\npython -m unittest discover -s tests\n```\n\n## Project Structure\n\n```plaintext\ntranscode-py/\n├── src/\n│   ├── cli.py                # Command-line interface\n│   ├── config/\n│   │   ├── __init__.py       # Config initialization\n│   │   └── settings.py       # Configurations and constants\n│   ├── core/\n│   │   ├── __init__.py       # Core package initialization\n│   │   ├── media_file.py     # MediaFile dataclass\n│   │   ├── media_scanner.py  # Media scanning logic\n│   │   └── transcoder.py     # Transcoding logic\n│   ├── interfaces/\n│   │   ├── __init__.py       # Interfaces initialization\n│   │   ├── i_media_scanner.py # Media scanner interface\n│   │   └── i_transcoder.py   # Transcoder interface\n│   └── main.py               # Main entry point\n├── tests/\n│   ├── test_cli.py           # CLI unit tests\n│   ├── test_media_file.py    # MediaFile unit tests\n│   ├── test_media_scanner.py # MediaScanner unit tests\n│   └── test_transcoder.py    # Transcoder unit tests\n├── requirements.txt          # Python dependencies\n└── README.md                 # Project documentation\n```\n\n## Contributing\n\nContributions are welcome! Please fork the repository, make changes, and submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See `LICENSE` for details.\n\n## Acknowledgments\n\n- [FFmpeg](https://ffmpeg.org/) for the powerful transcoding capabilities.\n- Python community for the amazing libraries and support.\n\n---\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eBuilt with ❤️ by \u003ca href=\"https://stephenjacobs.io\"\u003eStephen Jacobs\u003c/a\u003e\u003c/sub\u003e\n\u003c/div\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenjacobsio%2Ftranscode-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenjacobsio%2Ftranscode-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenjacobsio%2Ftranscode-py/lists"}