Subtitles For Movies


Cellsplitter

Member
Joined
Aug 2, 2003
Messages
195
Age
37
Location
Lysekil - Sweden
Website
Visit site
In this movie which clearly shows that there's an obvious subtitle file in the same directory as the FFVII Advent Children movie. During the the demo of him playing the movie you can totaly tell that's not a "hard sub" that shows on the GP2x.

The most standard subtitle files I know are .sub and .srt. That file in the movie was .smi (never heard of it :huh:)
So, subtitles are obvious suported and I was wondering if any knew more of this?

thx
 
Im pretty sure you just copy the subtitle file into the same directory as the avi file but i havent tested this yet
 
There are several kinds of subtitle files that use the names SRT and SUB
so those two names are the names of several subtitle formats. (not just two) B)

the subtitle format .SMI is called "SAMI Captioning" just so you know.
You can convert all kinds of SRT and SUB files to SMI using
"Subtitle Workshop". Hope that helps. :)
 
The mplayer I have here loads automatically the captions file if it has the same name as the video.

The only one I have here is an SRT. As gplayer is based on mplayer I think it will play srts just fine. But who knows..
 
*bump*

Has anyone tried this? can anyone confirm that subtitles work on the GP2X, and if so, what format was your captions file?
 
BattleCattle posted on Dec 4 2005 at 09:15 PM said:
*bump*

Has anyone tried this? can anyone confirm that subtitles work on the GP2X, and if so, what format was your captions file?
YES! I have subtitles on my GP2X movie! I dont know how I did it though?!
 
Last edited by a moderator:
To my knowledge, .avi containers don't have support for subtitles to be built-in without them being "hard subbed", or being in a separate file in the same directory. Hard-subbing is where the text of the subtitles is overlayed onto the frames of the movie. So, if I'm not mistaken and you have subtitles on a movie you're playing on the GP2X, they're either "hard subbed" or you have another file in the same directory that has the subbing information. If it is in a separate file, could you post its extension? If not, try playing the same file on your computer and see if you can turn the subtitles off. If you can't, chances are its hard subbed (or you're having trouble configuring your video player), but if you can, then it cannot be hard subbed.

If I'm wrong about the avi thing, somone feel free to correct me. My unit should arrive sometime this week, at which point I'll try to get subtitles to work, but if anyone wants to test it out and post here, it would be much appreciated. If they don't work, I'll be adding hard subs to a lot of the video files I'll be re-encoding shortly :rolleyes:
 
BattleCattle posted on Dec 4 2005 at 09:28 PM said:
To my knowledge, .avi containers don't have support for subtitles to be built-in without them being "hard subbed", or being in a separate file in the same directory. Hard-subbing is where the text of the subtitles is overlayed onto the frames of the movie. So, if I'm not mistaken and you have subtitles on a movie you're playing on the GP2X, they're either "hard subbed" or you have another file in the same directory that has the subbing information. If it is in a separate file, could you post its extension? If not, try playing the same file on your computer and see if you can turn the subtitles off. If you can't, chances are its hard subbed (or you're having trouble configuring your video player), but if you can, then it cannot be hard subbed.

If I'm wrong about the avi thing, somone feel free to correct me. My unit should arrive sometime this week, at which point I'll try to get subtitles to work, but if anyone wants to test it out and post here, it would be much appreciated. If they don't work, I'll be adding hard subs to a lot of the video files I'll be re-encoding shortly :rolleyes:

Im pretty sure ur wrong about the 'hard sub' things to do with avis, because alot of the anime I dl is avi and has nice subtitles in em :p Dont know if they are called hard sub thou -.-
 
Last edited by a moderator:
http://en.wikipedia.org/wiki/Comparison_of_container_formats

according to wikipedia, subtitles are only availabile for avi's "Only through hacks". I believe that this is referring to hard-subbing or an external file (as I said, if anyone can clarify this for certain, please by all means)

hard-subbing can look just as good as subs that are overlayed, the only issue with them is that they cannot be turned off or separated from the individual frames of the video.

if subtitles are not hard-subbed, then they can be turned off at any point, and you will be able to see what the subs were covering. However, if hard-subbing is used, there is no way to remove the subtitles as each frame of the movie has the subtitles overlayed in the image itself.

As I dont think thats close to a clear explanation, I'l try again:

video files store several types of information, video (images), audio (sounds), and potentially subtitles, etc. If "hard-subbing" (just another term for 'embedded' subtitles) is used, then there is only the video and audio components. The subtitles are part of the individual frames that make up the picture you see on the screen and cannot be separated out. However, if the subtitles are not embedded, then your video player draws each frame from the image section of the file, and then adds the subtitles on top, in real time. Thus, if you want to watch the movie without the subtitles, you just have to tell your player not to bother with overlaying the subtitles.

hard (embedded) subtitles don't necessarily mean crappy-looking subtitles, but it does mean that the subtitles cannot be turned off.

If anyone knows what the wikipedia means by "Only through hacks" and wouldn't mind explaining what said hacks are (external sub files?) please clarify, lest I continue to throw out speculations based on my limited knowledge :D
 
Hard subs suck if you want to enlarge the video(ex. fullscreen playback).

Since soft subs(correctly done) are draw on the fly, they will look much sharper when scaled. Softsubs also eat more resouces(cpu and ram) from your system, specialty if you are using ass/ssa with karaoke and custom embedded fonts like Matroska supports.
 
BattleCattle posted on Dec 4 2005 at 10:28 PM said:
To my knowledge, .avi containers don't have support for subtitles to be built-in without them being "hard subbed", or being in a separate file in the same directory. Hard-subbing is where the text of the subtitles is overlayed onto the frames of the movie. So, if I'm not mistaken and you have subtitles on a movie you're playing on the GP2X, they're either "hard subbed" or you have another file in the same directory that has the subbing information. If it is in a separate file, could you post its extension? If not, try playing the same file on your computer and see if you can turn the subtitles off. If you can't, chances are its hard subbed (or you're having trouble configuring your video player), but if you can, then it cannot be hard subbed.

If I'm wrong about the avi thing, somone feel free to correct me. My unit should arrive sometime this week, at which point I'll try to get subtitles to work, but if anyone wants to test it out and post here, it would be much appreciated. If they don't work, I'll be adding hard subs to a lot of the video files I'll be re-encoding shortly  :rolleyes:

interesting development in the video encoding world...

vidomi has produced an avi file that not only holds subtitles, but menus, seperate audio tracks, etc. as of now the only player that i've found that works with it is the vidomi player...

read more here.

it would be interesting if the gp2x could be made to accept this type of video but... i doubt it. would be REALLY NICE.

edit: this is open source. Vidomi Download Page
 
Last edited by a moderator:
Why create yet another container format to replace AVI, when moving to MKV would be better?

btw, mplayer(what the gp2x's player is based from) support mkv.
 
I'm no expert, but I like to consider myself an adept when it comes to video and subtitles. Let me clear things up.

Hard Subs
"Hard" subs mean that they cannot be turned off. They are made part of the video images. These are the most common type for fansubs, since this means AVI can be used. If you're unsure if you have hard subs, the best way to tell is how they look. You could easily pause the video file and check for compression artifacts around the lettering. You could also see if multiple tracks of subtitles appear in different colors, if they move, are slanted/tilted, use different fonts (Or fonts other than Arial), appear in non-Latin (languages not using alphabets similar to English's) or appear in several different places.

Soft Subs
These are subtitles that can be turned on or off. They are separate from the video images. These are a little less common. Generally, if you have soft subs, you know, but just in case, a soft subtitle will usually appear in Arial, will stay near the bottom, centered, will stay the same color, will not move with the picture, no compression artifacts around it, and usually only appear in Latin. Generally, these look a lot like the subtitles one would see in a DVD. Often times, the soft subs will appear sharper than the video they are in, sometimes even sharper when the video is enlarged.

Soft Subs in Video Files
Generally, Soft Subs are stored in one of two methods:
Embedded
Separate file

Separate files are the most common, since they can be easily used with AVI files. To use these files, most of the time all you have to do is make sure the subtitle file has the same name (up to the extension) as the video file. (Ex: FF7AC.avi and FF7AC.ssa would work)

Embedded subtitles are NOT supported by AVI. The AVI format is over ten years old and was never intended for such a use. When the Wikipedia refers to subtitles working "only through hacks" the general gist is that the subtitle data is usually lumped at the end of the file, and is 90% of the time not detected, or readable (from within the file at least) by most video players. The disadvantages to these hacks are that, if the embedded subtitle in AVI works, it's not interleaved (the video is chopped up into chunks that contain all the information needed for a particular part of the file: A chunk of audio, and video, and in non-AVI format, subtitles) so the hard disk often spends a lot of the time seeking, which can slow down read and playback time, as well as adding unnessessary wear and tear to the hard disk. Generally, the more accepted examples are to take the "hacked" subtitles, put them in their own file, and play it that way, or convert the AVI format to OGM of MKV (discussed later, can be done very quickly with no loss of quality. This can even fix some "broken" AVIs which have problems with seeking) with embedded subtitles.

The most common containers (formats) for video with embedded soft subs are either Matroska (.MKV) or Ogg Media (.OGM). These formats were intended for videos with multiple video tracks, audio tracks, subtitle tracks, attachments, chapters, and other such toys (think something like DVD in a file, but without menus).

Subtitle Formats
Soft Subs come in three common formats: SubRip (.SRT), SubStation Alpha (.SSA or .ASS) and MicroDVD (.SUB). While these are not the only three, nor the best three, they are the most common.

Subtitles and the GP2X
I do not own a GP2X, all I know is what I've read, and my own knowledge.

The GP2X uses a modified version of the renown media application MPlayer. The full sized version (IE the version used on PCs) has support for a wide variety of video formats and codecs, audio formats and codecs, and Subtitle formats.

However, as it is understood so far, MPlayer on the GP2X only understands SAMI (.SMI) subtitles. There are definate advantages to this format, but the drawback is that it's not that well distributed. However, there is hope.

For Windows users, you can download SubStudio SAMI. Linux and Mac OS X users can take advantage of MPlayer (which I recomend you use for your media playback anyway) and use the -dumpsami option to convert their soft subs.

Thus far, it's unknown if OGM or MKV files will play on a GP2X (I'd like someone to test this. I can provide a MKV and/or OGM file for them to test with), so it's unknown if embedded subtitles in either of those formats would work. Including the .SMI file with a name identical to the AVI should work fine.

To clear up one thing: Using Vidomi would be a terrible misalocation of resouces for anyone developing on the GP2X. Vidomi does not use the correct specification of AVI, therefore there is the possiblilty of the additional ODML/chunk data confusing certain players. I, for one, am against the bastardization and modification of older formats when new ones offer more than enough. My personal favorite of the two new formats is Matroska, but OGM is perfectly fine in my opinion. Plus, there is the distinct possibility that the GP2X may already play MKV and/or OGM files.
 
Thank you for clarifying what I've been hearing. I'll definately have to look into the SAMI subtitles, but it would be great if someone who actually has a GP2X could test this out. I also have a number of ogm files if people would like to test this on their units.

OGM & Matroska would be great to have on the GP2X, but I wonder if there's any interface for selecting which audio / subtitle track to use during playback on the GP2X version of MPlayer.

*digs out and pokes around mplayer source code*
 
BattleCattle posted on Dec 5 2005 at 09:27 AM said:
Thank you for clarifying what I've been hearing. I'll definately have to look into the SAMI subtitles, but it would be great if someone who actually has a GP2X could test this out. I also have a number of ogm files if people would like to test this on their units.
That's what I was hoping would happen, that someone with a GP2X would pop their head up and say "I'll try it."
BattleCattle posted on Dec 5 2005 at 09:27 AM said:
OGM & Matroska would be great to have on the GP2X, but I wonder if there's any interface for selecting which audio / subtitle track to use during playback on the GP2X version of MPlayer.
Well, I'm guessing there's some kind of interface, I mean, after all, with soft subs in a separate file, there's probably some option to turn them off.
BattleCattle posted on Dec 5 2005 at 09:27 AM said:
*digs out and pokes around mplayer source code*
Uhh, something tells me that the mplayer code in the GP2X is not strict mplayer code (you know, those tricks you need to use to get the second CPU core to do your bidding) so I doubt we'll find the answer in the source.
 
Last edited by a moderator:
Kichigai posted on Dec 5 2005 at 03:39 PM said:
BattleCattle posted on Dec 5 2005 at 09:27 AM said:
*digs out and pokes around mplayer source code*
Uhh, something tells me that the mplayer code in the GP2X is not strict mplayer code (you know, those tricks you need to use to get the second CPU core to do your bidding) so I doubt we'll find the answer in the source.

Actually, I was referring to the "leaked" gplayer code that was being called the SDK before the console was even beginning to be released commercially (aka, while they were still testing the firmware). Yes, It is undoubtedly out of date, but still some good info there.

Couple of interesting things I've found thus far (haven't had much time to poke through it):
two files called subreader.h and subreader.c seem to imply that subtitles are actually supported.

The sub_autodetect function takes a file pointer, seeming to imply that subs would work with an external file. In it, it seems to be able to detect the following sub formats (this is what they are called, feel free to clarify what their proper names are):

MICRODVD
MPL2
SUBRIP
SUBVIEWER
SUBVIEWER2
SAMI
JACOSUB
VPLAYER
RT
SSA
PJS
MPSUB
AQTITLE
SUBRIP09

It appears to search in the function sub_filenames for the following extensions:
"utf"
"utf8"
"utf-8"
"sub"
"srt"
"smi"
"rt"
"txt"
"ssa"
"aqt"
"jss"
"js"
"ass"


Granted, there is no guarentee that this is the same source that made it on the final units, and that this functionality could very well be untested or in some way crippled, but then again we won't know that until someone *who owns a GP2X* will test it out (or until I get my unit and I test it out).

Seems promising
^_^

And I leave you with one last amusing tidbit:
static char * stristr(const char *haystack, const char *needle)

(for you non-coders this is a function to search for a string in a string, aparently for a needle in a haystack :D )
 
Last edited by a moderator:
BattleCattle posted on Dec 5 2005 at 09:44 PM said:
Kichigai posted on Dec 5 2005 at 03:39 PM said:
BattleCattle posted on Dec 5 2005 at 09:27 AM said:
*digs out and pokes around mplayer source code*
Uhh, something tells me that the mplayer code in the GP2X is not strict mplayer code (you know, those tricks you need to use to get the second CPU core to do your bidding) so I doubt we'll find the answer in the source.

Actually, I was referring to the "leaked" gplayer code that was being called the SDK before the console was even beginning to be released commercially (aka, while they were still testing the firmware). Yes, It is undoubtedly out of date, but still some good info there.

Couple of interesting things I've found thus far (haven't had much time to poke through it):
two files called subreader.h and subreader.c seem to imply that subtitles are actually supported.

The sub_autodetect function takes a file pointer, seeming to imply that subs would work with an external file. In it, it seems to be able to detect the following sub formats (this is what they are called, feel free to clarify what their proper names are):

MICRODVD
MPL2
SUBRIP
SUBVIEWER
SUBVIEWER2
SAMI
JACOSUB
VPLAYER
RT
SSA
PJS
MPSUB
AQTITLE
SUBRIP09
These ARE the names of the subtitle formats. MicroDVD, SSA, SubRip are the most common, and it even includes MPSub, which is MPlayer's own format.
BattleCattle posted on Dec 5 2005 at 09:44 PM said:
It appears to search in the function sub_filenames for the following extensions:
"utf"
"utf8"
"utf-8"
"sub"
"srt"
"smi"
"rt"
"txt"
"ssa"
"aqt"
"jss"
"js"
"ass"


Granted, there is no guarentee that this is the same source that made it on the final units, and that this functionality could very well be untested or in some way crippled, but then again we won't know that until someone *who owns a GP2X* will test it out (or until I get my unit and I test it out).

Seems promising
^_^

And I leave you with one last amusing tidbit:
static char * stristr(const char *haystack, const char *needle)

(for you non-coders this is a function to search for a string in a string, aparently for a needle in a haystack :D )
Those are all file extensions for subtitles. It's entirely possible that they've been disabled. Couldn't someone just compile mplayer using the GP2X SDK and add it to their card as a GP2X application? I'd be willing to make that sacrifice if it meant more customization.
 
Last edited by a moderator:
Back
Top