[FFmpeg-user] Encoding SRT subtitle into an MPEG-TS stream
nicolas.george at normalesup.org
Sat Jul 28 15:23:26 CEST 2012
Le primidi 11 thermidor, an CCXX, Matt Joiner a écrit :
> Here's the command line I'm attempting:
> ffmpeg -ss 0:3:50 -i movie.avi -i movie.srt -scodec dvbsub -target
> pal-dvd pipe: | vlc -
> This works just fine, with no errors, and the subtitle is listed under
> the available subtitle tracks in VLC. But there are no subtitles
dvbsub works with bitmap subtitles, and srt files are text subtitles.
Neither ffmpeg nor libavcodec is able to rasterize text subtitles.
I see two solutions to your problem:
If you are ok with hardcoding the subtitles in the video, you can convert
the srt file to ASS and use the ass filter: -vf ass=movie.ass
If you really want a separate sub track, you can try encoding the video to a
VOB file, then using spumux from the dvdauthor project to rasterize the srt
file and mux it into the VOB file, and then again ffmpeg to remux the result
to MPEG-TS, converting dvdsub into dvbsub. This solution is very likely to
fail for one reason or another.
> Must I separately seek the subtitle file too? (-ss)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-user