Home/News | About | Download | Documentation | Forum | Bug Reports | Contact | Donations | Consulting | Projects | Legal | Security | FATE


This forum has not been maintained for a long time and will probably get deleted in the near future.
For faster responses to your questions, please use StackOverflow instead and tag your questions with "FFmpeg".
If you need a backup of the posts from this forum, please contact me directly.

How to burn subtitles into the video

A collection of useful tutorials for some common tasks.

How to burn subtitles into the video

Postby burek » Wed Feb 08, 2012 8:46 pm

Using FFmpeg's ass video filter, we can draw text of the subtitles into the movie, like this:
Code: Select all
ffmpeg -i video.avi -vf "ass=subtitle.ass" out.avi
burek
 
Posts: 864
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: How to burn subtitles into the video

Postby nille » Thu Jul 26, 2012 7:59 am

I have try it but it didn't work :(

Code: Select all
ffmpeg.exe -i input.mkv -vf ass=subtitle.ass -vcodec libx264 -preset ultrafast -tune animation -g 246 -keyint_min 11 -bf 3 -b_strategy 2 -refs 3 -crf 18.0 output.mp4


But he is not burn in the subtitle. All file names an path are correct and ffmpeg is compiled with ass support.

Code: Select all
ffmpeg version N-42704-g85761ef
built on Jul 20 2012 20:41:09 with gcc 4.7.1 (GCC)
configuration: --disable-static --enable-shared --enable-gpl --enable-version3 -
-disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib
--enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --en
able-libopencore-amrwb --enable-libfreetype --enable-libgsm --enable-libmp3lame
--enable-libnut --enable-libopenjpeg --enable-librtmp --enable-libschroedinger -
-enable-libspeex --enable-libtheora --enable-libutvideo --enable-libvo-aacenc --
enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libx264 --enab
le-libxavs --enable-libxvid --enable-zlib
libavutil      51. 65.100 / 51. 65.100
libavcodec     54. 42.100 / 54. 42.100
libavformat    54. 18.100 / 54. 18.100
libavdevice    54.  1.100 / 54.  1.100
libavfilter     3.  2.100 /  3.  2.100
libswscale      2.  1.100 /  2.  1.100
libswresample   0. 15.100 /  0. 15.100
libpostproc    52.  0.100 / 52.  0.100
nille
 
Posts: 7
Joined: Thu Jul 26, 2012 7:52 am

Re: How to burn subtitles into the video

Postby admin » Thu Jul 26, 2012 9:47 am

you didn't provide the full uncut output
admin
Site Admin
 
Posts: 26
Joined: Thu May 05, 2011 4:24 pm

Re: How to burn subtitles into the video

Postby nille » Thu Jul 26, 2012 10:47 am

I have only removes some repeating messages.
See attachment.
Attachments
ffmpeg-20120726-121127.7z
(19.77 KiB) Downloaded 567 times
nille
 
Posts: 7
Joined: Thu Jul 26, 2012 7:52 am

Re: How to burn subtitles into the video

Postby burek » Thu Jul 26, 2012 12:18 pm

your output looks ok
burek
 
Posts: 864
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: How to burn subtitles into the video

Postby little_gootoo » Wed Aug 08, 2012 3:40 am

Hello burek.

Where can I learn about the format of an ass subtitle file?

Thanks.
little_gootoo
 
Posts: 14
Joined: Sat Aug 04, 2012 2:31 am

Re: How to burn subtitles into the video

Postby burek » Wed Aug 08, 2012 9:39 am

Hi, I did a Google search for "ass subtitle" and the first link was this: http://en.wikipedia.org/wiki/SubStation_Alpha
burek
 
Posts: 864
Joined: Mon May 09, 2011 10:16 pm
Location: Serbia

Re: How to burn subtitles into the video

Postby little_gootoo » Wed Aug 08, 2012 2:27 pm

Ok, I see. I thought you guys had something about it.

Regards.
little_gootoo
 
Posts: 14
Joined: Sat Aug 04, 2012 2:31 am

Re: How to burn subtitles into the video

Postby nille » Tue Aug 14, 2012 8:53 pm

So ok my problem is solved now. The Problem was that libass is build without fontconfig.
nille
 
Posts: 7
Joined: Thu Jul 26, 2012 7:52 am

Re: How to burn subtitles into the video

Postby TechnoPhil » Thu Aug 30, 2012 6:45 am

Hi there!
I am trying to convert an mkv video into an mp4.
I am using this script:

Code: Select all
for i in *.mkv; do newname=`basename $i .mkv`.mp4; ffmpeg -map 0.0:0.0 -map 0.3:0.1 -i $i -s 1280x720 -b 3000k -bt 5000k -vcodec libx264 -acodec ac3 -ac 6 -ar 44100 -ab 256k -threads 4 $newname; done


My question is: is it possible to preserve a subtitle track into an mp4 video? If possible, how can i do that?
Thank you! ;)
TechnoPhil
 
Posts: 12
Joined: Thu Aug 30, 2012 6:40 am
Location: San Marino

Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest