[MEncoder-users] Copy subtitles?

Ian Collier Ian.Collier at comlab.ox.ac.uk
Mon Oct 12 12:51:23 CEST 2009


On Mon, Oct 12, 2009 at 01:18:58AM +0100, you wrote:
> I have an MPEG2 TS input, recorded off DVB-S, and want to convert it
> to an MPG. I would like to keep the (sole) subtitle track in the TS.

I have some experience in dealing with DVB-T streams from FreeView
in the UK; the following info may or may not be relevant to your
purposes.

My PVR does not record text subtitles into the transport streams it
saves; instead, it records the EN-300-743 standard bitmapped subtitles.
Mplayer will not display these subtitles as far as I can tell.
ProjectX[0] can extract the subtitles in either SUP or SON format.
However, neither of these is directly useful.

SON is the only format that preserves the colour.  To do this I need to
set the subtitle format to SON and the colour model to 16 colours in the
ProjectX options.  It's also necessary to have a version of ProjectX
which includes a patch made to CVS on 2006-07-05[1] (the last stable
release 0.90.4.00 was made prior to this).

ProjectX outputs an mpeg2video file, an mp2 audio file, a SON subtitle
description file and a whole bunch of BMP subtitle bitmaps.

I have hacked up a program which converts the SON subtitles into an
input file suitable for spumux (the chief task is converting all the
multicolour BMP files into 2-bit PNGs as best it can; it's not perfect
but it works well enough for the most part).  I could make this public
if there is any interest.

Then I run mplex to multiplex the video and audio back together, and
spumux to add the subtitles.  (Note that spumux only works on MPEG2
program streams.  This may make the subtitles useless for any other
video encoding format.)

Mplayer still won't play the subtitles from the resulting file, but
vlc will.  They are also directly suitable for recording on to a DVD
such that a standard DVD player can display the subtitles.

imc

[0] http://sourceforge.net/projects/project-x/
[1] http://project-x.cvs.sourceforge.net/viewvc/project-x/Project-X/src/net/sourceforge/dvb/projectx/subtitle/DVBSubpicture.java?r1=1.9&r2=1.10


More information about the MEncoder-users mailing list