svt_av1_lanczos submission (score: 2.20)#17
svt_av1_lanczos submission (score: 2.20)#17EthanYangTW wants to merge 2 commits intocommaai:masterfrom
Conversation
|
Thanks for the submission @EthanYangTW! 🤏 A maintainer will review your PR shortly. To run the evaluation, a maintainer will trigger the |
There was a problem hiding this comment.
Pull request overview
Adds the “winner” submission implementation to the repository, providing an inflation pipeline (decode + resize back to original resolution) and an optional compression script matching the reported leaderboard score.
Changes:
- Added
inflate.sh+inflate.pyto decode the submission’s.mkvfiles and upscale frames back tocamera_size, writing.rawRGB dumps. - Added
compress.shthat buildsarchive.zipby encoding videos with SVT-AV1 after Lanczos downscaling. - Added the submission package initializer (
__init__.py) for module execution viapython -m submissions.winner.inflate.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| submissions/winner/inflate.sh | Runs the submission’s Python inflator per file listed by the evaluator. |
| submissions/winner/inflate.py | Decodes video frames with PyAV and resizes to camera_size before writing raw RGB bytes. |
| submissions/winner/compress.sh | Optional script to generate archive.zip using ffmpeg + SVT-AV1 with downscaling. |
| submissions/winner/init.py | Makes submissions.winner a Python package for -m execution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| rm -rf "$ARCHIVE_DIR" | ||
| mkdir -p "$ARCHIVE_DIR" | ||
|
|
||
| while IFS= read -r rel; do | ||
| [[ -z "$rel" ]] && continue | ||
| IN="${IN_DIR}/${rel}" | ||
| BASE="${rel%.*}" | ||
| OUT="${ARCHIVE_DIR}/${BASE}.mkv" | ||
|
|
||
| echo "→ ${IN} → ${OUT}" | ||
|
|
||
| ffmpeg -nostdin -y -hide_banner -loglevel warning \ | ||
| -r 20 -fflags +genpts -i "$IN" \ | ||
| -vf "scale=trunc(iw*0.45/2)*2:trunc(ih*0.45/2)*2:flags=lanczos" \ | ||
| -c:v libsvtav1 -preset 0 -crf 32 \ | ||
| -g 180 \ | ||
| -r 20 "$OUT" | ||
| done < "$VIDEO_NAMES_FILE" | ||
|
|
There was a problem hiding this comment.
compress.sh hard-codes the input videos directory and video list file, and doesn’t accept the --in-dir / --video-names-file (and optionally --jobs) CLI flags that other submissions’ compress.sh scripts support (e.g. submissions/baseline_fast/compress.sh). This makes the compression script harder to reuse with other datasets like test_videos.zip and inconsistent with the existing submission script interface.
Consider adding the same argument parsing/usage pattern as baseline_fast so callers can override input dir, names file, and parallelism without editing the script.
| rm -rf "$ARCHIVE_DIR" | |
| mkdir -p "$ARCHIVE_DIR" | |
| while IFS= read -r rel; do | |
| [[ -z "$rel" ]] && continue | |
| IN="${IN_DIR}/${rel}" | |
| BASE="${rel%.*}" | |
| OUT="${ARCHIVE_DIR}/${BASE}.mkv" | |
| echo "→ ${IN} → ${OUT}" | |
| ffmpeg -nostdin -y -hide_banner -loglevel warning \ | |
| -r 20 -fflags +genpts -i "$IN" \ | |
| -vf "scale=trunc(iw*0.45/2)*2:trunc(ih*0.45/2)*2:flags=lanczos" \ | |
| -c:v libsvtav1 -preset 0 -crf 32 \ | |
| -g 180 \ | |
| -r 20 "$OUT" | |
| done < "$VIDEO_NAMES_FILE" | |
| JOBS=1 | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "$0") [--in-dir DIR] [--video-names-file FILE] [--jobs N] | |
| Options: | |
| --in-dir DIR Input videos directory (default: ${PD}/videos) | |
| --video-names-file FILE File containing relative video paths (default: ${PD}/public_test_video_names.txt) | |
| --jobs N Number of parallel ffmpeg jobs to run (default: 1) | |
| -h, --help Show this help message | |
| EOF | |
| } | |
| while [[ $# -gt 0 ]]; do | |
| case "$1" in | |
| --in-dir) | |
| [[ $# -ge 2 ]] || { echo "Missing value for $1" >&2; usage; exit 1; } | |
| IN_DIR="$2" | |
| shift 2 | |
| ;; | |
| --video-names-file) | |
| [[ $# -ge 2 ]] || { echo "Missing value for $1" >&2; usage; exit 1; } | |
| VIDEO_NAMES_FILE="$2" | |
| shift 2 | |
| ;; | |
| --jobs) | |
| [[ $# -ge 2 ]] || { echo "Missing value for $1" >&2; usage; exit 1; } | |
| JOBS="$2" | |
| shift 2 | |
| ;; | |
| -h|--help) | |
| usage | |
| exit 0 | |
| ;; | |
| *) | |
| echo "Unknown argument: $1" >&2 | |
| usage | |
| exit 1 | |
| ;; | |
| esac | |
| done | |
| [[ "$JOBS" =~ ^[1-9][0-9]*$ ]] || { echo "--jobs must be a positive integer" >&2; exit 1; } | |
| rm -rf "$ARCHIVE_DIR" | |
| mkdir -p "$ARCHIVE_DIR" | |
| compress_one() { | |
| local rel="$1" | |
| [[ -z "$rel" ]] && return 0 | |
| local in="${IN_DIR}/${rel}" | |
| local base="${rel%.*}" | |
| local out="${ARCHIVE_DIR}/${base}.mkv" | |
| mkdir -p "$(dirname "$out")" | |
| echo "→ ${in} → ${out}" | |
| ffmpeg -nostdin -y -hide_banner -loglevel warning \ | |
| -r 20 -fflags +genpts -i "$in" \ | |
| -vf "scale=trunc(iw*0.45/2)*2:trunc(ih*0.45/2)*2:flags=lanczos" \ | |
| -c:v libsvtav1 -preset 0 -crf 32 \ | |
| -g 180 \ | |
| -r 20 "$out" | |
| } | |
| export IN_DIR ARCHIVE_DIR | |
| export -f compress_one | |
| if [[ "$JOBS" -eq 1 ]]; then | |
| while IFS= read -r rel; do | |
| compress_one "$rel" | |
| done < "$VIDEO_NAMES_FILE" | |
| else | |
| xargs -d '\n' -P "$JOBS" -I {} bash -lc 'compress_one "$1"' _ "{}" < "$VIDEO_NAMES_FILE" | |
| fi |
|
Great job! I think anyone who wants to beat your score will have to put in substantial effort for a slight improvement. |
|
@EthanYangTW can you please rename to an informative name like |
Eval Results:
|
submission name:
svt_av1_lanczos
upload zipped
archive.ziphttps://github.com/EthanYangTW/comma_video_compression_challenge/releases/download/v0.2/archive_220.zip
report.txt
does your submission require gpu for evaluation (inflation)?
no
did you include the compression script? and want it to be merged?
yes
additional comments
SVT-AV1 with 45% lanczos downscale, CRF 33, preset 0, GOP 180, film-grain=22 (denoise+synth).
Film grain synthesis strips sensor noise before encoding for better compression, decoder re-adds synthetic grain.