[FFmpeg-user] overlay not connected to source error - drawtext

Clément Bœsch ubitux at gmail.com
Sat Apr 28 10:19:51 CEST 2012


On Sat, Apr 28, 2012 at 09:52:39AM +0200, Nicolas George wrote:
> Le nonidi 9 floréal, an CCXX, Damon Edwards a écrit :
> > [root at localhost test]# ffmpeg -i table.mp4 -vf
> > "drawtext=textfile=txtoverlay:fontfile=/usr/share/fonts/default/ghostscript/bchb.pfa:x=(w-text_w)/2:y=(h-text_h-line_h)/2:fontsize=21:fontcolor=white:shadowy=2,fade=in:0:10:alpha=1,fade=out:30:10:alpha=1
> > [over]; [in][over] overlay [out]"
> 
> drawtext is a filter: it reads frames, writes the text on top of them and
> sends them to the next filter. As such, you did not provide an input, so it
> takes the current one, which is the filtergraph input, which is therefore no
> longer available for overlay.
> 
> > -r 29
> 
> That is a very strange choice.
> 
> > However, something like this works
> > ffmpeg -i table.mp4 -vf
> > "color=red at 0.2:270x50,fade=in:0:10:alpha=1,fade=out:30:10:alpha=1
> > [over]; [in][over] overlay [out]" -r 29 -vcodec libx264 -acodec libfaac -ab
> > "96k" -ac 2 -y overlaid.mp4
> 
> Yes: drawtext is writing its text on the red image. Unfortunately, there is
> currently no way to get drawtext to write on a transparent image and produce
> non-transparent text. The best you can do is probably to duplicate your
> input (using split) to use it as input for drawtext.
> 

Or maybe a simpler way would be to make use of the ASS markup (-vf
ass=...)? When it comes to text effects I believe it's the most
appropriate solution.

Youtube + "aegisub karaoke effects" or "aegisub fade" should give an
overview. Also, http://docs.aegisub.org/manual/ASS_Tags and #aegisub at rizon
on IRC.

Then, you can use http://ffmpeg.org/libavfilter.html#ass to do the
overlay.

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120428/4993eb3d/attachment.asc>


More information about the ffmpeg-user mailing list