[MEncoder-users] Problem with embedding subtitles

Diogo Franco diogomfranco at gmail.com
Mon May 5 21:39:32 CEST 2008


2008/5/5 Андреев Максим <andreevmaxi
>
> I try playing video with
> mplayer -sub 2.srt -ss 300 -endpos 20 2.avi
> and all was fine - subtitles worked. I try "-sid 1" as mencoder option -
> result not changed: no any subtitles in output file. mplayer runned
> without any options display subtitles without problem. But mencoder...
>

Another thing to try is to compile mencoder with patches that allow it to
use libass (it is broken on svn I think, or was for a long time) or use
fifos to pipe mplayer's output. Try something like this for fifos (yes, you
need the two mplayer instances):

# BEGIN ----

# Create and populate the fifos
mkfifo video.yuv audio.wav
mplayer -ao null -vo yuv4mpeg:file=video.yuv -sub 2.srt 2.avi &
mplayer -ao pcm:file=audio.wav -vo null -vc dummy 2.avi &

# Use ffmpeg to read them (this is what I use for general encoding)
ffmpeg -f yuv4mpegpipe -i video.yuv -i audio.wav -ss 300 -t 20 -b 800k -ab
128k out.avi

# OR use mencoder (not tested!)
mencoder video.yuv audio.wav -ovc lavc -oac lavc -ss 300 -endpos 20 -o
out.avi

# ---- END

About the libass patch, there's one at
http://www.cccp-project.net/nichorai/mplayer-patches/mplayer-libass-in-mencoder.patch.
It doesn't work with embedded fonts tough, but since you don't use
them
there's no problem.


More information about the MEncoder-users mailing list