ffmpeg – Cutting a video by specific time
I want to cut a video using ffmpeg.
This is the command I used.
ffmpeg -ss 1:40 -t 0:40 -i "1.ts" -c copy 100sts.ts
Duration of the result file is 1m 43s.
I guessed there is no keyframe in that section, but I was wrong.
Below is the list of the command I typed, and duration of them respectively.
ffmpeg -ss 1:40 -t 0:30 -i "1.ts" -c copy 100sts_2.ts
ffmpeg -ss 1:40 -t 0:10 -i "1.ts" -c copy 100sts_3.ts
ffmpeg -ss 1:40 -to 2:20 -i "1.ts" -c copy 100sts_4.ts
ffmpeg -ss 1:40 -to 1:50 -i "1.ts" -c copy 100sts_5.ts
ffmpeg -ss 1:40 -to 1:41 -i "1.ts" -c copy 100sts_6.ts
1min 30s
1min 13s
1min 43s
1min 13s
1min 4s
I want to cut this video so that its duration would be around 30~40s.
But ffmpeg is cutting it 1 min more than specified time.
What have i done wrong?
Read more here: Source link