External subtitles for DVDPlayer (text-based and bitmap-based)
#1
Lightbulb 
Since XBMC's FFmpeg-based in-house DVDPlayer video-player will be XBMC's primary cross-platform video-player core I like too submit this little more formal suggestion for the handling of external subtitles in the DVDPlayer, preferably via portable (supporting both Xbox/Win32 and Linux/POSIX) library.

Something in the lines what is suggested here in the FFmpeg Wishlist:
Quote:* Create a common 'subtitles parser library' (and/or an API system for adding support for additional subtitle formats?) - a common sub-library to FFmpeg with all subtile decoders/demuxers/parsers gathered (similar to the libpostproc and libavutils). Call it "libsubs" (or "libsub", "libsubtitles" or whatever). Move FFmpeg's existing VobSub and DVBsub code there, so no matter if they are bitmap or text-based subs all existing and future subtile code is collected there. This will help reduce future code replication by sharing common code, thus making it easier to add support for additional subtitles.
**Maybe use MPlayer's recently added "libass'" (SSA/ASS subtile reader) as a base for such a common library?
* Support for advanced SSA/ASS rendering
**Possible source are libass or the asa library
* Support bold, italic, underline, RGB colors, size changes and font changes for a whole line or part of one line
* Line 23 signal (a.k.a. "Wide-screen signal") detecting and use for DVD-Video (VobSub)
* Support for the subtitles HTML tags
* Capability of displaying subtitles with no video enabled (for example for audio-books)
* Support for Karaoke subtitles (for kar and cdg, etc.)
* Dual-subtitle-display (display two subtitles/languages at the same time, one at the bottom as normal plus one at the top of the screen)
* Capability of moving the subtitles in the picture (freetype renderer)
*Support more subtitle formats (text and bitmap-based):
** Closed captioning (CC) subtitle support - (Closed captions for the deaf and hard of hearing, also known as "Line 21 captioning", uses VobSub bitmaps)
*** xine have a SPU decoder for subpictures and Closed Captions software decoding
** DirectVobSub (VSFilter) - standard VobSubs (DVD-Video subtitles) embedded in AVI containers
** DivX Subtitles (XSUB) display/reader/decoder (Note: bitmap based subtitle, similar to VobSub)
** SubRip (.srt) subtile support (Note: simple text-based based subtitle with timestamp)
** Subviewer (.sub) subtile support (Note: simple text-based based subtitle with timestamp)
** MicroDVD (.sub) subtile support (Note: simple text-based based subtitle with timestamp
** Sami (.smi) subtile support (Note: simple text-based based subtitle with timestamp)
** SubStation Alpha (.ssa+.ass) subtile support (Note: advanced text-based based subtitle with timestamps and X/Y location on screen)
** RealText (.rt) subtile support
** PowerDivx (.psb) subtile support
** Universal Subtitle Format (.usf) subtitle support
** Structured Subtitle Format (.ssf) subtile support
Possible Source code libraries:

MPlayer (MPlayer has multiple subtitle libaries? like libass for SSA/ASS subtitles)

VSFilter (formally called "VobSub") DirectShow filter (advanced subtitles with styles and realtime karaoke effects. All rendered in high quality with anti-aliased fonts)
Reply
#2
another possible source to build upon is Guliverkli's subtitle support
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
Smile 
I wonder how/why FFmpeg added this patch their SVN; Log of /trunk/libavformat/matroskadec.c
Quote:Revision 9591
Modified Wed Jul 11 13:13:20 2007 UTC (13 days, 1 hour ago) by aurel
add support for Matroska subtitle tracks

Revision 9593
Modified Wed Jul 11 13:37:07 2007 UTC (13 days, 1 hour ago) by aurel
add support for ASS like subtitles in Matroska


Revision 9704
Modified Mon Jul 16 14:51:43 2007 UTC (7 days, 23 hours ago) by aurel
add support for S_ASS and S_SSA codec string
For more information read their mailling-list conversation => [FFmpeg-devel] [PATCH] matroska subtitle tracks support

Huh

Too bad FFmpeg did not add full text-based subtitle support in all supported containers... ...but maybe XBMC devs would be willing to extend their support? Maybe building a genric filter class in FFmpeg's "libavutil" for their 'CODEC_ID_TEXT' to all text-based subtitles?

Rolleyes
Reply
#4
pike Wrote:another possible source to build upon is Guliverkli's subtitle support
@pike, it is Guliverkli who makes VSFilter (formally called "VobSub") which is the DirectShow filter I mentioned in my first post. Problem is since it is made for DirectShow which is Windows Win32 only it would have to be ported to support all platforms, ...on the other hand, VSFilter is codec in C++ and MPlayer is coded in C which I am not sure makes a difference if it would be implemented into XBMC's DVDPlayer?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
Wink 
FYI;

FFmpeg has now implemented a DivX subtitles (XSUB™Wink decoder into their SVN ("/ffmpeg/trunk/libavcodec/xsubdec.c"), which makes for the first open source XSUB decoder (.divx embedded subtitles) as per this feature request.
http://forum.xbmc.org/showthread.php?tid=18071
Quote:DivX Subtitles (XSUB)

DivX, Inc. (formerly DivXNetworks, Inc.) have since DivX 6.0 their own proprietary subtitle tracks that they call "XSUB" (which they also trademarked as XSUB). These subtitles are not text-based like many other subtitles, instead they are bitmap (digital image) based like VSFilter subtitles for DVD-Video are. And like VSFilter subtitles for DVD-Video are suppose to, XSUB does not come in standalone files but are only embedded in .divx containers, which can be created with Dr.DivX, (Dr.DivX can actually convert/encode XSUB from VSFilter subtitles inside DVD-Video). A .divx container can contain multiple XSUB subtitles in several languages.

Also, FFmpeg have updated their dvdsub_parser.c/dvdsubdec.c (DVD subtitle parser) to be able to parse HD DVD subtitle packets.
Reply
#6
Has anyone else experienced problems with subtitles not showing at all in the GNU/Linux port? I've tried to use the Arial.tff that comes with XBMC, arial-iso-8859-8, and also DejaVuSans.tta from my OS' font folder; neither would show up. I tried to change charset from Default to Western Europe, but that do anything. I've also checked for each file that the subtitles were indeed activated.

The files I've tried to use are mostly MKVs with softsubs, is support for this not implented yet? I don't get why, because handling those should be mplayer's task, right? Never had any problems on my Xbox hardware.
Reply
#7
MPlayer has not yet been ported to the XBMC Linux port (nor to XBMC for Mac OS X, nor to XBMC for Windows), XBMC for Linux instead uses the DVDPlayer which does not yet support external subtitles (but only embedded DVD-Video subtitles in DVD-Video, so not even such subtitles embedded in AVI, MKV, OGM, MP4, etc.)

See these specific XBMC wiki articles for more information and updates:
http://xboxmediacenter.com/wiki/?title=X...rt_project
http://xboxmediacenter.com/wiki/?title=X...rt_project
http://xboxmediacenter.com/wiki/?title=X...rt_project
Reply
#8
actually "srt" external subtitles are now supported in dvdplayer thanks to d4rk and elupus...
Reply
#9
Cool, but embedded text-based (srt, etc.) inside AVI, MKV, OGM and so on are not supported yet are they?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#10
nope, only external at the moment.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#11
Will DVD-Video playback support external subtitles?
Reply
#12
Hello,

Why only SRT external subs are supported?
All of them work with Xbox version and SRT works with everything so from coding point of view we got both "choose subs file" and "parse subs file" functions already done.
Regards,
Embrion
Reply
#13
it isn't supported because nobody has stepped up and added it. those functions are part of mplayer's (imo obfuscated) code base. you want it? patch is certainly welcome
Reply
#14
Smile 
http://wiki.xbmc.org/?title=Google_Summe...discussion
Quote:* Unified Subtitle Parser / Display Filter Library for XBMC's in-house DVDPlayer video-player core
** Create a Unified Subtitle Parser Library for external and embedded subtitles, plus a FFmpeg libavfilter filter for it
Maybe a GSoC student will pick it up, ...one can always hope
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#15
FYI; here is a related suggestion for XBMC's DVDPlayer => http://forum.xbmc.org/showthread.php?tid=6982

That is a request for Advanced SSA/ASS subtitle support in XBMC
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply

Logout Mark Read Team Forum Stats Members Help
External subtitles for DVDPlayer (text-based and bitmap-based)0