I am trying to trim many smaller videos out of one big video. I have watched the entire big video using VLC and noted the time index where each video stops and starts.
Next, I use ffmpeg to trim each small video:
ffmpeg -ss 00:43:58 -i big_video.mp4 -v copy -t 1:00 small_video.mp4
While the duration for each video is correct, the start time is off by about a minute. Note this is not the issue where ffmpeg starts at the nearest keyframe. If I manually compensate the start time, the clip is trimmed correctly.
If I use ffplay as follows to skip to the starting point in the video, it also starts about one minute ahead:
ffplay -ss 00:44:58 big_video.mp4
I then verified my timestamps in VLC, and they are correct. It seems that there is some sort of difference between how VLC and ffmpeg seek in the index? Or maybe even that the index is corrupted in some way. How can I fix this?
ffplay -vf "drawtext=text='%{pts\:hms}':box=1:x=(w-tw)/2:y=h-(2*lh)" input.mp4