[FFmpeg-user] How to use drawtext to overlay dynamic text
Zack Thevenot
zack924 at yahoo.com
Wed Jun 11 21:29:02 CEST 2014
Thanks. I really like the subtitles idea, but I'm having trouble getting the subtitles to show. I'm trying both filtering and muxing but nothing is showing.
ffmpeg -i input.mp4 -vf subtitles=sub.srt out.mp4
ffmpeg -i input.mp4 -i sub.srt -codec copy out.mp4
Show message history
I'm attaching some log files so maybe you can see whats wrong. My subtitle files are SubRip format, but I'm also converting them to .ass and trying those as well
On Wednesday, June 11, 2014 2:22 PM, Zack Thevenot <zack924 at yahoo.com> wrote:
Thanks. I really like the subtitles idea, but I'm having trouble getting the subtitles to show. I'm trying both filtering and muxing but nothing is showing.
ffmpeg -i input.mp4 -vf subtitles=sub.srt out.mp4ffmpeg -i input.mp4 -i sub.srt -codec copy out.mp4
On Wednesday, June 11, 2014 1:11 PM, Lou <lou at lrcd.com> wrote:
On Wed, 11 Jun 2014 10:57:50 -0700 (PDT)
Zack Thevenot <zack924 at yahoo.com> wrote:
>
>
> I am trying to find a way to use filters to draw dynamic text in the
> same location on my video. I understand how to draw static text for a
> certain duration, so my plan was to chain multiple of these filters
> together to make a dynamic text overlay, but I didn't find a way to do
> two or more drawtext filters. What is the best way to do something
> like this? Any help is greatly appreciated.
>
> This is the command
I have so far to make static text
>
> ffmpeg -i input.h264 -vf
> "drawtext=enable='between(t,0,60)':fontfile=/Windows/Fonts/Tahoma.ttf:fontcolor='White':
> text='100'" -acodec copy output.h264
You can make a linear chain of multiple filters by separating them with
a comma:
-vf "drawtext,drawtext"
See <http://ffmpeg.org/ffmpeg-filters.html#Filtergraph-syntax-1>
An
alternative and possibly easier method would be to make an ASS or SRT
subtitle and use the ass or subtitles filters to make hardsubs:
-vf "subtitles=subtitles.srt"
See:
http://ffmpeg.org/ffmpeg-filters.html#subtitles
http://ffmpeg.org/ffmpeg-filters.html#ass
https://trac.ffmpeg.org/wiki/HowToBurnSubtitlesIntoVideo
Or mux the subtitles if you prefer softsubs:
ffmpeg -i video.mkv -i subtitles.ass -codec copy output.mkv
aegisub is an easy to use tool to make such subtitles.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user
I'm attaching some log files so maybe you can see whats wrong. My subtitle files are SubRip format, but I'm also converting them to .ass and trying those as well
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-20140611-141245.log
Type: application/octet-stream
Size: 139028 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140611/6afcc793/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-20140611-141723.log
Type: application/octet-stream
Size: 5862 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140611/6afcc793/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-20140611-141749.log
Type: application/octet-stream
Size: 3936 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20140611/6afcc793/attachment-0002.obj>
More information about the ffmpeg-user
mailing list