mkvtoolnix/tests/test-0757av1_overwriting_aspect_ratio.rb
Moritz Bunkus c433c528d0
AV1 packetizer: honor aspect ratio given on command-line
The values set via `--aspect-ratio` / `--aspect-ratio-factor` was
simply ignored due to using the wrong function.
2023-05-05 14:29:17 +02:00

26 lines
833 B
Ruby
Executable File

#!/usr/bin/ruby -w
# T_757av1_overwriting_aspect_ratio
describe "mkvmerge / overwriting the aspect ratio of AV1 tracks"
def get_display_dimensions file_name
identify_json(file_name)["tracks"][0]["properties"]["display_dimensions"]
end
def run_test_with_args initial_args
merge "#{initial_args} -A data/av1/av1.ivf"
result = get_display_dimensions tmp
[ "", "--display-dimensions 0:1212x2424", "--aspect-ratio 0:5", "--aspect-ratio-factor 0:5" ].each_with_index do |args, idx|
merge "#{args} #{tmp}", :output => "#{tmp}#{idx}"
result += "-" + get_display_dimensions("#{tmp}#{idx}")
end
result
end
[ "--display-dimensions 0:4254x815", "--aspect-ratio 0:10", "--aspect-ratio-factor 0:10" ].each_with_index do |args, idx|
test "initial args #{args}" do
"#{idx}[" + run_test_with_args(args) + "]"
end
end