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

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Discussions (https://forum.kodi.tv/forumdisplay.php?fid=222)
+--- Forum: Feature Requests (https://forum.kodi.tv/forumdisplay.php?fid=9)
+--- Thread: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? (/showthread.php?tid=66970)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - noeikujoo - 2012-04-16

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().


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - CrystalP - 2012-04-18

@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.


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - RockerC - 2012-04-19

(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




RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - steve1977 - 2012-04-20

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?


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - giaur - 2012-04-20

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.


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - febox-pootz - 2012-04-20

(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


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - noeikujoo - 2012-04-20

(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?


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - plesken - 2012-04-20

(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?




RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - henrikyo - 2012-04-27

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


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - giaur - 2012-04-28

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-you-can-make-3d-subtitle.html


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - jake007 - 2012-05-03

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?


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - giaur - 2012-05-03

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.


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - jake007 - 2012-05-03

I don´t know what was wrong but i did the subtitles again and now it´s working!!


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - giaur - 2012-05-03

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.


RE: 3DTV Support - Play "3D" Movies in XBMC plus have GUI / OSD and subtitles just work? - modderhut - 2012-05-06

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_subtitles-2012.03.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.