Beispiel #1
0
def _ssh_r2d(file, export_type, tmp_folder, start_frame=1, end_frame=2):

    ssh = MultiSSHClient()

    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(settings.R3D_HOST, username=settings.R3D_USER, password=settings.R3D_PASS)
    #output_file_dir,output_file_name = os.path.split(tmpimage)

    command = "redline --i %s --outDir %s/%s --exportPreset %s -s %s -e %s" % (file, tmp_folder, export_type, start_frame, end_frame)
    logging.info(command)

    stdin, stdout, stderr = ssh.exec_command(command)

    result = {}
    result["stdout"] = stdout.readlines()
    result["sdterr"] = stderr.readlines()

    return result
Beispiel #2
0
def _ssh_r3d(left_eye_file, right_eye_file, tmpimage, start_frame=1, end_frame=2):
    ssh = MultiSSHClient()

    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(settings.R3D_HOST, username=settings.R3D_USER, password=settings.R3D_PASS)
    clip_settings_file = "/Volumes/Media/masterRMD"
    output_file_dir, output_file_name = os.path.split(tmpimage)

    command = "redline -i3d %s %s -outDir %s -o %s --exportPreset 3Dtiff --makeSubDir --s  %s --e  %s --masterRMDFolder %s " % (
    left_eye_file, right_eye_file, output_file_dir, output_file_name, start_frame, end_frame, clip_settings_file)

    logging.info(command)

    stdin, stdout, stderr = ssh.exec_command(command)

    result = {}
    result["stdout"] = stdout.readlines()
    result["sdterr"] = stderr.readlines()

    return result
Beispiel #3
0
def _ssh_r2d(files, export_type, tmp_folder, start_frame=1, end_frame=2):
    ssh = MultiSSHClient()
    result = {}

    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
    ssh.connect(settings.R3D_HOST, username=settings.R3D_USER, password=settings.R3D_PASS)

    for file in files:
        test_filename = file.lower()
        if (test_filename.endswith(".r3d")):
            command = "redline --i %s --outDir %s --exportPreset %s" % (file, tmp_folder, export_type)
            if (start_frame > -1):
                command += " -s %s" % (start_frame)
            if (end_frame > -1):
                command += " -e %s" % (end_frame)
            logging.info(command)

            stdin, stdout, stderr = ssh.exec_command(command)
            result[file] = {}
            result[file]["stdout"] = stdout.readlines()
            result[file]["sdterr"] = stderr.readlines()

    return result