bino-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bino-list] SubTitles?


From: Martin Lambers
Subject: Re: [Bino-list] SubTitles?
Date: Tue, 15 Mar 2011 20:54:41 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8

Hello Joe!

On 15/03/11 11:35, Joe wrote:
> On Monday 14 March 2011 22:00:06 Martin Lambers wrote:
>> I currently only have one DVD video file that has subtitles, and that
>> does not seem to work yet - it crashes after a while, without actually
>> displaying subtitles. So I did not yet test the rendering code itself.
>>
>> Do you have links to some freely available video file samples with
>> subtitles, for testing?
> 
> DVD uses image subtitles and they are not implemented yet.
> 
> I think http://samples.mplayerhq.hu is good collection. I'm testing on real 
> movies but I found now this example of embedded multiple subtitles in mkv and 
> it surprisingly works :-) 
> http://samples.mplayerhq.hu/Matroska/subtitles/multiple_sub_sample.mkv
> 
> For testing of srt support, use another example: 
> http://samples.mplayerhq.hu/sub/thief.avi and subtitles 
> http://samples.mplayerhq.hu/sub/thief.srt . It is working now in latest 
> version of my the patch.
> 
> The loading and delivery of subtitle into rendering should work, the problem 
> is rendering. On my ATI graphic card it is white and in the middle. On my 
> Nvidia card, it catches color from video (hard to see) and are not centered. 
> I 
> think it will correct once FTTextureFont will be used.

Thanks for these hints! I will look into this over the weekend
(unfortunately I won't have enough time before that).

>> - What character encoding do the FFmpeg subtitle streams use? We may
>> need to do a character set conversion and set an appropriate FTGL
>> charmap, to get non-ASCII languages right.
> 
> FTGL/Pango supports ft_encoding_unicode/unicode. So I would put a combobox in 
> configuration dialog with selection of input encoding, than it is possible to 
> do the conversion to unicode. Should I use iconv or QT?
> 
>> - From the FTGL overview, it seems that the Texture font type might be a
>> better choice than the Bitmap font type, because it has antialiasing
>> support?
> 
> I'm using Bitmap/Pixmap  because it was the only font I was able to get text 
> on screen. Please, help me to get FTGL/Pango render into left/right textures 
> with FTTextureFont/buffer with Pango rendered font. I'm not Opengl guru as 
> you, 
> so I've tried but always end up with corrupted image.
> 
>> - Is there a way to use font names instead of specifying font files?
>> Then, the default could just be "Sans" to get the default sans serif
>> font of the system. Arial.ttf is problematic because it is not strictly
>> free and thus not available by default on all installations. Maybe we
>> need to use fontconfig to translate a font name to a font file.
> 
> Yes I hate to set font file instead of "logical font name", but it was the 
> only 
> way, because QT did not offered me the way to get absolute font path from 
> QTfont. Maybe it would require some more low-level X library to get that 
> path, 
> but it will break windows versions.

Yes, we need a high level library that hides all those messy system
dependent details, and ideally also takes care of any character encoding
issues for us.

I agree that we should avoid adding too many dependencies. Pango
actually does not seem to be too much of a problem in this regard: it
does depend on glib, but not on GTK, and on my system (Ubuntu 10.10)
libqt4gui also depends on glib (to allow using the glib mainloop), so
the number of additional dependencies would be limited to pango+cairo.
Still, there might be better choices than pango.

Maybe we should just use Qt, but I really would like to have subtitles
working with Equalizer, too. From a quick look at the code, Equalizer
itself seems to only support crappy old-style X11 fonts on Linux, and
only in US-ASCII encoding.

>> It would great to merge your work. How should we proceed? Would you like
>> to post updated versions of the patch, or should we set up a 'subtitles'
>> branch in the Bino repository that we can later merge into the master
>> branch?
> 
> I've set up repository on GitHub: 
> https://github.com/cuchac/bino
> 
> I will do all the development there and you can pull from it when you think 
> it 
> is ready/usable enough. Few minuted ago I pushed one little fix to be able to 
> play Thief.avi example for srt testing.

Perfect, thank you very much! I'll try this on the weekend.

Best regards,
Martin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]