remove git lfs

This commit is contained in:
2025-04-21 20:04:00 +02:00
parent d04209c1be
commit 92f93ad690
4 changed files with 23 additions and 4 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +1,23 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cffb5c4319b966658663ee89470c5c8baa45cc503852592fa09c312d3b0f5b30
size 747
#!/usr/bin/env bash
set -e
if [ $# -ne 3 ]; then
echo "Usage: $0 target_size_MB input_file output_file"
exit 1
fi
target_size_mb="$1"
input_file="$2"
output_file="$3"
duration=$(ffprobe -v error -select_streams v:0 -show_entries format=duration \
-of default=noprint_wrappers=1:nokey=1 "$input_file")
duration=${duration%.*} # remove decimals
target_size_kbit=$((target_size_mb * 8192)) # 1 MB = 8192 kbit
bitrate=$((target_size_kbit / duration))
clear
echo " bitrate : $bitrate"
ffmpeg -y -i "$input_file" -c:v libx264 -b:v "${bitrate}k" -pass 1 -an -f mp4 /dev/null && \
ffmpeg -i "$input_file" -c:v libx264 -b:v "${bitrate}k" -pass 2 -c:a aac -b:a 128k "$output_file"
rm -f ffmpeg2pass-0.log*