I tried to enable libass for ffmpeg with this --enable-libass
in command but it didn't recognise the command.
Does anyone know how to enable libass on Linux?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityI tried to enable libass for ffmpeg with this --enable-libass
in command but it didn't recognise the command.
Does anyone know how to enable libass on Linux?
First you need to make sure that your particular version of ffmpeg
was built with and supports that switch. You'll also likely need to make sure that the library libass
is installed as well.
You don't specify your Linux distro but I did notice that libass
is available in my stock Fedora 19 repository so it's trivial to install.
$ sudo yum install libass
Now back to ffmpeg
's support of libass
. You can confirm how it was built by simply running it without any arguments.
$ ~/ffmpeg |& grep libass configuration: --prefix=/root/ffmpeg-static/64bit --extra-cflags='-I/root/ffmpeg-static/64bit/include -static' --extra-ldflags='-L/root/ffmpeg-static/64bit/lib -static' --extra-libs='-lxml2 -lexpat -lfreetype' --enable-static --disable-shared --disable-ffserver --disable-doc --enable-bzlib --enable-zlib --enable-postproc --enable-runtime-cpudetect --enable-libx264 --enable-gpl --enable-libtheora --enable-libvorbis --enable-libmp3lame --enable-gray --enable-libass --enable-libfreetype --enable-libopenjpeg --enable-libspeex --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-version3 --enable-libvpx
So the version that I have, does include this support, --enable-libass
. If your version of ffmpeg
doesn't support it you can simply download a static build:
recompile ffmpeg with:
./configure --enable-libass
Then
make
sudo make install
Then check the new ffmpeg without arguments:
ffmpeg
Mine says "libass" is in the new config.
Then, to convert videos I use:
ffmpeg -i input.avi -vf "ass=subs.ass" out.avi
To obtain the subtitles in .ass
from .srt
I use:
ffmpeg -i subs.srt subs.ass
Good luck!