[MPlayer-users] Adding subtitles to .mpg for DVD

Ivan Kowalenko ivan.kowalenko at gmail.com
Sun Apr 23 20:28:03 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Apr 23, 2006, at 02.19, Reshat Sabiq wrote:

> Are subtitles always in separate files, or does it depend on file  
> format, and or player?

It depends on the CONTAINER. AVI files can contain subtitle streams  
through various hacks (and are therefore, unsupported). Matroska  
(MKV) and Ogg Media (OGM) containers can contain multiple video,  
audio, and subtitle streams natively (not to mention other functions,  
such as chapter points, embedded additional files, and more), and  
have pretty decent support (MPlayer and VLC are the two best players,  
both are multiplatform, and VLC uses a graphical interface that many  
people have no problem with).

> Based on
> http://shsc.info/PlayingVideoFiles
> i conclude that subtitles are contained within .mpg. Is that correct?

They can be. For DVDs and DVB streams, they are. In fact, lots of  
information can be stored in MPEG streams, even Electronic Program  
Guide (EPG) data! However, just like with all other formats, the  
subtitles can be external files.

>
> I'd appreciate any command tips on how to add subtitles to .mpg. I  
> assume i should use mencoder. I took a look at
> http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.html#OSD/SUB%20OPTIONS
> and so far it appears they refer to customizing subtitles at  
> playback time. Since i'm writing this out to a DVD, and the end  
> user may or may not be using mplayer, i'd like to build them  
> into .mpg itself.

This is where things get kinda tricky. MPG supports two kinds of  
subtitles. First are closed captions, using a system called VBI. It's  
outmoded, and not a lot of information for jamming user-created VBI  
data into MPGs. The other are VobSub data. They are basically  
pictures that are overlayed on the video, as dictated by a timecode  
file. These are a bit easier to create, and easier to put in a MPG file.

However, MEncoder's MPEG muxer isn't the most advanced right now, and  
jamming subtitles into MPEG streams isn't available, last time I  
checked. Transcode has an option to include up to two audio streams,  
so I'm betting you'd have a better chance of learning how to insert a  
VobSub subtitle stream from them.

But, that's not the end of the story. Subtitles in MPEG files (not  
the VOB files found on DVDs) are kind of obscure. Not many programs  
recognize them, period. This includes DVD burning apps. More than  
likely, they'll be striped right out. You might want to look into  
ffmpeg. I have the Mac OS X front-end ffmpegX, which will create a  
DVD file system, or even an image file, for me, and offers an option  
to create, and embed, a VobSub subtitle stream into the disc.

That is, assuming your DVD is a DVD-Video disc, and not a DVD data disc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFES8c1187keuSyQSQRAlPuAKCRgPCOA584kiMX5iMstMuuVCwL+gCfa3gU
sd6AjG8Kl+VZETUsoB+Yc58=
=mZye
-----END PGP SIGNATURE-----




More information about the MPlayer-users mailing list