[FFmpeg-user] ISSUE ABOUT EXTRACTING

Ferdi Scholten ferdi at sttc-nlp.nl
Thu Feb 29 16:50:33 EET 2024


Hello all,
> using release 6.1 of ffmpeg, I have an issue about extracting a part from a mkv video, into another mkv video.
>
> If it can help, there are a few infos about the source video (the video from which I extract) ; infos provided by the VLC MEDIA PLAYER software :
>
>       [cid:e9bf5d83-4a7e-410b-b522-08d2d7c75fc1]
>
> I use the command to extract from "position" (if we can say so) 1320 seconds to "position" 3183 seconds :
>
>       ffmpeg.exe -i "C:\temp\source video.mkv" -ss 1320 -to 3183 -codec copy "D:\temp\new video.mkv"
>
> and in the new video, at the beginning, there are a few seconds missing (about 2-3 seconds) : a few seconds I see in the source video, but not in the new video.
>
> Does anybody have an idea about a way to solve it ?
>
> Please let me know if you require another technical infos, to help ; thanks in advance.
>
> Regards,
> HA
>
When using codec:copy you can only cut on keyframes so your video will 
be cut on the nearest keyframe to the time you specified. Keyframes can 
be seconds to minutes apart depending on the type of video and codec used.

So to use exact timing you either need to transcode both source and 
detination, or use raw video material for both.


More information about the ffmpeg-user mailing list