[MPlayer-users] Mencoder and transparent subtitles, again
Loren Merritt
lorenm at u.washington.edu
Mon Apr 19 22:08:27 CEST 2004
On Mon, 19 Apr 2004, Eddie wrote:
> On Sun, 18 Apr 2004 16:58:50 -0700 (PDT), Loren Merritt wrote:
>
>> The best quality would be to OCR the subtitles into SRT or the like
>> (and maybe mux into OGM or Matroska). It doesn't take long, but you
>> can't really automate it. I haven't seen a decent non-interactive OCR
>> program.
>> Almost as good is to leave the subtitles as sub/idx files (or mux them
>> into Matroska).
>>
>> Either way, the viewer can choose display settings at runtime, and you
>> don't add compression artifacts around the subtitles like you would
>> when hardsubbed.
>>
>> --Loren Merritt
>
> That is a bummer. I looked into OCR and that is the best way, but from
> what I have read, it's not 100% and I don't have the time it takes to
> proof read. Right now I load up my computer with 5-6 DVDs and 100+ eps
> in vob format, hit my scripts and come back in a few days to a drive
> full of avi files.
>
> On the topic of OGMs. I have some OGMs that a friend gave me. They have
> optional subtitles and 2 audio tracks. I don't see a lot about encoding
> OGMs in mencoder? Can I do the same mecoder? I can't have the subs
> split off into seperate files. I won't have mplayer with me at all
> times. I need to play this from a Win box if I have too. OGM is about
> as exotic as I want to get.
>
> Thank you
> Eddie
MEncoder can't directly output OGM. But you can take an AVI from mencoder,
some audio (usually Vorbis), some subtitles (SRT only) and mux them to OGM
with ogmmerge. ( http://www.bunkus.org/videotools/ogmtools/ )
However, OGM can't contain vobsubs. So if you can't OCR and want a single
video file, you need Matroska instead.
( http://www.bunkus.org/videotools/mkvtoolnix/ )
While MKV is a slightly more recent format, it's no less commonly
supported than OGM (i.e. playable on Windows with a directshow filter.)
I use a script like (typed from memory, may contain errors):
# needs postprocessing if episodes are packed within a single title
dvdxchap /dev/dvd --title 1 > chapters.txt
# only decodes at 1x, but can run concurrently with video encoding
mplayer dvd://1 -alang ja -vo null -ao pcm -aofile ja.wav
mplayer dvd://1 -alang en -vo null -ao pcm -aofile en.wav
oggenc -q 4 ja.wav en.wav
# demux subtitles
mencoder dvd://1 -o/dev/null -ovc frameno -nosound \
-vobsubout foosub -slang en -vobsuboutid en
# encode video (2 pass)
mencoder dvd://1 -o foo.avi -nosound -ovc lavc # ...
mkvmerge -o foo.mkv \
--title "Foo" --track-name 0:"Foo" --aspect-ratio 0:16/9 foo.avi \
--language 1:jpn --track-name 1:"Japanese" ja.ogg \
--language 2:eng --track-name 2:"English" en.ogg \
--language 3:eng --track-name 3:"English Vobsub" foosub \
--chapters chapters.txt
--Loren Merritt
More information about the MPlayer-users
mailing list