According to this article you can only cut the time, but not specify when to cut from the original video. So the end time will always be wrong. You need to calculate each time on the timeline when your video will end.
e.g. -ss 01:30:40 -to 03:03:05
will cut your video in the wrong order, because it starting the calculation not from the 00:00:00
of the video, but from the -ss 01:30:40
Is there a workaround for this?
example command:
ffmpeg -ss 00:14:15 -an -i "2022-05-30.mp4" -to 01:30:40 -crf 23 -c:v libx264 PART1.mp4
I will lose 14:15
minutes here, it is clearly a bug.
I need to extract 14:15
from the end time to get the correct time of the result video. When it comes to multiple video-editing it's so annoying.
FFmpeg is behaving exactly as it is called. Your main issue is the lack of understanding of the complex FFmpeg option structure. Specifically, you are mixing -ss
input option and -to
output option. Cutting to the chase, try this:
ffmpeg -ss 00:14:15 -to 01:30:40 -i "2022-05-30.mp4" -an -crf 23 -c:v libx264 PART1.mp4
The documentation is very clear on what type of options they are (input/output/global). Some of them, including -ss
and -to
, can be either input or output, depending on their placements. Misplacing them results in an unexpected result like you experienced.
There are some finicky timing condition issues in FFmpeg, but I don't think your case falls under them.