Skip to content

Instantly share code, notes, and snippets.

@xupeng
Created January 8, 2012 04:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xupeng/1577282 to your computer and use it in GitHub Desktop.
Save xupeng/1577282 to your computer and use it in GitHub Desktop.
使用 mencoder 给视频内嵌字幕
#!/bin/bash
mencoder -o with-subtitle.avi -ovc lavc -lavcopts mbd=2:trell=yes:v4mv=yes:vbitrate=16000 -oac copy -sub subtitle.srt -utf8 -subfont-text-scale 2 -overlapsub -font "STHeiti" movie.mov
@tonghuix
Copy link

tonghuix commented Sep 7, 2013

Thank you very much! I test it and very beautiful, I add some ASS subtitle features, so made it more advanced.

mencoder -o out.avi -ovc lavc -lavcopts autoaspect=1:mbd=2:trell=yes:v4mv=yes:vbitrate=16000 -oac pcm -sub Subtitle.srt -ass -ass-color FFFFFF00 -ass-border-color 00808055 -ass-hinting 3 -ffactor 0.75 -spuaa 2 -font 'WenQuanYi MicroHei:style=Bold' -utf8 -subfont-text-scale 5 -overlapsub movie.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment