[FFmpeg-user] Overlay performance

Micael Silva micaelsilva at gmail.com
Tue Aug 27 19:57:49 EEST 2019


On Tue, 27 Aug 2019, 13:50 Darrin Smith, <darrinps at gmail.com> wrote:

> Really appreciate the feedback.
>
> One question though so I understand correctly.
>
> It was suggested to use a cropped overlay. Does FFMpeg auto scale up then?
>
> I need overlay content on all four corners of the video. What I did was
> create on png that is the same size as the video source resolution. If I
> crop everything out but the text I need, then FFMpeg, by default, will
> stretch that to the corners of the video? I had not read that anywhere so I
> was just wanting to make sure that I understood correctly.
>
> Again, thank you for your help here.
>
>
>
> [image: Mailtrack]
> <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&
> >
> Sender
> notified by
> Mailtrack
> <
> https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&
> >
> 08/27/19,
> 11:46:35 AM
>
> On Tue, Aug 27, 2019 at 11:21 AM Paul B Mahol <onemda at gmail.com> wrote:
>
> > On Tue, Aug 27, 2019 at 6:17 PM Carl Zwanzig <cpz at tuunq.com> wrote:
> >
> > > On 8/27/2019 9:04 AM, Darrin Smith wrote:
> > > > I did copy the command, but there is no way to get better hardware.
> > This
> > > is
> > > > for an app where the user may have even lesser hardware (cell phones)
> > > than
> > > > what was used so I'm hoping to optimize it as much as possible.
> > >
> > > Try using a cropped overlay (not full size)- if most of the full-size
> > > overlay is transparent, there's no point in processing that part, let
> > > ffmpeg
> > > ignore those pixels.
> > >
> > >
> > Yea, that is sane approach.
> >
> >
> > > Make sure the color spaces and formats are identical.
> > >
> > > Remove the math from the filter complex; do it in the outside script
> (but
> > > the next will take care of this).
> > >
> > > Drop any filters/options that aren't actually necessary (i.e. rotate=0
> > and
> > > all the rotate options); if you're not rotating, don't include them at
> > all.
> > >
> > > Consider using an uncompressed overlay (so it doesn't need to be
> > decoded).
> > >
> > >
> > > Basically, optimize all of the operations and remove redundant or
> > > non-operational ones.
> > >
> > >
> > > > Thank you for your feedback anything else you can think of?
> > > Please stop top-posting on this list.
> > >
> > > Later,
> > >
> > > z!
> > >
> > >


No, it doesn't. Overlay doesn't scale or stretch by itself. It is overlayed
pixel by pixel, if the source image changes to position or size the result
image can change just because of that.


More information about the ffmpeg-user mailing list