Precision Video Trimming
Hi,
My use-case requires very precise video trimming, but the videos being delivered are always slightly out. For instance, on one video I'm using `so_0.064,eo_8.064`, and the delivered video has a duration of 8.067s. I've tried transcoding and increasing the keyframe interval but can't seem to get the trimming to be accurate. Any tips?
Thanks!
-
Hi James,
I would suggest getting the exact `video_duration` and `frame_rate` details, to calculate the timing.
You can get these details via the Admin API and including the `image_metadata` parameter in your request.
For example:
cloudinary.api().resource("myVideo", ObjectUtils.asMap("resource_type", "video","image_metadata", "true"));
Please refer here for more details: https://cloudinary.com/documentation/admin_api#get_the_details_of_a_single_resource
The response will include these details which you can use to calculate.
For example, the calculation to get the last timeframe would be `video_duration - 1/frame_rate`.
If you would like to provide the Video URL we will gladly further assist. If privacy is a concern you can open a ticket at support@cloudinary.com.
Thanks,
Michal
Please sign in to leave a comment.
Comments
1 comment