[FFmpeg-user] Watermark and Text overlay at the same time?
Clément Bœsch
u at pkh.me
Wed Dec 31 00:24:21 CET 2014
On Tue, Dec 30, 2014 at 11:05:18PM +0000, Carl Eugen Hoyos wrote:
> Les Irvin <lesirvin <at> gmail.com> writes:
>
> > ffmpeg -r 1/4 -i img_%03d.jpg -i audio.mp3 -codec:a copy
> > -c:v libx264 -vcodec png
> > -vf "movie=wm.png [wm]; [in][wm] overlay=10:main_h-overlay_h-10 [out]"
> > -shortest output.mp4
> >
> > Now, I'm trying to add a text overlay as well:
> >
> > -vf "[0:v]drawtext=fontfile=Average-Regular.ttf:text='TESTING';"
>
> Please try to remove the following from your command line:
> [out]" -vf "[0:v]
> And instead use "," or ";" (sorry, I always forget which
> one to use).
>
A,B simply means B filters what A sends out. A;B separate two different
context.
Example:
[in] split=2 [a][b];
[a] curves, edgedetect, hue [x];
[b] scale, subtitles [y];
[x][y] overlay [out]
This means:
- You have one input ("[in]"), which you split into 2: [a] and [b]
- Then in another context: the frames that arrive at [a] will get pass
through curves, then through edgedetect then through hue filter, and
will go out into [x]
- Then in another context: the frames that arrive at [b] will get scaled,
then subtitles will be applied on them, and they will then be sent to
[y]
- Then in another context, all the frames arriving from [x] and [y] will
be sent to the overlay filter, which will sent the result to "[out]"
Hope it clarifies things. They are really two completely different thing.
Now there is also a confusing syntactic sugar that allow you to somehow
avoid the "context switch" with ';' by using a comma well placed, but that
is advanced, and if you're confused by it, don't do that.
IIRC, it basically means the previous filtergraph is equivalent to:
[in] split=2 [a][b];
[b] scale, subtitles [y];
[a] curves, edgedetect, hue,
[y] overlay [out]
... You just drop out a label. (untested, but that's something along these
lines)
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20141231/7bc59799/attachment.asc>
More information about the ffmpeg-user
mailing list