[FFmpeg-user] What is the correct way to cut the video with ffmpeg?

桃源老師 xanadu6291 at dream.jp
Tue Jun 21 18:39:35 CEST 2016


> 2016/06/22 1:05 A.M. Cley Faye <cleyfaye<at>gmail.com> wrote:
> 
> 2016-06-21 17:44 GMT+02:00 桃源老師 <xanadu6291<at>dream.jp>:
> 
>> Still curious about cutting video on non key frame is correct or not...
> 
> 
> ​Depends on your definition of correct, but for my definition (which is, I
> need an output file that play fine in most players) I'd say "no".

Thank you for your answer.  I feel very clear to hear that.

> It varies between codecs of course, but "usually", if you don't reencode,
> cutting anywhere else than a key frame will result in a garbled stream up
> until the next key frame.

Understand.

> From this page: https://trac.ffmpeg.org/wiki/Seeking the behavior of ffmpeg
> when seeking and *not* transcoding is to seek to an i-frame (key frame) and
> adjust the stream timestamp accordingly, which might be why some players
> are confused.
> 
> If you want accurate seeking outside of keyframes without some sort of
> timestamp adjustment, you'll have to transcode the video/audio. You can
> either transcode the whole segment, or just transcode up to the next
> keyframe then copy from there but as far as I know you'll have to do it "by
> hand".

It seems time and trouble.  But may be required for accurate working.
I will consider what should I do.

Again Thank you for your answer...


Best Regards,


// Miya aka. TougenRoushi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3577 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20160622/6e0e2f8a/attachment.bin>


More information about the ffmpeg-user mailing list