Jittery Video?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ashlar Offline
Donor
Posts: 2,048
Joined: Mar 2006
Reputation: 26
Post: #341
bobo1on1 Wrote:In that case, they will play just fine at 24 fps, when I implement the resampler.
I know I already wrote an enthusiastic message when you first announced XBMC "reclock-like" functionalities but... again, thanks a bunch. This is a huge step in the right direction.

Now we "just" need custom shaders and avisynth filters for DVDplayer and XBMC will rule the HTPC world, as it rightfully should. Big Grin (is avisynth Windows only?).

Edit: the second part of this is, mainly, a joke. In the past few months XBMC has made so many steps in the right direction that I can't even count them. I'm sure a lot more will come, but I'm in no hurry.
(This post was last modified: 2009-02-25 18:55 by ashlar.)
find quote
bobo1on1 Offline
cheapass Team-XBMC Developer
Posts: 2,752
Joined: Dec 2008
Reputation: 20
Post: #342
Nazgulled Wrote:But, what will happen exactly?

I mean, let's say I put a PAL DVD in my drive and start playing the movie. Will you simply detect that the DVD is played at 25fps and assume that it should be played at 24fps and forcibly apply your resample thing?

I guess that question can be resumed to: how will you know if a PAL DVD was originally converted from 24fps?

Well, you won't know, so any pal dvd will play at 24 fps, but only if your refreshrate is a multiple of 24 hertz, set it to a multiple of 25 hertz and it will play at 25 fps.
You can also adjust the maximum speed change, you can set it to 0% if you want, but remember that the refreshrate and fps are both rounded, so 23.976 fps will be treated as 24 fps and 59.94 hertz will be treated as 60 hertz.

Quote:Either way, I mostly watch digital files and those normally are 23,976fps or 24fps, so, no problem here. But I buy a DVD (PAL cause I'm from Europe) once a in while for a movie I really like.

But I really can't see the benefit and I really wanted to understand it cause I want to have the best playback possible. I mean, let's say I play an MKV video file and this file is 24fps. Wouldn't the "adjust refresh rate" option suffice to playback that video the smoothest way possible? If the video plays at 24fps, the screen refresh rate is 24Hz, it's all good, right? Or do I still need the work you are doing in the "smoothvideo" branch? I could understand this for videos with 23.976 which 24Hz or even 23Hz are not a perfect match, and your work could prove useful in this situation, but in a 24fps/24Hz situation, is there any benefit?

The problem with playing video on a computer is that the system clock is used to play the video at the correct speed, because of several reasons, this clock as an awful lot of jitter and is also slightly off from the videoclock, thus causing jerky playback.
What I did is sync the playback to the videoclock, so now the audio has to handle all the jitter (which it can do just fine), so providing your computer is fast enough (which it is) you get perfectly smooth playback.

Quote:I'm not saying your work is not appreciated and it doesn't serve any porpuse. Any work to improve anything XBMC is appreciated and thank all the developers that invested their time on this great application. I just want to make that clear. And I'm sorry for all of these questions too.. I just want to understand all this...
No problem Smile
find quote
Nazgulled Offline
Fan
Posts: 514
Joined: Feb 2009
Reputation: 0
Post: #343
bobo1on1 Wrote:Well, you won't know, so any pal dvd will play at 24 fps, but only if your refreshrate is a multiple of 24 hertz, set it to a multiple of 25 hertz and it will play at 25 fps.
You can also adjust the maximum speed change, you can set it to 0% if you want, but remember that the refreshrate and fps are both rounded, so 23.976 fps will be treated as 24 fps and 59.94 hertz will be treated as 60 hertz.
Basically, this means that, it doesn't matter if the DVD is 24fps or 25fps, as long as I have the "adjust refresh rate" option enabled, my DVDs will all playback at the proper refresh rate?

But this still leaves me to the same question... What if, one of these PAL DVDs (25fps) were actually converted from 24fps? There's no way to tell that right? So, if you don't know, the movie is 25fps and the refresh rate is 25Hz, the work you are doing won't do anything to this specific playback, right?

bobo1on1 Wrote:The problem with playing video on a computer is that the system clock is used to play the video at the correct speed, because of several reasons, this clock as an awful lot of jitter and is also slightly off from the videoclock, thus causing jerky playback.
What I did is sync the playback to the videoclock, so now the audio has to handle all the jitter (which it can do just fine), so providing your computer is fast enough (which it is) you get perfectly smooth playback.
So, what you are saying is that the system clock and video clock are not always in sync and your work is to fix that, correct?

And just so I get the whole picture here, by system clock you are referring to the clock speed of the CPU and by video clock, to the clock speed of the GPU or something else? If this is correct, well, I got say I never thought this could be such an issue for perfect smooth playback... I always thought the problem was only a matter of video fps and screen refresh rate...
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #344
My head hurts.

[Image: sig_zps3af3b48e.jpg]
find quote
bobo1on1 Offline
cheapass Team-XBMC Developer
Posts: 2,752
Joined: Dec 2008
Reputation: 20
Post: #345
Nazgulled Wrote:Basically, this means that, it doesn't matter if the DVD is 24fps or 25fps, as long as I have the "adjust refresh rate" option enabled, my DVDs will all playback at the proper refresh rate?

But this still leaves me to the same question... What if, one of these PAL DVDs (25fps) were actually converted from 24fps? There's no way to tell that right? So, if you don't know, the movie is 25fps and the refresh rate is 25Hz, the work you are doing won't do anything to this specific playback, right?
If your refreshrate is 25 hertz and the dvd is 25 fps, it will play at 25 fps, but it will play a lot smoother, the effect can especially be noticed on pans (unfortunately for me and fortunately for everyone else I notice it all the time).
Quote:So, what you are saying is that the system clock and video clock are not always in sync and your work is to fix that, correct?

And just so I get the whole picture here, by system clock you are referring to the clock speed of the CPU and by video clock, to the clock speed of the GPU or something else? If this is correct, well, I got say I never thought this could be such an issue for perfect smooth playback... I always thought the problem was only a matter of video fps and screen refresh rate...

The problem exists on many levels, and two unsynchronized clocks is one of em, imagine having two (cheap)watches, even if you synchronize them every day, they will never show the exact same time.
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #346
bobo1on1 Wrote:If your refreshrate is 25 hertz and the dvd is 25 fps, it will play at 25 fps, but it will play a lot smoother, the effect can especially be noticed on pans (unfortunately for me and fortunately for everyone else I notice it all the time).

So does this work with the standard 'Adjust refresh rate'?

Only I run the GUI at 60Hz and ideally I still want the rate to change to 24Hz for 23.98/24fps video and 50Hz for 25fps but use the video clock instead of the system clock.

[Image: sig_zps3af3b48e.jpg]
(This post was last modified: 2009-02-26 00:35 by Hitcher.)
find quote
bobo1on1 Offline
cheapass Team-XBMC Developer
Posts: 2,752
Joined: Dec 2008
Reputation: 20
Post: #347
Hitcher Wrote:So does this work with the standard 'Adjust refresh rate'?

Only I run the GUI at 60Hz and ideally I still want the rate to change to 24Hz for 23.98/24fps video and 50Hz for 25fps but use the video clock instead of the system clock.

Adjust refreshrate should work fine with that (I hope, the general idea does, but I didn't test the actual implementation).
find quote
Nazgulled Offline
Fan
Posts: 514
Joined: Feb 2009
Reputation: 0
Post: #348
I'm so interested in this because after finding these sample videos:
http://spng.se/frame-rate-test/

I tested all of them with one of the latest SVN versions (one with the "adjust refresh rate" option) but it stills seems to me that most of them could be even smoother. I mean, my TV supports all of those frequencies, still, they didn't look 100% smooth to me on XBMC with "adjust refresh rate" turned on. And I made sure, by pressing 'Z', that refresh rate was being correctly detected and changed by XBMC.

And I'm wondering if this "smoothvideo" work you are having could possible be the fix for the jitter I'm seeing, or maybe my problem is different, I don't know what to think anymore lol...
find quote
dpassent Offline
Senior Member
Posts: 188
Joined: Feb 2008
Reputation: 0
Post: #349
bobo1on1 Wrote:Adjust refreshrate should work fine with that (I hope, the general idea does, but I didn't test the actual implementation).

it works... Smile I tested it... It switches to nearest refreshrate and then syncing to it...

DP
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #350
Cool, so all we need now is someone to make a build and share it.

[Image: sig_zps3af3b48e.jpg]
find quote
Post Reply