Notices


Reply
Thread Tools
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#1
The following steps solve problems associated with displaying subtitle in mplayer under N900/Maemo, but this can be generally applicable to other Linux platform.

Sometime one may encounter the following error while loading subtitle with mplayer...

Code:
mplayer -sub movie.srt movie.avi
....
SUB: Could not determine file format
....
One possible cause of the problem is that the .srt was generated under some Windows programs which has utf16 encoding. Therefore, in order to play it properly in N900, you'd like to convert it to utf8 by iconv:

Code:
(rename your original .srt, e.g. movie_original.srt)

iconv -f utf16 -t utf8 < movie_original.srt > movie.srt

mplayer -sub movie.srt movie.avi
The above steps apply to playing movies with mplayer in command line mode (xterminal on N900). Suggestion to load subtitles under SiB and KMplayer are welcome.
 

The Following User Says Thank You to 9000 For This Useful Post:
Addison's Avatar
Posts: 3,811 | Thanked: 1,150 times | Joined on Oct 2007 @ East Lansing, MI
#2
Awesome find dude!

Just a little off topic here, but how can I subscribe to good threads such as this so they don't get lost?

Thanks.
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#3
OOops I thought it's the place to post this?

Where should I post to for discussion like that?
 
Posts: 726 | Thanked: 345 times | Joined on Apr 2010 @ Sweden
#4
@9000

The "off topic" comment was regarding the question about how to subscribe to a thread.

@Addison

Look in top right of page. Power search. Power. Mmmmmm. Or you could actually subscribe to a thread and get emails sent to you when it changes.

Look at top, "Thread tools", om nom nom nom.
 

The Following 2 Users Say Thank You to Joorin For This Useful Post:
Posts: 36 | Thanked: 14 times | Joined on Mar 2010 @ Slovakia
#5
Why convert subtitles? Most of subtitles on the net are using cp1250.
Just open .mplayer/config, and add :
Code:
subcp = "cp1250"
 
Posts: 1,425 | Thanked: 983 times | Joined on May 2010 @ Hong Kong
#6
Originally Posted by Deafboy View Post
Why convert subtitles? Most of subtitles on the net are using cp1250.
Just open .mplayer/config, and add :
Code:
subcp = "cp1250"
This is the MS latin II encoding, it works for some latin origin languages like English. For the rest of the world, there're unicode. These subtitles are encoded in either utf16 and utf8, thus is the reason to convert.

For example, you may need to set subcp=gbk in config for mplayer to display simplified Chinese subtitles; but still, you might need to convert when it's made in utf16.

Thanks for the input.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#7
Originally Posted by 9000 View Post
The above steps apply to playing movies with mplayer in command line mode (xterminal on N900). Suggestion to load subtitles under SiB and KMplayer are welcome.
If the name matches (like movie.srt for movie.avi), mplayer will pick them up automatically with no need for -sub:
Code:
mplayer movie.avi
So I guess SiB and KMplayer should just work.
 
Reply


 
Forum Jump


All times are GMT. The time now is 08:47.