{"id":14985013,"url":"https://github.com/kerasty2024/smart_encoder","last_synced_at":"2025-04-10T23:15:57.162Z","repository":{"id":252054800,"uuid":"838760777","full_name":"kerasty2024/smart_encoder","owner":"kerasty2024","description":"Smart Encoder is a powerful tool for video encoding that optimizes video quality while minimizing file size. It automatically selects the best encoding parameters based on video content and desired output characteristics.","archived":false,"fork":false,"pushed_at":"2024-10-17T01:12:56.000Z","size":399,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T23:15:51.723Z","etag":null,"topics":["ab-av1","encode","ffmpeg","python"],"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/kerasty2024.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-06T09:37:18.000Z","updated_at":"2024-10-17T01:12:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"09bfeacd-b4ad-41fe-8f75-c31b23621089","html_url":"https://github.com/kerasty2024/smart_encoder","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"55a1e2e58bd0934a4e75026112ec9fb1148b3c15"},"previous_names":["kerasty2024/smart_encoder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerasty2024%2Fsmart_encoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerasty2024%2Fsmart_encoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerasty2024%2Fsmart_encoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerasty2024%2Fsmart_encoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kerasty2024","download_url":"https://codeload.github.com/kerasty2024/smart_encoder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312132,"owners_count":21082638,"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":["ab-av1","encode","ffmpeg","python"],"created_at":"2024-09-24T14:10:06.029Z","updated_at":"2025-04-10T23:15:57.143Z","avatar_url":"https://github.com/kerasty2024.png","language":"Python","readme":"# Smart Encoder\r\n\r\nSmart Encoder is a powerful tool for video encoding that optimizes video quality while minimizing file size. It\r\nautomatically selects the best encoding parameters based on video content and desired output characteristics.\r\n\r\n## Features\r\n\r\n- **Automatic Codec Selection**: Automatically selects the best video codec for encoding (default: libsvtav1).\r\n- **CRF Optimization**: Finds the optimal Constant Rate Factor (CRF) for the best quality-to-size ratio by ab-av1. If\r\n  suitable crf cannot be defined, use MANUAL_CRF(default: 23, usually recognized as visually lossless). If encoded file\r\n  size \u003e original file size, increment CRF by MANUAL_CRF_INCREMENT_PERCENT (default: 15%) and encode again, until\r\n  encoded file size is smaller than original one.\r\n- **Multi-Process Encoding**: Supports encoding multiple files in parallel to speed up the process. # of processors can\r\n  be configured by command-line.\r\n- **Comprehensive Logging**: Logs success and error details for easy troubleshooting and monitoring.\r\n- **Flexible Configuration**: Customizable settings for advanced users through configuration files.\r\n\r\n## Requirements\r\n\r\n- Python 3.7+\r\n- [FFmpeg](https://ffmpeg.org/download.html) installed and added to PATH\r\n- [ab-av1](https://github.com/alexheretic/ab-av1/releases/) added to PATH for searching best codec and CRF.\r\n\r\n## Installation\r\n\r\n1. Clone the repository:\r\n\r\n   ```bash\r\n   git clone https://github.com/kerasty2024/smart_encoder.git\r\n   cd smart_encoder\r\n\r\n2. Create a virtual environment and activate it:\r\n\r\n    ```bash\r\n    python -m venv venv\r\n    venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\r\n\r\n3. Install the required packages:\r\n\r\n    ```bash\r\n    pip install -r requirements.txt\r\n\r\n4. Ensure FFmpeg \u0026 ab-av1 and so on (refer to Requirements) is installed and accessible from your command line.\r\n\r\n## Usage\r\n\r\n1. Prepare your media files: Place the media files you want to encode in a source directory.\r\n2. Run the encoder:\r\n\r\n    ```bash\r\n    python -O main.py --processes 3 --move-raw-file  # you can also modify # of processes, depending on how powerful your environmet is.\r\n\r\n- Use --manual-mode if you wish to manually set encoding parameters. manual crf can be set in settings/video.py\r\n\r\n    ```bash\r\n    python -O main.py --processes 1 --move-raw-file --manual-mode # you can also modify # of processes, depending on how powerful your environmet is.\r\n- If you want more message shown in console, remove -O option (change to debug mode).\r\n- other options can be found in main.py\r\n\r\n3. Check logs:\r\n\r\n- Success logs are stored in the output directory with details of encoded files.\r\n- Error logs are available in the same directory for any issues encountered during encoding.\r\n\r\n## Configuration\r\n\r\n.py files in settings directory allow you to adjust default settings for encoding parameters and language detection\r\npreferences. Customize this file to suit your needs before running the encoder.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! If you have ideas for improvements or new features, feel free to open an issue or submit a\r\npull request.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerasty2024%2Fsmart_encoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkerasty2024%2Fsmart_encoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerasty2024%2Fsmart_encoder/lists"}