I am trying to create small clips from video file using ffmpeg3. The type of clip and video will be same i.e. mp4 to mp4 only. Below is command, which is being used for same.
ffmpeg -ss 00:07:00.000 -t 0:00:02.000 -i source.mp4 -codec copy -y output.mp4
The duration for clips generated is not same, they always have additional seconds with them i.e. 4,5 or 6 seconds. I have tried this on multiple videos and behavior is same.
Since, the output and input type is same. So I am not using any encoding or decoding, as it will be time consuming process.
Please share suggestions on same.
-c copy
while creating a clip from MKV using ffmpeg. When clip duration is small like 2seconds or 10 seconds then it was not picking up video stream. When duration is bigger like 35econds or 1minute then it produces audio+video streams in output file. Now, I have removed-c copy
so it re-encodes and even 1second. 2second clips are fine now. thanks bunch!