{"id":13905514,"url":"https://github.com/askrejans/ffmpeg-home-video-tools","last_synced_at":"2026-05-13T20:33:47.778Z","repository":{"id":77093685,"uuid":"122826886","full_name":"askrejans/ffmpeg-home-video-tools","owner":"askrejans","description":"This repository contains a set of handy shell scripts that use FFmpeg to help organize home video collections, bringing order to the varied landscape of modern video formats.","archived":false,"fork":false,"pushed_at":"2026-04-15T07:35:34.000Z","size":108,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-15T09:36:30.253Z","etag":null,"topics":["ffmpeg","ffmpeg-wrapper","mp4","transcode","video-processing"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/askrejans.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":"2018-02-25T10:44:06.000Z","updated_at":"2026-04-15T07:35:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"a231d8de-4099-4321-b8f2-345e18fcffc9","html_url":"https://github.com/askrejans/ffmpeg-home-video-tools","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/askrejans/ffmpeg-home-video-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askrejans%2Fffmpeg-home-video-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askrejans%2Fffmpeg-home-video-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askrejans%2Fffmpeg-home-video-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askrejans%2Fffmpeg-home-video-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/askrejans","download_url":"https://codeload.github.com/askrejans/ffmpeg-home-video-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/askrejans%2Fffmpeg-home-video-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32999417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"ssl_error","status_checked_at":"2026-05-13T13:14:51.610Z","response_time":115,"last_error":"SSL_read: 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":["ffmpeg","ffmpeg-wrapper","mp4","transcode","video-processing"],"created_at":"2024-08-06T23:01:17.533Z","updated_at":"2026-05-13T20:33:47.772Z","avatar_url":"https://github.com/askrejans.png","language":"Rust","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# FFmpeg Home Video Tools\n\nA video processing toolkit for standardizing and concatenating home videos to 4K UHD (3840x2160). Available in both Bash and Rust implementations.\n\n## Quick Start\n\n### Rust Version (Recommended)\n```bash\n# Build and install\ncargo install --path .\n\n# Process videos with TUI (if interactive terminal)\nffmpeg-video-processor process /path/to/input /path/to/output\n\n# Or use CLI mode\nffmpeg-video-processor process /path/to/input /path/to/output --no-tui\n\n# See all options\nffmpeg-video-processor --help\n```\n\n### Bash Version\n```bash\ncd bash\n./process_videos.sh /path/to/input /path/to/output\n```\n\n## 🎯 What It Does\n\nStandardizes diverse home video formats into a single, unified MP4 file:\n\n1. **Batch Convert** - Standardize all videos to MP4 format (25fps PAL)\n2. **Pad** - Add blurred background to non-standard aspect ratios\n3. **Crop** - Crop oversized videos to target resolution\n4. **Add Audio** - Generate silent audio for videos without audio\n5. **Resample** - Normalize all audio to 48kHz stereo\n6. **Concatenate** - Merge everything into final output\n\n**Default Output Settings:**\n- Resolution: 3840x2160 (4K UHD)\n- Frame Rate: 25 fps (PAL standard)\n- Video: H.264 (libx264), CRF 20, medium preset\n- Audio: AAC 256kbps, 48kHz stereo\n\n## Usage Warning\n\n**⚠️ Important:** These tools modify video files. Always work on copies of your original files, not the originals themselves. Test on a small batch first!\n\n## 📚 Bash Scripts Documentation\n\nAll Bash scripts are located in the `bash/` directory with production-hardening applied.\n\n### Main Entry Point: `process_videos.sh`\n\nThe master script that orchestrates the entire pipeline with comprehensive logging and error handling:\n\n```bash\ncd bash\n./process_videos.sh /path/to/input /path/to/output\n```\n\n**Features:**\n- Pre-flight checks (FFmpeg availability, disk space)\n- Detailed logging to `output/logs/process_YYYYMMDD_HHMMSS.log`\n- Progress tracking for each step\n- Automatic error detection and reporting\n- Cleanup trap handlers\n\n### Processing Steps\n\n#### `batch_convert_to_mp4.sh`\n\nThis script identifies and batch converts files within a specified folder to high-quality, low-compression MP4 format with a unified Full HD resolution. The script performs the following actions based on the input file characteristics:\n\n- Vertically rotated videos are upscaled to 1080p with blurred bars padded to the sides, encoded to MP4 with high quality/low compression.\n- 1080p videos are reencoded to MP4 with high quality/low compression.\n- Lower resolution videos are reencoded to 1080p upscaled MP4 with high quality/low compression.\n\nAudio is consistently reencoded to 320k AAC, and the video frame rate is forced to 25 fps.\n\n#### `pad_to_fullhd.sh`\n\nChecks converted files for resolutions other than 1920x1080 and pads them with a blurred background.\n\n#### `crop_to_fullhd.sh`\n\nCrops videos where the resolution exceeds Full HD while maintaining 16:9 aspect ratio.\n\n#### `add_missing_audio_tracks.sh`\n\nAdds silent audio tracks to videos lacking audio, required for concatenation.\n\n#### `resample_all_audio.sh`\n\nResamples audio using `aresample=async=1000` to prevent sync issues during concatenation.\n\n#### `concat_videos.sh`\n\nConcatenates all processed videos into a single timestamped output file and cleans up intermediate files.\n\n## 🛠️ Requirements\n\n- **FFmpeg** (with ffprobe) - Must be installed and in PATH\n- **For Rust version:** Rust 1.70+ (for building from source)\n- **For Bash version:** bash, bc (for frame rate calculations)\n\n## 📖 Documentation\n\n- **[Rust Implementation Guide](RUST_README.md)** - Complete documentation for the Rust version\n- **[Example Configuration](config.example.toml)** - Sample configuration file\n- **[Docker Support](Dockerfile)** - Containerized deployment\n\n## 🤝 Contributing\n\nContributions are welcome! Please:\n1. Fork the repository\n2. Create a feature branch\n3. Add tests for new functionality\n4. Ensure all tests pass\n5. Submit a pull request\n\n## 📄 License\n\nBSD 2-Clause License - See [LICENSE](LICENSE) file for details\n\n## 🙏 Acknowledgments\n\nOriginally created as personal shell scripts, now evolved into a production-ready tool with both Bash and Rust implementations.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskrejans%2Fffmpeg-home-video-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faskrejans%2Fffmpeg-home-video-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faskrejans%2Fffmpeg-home-video-tools/lists"}