39 EXPORT_TESTS = os.path.join(os.path.expanduser(
"~"),
".openshot_qt",
"tests")
42 if len(sys.argv) != 15:
43 print(
"Error: %s is not the correct # of arguments (15 expected)" % len(sys.argv))
52 fps = openshot.Fraction(int(sys.argv[3]), int(sys.argv[4]))
53 width = int(sys.argv[5])
54 height = int(sys.argv[6])
55 pixel_ratio = openshot.Fraction(int(sys.argv[7]), int(sys.argv[8]))
56 bitrate = int(sys.argv[9])
59 audio_codec = sys.argv[10]
60 sample_rate = int(sys.argv[11])
61 channels = int(sys.argv[12])
62 channel_layout = int(sys.argv[13])
63 audio_bitrate = int(sys.argv[14])
67 export_file_path = os.path.join(EXPORT_TESTS,
"test.%s" % format)
68 print(
"Test Export to %s" % export_file_path)
71 w = openshot.FFmpegWriter(export_file_path);
74 w.SetVideoOptions(
True, codec, fps, width, height, pixel_ratio,
False,
False, bitrate);
75 w.SetAudioOptions(
True, audio_codec, sample_rate, channels, channel_layout, audio_bitrate);
82 for frame_number
in range(30):
84 f = openshot.Frame(frame_number, width, height,
"#ffffff")
85 f.AddColor(width, height,
"#ffffff")