Skip to content

Tutorial that shows how to add text to a video file with ffmpeg

Notifications You must be signed in to change notification settings

Erkaman/ffmpeg-add-text-to-video-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Adding Text to a Video File with ffmpeg

By burning text subtitles into a video, we can use ffmpeg as a quick and dirty way of adding text to a video. Let us say we want to add text to the video original.mp4, which is rendered a .gif below

Animated

Then we simply specify a subtitle file of the format .ass(Advanced Substation Alpha), and feed it to ffmpeg as follows:

ffmpeg -y -i original.mp4 -vf subtitles=text.ass original_with_subs.mp4

and this gives us a video with text added:

Animated

The file text.ass can be found in the repo, and it contains explanatory comments. The specification of the subtitle format can be found here.

About

Tutorial that shows how to add text to a video file with ffmpeg

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published