mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-07 18:36:09 +08:00

This makes them pass shellcheck. Except for a few unused export warnings. I also wonder if the majority of these files should be in the root of the project, or should be moved to "build-scripts" (or should still even exist). a few minor changes one more minor changes
19 lines
787 B
Bash
Executable File
19 lines
787 B
Bash
Executable File
#!/usr/bin/env bash
|
|
file="${1}"
|
|
bitrate=15000000
|
|
aspect_ratio=4:3
|
|
overscan_percent=10
|
|
final_height=2160 # 4K UHD
|
|
final_width=2880
|
|
|
|
# non-editable part
|
|
render_width=$(((final_width * (100-overscan_percent))/100))
|
|
render_height=$(((final_height * (100-overscan_percent))/100))
|
|
|
|
# announce
|
|
echo "Rendering as ${render_width} x ${render_height} encoding to ${final_width} x ${final_height}"
|
|
|
|
# go
|
|
ffmpeg -i "${file}" -acodec copy -vcodec libx264 -pix_fmt yuv420p -r 300000/1001 -vsync vfr -bsf:a aac_adtstoasc -vf "scale=${render_width}:${render_height},pad=width=${final_width}:height=${final_height}:"'x=(ow-iw)/2:y=(oh-ih)/2' -vb "${bitrate}" -minrate "${bitrate}" -maxrate "${bitrate}" -bufsize 8000000 -g 15 -bf 2 -threads 0 -aspect "${aspect_ratio}" -y -f mp4 "${file}.mp4" || exit 1
|
|
|