From: Charles de N. <man...@sp...> - 2006-10-28 20:44:50
|
Hello, My post is about .srt subtitles in Emotion. I tried to look into the code, and I *think* that nothing is done to read subtitles. What I expected and look for is kind of EAPI void emotion_object_{subtitles,spu}_file_set ( Evas_Object *obj, const char *filename ) I saw the "emotion_object_spu_channel_count(Evas_Object *obj)" But I could not figure out what it was used for... DVD's subs ? The thing is that needs some changes in Emotion EAPI, and maybe, a such thing is not wanted (read subtitles in Emotion). What do you thing about it? Would that be easy to do? Is it necessary? The point for me to do this, is to be able to read subtitled movies in "rage", which I just love :) (thanx raster) I made the first "patch" to be able to do so in this app... It enables rage to avoid the thumbnailing of ".srt" files. ------------------------- 8< ------------------------------------------- rage-0.1.0/src/bin/bg.c bg.c 32a33,40 > int > is_subtitle_file ( char *file ) > { > if ( ( strlen ( file ) > 4 ) && > !strncmp ( (file + strlen (file) - 4 ), ".srt", 4 ) ) return 1; > return 0; > } > 48c56 < if (file[0] != '.') --- > if ( (file[0] != '.') && ( ! is_subtitle_file ( file ) ) ) ------------------------------------------------------------ 8< ------- I know, it was kind of easy to make, and probably not well made... but it might help someone :) -- Charles de Noyelle |
From: Carsten H. (T. R. <ra...@ra...> - 2006-10-29 01:16:55
|
On Sat, 28 Oct 2006 22:44:07 +0200 Charles de Noyelle <man...@sp...> babbled: > Hello, > > My post is about .srt subtitles in Emotion. > > I tried to look into the code, and I *think* that nothing is done to > read subtitles. What I expected and look for is kind of > > EAPI void emotion_object_{subtitles,spu}_file_set ( Evas_Object *obj, > const char *filename ) > > I saw the "emotion_object_spu_channel_count(Evas_Object *obj)" But I > could not figure out what it was used for... DVD's subs ? yes - dvd subtitles are handled by libxine as video overlays - they do work if turned on. there is no way to use external files. > The thing is that needs some changes in Emotion EAPI, and maybe, a such > thing is not wanted (read subtitles in Emotion). > > What do you thing about it? Would that be easy to do? Is it necessary? i suggest first looking at gstreamer and xine api's to see if you can put it there as the subtitles also need to be timed to the video. > > The point for me to do this, is to be able to read subtitled movies in > "rage", which I just love :) (thanx raster) > > I made the first "patch" to be able to do so in this app... It enables > rage to avoid the thumbnailing of ".srt" files. thanks - though won't appply to my local rage src at all - i currently don't have any time to work on this unfortunately :( > ------------------------- 8< ------------------------------------------- > rage-0.1.0/src/bin/bg.c bg.c > 32a33,40 > > int > > is_subtitle_file ( char *file ) > > { > > if ( ( strlen ( file ) > 4 ) && > > !strncmp ( (file + strlen (file) - 4 ), ".srt", 4 ) ) return 1; > > return 0; > > } > > > 48c56 > < if (file[0] != '.') > --- > > if ( (file[0] != '.') && ( ! is_subtitle_file ( file ) ) ) > ------------------------------------------------------------ 8< ------- > > I know, it was kind of easy to make, and probably not well made... but > it might help someone :) > > -- > Charles de Noyelle > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ra...@ra... 裸好多 Tokyo, Japan (東京 日本) |
From: Simon T. <sim...@fr...> - 2006-10-29 09:30:26
|
On Sun, 29 Oct 2006 10:13:15 +0900, Carsten Haitzler (The Rasterman) <ra...@ra...> wrote : > On Sat, 28 Oct 2006 22:44:07 +0200 Charles de Noyelle > <man...@sp...> babbled: > > > Hello, > > > > My post is about .srt subtitles in Emotion. > > > > I tried to look into the code, and I *think* that nothing is done > > to read subtitles. What I expected and look for is kind of > > > > EAPI void emotion_object_{subtitles,spu}_file_set ( Evas_Object > > *obj, const char *filename ) > > > > I saw the "emotion_object_spu_channel_count(Evas_Object *obj)" But > > I could not figure out what it was used for... DVD's subs ? > > yes - dvd subtitles are handled by libxine as video overlays - they > do work if turned on. there is no way to use external files. > > > The thing is that needs some changes in Emotion EAPI, and maybe, a > > such thing is not wanted (read subtitles in Emotion). > > > > What do you thing about it? Would that be easy to do? Is it > > necessary? > > i suggest first looking at gstreamer and xine api's to see if you can > put it there as the subtitles also need to be timed to the video. > I had implemented .srt support for eclair some times ago and it was working quite well but it is now broken since it still uses the old textblock API. I know that the API of xine allow to load external subtitles, and gstreamer's probably does too, but those substitles won't look as good as if we use an evas' text object to render them: xine and gstreamer directly render the subtitles in the YUV data, so when the video is stretched, the subtitles are stretched too. With evas' text object, we could also make the subtitles transparent, glow, cast a shadow, ... So I would probably be a good idea to make emotion render its own subtitles. Now there are several problems that I met when I implemented that in eclair. First the text encoding: Evas requires UTF-8 whereas .srt files doesn't seem to follow a standard: some times they uses 8-bit ascii, some times UTF-8, ..., and it's not specified in the files. So we would need to be able to auto-detect the encoding of a text. Is there a way to do that? And also, I noticed that when you render an incorrectly UTF-8 encoded text with Evas, Evas only renders the text up to the first incorrect character, the following characters are not rendered. It may be good to just ignore the incorrect character, and to continue to render the others (I don't know if it's easy to do though, I just know that GTK and QT do that so it should be possible :)) Other problem: there are a lot of subtitle formats (srt, ssa, txt, ...) so we would need a lot of loaders if we want to support them all. Srt seems to be the most used by far (and it is really easy to load), so we should probably start with it. I will try to add .srt support to emotion this week end. Simon |
From: Vincent T. <vt...@un...> - 2006-10-29 09:58:55
|
something interesting for subtitles is the 'halo' of the text, like that: http://avisynth3.unite-video.com/avs_text.png it is sometimes necessary to have that halo because the text can be unreadable if the color of background is closed to the one of the text. I don't know if it is easily doable with evas or not. Vincent PS: that example has been done with feetype On Sun, 29 Oct 2006, Simon TRENY wrote: > On Sun, 29 Oct 2006 10:13:15 +0900, > Carsten Haitzler (The Rasterman) <ra...@ra...> wrote : > >> On Sat, 28 Oct 2006 22:44:07 +0200 Charles de Noyelle >> <man...@sp...> babbled: >> >>> Hello, >>> >>> My post is about .srt subtitles in Emotion. >>> >>> I tried to look into the code, and I *think* that nothing is done >>> to read subtitles. What I expected and look for is kind of >>> >>> EAPI void emotion_object_{subtitles,spu}_file_set ( Evas_Object >>> *obj, const char *filename ) >>> >>> I saw the "emotion_object_spu_channel_count(Evas_Object *obj)" But >>> I could not figure out what it was used for... DVD's subs ? >> >> yes - dvd subtitles are handled by libxine as video overlays - they >> do work if turned on. there is no way to use external files. >> >>> The thing is that needs some changes in Emotion EAPI, and maybe, a >>> such thing is not wanted (read subtitles in Emotion). >>> >>> What do you thing about it? Would that be easy to do? Is it >>> necessary? >> >> i suggest first looking at gstreamer and xine api's to see if you can >> put it there as the subtitles also need to be timed to the video. >> > I had implemented .srt support for eclair some times ago and it was > working quite well but it is now broken since it still uses the old > textblock API. I know that the API of xine allow to load external > subtitles, and gstreamer's probably does too, but those substitles > won't look as good as if we use an evas' text object to render them: > xine and gstreamer directly render the subtitles in the YUV data, so > when the video is stretched, the subtitles are stretched too. With > evas' text object, we could also make the subtitles transparent, glow, > cast a shadow, ... So I would probably be a good idea to make emotion > render its own subtitles. > > Now there are several problems that I met when I implemented that in > eclair. First the text encoding: Evas requires UTF-8 whereas .srt > files doesn't seem to follow a standard: some times they uses 8-bit > ascii, some times UTF-8, ..., and it's not specified in the files. So > we would need to be able to auto-detect the encoding of a text. Is > there a way to do that? And also, I noticed that when you render an > incorrectly UTF-8 encoded text with Evas, Evas only renders the text up > to the first incorrect character, the following characters are not > rendered. It may be good to just ignore the incorrect character, and to > continue to render the others (I don't know if it's easy to do though, I > just know that GTK and QT do that so it should be possible :)) > Other problem: there are a lot of subtitle formats (srt, ssa, txt, ...) > so we would need a lot of loaders if we want to support them all. Srt > seems to be the most used by far (and it is really easy to load), so we > should probably start with it. > > I will try to add .srt support to emotion this week end. > > Simon |
From: Carsten H. (T. R. <ra...@ra...> - 2006-10-29 09:38:48
|
On Sun, 29 Oct 2006 10:05:02 +0000 (GMT) Vincent Torri <vt...@un...> babbled: > > something interesting for subtitles is the 'halo' of the text, like that: > > http://avisynth3.unite-video.com/avs_text.png > > it is sometimes necessary to have that halo because the text can be > unreadable if the color of background is closed to the one of the text. > > I don't know if it is easily doable with evas or not. yes it is - there are text styles to add glow, shadows, (glow and outlines are the same just given well chosen colours) etc. :) > Vincent > > PS: that example has been done with feetype > > On Sun, 29 Oct 2006, Simon TRENY wrote: > > > On Sun, 29 Oct 2006 10:13:15 +0900, > > Carsten Haitzler (The Rasterman) <ra...@ra...> wrote : > > > >> On Sat, 28 Oct 2006 22:44:07 +0200 Charles de Noyelle > >> <man...@sp...> babbled: > >> > >>> Hello, > >>> > >>> My post is about .srt subtitles in Emotion. > >>> > >>> I tried to look into the code, and I *think* that nothing is done > >>> to read subtitles. What I expected and look for is kind of > >>> > >>> EAPI void emotion_object_{subtitles,spu}_file_set ( Evas_Object > >>> *obj, const char *filename ) > >>> > >>> I saw the "emotion_object_spu_channel_count(Evas_Object *obj)" But > >>> I could not figure out what it was used for... DVD's subs ? > >> > >> yes - dvd subtitles are handled by libxine as video overlays - they > >> do work if turned on. there is no way to use external files. > >> > >>> The thing is that needs some changes in Emotion EAPI, and maybe, a > >>> such thing is not wanted (read subtitles in Emotion). > >>> > >>> What do you thing about it? Would that be easy to do? Is it > >>> necessary? > >> > >> i suggest first looking at gstreamer and xine api's to see if you can > >> put it there as the subtitles also need to be timed to the video. > >> > > I had implemented .srt support for eclair some times ago and it was > > working quite well but it is now broken since it still uses the old > > textblock API. I know that the API of xine allow to load external > > subtitles, and gstreamer's probably does too, but those substitles > > won't look as good as if we use an evas' text object to render them: > > xine and gstreamer directly render the subtitles in the YUV data, so > > when the video is stretched, the subtitles are stretched too. With > > evas' text object, we could also make the subtitles transparent, glow, > > cast a shadow, ... So I would probably be a good idea to make emotion > > render its own subtitles. > > > > Now there are several problems that I met when I implemented that in > > eclair. First the text encoding: Evas requires UTF-8 whereas .srt > > files doesn't seem to follow a standard: some times they uses 8-bit > > ascii, some times UTF-8, ..., and it's not specified in the files. So > > we would need to be able to auto-detect the encoding of a text. Is > > there a way to do that? And also, I noticed that when you render an > > incorrectly UTF-8 encoded text with Evas, Evas only renders the text up > > to the first incorrect character, the following characters are not > > rendered. It may be good to just ignore the incorrect character, and to > > continue to render the others (I don't know if it's easy to do though, I > > just know that GTK and QT do that so it should be possible :)) > > Other problem: there are a lot of subtitle formats (srt, ssa, txt, ...) > > so we would need a lot of loaders if we want to support them all. Srt > > seems to be the most used by far (and it is really easy to load), so we > > should probably start with it. > > > > I will try to add .srt support to emotion this week end. > > > > Simon > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ra...@ra... 裸好多 Tokyo, Japan (東京 日本) |