{"id":47589102,"url":"https://github.com/birkdev/ffvm","last_synced_at":"2026-04-01T17:03:24.935Z","repository":{"id":343833518,"uuid":"1179417661","full_name":"birkdev/ffvm","owner":"birkdev","description":"CLI tool for encoding videos with ffmpeg and scoring quality with VMAF","archived":false,"fork":false,"pushed_at":"2026-03-24T09:45:10.000Z","size":196,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-24T10:15:39.737Z","etag":null,"topics":["cli","ffmpeg","python","video-encoding","video-quality","vmaf"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ffvm","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/birkdev.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-03-12T02:21:30.000Z","updated_at":"2026-03-24T09:45:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/birkdev/ffvm","commit_stats":null,"previous_names":["birkdev/ffvm"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/birkdev/ffvm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birkdev%2Fffvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birkdev%2Fffvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birkdev%2Fffvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birkdev%2Fffvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/birkdev","download_url":"https://codeload.github.com/birkdev/ffvm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/birkdev%2Fffvm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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":["cli","ffmpeg","python","video-encoding","video-quality","vmaf"],"created_at":"2026-04-01T17:03:11.368Z","updated_at":"2026-04-01T17:03:24.921Z","avatar_url":"https://github.com/birkdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ffvm\n\nA CLI tool for encoding videos with ffmpeg and scoring quality with VMAF. Supports single files, batch processing, and automatic CRF sweeping to hit a target VMAF score.\n\n![Results table](results_table.png)\n\n## Installation\n\nRequires [ffmpeg](https://ffmpeg.org/) (built with libvmaf) and ffprobe in PATH.\n\n```\npip install ffvm\n```\n\n## Commands\n\n### encode\n\nEncode a single video file.\n\n```\nffvm encode input.mp4 output.mp4 --vcodec libsvtav1 --crf 28 --preset 5 --extra \"-svtav1-params tune=0:enable-qm=1:qm-min=0\" --extra \"-write_tmcd 0\"\n```\n\nOptions:\n- `--vcodec` — Video codec: `copy`, `libx264`, `libx265`, `libsvtav1`, `libvpx-vp9`, `libaom-av1`, `librav1e` (default: `libx264`)\n- `--crf` — Constant Rate Factor (default: `23`)\n- `--preset` — Encoder preset, e.g. `5`\n- `--extra` — Extra ffmpeg arguments (repeatable), e.g. `--extra \"-svtav1-params tune=0\"`\n- `--acodec` — Audio codec: `copy`, `aac`, `libopus`, `libvorbis`, `flac`, `pcm_s16le`, `libmp3lame` (default: `copy`)\n- `--ab` — Audio bitrate, e.g. `160k`\n- `--resolution` — Output resolution, e.g. `1920x1080`\n- `--compare` — Run VMAF comparison after encoding\n\n### batch\n\nEncode all videos in a directory.\n\n```\nffvm batch ./videos --vcodec libsvtav1 --crf 30 --compare\n```\n\nOutput files are named `{original}_{codec}_{crf}.{ext}`. Additional options:\n- `--output-dir` — Write encoded files to a different directory\n- `--recursive` — Search subdirectories for videos\n- `--overwrite` — Skip overwrite confirmations\n- `--compare` — Run VMAF on each encode and display a results table\n\n### sweep\n\nFind the optimal CRF for a video using binary search against a VMAF target. Extracts representative segments, tests CRF values, and encodes the full video at the best CRF found.\n\n```\nffvm sweep input.mp4 output.mp4 --target-vmaf 95.0 --crf-min 20 --crf-max 35\n```\n\nOptions:\n- `--target-vmaf` — Target VMAF score (default: `93.0`)\n- `--crf-min` — Lower bound of CRF search range (default: `23`)\n- `--crf-max` — Upper bound of CRF search range (default: `32`)\n\n### batch-sweep\n\nRun CRF sweep on every video in a directory. Each video gets its own optimal CRF.\n\n```\nffvm batch-sweep ./videos --vcodec libsvtav1 --target-vmaf 95.0\n```\n\n## How sweep works\n\n1. Extracts 1-7 short segments (scaled by video length) from the middle 80% of the video\n2. Binary searches through the CRF range, encoding and VMAF-scoring each segment per iteration\n3. Converges when `crf_max - crf_min \u003c= 1`\n4. Encodes the full video at the resulting CRF\n\n## Roadmap\n\n- [ ] RAM disk support for intermediate files\n- [x] Test suite (unit tests for pure functions, integration tests for encode pipeline)\n- [x] Better error handling for ffmpeg subprocess failures\n- [ ] Robust VMAF score parsing\n- [ ] Logging for long-running operations (sweep, batch)\n- [x] UI improvements (progress display, summary tables)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirkdev%2Fffvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbirkdev%2Fffvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbirkdev%2Fffvm/lists"}