mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
remove git lfs
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1 +0,0 @@
|
||||
renders/* filter=lfs diff=lfs merge=lfs -text
|
Binary file not shown.
Binary file not shown.
@ -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*
|
||||
|
||||
|
Reference in New Issue
Block a user