<p>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.</p>
<p>Next, I use ffmpeg to trim each small video:</p>
<p><code>ffmpeg -ss 00:43:58 -i big_video.mp4 -v copy -t 1:00 small_video.mp4</code></p>
<p>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.</p>
<p>If I use ffplay as follows to skip to the starting point in the video, it also starts about one minute ahead:</p>
<p><code>ffplay -ss 00:44:58 big_video.mp4</code></p>
<p>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?</p>

CC BY-SA 4.0
2020-09-27T09:36:10.627Z
When viewing certain parts of the video with ffplay, it seems some parts play a bit faster as they should. In VLC this does not happen. The passage of time as indicated by each player remains constant, so this explains at least where the discrepancy is. Different parts of the video happen at a different time index when comparing between ffplay/ffmpeg and VLC. The discrepancy becomes bigger after more time passes. Not yet sure what causes this though...
Thomas De Reyck
CC BY-SA 4.0
2020-09-27T10:27:54.193Z
Eventually, I noted down time stamps again while playing via ffplay. The following command displays timestamps while playing:

```ffplay -vf "drawtext=text='%{pts\:hms}':box=1:x=(w-tw)/2:y=h-(2*lh)" input.mp4```
Thomas De Reyck
<ffmpeg><timecode><vlc>
ffmpeg or ffplay time index not matching with VLC
Thomas De Reyck
# ffmpeg or ffplay time index not matching with VLC

(Asked by: username_0 on 2020-09-26)

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?

**Tags:** ffmpeg, timecode, vlc

> **Comments:**
> **username_0**: When viewing certain parts of the video with ffplay, it seems some parts play a bit faster as they should. In VLC this does not happen. The passage of time as indicated by each player remains constant, so this explains at least where the discrepancy is. Different parts of the video happen at a different time index when comparing between ffplay/ffmpeg and VLC. The discrepancy becomes bigger after more time passes. Not yet sure what causes this though...  
> **username_0**: Eventually, I noted down time stamps again while playing via ffplay. The following command displays timestamps while playing:  ```ffplay -vf "drawtext=text='%{pts\:hms}':box=1:x=(w-tw)/2:y=h-(2*lh)" input.mp4```  

---

## 0 answers

