jonataslaw / VideoCompress

Compress videos, remove audio, manipulate thumbnails, and make your video compatible with all platforms through this lightweight and efficient library.
MIT License
230 stars 279 forks source link

compression duration is not working as expected #205

Closed legend1998 closed 8 months ago

legend1998 commented 2 years ago

there is lack of info of duration parameter, whether it takes milliseconds or seconds, the problem is duration parameter takes seconds as input and compressed video duration is not in seconds .

for example

i compressed a video of 67 seconds duration and gave start parameter 0, and duration parameter 60, the output compressed video is 6 second duration.

Any suggestion or hint may work for me.

temirfe commented 1 year ago

my video was 28 sec, i gave startTime 0, duration 10 (to get first 10 secs) but it returned first 18 secs. Seems like duration is for cutting, but i don't know why it cut 10 secs from end

heshesh2010 commented 1 year ago

+1

angelogullotta commented 1 year ago

It's not intuitive but I think duration = time (seconds) to trim from the end of the video.

legend1998 commented 8 months ago

Well seems like @angelogullotta is right. closing this is issue.

I suppose this parameter instruction is updated on newer upcoming versions.