[MPlayer-users] convert/merge RealTime (.rt) subtitles

EC zybhjk at verizon.net
Mon May 15 00:10:25 CEST 2006


wim delvaux <wim.delvaux at adaptiveplanet.com> | Sun, 14 May 2006
23:51:37 +0200

> HI all,
> 
> This might be off topic but I have the following problem
> 
> I have merged two AVI files of a movie into one AVI file assuming
> that I could merge the corresponding subtitle files too.  I already
> did that for srt files before so I assumed that there would be no
> problems The files have the extension *.sub with for each sub a *idx
> file.
> 
> mplayer claims these subtitles to be of .rt type. and can play these
> files perfectly.  
> 
> Until now I have not found any tool (nor linux nor windows) that can
> merge these subtitle file types.
> 
> Mplayer has the option -sub and -dump...sub but I have not managed to
> get them going in my situation nor do I know if these options can
> solve my problem (the AVI files being merged already and all)

IIRC, .srt uses absolute times to display subtitles, so as you
discovered, cat'ing the two files together will not work.  What you
should do is covert the subs to a relative time format, of which I
believe mpsub is one of.  So you should run 
mplayer -sub <srt sub> -dumpmpsub <video file, any one long enough will
work>
for each file.  That will only proceed at 1x time, so maybe you should
try adding -vo null -benchmark -nosound.

Once you have all of the mpsub files, you can cat them together and
play the resulting file with your final avi.  You can even
use -dumpsrtsub and get them back into a .srt format.

I don't have the files to test this, but I believe it will work.

--
EC




More information about the MPlayer-users mailing list