5 ms·
An example on how to seek and cut video exactly on it's "I-frames" would be nice. The few times I've searched, I've never really found what I'm looking for. U
by throw7 4y ago
An example on how to seek and cut video exactly on it's "I-frames" would be nice. The few times I've searched, I've never really found what I'm looking for. Usually I just use avidemux to seek and cut to keyframes.
- Melatonic 4y agoI frames are full frames as far as I know - they are considered keyframes because you CAN physically jump to them. In between frames are going through temporal compression (all frames are going through image compression individually as well) which means they rely on the previous and next frame for information.
- astrange 4y agoYou shouldn't need to care about that; video formats should support clipping to non-keyframes by including the preceding GOP at negative playback times, so it skips to the frame you started the clip at. (MOV in fact does support this, but ffmpeg doesn't play it back properly.)
- gyan 4y ago> ffmpeg doesn't play it back properly Can't repro here. Commands: ffmpeg -ss X -i INPUT -c copy -t 10 test.mp4 ffplay test.mp4 where X is not a KF time. Plays from X with audio in sync for 10 secs.
- astrange 4y agoWell, I haven't tried it recently, but it's probably rounding your start time to the nearest keyframe.