[MEncoder-users] help embedding subtitles

Phil Ehrens phil at slug.org
Sat Jun 9 18:50:08 CEST 2007


willowtree at mts.net wrote:
>  Hi. I'm trying to embed subtitles onto an avi file (for youtube). I
> found the  following code online...
> 
>  mencoder -vop pp=de,scale=352:288 -oac copy -ovc lavc -lavcopts
> keyint=25:vcodec=mpeg4:vbitrate=679:vpass=1 -sub "Sarayac2_56k.ass" -o
> "EMBG_Sarayac2_56k[sub].avi" "Sarayac2_56k.avi"
> 
> ...which worked, but the end of the video was erratic/jumpy. Is there
> something I'm doing wrong? Or is there a better way to embed the subs?
> I'm a total novice here (I don't even understand what everything above
> means) so if it's not any trouble, maybe someone could provide an
> example that I can run.

Maybe:

mencoder -oac mp3lame -ovc lavc -ffourcc DX50 \
-vf scale=352:288,eq2=0.9:1.1:0.03:1.1 \
-lameopts preset=medium \
-lavcopts vcodec=mpeg4:vbitrate=400:trell:v4mv:mbd=2:nr=40:vpass=N \
-ass -sub mysub.ass -o myout.avi myin.avi

If you don't mind waiting a bit longer for the encode,
you can add cmp=3:subcmp=3 to the lavcopts. There are
other "cmp" options, but a few experiments seemed to
indicate that they did nothing, at least with the
version of mencoder that I am using. Other folks may
have observed different things, of course, and I'm
not going to insist that I am "right".



More information about the MEncoder-users mailing list