[MEncoder-users] embedded subtitles in an avi file

David Liebman radiodee1 at gmail.com
Sat May 23 13:25:47 CEST 2009


I have a sample dv video file and a sub station alpha subtitle file. I
would like to embed the subtitles in the video and convert the video to
a smaller .avi file in one process. I have tried to view my subtitles
using mplayer and they show fine. Using mencoder the subtitles never
show up on the screen. This is what I tried, but it didn't work. 

mencoder fan001.avi -sub fanText.ass -ss 10 -endpos 10 -o fanOut.avi

I also tried the above command with the option '-ass'. I found that when
I used the -ass option with mplayer the subtitles were not easily
readable, though they were there. The subtitles look better without the
'-ass' option. When I used the '-ass' option with mencoder there were no
subtitles recorded in the final avi file, as before. I did some research
and came up with the following commands which I put in a shell script:

mkfifo video.yuv audio.wav

mplayer -ao null -vo yuv4mpeg:file=video.yuv -sub fanText.ass fan001.avi
&

mplayer -ao pcm:file=audio.wav -vo null -vc dummy fan001.avi &

ffmpeg -f yuv4mpegpipe -i video.yuv -i audio.wav -b 800k -ab 128k
fanOutYuvText.avi

These commands do record the subtitles, but the quality of the recording
is poor. Why does that first mencoder command not work?



More information about the MEncoder-users mailing list