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: 50
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 Offline
Senior Member
Posts: 154
Joined: May 2011
Reputation: 3
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,581
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
Senior Member
Posts: 245
Joined: Nov 2011
Reputation: 0
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: 38
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: 50
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: 38
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: 311
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

Picture: Samsung LE46A656
Reciever: Onkyo TX-SR607B
Front Spkeakers: Yamaha NS-555
Computer: Asrock Ion 330, 4gb ram, OCed 2.0Ghz.

My Ht(havnt updated pictures)
http://minhjemmekino.no/Henrikr
find quote
giaur Offline
Senior Member
Posts: 245
Joined: Nov 2011
Reputation: 0
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
Post Reply