Couldnt concatanate image with video with python
We want to concatenate this image https://hcti.io/v1/image/7a19364a-4a5b-4bc1-9ee8-cb7dea1fc06f in the beginning of this video "https://res.cloudinary.com/ama-fans/video/upload/v1645395910/temptemp1.mp4" and upload the concatenated to a new cloudinary URL.
This is our code:
```
```
We are getting this weird error cloudinary.exceptions.Error: File size too large. Got 44806469. Maximum is 20971520.
-
Hi Saurav,
As the video that you are using is already uploaded into your Media Library account, you could use the explicit method and perform the eager transformation. For example (i.e. using Python SDK):
cloudinary.uploader.explicit("sample_video",
type = "upload",
resource_type = "video",
eager = [
{ "format": 'webm', "codec": 'vc_vp9/mp4', "quality": 'auto' },
{ "format": 'mp4', "codec": 'h264', "quality": 'auto' },
{ "format": 'mp4', "codec": 'h_265', "quality": 'auto' },
{ "format": 'auto', "quality": 'auto' }
])On the other hand, you could also perform the eager transformation using the upload method of the Upload API for the video that is from another source location. For example (i.e. using Python SDK):
cloudinary.uploader.upload("/localdir/sample_video.mp4",
type = "upload",
resource_type = "video",
eager = [
{ "format": 'webm', "codec": 'vc_vp9/mp4', "quality": 'auto' },
{ "format": 'mp4', "codec": 'h264', "quality": 'auto' },
{ "format": 'mp4', "codec": 'h_265', "quality": 'auto' },
{ "format": 'auto', "quality": 'auto' }],
eager_async = True,
eager_notification_url = "https://your_webhook_site",
notification_url = "https://your_webhook_site")As for concatenating videos and adding image overlays, you can take a look at the sample provided in this link.
Hope this helps.
0
Post is closed for comments.
Comments
1 comment