Is there a way to insert one or more additional I-frames in a clip?

Started by BG Davis, February 07, 2019, 04:12:08 AM

Previous topic - Next topic

BG Davis

Sometimes, for whatever reason, I-frames are too far apart to allow for cutting a clip near enough to a desired point.  Cutting at/near the desired point means cutting on a B or P frame, which means a corrupted clip.
Is there a way to insert an I-frame at a desired point?
I've tried saving a frame as JPEG, appending it to the clip, copying it, and attempting to paste it at the desired insertion point.  But this does not seem to work.
Any solution to this problem?

eumagga0x2a

Quote from: BG Davis on February 07, 2019, 04:12:08 AM
Sometimes, for whatever reason, I-frames are too far apart to allow for cutting a clip near enough to a desired point.  Cutting at/near the desired point means cutting on a B or P frame, which means a corrupted clip.
Is there a way to insert an I-frame at a desired point?

This is called "smart copy" (re-encoding only the GOP containing the cut point) and turned out to be very hard / hit and miss / impossible with modern codecs (H.264, HEVC), the only one that really matter. Avidemux can't do that, some video editors claim to be able to perform "smart copy" even with H.264.

QuoteI've tried saving a frame as JPEG, appending it to the clip, copying it, and attempting to paste it at the desired insertion point.  But this does not seem to work.

After such a step, you would have to re-encode the whole video anyway, which defeats the purpose. The only two existing options with Avidemux are either to accept the seek / cut point granularity as-is or to re-encode the entire video.

BG Davis

Thank you for the reply and the information/explanation.  Not what I wanted to hear, but that's life.
This is still a great program and I use it over 95% of the time, even though I have Shotcut and Adobe Premiere.  Sometimes less is more, or at least less is more convenient.
Now if Avidemux only had the ability to straighten a tilted video to horizontal by any desired number of degrees...

eumagga0x2a

Quote from: BG Davis on February 08, 2019, 08:09:39 PM
Now if Avidemux only had the ability to straighten a tilted video to horizontal by any desired number of degrees...

Avidemux can do this for many years (the video filter "OpenGL Rotate"), albeit the number of degrees must be an integer (fractions or a degree are not supported). You must enable OpenGL in Avidemux preferences to enable OpenGL-based filters.

BG Davis

Thanks for the welcome information about Open GL rotate.
However:
I have this activated under Edit > Display, which is the only place I can find it.  It appears to be the default option.
Under Filters > Transform, the only rotation options are 90, 180, 270 degrees.
If I go to Filters > Open Gl, nothing shows up in the Available Filters column.  Just a blank column.
How can I activate this feature?


BG Davis

Sorry, I meant
Edit > Preferences > Display...Video Display...Open GL (best)

eumagga0x2a

Quote from: BG Davis on February 14, 2019, 05:50:59 PM
Sorry, I meant
Edit > Preferences > Display...Video Display...Open GL (best)

I didn't mean this one. The checkbox to enable OpenGL is farther below.

edit: if the checkbox is checked but no OpenGL filters are listed after Avidemux restart, please compress and attach admlog.txt from %localappdata%\avidemux\. Likely some required features are not provided by the graphics card and driver.

BG Davis

Got it, thanks.  After a restart, all Open GL options show up and the variable angle works perfectly.

Thank you for showing me this feature and helping me to get it up and running.