News:

--

Main Menu

Problems with Points A and B. Please solve.

Started by cdkr, January 19, 2021, 05:52:53 AM

Previous topic - Next topic

cdkr

Hello ... I have had serious problems with points A and B only corresponding to keyframes. This I would describe as a serious software problem. The logical thing is that whatever the point and how they are reached, they are respected. Is there a way to save this serious problem detected?
One of the things that I appreciate the most about Avidemux is that it can copy the output format of the audio and video so the output process is super fast. Cheers!

butterw

#1
If you always use the seek to keyframe function (top and bottom arrows or <<, >> buttons) before setting markers A and B, they will always be on keyframes (Frame type: I-FRM displayed).

Even for lossless cutting in COPY mode, B doesn't have to be on a keyframe (at least for closed-GOP). But having a preference to allow markerA only on keyframes would be useful.

Edit: It turns out that in COPY mode, saves always start on a keyframe. If A wasn't on a keyframe, the save will start on the keyframe before A.

alexstorm

Cdkr, It seems you are asking for the ability to work on a video frame by frame, but the type of video you are working with is compressed with different frame types.  I've worked in video editing for independent films in post production and with special effects production houses.  I would not approach a frame by frame control for any purpose inside a compressed I and B frame video.  You might sometimes hit the mark, but mostly it's just frustrating and not useful way to spend time trying to work on a video.

Video editing, special effects, multiple layers and frame by frame work is done on lossless or uncompressed video, before it ever gets to a compressed MPEG type of copy.  In post production, the answer would be, send us the master or we can't help you.  Freelance hack would be to convert the video back to uncompressed or lossless where ever frame is full res, work on your editing there and convert it back again to a compressed version.  Of course, you loose two generations, but sometimes you can tweak the look enough.

Do you just want to have the convenience of getting the frame settings exactly right?  I, personally, just never expect that to happen unless I am on a full edit desk software working with a master copy.  I hope that makes sense.

Who

The thing I have sometimes wished that Avidemux had is an option to only re-encode where necessary, copy otherwise.  So if that option was enabled, and you set your A and B markers between keyframes, and you had selected something other than Copy for the output (you would need to makes some selection), it would first check to see if the input and output formats are compatible.  If they are the same, and only if that option were selected, it would re-encode the part from the A marker to the first keyframe thereafter, then do a straight copy until the end of the selection, and then (if necessary) re-encode the final frames that do not end on a keyframe up to the B marker.  So only a few frames at the start and end would get re-encoded, and the rest would just get copied.

Well, except in sections cases where filters might be applied that necessitate re-encoding.  Then in that situation only the frames where filters are applied (including to the previous and following keyframes) would be re-encoded and again, the rest would be a straight copy.  So the idea is that any section that can be copied will be, and those that can't will be re-encoded after applying any filters or whatever.  I'm not holding my breath waiting for it, though.

alexstorm

My limited understanding of trying to edit a clip inside a longer video is that the compression has to sync up with I-frames and B-frames.  Taking a compressed video length A to B, then some extra edit B to C and again compressed video from C to D (end).  The only way to make these transitions smooth on a compressed video would be to encode the entire video.  You can say that you should have a way to start with an I Frame at point B and end with all B frames and hit a new I-frame at point C.  What would make the edit match the compression of the rest of the video.  If it doesn't match you would expect a glitch. 

This type of insert editing is done all the time with lossless compressed masters where every frame is essentially an I-frame.  There is no production house, I think, that would agree to do this.  They would just say deliver a lossless master and then we'll talk.

butterw

Partial re-encoding (smart rendering) of x264 is available in some paid software. It may be possible to do it manually in some cases (Closed-GOP with real keyframes: IDR I-frames) if the encoding parameters are known (they need to be matched).
Instantaneous Decoder Refresh (IDR) frames allow independent decoding of the following frames, without access to previous frames.

Currently supported solutions in Avidemux would be to use a master file
- using a lossless video format if partial filters are applied
- or using a keyframe only compressed format for cutting