Kodi Community Forum
XBMC and Reclock - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Windows (https://forum.kodi.tv/forumdisplay.php?fid=59)
+---- Thread: XBMC and Reclock (/showthread.php?tid=39011)

Pages: 1 2


XBMC and Reclock - m0gwai - 2008-10-15

Hi Guys,

I'm starting to love (and use) XBMC more and more, but one thing really bothering me is it's inconsistency in rendering the FPS.

I tried watching several 1080P movies, using the debug option (O) I could see that I was not getting any drop frames, which means my HTPC as the necessary horsepower to deliver clean 1080P playback.

However the frame rate is just messed up, again using the debug option I could see that frame rate can easily go from 23.5 to 24.5 and often more/less, this is giving me the weird feeling that the audio is never really lip synced, also during slow camera movement like zoom in - zoom out it makes the playback really jerky with a lot of jitter, my CPU is rarely above 25-30% so again it means it's not a hardware issue.

The answer to all those problems would be to use reclock, I was told it won't work with XBMC while I accept that I was curious to know the reason for this, I saw in beta 2 a new option for video rendering, so I was thinking (hoping) there is a work around to make it work, anyone has any ideas?

I don't know how high this is on the devs to do list, but in my opinion this should be a priority, btw you guys are doing an awesome job!

Thx


- elupus - 2008-10-15

Or set the refresh rate of the screen to something that is a multple of 24. (if the video is 24fps)


- m0gwai - 2008-10-15

elupus Wrote:Or set the refresh rate of the screen to something that is a multple of 24. (if the video is 24fps)

THIS is exactly the problem, or I'd like to think so.

It's set to 24Hz but XBMC is not rendering 24 frames per second, it's rendering 23.5 - 24.5 fps, which means my display is refreshing the image 24 times per second but is not getting the exact same fps, hence creating jitter, at least that's my understanding.

Maybe someone more knowledable can pitch in and give more details.


- ashlar - 2008-10-15

elupus Wrote:Or set the refresh rate of the screen to something that is a multple of 24. (if the video is 24fps)
Not necessarily, unfortunately: http://forum.xbmc.org/showthread.php?tid=38530

Furthermore, I have strong doubts that in the Windows ecosystem one needs Reclock to deal with the mess of multiple reference clocks and, automagically, XBMC can do away with all of that.

At 48Hz playback is unbearably juddering, at 24Hz playback is better but still not totally judderless (no frames lost in both cases). On the same machine, 48Hz+Reclock+CoreAVC+AC3filter+VRM7+Zoom Player is performing flawlessly.

Something must be going on.

Edit: if you want to understand the level of sophistication needed, have a look here: http://forum.slysoft.com/showthread.php?t=19931

Edit: XBMC offers different renderers. Two advanced OpenGL ones and a "software" option. What's the tech behind these? What does the "software" one equals to? Overlay? What sort of vsynch correction is implemented? I searched in the Wiki yesterday but couldn't come up with anything.


- m0gwai - 2008-10-15

It's good to see some other people are interested in this topic, I really hope we will be able to get input from developers, in addition to the render method you mentionned I have an additional one called "driver" if I recall, what's strange is I only have that one on my HTPC, I run XBMC on my home PC and don't see it there.


- ashlar - 2008-10-15

m0gwai Wrote:It's good to see some other people are interested in this topic
You can bet your house on me being interested. XBMC is still so far ahead of anything else, interface wise, that I'll do anything in my power for it to become far ahead of anything else playback wise. Big Grin

The developers are top notch, so I have faith in them.


- jmarshall - 2008-10-15

I believe a big problem on win32 (in particular, and possibly on other platforms) is that we are reliant on graphics (opengl) drivers to actually swap when we tell it to (which they don't necessarily) and to actually tell us vsync information that is accurate (which they don't necessarily). This is I believe a nightmare to get right. Reclock et. al. doesn't have anything to do with things at this point (i.e. we don't need to bother with mucking around with audio playback rates quite yet). If we can't get decoded frames to the screen so that the swap occurs at vsync in a reliable fashion, then all else is lost.

elupus has way more experience with this than me though, so I'll defer to his explanation of the issues Smile

One possibly interesting thing to consider is whether switching to DirectX based rendering will give us more accurate vsync/swapping reliability.

Cheers,
Jonathan


- d4rk - 2008-10-15

Quote:Edit: XBMC offers different renderers. Two advanced OpenGL ones and a "software" option. What's the tech behind these? What does the "software" one equals to? Overlay? What sort of vsynch correction is implemented? I searched in the Wiki yesterday but couldn't come up with anything.
The renderers in question only change the way the YUV to RGB conversion occurs for the video frames. ARB and GLSL are 2 methods that employ GPU shaders to perform the conversion. The software renderer, on the other hand, uses the CPU to perform the YUV to RGB coversion. Once the conversion is done, how it is rendered onto the screen and swapped is pretty much the same for all three methods.


- Eicar - 2008-10-15

I believe most GPU manufacturers like NVidia and ATI (Now Amd) put more money in stable DirectX drivers vs. OpenGL. This is due to the fact that the gaming industry in general has moved to DirectX. I would really like to see XBMC using Direct3D. This is also the "native" choice on the windows platform. I believe this in the long run will save us all a lot of video problems Wink

XBMC Beta 3 with Direct3D anyone? Big Grin

-Eicar


- ashlar - 2008-10-16

jmarshall Wrote:Reclock et. al. doesn't have anything to do with things at this point (i.e. we don't need to bother with mucking around with audio playback rates quite yet).
Hi Jonathan, I think you should read the readme included in Reclock. There's a reason why Reclock is useful even if you are using perfect multiples refresh rates. For instance, in my case, Reclock allows me to have perfect playback, judderless, when playing back 23.976fps material at 48Hz. Reclock does more than changing the audio playback rates.
Edit:
Quote:One possibly interesting thing to consider is whether switching to DirectX based rendering will give us more accurate vsync/swapping reliability.
Wouldn't this be against all development rules? Wouldn't it break the easy "compatibility" among the four versions?
Maybe not, as I think Xbox XBMC is DirectX based too.
Under DirectX you could use the Direct3D Exclusive mode (check MPC HC for that) under XP or the EVR more under Vista. Those appear to have perfect vsynch adjustments (with Aero enabled in the latter case).


- m0gwai - 2008-10-16

well all of this is way above my technical knowledge, I know my fair share about video but when it comes to computer I'm quickly out of the loop.

In my opinion XBMC is by far the best software in terms of interface and user friendliness, but it's also very weak on the video playback side.

I mean you probably have a lot of user getting their 700mb divx off the internet, watching them on their TV and for them it's going to be just fine, but you also have a crowd of people like myself, more interested in the HTPC side than the Mediacenter, of course it's nice to watch some divx on my TV but can XBMC replace my high-end DVD player, so far certainly not.

Just take a look at places like avsforum.com, you will see thousands of people talking about HTPC, using very advanced configuration, you are clearly missing to interest of all those guys with the lack of flexibility in video settings.

Video settings in XBMC would be like a PC game you can't adjust, you will get people complaining it's lagging other asking why they can't increase the resolution or put some filters with the CPU power they have in there machine.

I really hope this message will be heard and will cascade up to the developers team, would be great!


- mdaria510 - 2008-10-16

jmarshall Wrote:I believe a big problem on win32 (in particular, and possibly on other platforms) is that we are reliant on graphics (opengl) drivers to actually swap when we tell it to (which they don't necessarily) and to actually tell us vsync information that is accurate (which they don't necessarily). This is I believe a nightmare to get right. Reclock et. al. doesn't have anything to do with things at this point (i.e. we don't need to bother with mucking around with audio playback rates quite yet). If we can't get decoded frames to the screen so that the swap occurs at vsync in a reliable fashion, then all else is lost.

elupus has way more experience with this than me though, so I'll defer to his explanation of the issues Smile

One possibly interesting thing to consider is whether switching to DirectX based rendering will give us more accurate vsync/swapping reliability.

Cheers,
Jonathan

I would cry tears of joy if XBMC used DX for its video rendering. Not only would it be much more compatible, but there would be the hope of tapping into hardware acceleration and GPU features much more easily but utilizing the codecs that are already out there. The "no need to download codecs" mentality can remain by default by using ffdshow, which of course decodes pretty much everything.

I cant imagine it would be *too* difficult to reuse the renderer implementation from a number of other DX based HTPC softwares out there. I know the windows version is kind of the redheaded stepchild of XBMC, but its almost certainly got the largest potential userbase. Show it some love by leveraging the advantages of windows.


- jmarshall - 2008-10-16

Let me be clear:

There is no desire within the team to utilize DirectShow. If we use anything it'll be DirectX only at this point for rendering. That is all. We welcome patches for other stuff if folk want it.

Cheers,
Jonathan


- swoop - 2008-10-17

Some time ago, I had my hopes for Vista Media Center. Of course, M$ failed in every aspect possible. Vista MC cannot connect to old-style codecs and thus won't play any of my SD nor HD content.

Just recently I heard about XBMC and i was extremely pleased by the looks. Then I stumbled upon the video playback features and I was so excited. Especially about the "Framerate Conversion (23.98<->25fps), another NTSC <-> PAL workaround solution" feature. Wow, that is great, because if XBMC uses it's own codecs it cannot make use of Reclock.

Unfortunately, the playback is jerky. Is there any action planned in this regard? Especially, the framearate conversion? Can ffdshow-mplayerc-reclock gang be beaten? If so, I hope XBMC will be the first.

In all other aspects of XBMC I have only one thing to say: AMAZING!! Keep it up, guys.


- midgetspy - 2008-10-17

This has been discussed a lot here: http://forum.xbmc.org/showthread.php?tid=38530