Author Topic: Is there a way to insert one or more additional I-frames in a clip?  (Read 408 times)

BG Davis

  • Full Member
  • ***
  • Posts: 100
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

  • Moderator
  • Hero Member
  • *****
  • Posts: 2723
Re: Is there a way to insert one or more additional I-frames in a clip?
« Reply #1 on: February 07, 2019, 07:01:44 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.

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

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

  • Full Member
  • ***
  • Posts: 100
Re: Is there a way to insert one or more additional I-frames in a clip?
« Reply #2 on: February 08, 2019, 08:09:39 PM »
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

  • Moderator
  • Hero Member
  • *****
  • Posts: 2723
Re: Is there a way to insert one or more additional I-frames in a clip?
« Reply #3 on: February 08, 2019, 11:50:36 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.
« Last Edit: February 08, 2019, 11:52:58 PM by eumagga0x2a »

BG Davis

  • Full Member
  • ***
  • Posts: 100
Re: Is there a way to insert one or more additional I-frames in a clip?
« Reply #4 on: February 14, 2019, 05:37:55 PM »
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

  • Full Member
  • ***
  • Posts: 100
Re: Is there a way to insert one or more additional I-frames in a clip?
« Reply #5 on: February 14, 2019, 05:50:59 PM »
Sorry, I meant
Edit > Preferences > Display...Video Display...Open GL (best)

eumagga0x2a

  • Moderator
  • Hero Member
  • *****
  • Posts: 2723
Re: Is there a way to insert one or more additional I-frames in a clip?
« Reply #6 on: February 14, 2019, 06:22:34 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.
« Last Edit: February 14, 2019, 06:45:36 PM by eumagga0x2a »

BG Davis

  • Full Member
  • ***
  • Posts: 100
Re: Is there a way to insert one or more additional I-frames in a clip?
« Reply #7 on: February 16, 2019, 02:13:27 AM »
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.