INNER CODE UNIT · Python

upload_to_s3

miztiik/AWS-Demos · how-to-examples/iam-s3-sqs-sns-video-transcoder.py:384

    def upload_to_s3(self, filepath):
        """
        Upload a file to the S3 input file bucket.
        """
        filename = os.path.basename(filepath)
        with open(filepath, 'rb') as data:
            self.in_bucket.Object(filename).put(Body=data)
        print("Uploaded raw video {0}".format(filename))
        return filename

    def start_transcode(self, filename):
        """
        Submit a job to transcode a file by its filename. The
        built-in web system preset is used for the single output.
        """
        self.transcoder.create_job(
            PipelineId=self.pipeline_id,
            Input={

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…