Cut at non keyframe, slightly jerky video play.

Started by Scott274, October 09, 2016, 10:23:22 AM

Previous topic - Next topic

Scott274

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..

eumagga0x2a

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.

Jan Gruuthuse

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

Scott274

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.

EEMcGee

#4
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.

Scott274

Thanks for the feedback....I'll try the latest version too..