3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work?

  Thread Rating:
  • 4 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
noeikujoo Offline
Member
Posts: 51
Joined: Mar 2009
Reputation: 0
Location: Finland
Post: #241
It would also be nice if 3d subtitle mode would be automatically detected from the file name. For example, if the letters "sbs" occur in a file name, Side-by-Side 3D ​​subtitle mode would go on automatically. I have not yet investigated how to get find out the name of the file being played when subtitles are drawn in CGUIWindowFullScreen method RenderTTFSubtitles().
find quote
CrystalP Offline
Team-XBMC Developer
Posts: 822
Joined: Apr 2010
Reputation: 18
Location: The Great North
Post: #242
@noeikujoo I think it would be better to attack the problem in a lower code layer to get proper font rendering.

For example add a parameter to RenderOutline() so that it does the x/y adjustments, and changes the texture coordinates so that the sub is rendered in the correct position and squished as required by the sbs/ou mode. No need to load the font differently.

Then in GUIWindowFullScreen you'd find for example and in pseudo code:
Code:
switch (g_settings.m_currentVideoSettings.m_Subtitle3DMode)
{
case 0:
RenderOutline (2D)
break
case 1:
case 2:
RenderOutline(SBS_LEFT)
RenderOutline(SBS_RIGHT)
break
case 3:
case 4:
RenderOutline(OU_TOP)
RenderOutline(OU_BOTTOM)
}

A similar approach could be used for DVD or ass subs.

Always read the XBMC online-manual, FAQ, Wiki 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.
find quote
RockerC Online
Fan
Posts: 336
Joined: May 2011
Reputation: 4
Post: #243
(2012-04-18 18:56)CrystalP Wrote:  @noeikujoo I think it would be better to attack the problem in a lower code layer to get proper font rendering.
Boxee supports 3D rendering of subtitles, maybe just look to see how they do it in their code? https://github.com/bartsidee/boxee
(This post was last modified: 2012-04-19 13:32 by RockerC.)
find quote
steve1977 Offline
Posting Freak
Posts: 1,949
Joined: Dec 2006
Reputation: 0
Post: #244
Does anyone know whether there is any way that the TV auto-detects that the file played is H-SBS and switches (rather than the manual switching that I currently do). Is there any player that can do this? I find the manual switching super-painful and annoying. Would so much to see this real and curious whether any other player succeeded to accomplish this?

Server: Asus Sabertooth Z77 | Intel Core i5 3.4 GHz | 12 GB DDR3 | 256 GB SSD, 40 TB (1 x 4 TB, 6 x 3TB, 9 x 2 TB)
HTPC 1: Apple Mac Mini (mid-2011) | Intel Core i5 2.5 GHz | 4GB DDR3 | 500 GB
HTPC 2: Apple Mac Mini (mid-2007) | Intel Core 2 Duo 2.0 GHz | 4 GB DDR2 | 16 GB SSD
find quote
giaur Offline
Fan
Posts: 460
Joined: Nov 2011
Reputation: 1
Post: #245
I've tested above-below movie with first version of this patch some time ago and in that case sutitles are displayed at top of the screen instead of bottom edge. Sbs movie is ok. I rather preffer over-under movies since they provide better quality with passive glasses and screens.
(This post was last modified: 2012-04-20 08:24 by giaur.)
find quote
febox-pootz Offline
Junior Member
Posts: 44
Joined: Sep 2008
Reputation: 0
Post: #246
(2012-04-20 04:30)steve1977 Wrote:  Does anyone know whether there is any way that the TV auto-detects that the file played is H-SBS and switches (rather than the manual switching that I currently do). Is there any player that can do this? I find the manual switching super-painful and annoying. Would so much to see this real and curious whether any other player succeeded to accomplish this?

Other media players can do that, then you dont need to switch on your TV.
For now, you can create a rule to open files with "SBS" in the filename with an external player that can handle this kind of situation (like mplayer or stereoscopic player).

I don't know if (the devs of) XBMC have any plans to support 3d media at all, i haven't read anything about that yet.
Imagine how cool it would be a 3d skin, 3d OSD, 3d subtitles... Just saying, I don't have a 3d TV either. Wink
find quote
noeikujoo Offline
Member
Posts: 51
Joined: Mar 2009
Reputation: 0
Location: Finland
Post: #247
(2012-04-20 04:30)steve1977 Wrote:  Does anyone know whether there is any way that the TV auto-detects that the file played is H-SBS and switches (rather than the manual switching that I currently do). Is there any player that can do this? I find the manual switching super-painful and annoying. Would so much to see this real and curious whether any other player succeeded to accomplish this?
I believe that it is not technically possible because the 3D-TV sees the H-SBS picture as a standard 1080p picture. 3D H-SBS mode could possibly be identified by examining the image, but it would require a complex calculation, which the TV video signal processors probably will not be able to do.

The automatic 3D mode detection could work, if the player would be able to send 3D image via HDMI using frame packing (a full resolution top-bottom) 24 fps format, which is used in 3D Blu-ray movies. Then you should have a HDMI 1.4 video card and powerful CPU.

BTW. Any information about the XBMC for the planned support for 3D Blu-Ray images?
(This post was last modified: 2012-04-20 15:24 by noeikujoo.)
find quote
plesken Offline
Junior Member
Posts: 40
Joined: Mar 2011
Reputation: 0
Post: #248
(2012-04-18 18:56)CrystalP Wrote:  @noeikujoo I think it would be better to attack the problem in a lower code layer to get proper font rendering.

For example add a parameter to RenderOutline() so that it does the x/y adjustments, and changes the texture coordinates so that the sub is rendered in the correct position and squished as required by the sbs/ou mode. No need to load the font differently.

Then in GUIWindowFullScreen you'd find for example and in pseudo code:
Code:
switch (g_settings.m_currentVideoSettings.m_Subtitle3DMode)
{
case 0:
RenderOutline (2D)
break
case 1:
case 2:
RenderOutline(SBS_LEFT)
RenderOutline(SBS_RIGHT)
break
case 3:
case 4:
RenderOutline(OU_TOP)
RenderOutline(OU_BOTTOM)
}

A similar approach could be used for DVD or ass subs.

Could you explain it on my code:

Code:
float x = maxWidth * 0.5f + g_settings.m_ResInfo[res].Overscan.left;
      float y = (float) g_settings.m_ResInfo[res].iSubtitles;
      float x1 = maxWidth * 0.25f + g_settings.m_ResInfo[res].Overscan.left * 0.5f - g_settings.m_currentVideoSettings.m_Subtitle3DParallax * 10.0f;
      float x2 = maxWidth * 0.75f + g_settings.m_ResInfo[res].Overscan.left * 0.5f + g_settings.m_currentVideoSettings.m_Subtitle3DParallax * 10.0f;
      float x3 = maxWidth * 0.5f + g_settings.m_ResInfo[res].Overscan.left - g_settings.m_currentVideoSettings.m_Subtitle3DParallax * 10.0f;
      float x4 = maxWidth * 0.5f + g_settings.m_ResInfo[res].Overscan.left + g_settings.m_currentVideoSettings.m_Subtitle3DParallax * 10.0f;
      float y1 = g_settings.m_ResInfo[res].iHeight * 0.02f;
      float y2 = g_settings.m_ResInfo[res].iHeight * 0.52f;
      float y3 = g_settings.m_ResInfo[res].iHeight * 0.34f;
      float y4 = g_settings.m_ResInfo[res].iHeight * 0.84f;
      
      switch (g_settings.m_currentVideoSettings.m_Subtitle3DMode)
      {
        case 0:
          if (subalign == SUBTITLE_ALIGN_MANUAL)
          y = (float) g_settings.m_ResInfo[res].iSubtitles - textHeight;
          else
          {
            CRect SrcRect, DestRect;
            g_application.m_pPlayer->GetVideoRect(SrcRect, DestRect);

            if ((subalign == SUBTITLE_ALIGN_TOP_INSIDE) || (subalign == SUBTITLE_ALIGN_TOP_OUTSIDE))
              y = DestRect.y1;
            else
              y = DestRect.y2;

            // use the manual distance to the screenbottom as an offset to the automatic location
            if ((subalign == SUBTITLE_ALIGN_BOTTOM_INSIDE) || (subalign == SUBTITLE_ALIGN_TOP_OUTSIDE))
              y -= textHeight + g_graphicsContext.GetHeight() - g_settings.m_ResInfo[res].iSubtitles;
            else
              y += g_graphicsContext.GetHeight() - g_settings.m_ResInfo[res].iSubtitles;

            y = std::max(y, (float) g_settings.m_ResInfo[res].Overscan.top);
            y = std::min(y, g_settings.m_ResInfo[res].Overscan.bottom - textHeight);
          }
          m_subsLayout->RenderOutline(x, y, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth);
          
          g_graphicsContext.SetRenderingResolution(m_coordsRes, m_needsScaling);
          break;
        case 1:
          m_subsLayout->RenderOutline(x1, y4, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth / 2.2f);
          m_subsLayout->RenderOutline(x2, y4, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth / 2.2f);
          
          g_graphicsContext.SetRenderingResolution(m_coordsRes, m_needsScaling);
          break;
        case 2:
          m_subsLayout->RenderOutline(x1, y1, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth / 2.2f);
          m_subsLayout->RenderOutline(x2, y1, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth / 2.2f);
          
          g_graphicsContext.SetRenderingResolution(m_coordsRes, m_needsScaling);
          break;
        case 3:
          m_subsLayout->RenderOutline(x3, y3, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth);
          m_subsLayout->RenderOutline(x4, y4, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth);
          
          g_graphicsContext.SetRenderingResolution(m_coordsRes, m_needsScaling);
          break;
        case 4:
          m_subsLayout->RenderOutline(x3, y1, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth);
          m_subsLayout->RenderOutline(x4, y2, 0, 0xFF000000, XBFONT_CENTER_X, maxWidth);
          
          g_graphicsContext.SetRenderingResolution(m_coordsRes, m_needsScaling);
          break;
      }

I have normal font in OU and SBS (its too big). How can I squash it (width for sbs, or height for ou)? Can you add value/function on above code for example to us?
find quote
henrikyo Offline
Fan
Posts: 321
Joined: Jan 2009
Reputation: 0
Post: #249
Hello i just gotten my first few (3-4) half sbs 3d movies, but the subtitles are all messed up, i found this thread, using latest nightly on osx, instead of reading 25 pages, what do i have to do, to enable half sbs subtitles, is it enough to download half sbs subtitltes? like for example lion.king.3d.halfsbs.subtitles

TV: UE55F8005
XBMC: Mac mini 2012 with windows 8.1
SOUND: Sonos playbar + Sonos Sub + 2x Rear Play: 3
find quote
giaur Offline
Fan
Posts: 460
Joined: Nov 2011
Reputation: 1
Post: #250
You need to download regular .srt subtitles and convert them to halfsbs .sub/.idx. You can use 3D subtitler for this: http://www.3dsbs.com/3d-subtitles/57-how...title.html
(This post was last modified: 2012-04-28 11:47 by giaur.)
find quote
jake007 Offline
Junior Member
Posts: 2
Joined: May 2012
Reputation: 0
Post: #251
Hello,

When i do subtitles with 3d-subtitles software i dont get them work with xbmc?
Inside the xxxx.sub everything is messed with this mumbojumbo ºDÄ‚‰Ãø ½ì kia1ÚvÑ=øýöÓ/ÓoߏÑ6–°?À?À mýøökiomß‹Ö¸¶–ö–#!kOÖ±?
The file is also big also like 10Megs.

What do i do wrong?
find quote
giaur Offline
Fan
Posts: 460
Joined: Nov 2011
Reputation: 1
Post: #252
Quote:Inside the xxxx.sub everything is messed with this mumbojumbo ºDÄ‚‰Ãø ½ì kia1ÚvÑ=øýöÓ/ÓoߏÑ6–°?À?À mýøökiomß‹Ö¸¶–ö–#!kOÖ±?

There is nothing messed inside. This is not text, .sub subitles are set of .png files for each subtitle packed into one big file. This is not text data, so don't look inside.

You should have .sub, .idx and xml files, .sub is not enough and useles without .idx and .xml. You need to select .idx file as subtitles file.
(This post was last modified: 2012-05-03 11:33 by giaur.)
find quote
jake007 Offline
Junior Member
Posts: 2
Joined: May 2012
Reputation: 0
Post: #253
I don´t know what was wrong but i did the subtitles again and now it´s working!!
(This post was last modified: 2012-05-03 12:04 by jake007.)
find quote
giaur Offline
Fan
Posts: 460
Joined: Nov 2011
Reputation: 1
Post: #254
I don't understand what is your problem. You should select subitles as always you do (for example, when you want to select external .srt file), but select .idx file. Or - better soulution: mux subtitles to .mkv file - you can use mkvmerge to do this. In this case, no any external files needed.

This should work if your xbmc version supports VobSub subitlte format. I have no idea what version supports it and what version dosn't. But I can use idx subtitles without any problems with xbmc 11 on linux.
find quote
modderhut Offline
Junior Member
Posts: 16
Joined: Jun 2011
Reputation: 1
Location: Apeldoorn, Netherlands
Post: #255
For the windows users;

Not sure if this has already been done but I could not find it, so apologies if this is old news.

I have used Plesken's code (see post http://forum.xbmc.org/showthread.php?tid=127365 and the code; http://systems-design.pl/xbmc/patches/3d...3.29.patch ) and inserted this in the latest xbmc source and compiled a new xbmc.exe. For me it works fine now. The subtitles can be set to over-under or side-by-side.

I have set subtitle size to 20 in the general settings menu, on my 50" screen that works well for me with both regular as 3D movies.

https://hotfile.com/dl/156126492/c2a2287...s.rar.html It's not a full installer, just a modified XBMC.exe. Instructions are included, cpmike has tested and confirmed its working for him too.

All credits to Plesken as I have done nothing more then compile the edit, thanks to cpmike and madcat for testing my build.

Samsung 50" 3D Plasma, I'm old school, like to do everything from one main pc, Core i7 930, Gigabyte GA-X58A-UD7, 2x ATi 5750, 1x SSD, 8TB HD total.
XBMC with 3D subs working, SpotyXBMC2, XBMC Android remote, Sickbeard, SABnzbd+, Newsleecher.
60Mb Internet
(This post was last modified: 2012-05-18 09:19 by modderhut.)
find quote
Post Reply