Ubuntu – How to burn srt subtitles to video with avconv

avconvffmpegvideo

System : Xubuntu 13.04 x64

I've found usage of this functionality in ffmpeg here

ffmpeg -i video.avi -vf subtitles=subtitle.srt out.avi

but it doesn't work. I get an error

No such filter: 'subtitles'

on that. Same thing happens if I replace ffmpeg by avconv.

So I tried downloading the libav source here and compile. Again I'm frustrated when I run

./configure --enable-libass

in the source directory, and this time I got

Unknown option "--enable-libass"

I wonder if this is a very particular thing that avconv doesn't support at all. And

Best Answer

Why subtitles filter is missing

Libav tends to ignore features from FFmpeg, so avconv and their counterfeit "ffmpeg" (removed as of 14.04) do not support libass, and therefore does not support the subtitles video filter among many other filters.


How to fix

You have several options to get the real ffmpeg from FFmpeg:


Usage

Hardsubs

This will "burn" the subtitles into the video, but of course requires that the video be re-encoded:

ffmpeg -i video.mkv -vf subtitles=subtitle.srt -codec:a copy output.mkv

Softsubs

Consists of a susbtitle stream that is muxed into the file. Any player worth using will allow you to turn the subtitles on and off and choose from other subtitle streams that may be present. Does not require any re-encoding.

ffmpeg -i video.mkv -i subtitle.srt -codec copy -map 0 output.mkv