1
0

resize 4:3 to 8:7

This commit is contained in:
2025-08-01 05:06:00 +02:00
parent 00343ce52d
commit de4e7266a0
5 changed files with 8 additions and 7 deletions

View File

@ -21,14 +21,15 @@ output_horizontal_length = math.sqrt((input_diagonal_length ** 2) / (input_verti
output_diagonal_length = math.hypot(output_horizontal_length, input_vertical_length) output_diagonal_length = math.hypot(output_horizontal_length, input_vertical_length)
output_diagonal_fov = math.degrees(math.atan(output_diagonal_length)) * 2.0 output_diagonal_fov = math.degrees(math.atan(output_diagonal_length)) * 2.0
output_ratio = 1.0 / (output_horizontal_length / input_vertical_length) output_ratio = 8 / 7
output_pixel_ratio = 1.0 / (output_horizontal_length / input_vertical_length)
print("Output FOV = %f" % output_diagonal_fov) print("Output FOV = %f" % output_diagonal_fov)
print("Output Ratio = %f" % output_ratio) print("Output Ratio = %f" % output_pixel_ratio)
print("= Resolutions =====================") print("= Resolutions =====================")
def width_rounded_8(height): def width_rounded_8(height):
width = int(round(height * input_ratio)) width = int(round(height * output_ratio))
return ((width + 4) // 8) * 8 return ((width + 4) // 8) * 8
print("HD = %i x 720" % width_rounded_8(720)) print("HD = %i x 720" % width_rounded_8(720))

View File

@ -91,7 +91,7 @@ adm.addVideoFilter(
"shaderFile=/opt/rk/avidemux/unfish_gopro_4:3_maxlens.glsl") "shaderFile=/opt/rk/avidemux/unfish_gopro_4:3_maxlens.glsl")
adm.addVideoFilter( adm.addVideoFilter(
"swscale", "swscale",
"width=2880", "width=2472",
"height=2160", "height=2160",
"algo=1", "algo=1",
"sourceAR=0", "sourceAR=0",

View File

@ -91,7 +91,7 @@ adm.addVideoFilter(
"shaderFile=/opt/rk/avidemux/unfish_gopro_4:3_maxlens.glsl") "shaderFile=/opt/rk/avidemux/unfish_gopro_4:3_maxlens.glsl")
adm.addVideoFilter( adm.addVideoFilter(
"swscale", "swscale",
"width=2880", "width=2472",
"height=2160", "height=2160",
"algo=1", "algo=1",
"sourceAR=0", "sourceAR=0",

View File

@ -91,7 +91,7 @@ adm.addVideoFilter(
"shaderFile=/opt/rk/avidemux/unfish_gopro_4:3_maxlens.glsl") "shaderFile=/opt/rk/avidemux/unfish_gopro_4:3_maxlens.glsl")
adm.addVideoFilter( adm.addVideoFilter(
"swscale", "swscale",
"width=1440", "width=1232",
"height=1080", "height=1080",
"algo=1", "algo=1",
"sourceAR=0", "sourceAR=0",

View File

@ -91,7 +91,7 @@ adm.addVideoFilter(
"shaderFile=/opt/rk/avidemux/unfish_gopro_4:3_maxlens.glsl") "shaderFile=/opt/rk/avidemux/unfish_gopro_4:3_maxlens.glsl")
adm.addVideoFilter( adm.addVideoFilter(
"swscale", "swscale",
"width=960", "width=824",
"height=720", "height=720",
"algo=1", "algo=1",
"sourceAR=0", "sourceAR=0",