Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: Scott274 on October 09, 2016, 10:23:22 AM

Title: Cut at non keyframe, slightly jerky video play.
Post by: Scott274 on October 09, 2016, 10:23:22 AM
I'm using Avidemux 2.6.10

I know that to cut in copy mode, we have to set the markers at keyframes only....but does the first or the last frame of the video strictly need to be a keyframe?

I just cut a video (H264-AAC-MP4)...marker B on a keyframe and pressed delete....then on the other end, marker A on a non-keyframe and pressed delete...leaving me with only the video clip inbetween I wanted (Output save: copy-copy-MP4v2).

Unlike older versions, Avidemux does go ahead and cuts the video, but I noticed that the video playback of the cut video clip is very slightly (yet noticeable) jerky (with slight audio breaks) at certain parts of the video (not necessarily just at the cut points).

This is also observed when I appended this video clip into another video cut file (of the same movie)....output video is bit unstable.

I did a second cut of the video...this time both marker B and A on "keyframes"....output video plays smoothly..
Title: Re: Cut at non keyframe, slightly jerky video play.
Post by: eumagga0x2a on October 09, 2016, 10:43:09 AM
Please use the current git or at least the latest release (2.6.14).

In copy mode, the marker A must be on a keyframe, the marker B doesn't matter unless the codec allows frame reordering.
Title: Re: Cut at non keyframe, slightly jerky video play.
Post by: Jan Gruuthuse on October 09, 2016, 04:17:10 PM
if you want to add more video (join/append) after end of that edit, and not re-encode the video: best you end [ B] on keyframe. Otherwise artefacts could occur on next edit. If it's the end of that video
Quotethe marker B doesn't matter
Title: Re: Cut at non keyframe, slightly jerky video play.
Post by: Scott274 on October 09, 2016, 09:56:40 PM
Quote from: Jan Gruuthuse on October 09, 2016, 04:17:10 PM
Otherwise artefacts could occur on next edit.

And this is true even with the latest release!?....Haven't the Avidemux developers found a way to prevent this.
Title: Re: Cut at non keyframe, slightly jerky video play.
Post by: EEMcGee on October 10, 2016, 12:01:33 AM
The problem with cutting off I-frames in 264 codec is that frames can reference future B or P-frames.  So the only place to reliably cut without frames trying to reference frames that aren't there is at key frames.
 
     I have found that with Mpeg-2 you can cut with the A-marker at the B-frame after any P-frames as  P-frames only reference past frames and B-frames only reference 1 frame before and after them.  I don't believe you can cut the B-marker on anything but the I-frame.
Title: Re: Cut at non keyframe, slightly jerky video play.
Post by: Scott274 on October 10, 2016, 03:25:16 PM
Thanks for the feedback....I'll try the latest version too..