question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Save to Amazon S3

See original GitHub issue

Hi,

I want to save my final video to Amazon S3 (or other network storage), but with current to_videofile I cannot.

Code from example:

# write the result to a file in any format
final_clip.to_videofile("myHolidays_edited.avi",fps=25, codec='mpeg4')

Can you use buffer instead of filename? Or other suggestions how can I do it.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
davidhariricommented, May 21, 2017

While I think folding in native S3 support is not necessary, it would be good to have examples of how MoviePy works without writing to disk (is that possible)? I want to perform my conversions in the context of the request and in memory before uploading the result to S3 (from memory).

3reactions
parampal290commented, May 25, 2020

Closing this. You can achieve a similar upload to s3 using boto3 s3 (pip install boto3) something like:

from boto3.s3.transfer import S3Transfer
import boto3

... video/audio manipulations via moviepy ...

# Define the S3 client with access and secret keys, if necessary.
client = boto3.client('s3', aws_access_key_id=access_key,aws_secret_access_key=secret_key)
# Define the S3Transfer instance.
transfer = S3Transfer(client)
# Upload the file to S3
transfer.upload_file(final_clip_path, aws_bucket, file_path_in_bucket)

Thank you!

in this solution I think you try to tell first write video on website storage and later upload on AWS any other solution like directly write on aws s3 or first, upload video in s3 bucket after that rewrite video if you have any idea please tell me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Store and Retrieve a File with Amazon S3
Enter the Amazon S3 console. Click on the AWS Management Console home to open the console in a new browser window, so you...
Read more >
Step 3: Upload the files to an Amazon S3 bucket
Step 3: Upload the files to an Amazon S3 bucket · Choose the name of the data folder. · In the Upload -...
Read more >
Uploading to Amazon S3 directly from a web or mobile ... - AWS
In a browser, navigate to the public URL of index.html file. · Select Choose file and then select a JPG file to upload...
Read more >
Amazon S3 - Cloud Object Storage - AWS
Amazon Simple Storage Service (Amazon S3) is an object storage service offering industry-leading scalability, data availability, security, and performance.
Read more >
Step 2: Upload an object to your bucket - AWS Documentation
Open the Amazon S3 console at https://console.aws.amazon.com/s3/ . · In the Buckets list, choose the name of the bucket that you want to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found