This commit is contained in:
hsz
2026-06-02 16:59:42 +08:00
commit 07816bd18a
44 changed files with 9035 additions and 0 deletions

17
scripts/remux_hevc.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# HEVC 主视角 MP4 转 H.264,供 VideoSwin 特征提取与 OpenCV 解码。
# 用法:
# ./scripts/remux_hevc.sh /path/to/source.mp4 [output.mp4]
# 未指定输出时写入 input/remuxed/<stem>_h264.mp4
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
SRC="${1:?用法: remux_hevc.sh <source.mp4> [output.mp4]}"
STEM="$(basename "${SRC%.*}")"
OUT="${2:-${ROOT}/input/remuxed/${STEM}_h264.mp4}"
mkdir -p "$(dirname "$OUT")"
echo "[remux] ${SRC} -> ${OUT}"
ffmpeg -y -i "$SRC" -c:v libx264 -preset ultrafast -crf 23 -an "$OUT"
echo "[done] ${OUT}"