Embedding subtitles into avi files on the linux command line


13 jan. 2008, 2h28m

After a few hours of googling, and turning up pretty much nothing; I figured I ought to make a note of this somewhere. I often find myself in the situation where I've just downloaded some asian movie (I'm a huge fan of Asian Extreme -think along the lines of Old Boy, Ishii the killer, etc-, and, I really want to be able to watch what I've downloaded on my TV) and it doesn't have the subtitles embedded in the avi file (and no, before you suggest it, I will NOT watch dubbed crap). Microsoft, unfortunately, doesn't think anyone in the world would want to watch something with subtitles, so this isn't a feature of the Xbox360. My Xbox is hooked up to a NAS box which has all my music/tv/movies on it, and this box runs a /very/ minimal install of ubuntu - ~150mb in total.

So, down to business. You'll need transcode installed, along with mplayer, then it's a simple case of:

transcode -i videofile.avi -x mplayer="-sub subfile.xxx" -o outputfile.avi -y xvid

There are other output formats, but I use xvid, since it's supported by the Xbox. It takes a while longer than just straight transcoding, but it's worth it to not have to watch it on my laptop.


  • strumbunny

    it's a simple case of me not having a clue what that means hehe. Did want to say however that Oldboy is awesome. Have you seen lady vengeance? =)

    15 jan. 2008, 10h16m
  • salimfadhley

    Yay, it works. I was able to watch a foreign language movie on my XBox 360. Thanks for the tip.

    16 fév. 2008, 1h57m

    I was searching how to to this, thanks!

    27 avr. 2008, 21h00m
  • Malucius

    it works BUT in my case the subtitles got huuuge (huge as half screen) i will browse more if it's possible to fix this thanks for the tip

    30 jui. 2008, 12h06m
  • grrrtoast

    yeah thanks! i was just googling this.

    1 oct. 2008, 7h52m
  • MasaFIN

    Thank you for this help!

    27 déc. 2008, 12h24m
  • luchhh

    About the font-size issue. You can modify your ./mplayer/config and insert this line "subfont-text-scale=1", this will make your default subs size smaller

    5 mars 2009, 10h35m
  • riotpunk77

    Hah! So ironic... I googled how to embed subs in Linux, because I want to watch Ichi the Killer on my x360 ^^ ... Thanks, works great (albeit a tad slowly on a netbook) =) and thanks to luchhh as well, as my subs were also ridiculously large until I set the option to 3

    7 juin 2009, 22h09m
  • Henkkagg

    Thanks a lot :) I signed up just because i wanted to say thanks to you.

    30 juin 2009, 9h45m
  • shanghaied

    Thanks! That's simple. And the subtitles look better than what I was able to get using avidemux.

    5 jui. 2009, 17h06m
  • Guriinii

    Cheers! nice and simple.

    25 avr. 2010, 17h06m
  • DJ-EAZ

    Thanks bro!!

    7 avr. 2013, 9h42m
Voir les 12 commentaires
Ajouter un commentaire. Connectez-vous à Last.fm ou inscrivez-vous (c'est gratuit).