[FFmpeg-user] Using expressions in "FADE" filter

Shlomo Morosow smorosow at jemedia.org
Thu Apr 30 18:33:34 CEST 2015


The first link was supposed to be this one
https://ffmpeg.org/ffmpeg-filters.html#Text-expansion

On Thu, Apr 30, 2015 at 12:32 PM, Shlomo Morosow <smorosow at jemedia.org>
wrote:

> Sorry email was sent before complete:
>
> https://www.ffmpeg.org/ffmpeg-utils.html#Expression-Evaluation
>
> I regularly use this in many filters and it works just as expected, it's
> just that I ran into an issue with the fade filter.
>
> Thanks,
> Shlomo
>
> On Thu, Apr 30, 2015 at 12:31 PM, Shlomo Morosow <smorosow at jemedia.org>
> wrote:
>
>> Thanks Moritz,
>> The reason I need to use mathematical values is because I'd like to make
>> a preset command to fade out the last second of any given video and since
>> the fade filter needs to be instructed on when to begin in relation to the
>> start of the video I need to be able to tell it to start at duration minus
>> one second.
>>
>> Regarding the documentation on using expressions in filters, this can be
>> found in the the text-expansion section of the ffmpeg filters documentation:
>>
>> https://www.ffmpeg.org/ffmpeg-utils.html#Expression-Evaluation
>>
>>
>> To which can be applied the the expressions-evaluation found in the
>> ffmpeg expression-evaluation documentation:
>>
>>
>>
>> On Thu, Apr 30, 2015 at 3:50 AM, Moritz Barsnick <barsnick at gmx.net>
>> wrote:
>>
>>> On Wed, Apr 29, 2015 at 17:57:43 -0400, Shlomo Morosow wrote:
>>> > I need the ability to input mathematical values for setting the start
>>> time
>>> > (st)  on the "fade" filter, I've attempted to use an expression and
>>> this
>>> > particular filter does not seem to work with expressions, nor simple
>>> math
>>> > as "10*1".
>>>
>>> As far as I can tell, you are right in saying that this filter (or at
>>> least the "st" argument) does not support expressions.
>>>
>>> For "st", it also doesn't make much sense. Expressions are used not for
>>> convenient calculation, but rather for expressing something which
>>> changes over the course of a media stream, i.e. depending on frame
>>> count, timestamp or the likes. "st" can only ever express a constant
>>> value.
>>>
>>> If you need to do math, you can let your interpreter (on Unix: the
>>> shell) do the math for you. I'm not sure how to do this on Windows (and
>>> usually avoid it, even professionally). ;-)
>>>
>>> > ffmpeg.exe -y -ss "0:00:20" -t "0:00:10" -i input.avi -filter_complex
>>> > "fade=out:st=%{expr\\\: (10-1)}:d=1" -f dvd -target ntsc-dvd -r 29.97
>>> > -aspect 4:3 -b:v 4500k -mbd rd -trellis 1 -flags +mv0 -cmp 0 -subcmp 2
>>> -b:a
>>> > 128k output.vob
>>>
>>> Where is it documented that an expression is expressed as such?
>>>
>>> Moritz
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>
>>
>>
>>
>> --
>>
>> *Shlomo Morosow*
>>
>> *The Living Archive · Archive Manager*
>>
>> 781 East New York Ave, Brooklyn, NY 11203
>> *t *718.774.1800 x1450 *c *347.693.7196
>>
>
>
>
> --
>
> *Shlomo Morosow*
>
> *The Living Archive · Archive Manager*
>
> 781 East New York Ave, Brooklyn, NY 11203
> *t *718.774.1800 x1450 *c *347.693.7196
>



-- 

*Shlomo Morosow*

*The Living Archive · Archive Manager*

781 East New York Ave, Brooklyn, NY 11203
*t *718.774.1800 x1450 *c *347.693.7196


More information about the ffmpeg-user mailing list