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: Sun, 24 Apr 2011 23:24:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8

On 24/04/11 15:00, Martin Lambers wrote:
> On 22/04/11 16:45, Joe wrote:
>>> On 20/04/11 12:45, Robert Pliszko wrote:
>>>> I've noticed that when I used "<i>", "</i>" or "/" tags in srt/txt/sub
>>>> subtitles, bino didn't show subtitle as italic, only display these tags
>>>> on screen.
>>>
>>> Hm, I'm unsure about this. Can you give some more information? There are
>>> two cases:
>>>
>>> 1. Plain text subtitles (such as those in your sample). Are such tags
>>> supposed to be supported in plain text subtitles? Is this documented
>>> somewhere?
>>
>> Plain text should be really "plain", however I also have one example of 
>> plain 
>> text subs with html tags - they are in matroska container. Maybe we could 
>> reuse srt_to_ass from ffmpeg to convert these tags to ASS format. Is it 
>> possible to call srt_to_ass function from ffmpeg public API?
>>
>>> 2. SRT subtitles. SRT is translated to ASS by FFmpeg for us, so Bino
>>> never sees SRT. This conversion from SRT to ASS is done here:
>>> <http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/srtdec.c;h=aa73f4
>>> c7bf45a74f6dd7ec0789bfe12fea756237;hb=HEAD> line 48-184. This function
>>> converts several SRT tags to ASS tags, but not <i>. If <i> is supposed to
>>> be supported by SRT, then FFmpeg needs to be fixed.
>>
>> I believe support for <i> and other HTML tags is there - just look at line 
>> 151: 
>> http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/srtdec.c;h=aa73f4c7bf45a74f6dd7ec0789bfe12fea756237;hb=HEAD#l151
>> I can confirm that it is working and subtitles are displayed in italics. So 
>> maybe Robert is using plaintext subtitles or has some old version of ffmpeg.
> 
> I have an update on this issue.
> 
> According to this specification
> <http://matroska.org/technical/specs/codecid/index.html>, text subtitles
> in Matroska a really meant to be interpreted as SRT. However, during
> decoding FFmpeg treats such subtitles as plain text, which in my opinion
> is not correct.
> 
> I reported this to the FFmpeg developers in this mail:
> <http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/131176>. If they
> change this, then the problems will go away with future versions of
> FFmpeg. If they don't change this for some reason, then we may need to
> implement a workaround.
> 
> Until a decision is made, I think we should keep the current behaviour
> of handling plain text as plain text, without tags.

Another update: It seems like Aurelien Jacobs is the main FFmpeg
subtitle wizard these days, and he promises to fix Matroska SRT decoding
in the near future (see the above mentioned thread on ffmpeg-devel).

So no further change to Bino is necessary, we just need to wait for
Aurelien's patch to arrive in FFmpeg/Libav.

Martin



reply via email to

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