Opened 5 years ago

Last modified 4 years ago

#2631 open enhancement

fade filter offset from the end of stream

Reported by: burek Owned by:
Priority: wish Component: avfilter
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

The fade filter example shows how to fade out last 45 frames of a video:

Fade out last 45 frames of a 200-frame video:
fade=out:155:45

where 155 is a starting frame and 55 is the number of frames that the filter should be applied to.

It might be more convenient if users could specify just the number of frames to fade out, together with some kind of a constant (or -1) for the starting frame, to avoid the need to know the exact frame number before setting the filter's parameters, like this:

Fade out last 45 frames of an unknown-frame-count video:
fade=out:-1:45

It would make filter to be applied to the last 45 frames of the video.

Change History (4)

comment:1 Changed 5 years ago by richardpl

  • Component changed from undetermined to avfilter
  • Status changed from new to open
  • Version changed from unspecified to git-master

comment:2 Changed 4 years ago by richardacre

Suggest a more flexible approach would be to allow a negative start-frame to count back from the end but also allow the second parameter to be omitted to also signify "from here until the end" ... so that in the 200 frame video example (above) the following would all have the same effect:

fade=out:155:45
fade=out:-45:45
fade=out:155
fade=out:-45

Same timekeeping could also apply to any filter (e.g. show a watermark for final X frames and audio fades)

This would certainly help me, as I am currently tasked with watermarking and processing several dozen videos and would love to be able to automate all of it in one simple script, rather than having to determine the length of each clip and then tailor the parameters individually!

comment:3 Changed 4 years ago by cehoyos

Most developers on irc seem to have a agreed that such a "queue" feature should not be implemented due to memory (security?) concerns.

comment:4 Changed 4 years ago by burek

I suggested the implementation of a new feature here: https://ffmpeg.org/trac/ffmpeg/ticket/2789

That might help implementing this feature, as well as other usable features that ffmpeg can't easily implement right now, because of the 1-pass processing logic.

Note: See TracTickets for help on using tickets.