Discussion:
[FFmpeg-user] Encoding SRT subtitle into an MPEG-TS stream
Matt Joiner
2012-07-28 08:23:51 UTC
Permalink
I've seen several questions around regarding doing this, but nobody
seems to find a solution:

I'm transcoding arbitrary files to MPEGTS through a pipe. The subtitle
files are separate and have extension .srt.

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
shown.

What is the appropriate subtitle codec to use for MPEG-TS (sending to
a Panasonic Viera TV)?

Must I separately seek the subtitle file too? (-ss)

I am using ffmpeg 0.11.1.
Nicolas George
2012-07-28 13:23:26 UTC
Permalink
Post by Matt Joiner
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
shown.
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.
Post by Matt Joiner
Must I separately seek the subtitle file too? (-ss)
Yes.

Regards,
--
Nicolas George
Tuuls
2012-07-31 12:29:47 UTC
Permalink
In last version of ffmpeg , builds for windows , "ass" filter not working :(



--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Encoding-SRT-subtitle-into-an-MPEG-TS-stream-tp4652131p4652172.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
Nicolas George
2012-07-31 12:58:27 UTC
Permalink
Post by Tuuls
In last version of ffmpeg , builds for windows , "ass" filter not working :(
Works for mi right now in my working tree. Your bug report is not detailed
enough.
http://ffmpeg.org/bugreports.html

Regards,
--
Nicolas George
Tuuls
2012-07-31 13:59:26 UTC
Permalink
most informatoins
http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=10&t=318&p=993&hilit=ass#p993



--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Encoding-SRT-subtitle-into-an-MPEG-TS-stream-tp4652131p4652175.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
Nicolas George
2012-07-31 14:30:15 UTC
Permalink
Post by Tuuls
most informatoins
http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=10&t=318&p=993&hilit=ass#p993
I do not have windows and can not do anything with a truncated non-debug
console-output. All I can say is that it works for me.

Regards,
--
Nicolas George
Matt Joiner
2012-07-28 08:02:48 UTC
Permalink
I've seen several questions around regarding doing this, but nobody
seems to find a solution:

I'm transcoding arbitrary files to MPEGTS through a pipe. The subtitle
files are separate and have extension .srt.

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
shown.

What is the appropriate subtitle codec to use for MPEG-TS (sending to
a Panasonic Viera TV)?

Must I separately seek the subtitle file too? (-ss)

I am using ffmpeg 0.11.1.
Continue reading on narkive:
Loading...