PDA

View Full Version : Smoothvideo branch


Pages : [1] 2

bobo1on1
2009-02-26, 18:59
Please go to the new thread: http://xbmc.org/forum/showthread.php?p=336538

What is it for?
Lots of people experience jerkiness when playing video on a computer, this has to do with the way video frames are presented, smoothvideo tries to fix this by syncing the video to the refreshrate of the monitor.

Where can I find it?
The svn is at https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/smoothvideo/.

To build it you need libsamplerate (http://www.mega-nerd.com/SRC/), which is also in the Ubuntu repositories (IMPORTANT: don't forget the dev package). For windows it's already included in the branch.

How does it work?
Usually video is referenced to the system clock, but with a little magic a clock can be made with information from the videocard, this makes sure every frame is presented right after a vblank. Also because the clock can now be controlled, the speed can be changed a little to fit the refreshrate better.

What about audio?
Audio has to stay in sync, this can either be done by resampling, skipping/duplicating packets, or adjusting the clock if it gets out of sync too far.

Resampling has the advantage that the speed of the video can be changed considerably, so 24 fps can be sped up to 25 fps to play at PAL speed.
The disadvantage of resampling is that it doesn't work with passthrough, and there is a slight loss of audio quality.

Skipping/duplicating audiopackets has no loss of audio quality, but the speed of the video can only be changed a little to avoid doing a skip/duplication too often, most of the time it's inaudible, but it can produce a very audible click.

Adjusting the clock has the best audioquality, but some extra video jitter can occur, also the speed of the video can't change much, as the audio will sync the clock more often the more the speed of the video is changed.

How do I turn it on?
It's on by default, under Settings->System->Audio hardware you can set the sync type and the maximum speed adjust percentage when Resample is selected.
Not all videocards support the proper calls, you should check the debug log for lines like:
"CVideoReferenceClock: [...] falling back to QueryPerformanceCounter"

If you have a line like that, the videocard can't be used as a clock and the systemclock is used instead.

Does it work with Adjust refresh rate?
Yes, it should work fine, except if you use vdpau.
Vdpau without adjust refreshrate works ok.

Known issues
When going from pause to play, a Goa`uld can show up for one second, but the valiant resampler will quickly chase it away.
Video jerks can occur every few minutes or so, this is probably caused by the system doing other important things.
NTSC dvd's don't play well with a 24 hertz refreshrate, this is because of broken timestamps, they play fine at 60 hertz.

Please don't message me about smoothvideo, it takes time away from development, I check this thread almost daily so the best place to ask questions is here.

alanwww1
2009-02-26, 20:48
Cangrats to you Bobo1on1 !

It's a great feature a lot of us been waiting for. We'll be here for testing in every way or anything you say.

It is already making a huge difference to me.

Thanks for the work.

theophile
2009-02-26, 21:35
So I shouldn't bother if I rely on AC3 passthrough?

ashlar
2009-02-26, 22:20
So I shouldn't bother if I rely on AC3 passthrough?It depends on how close you are to the needed refresh rate. A dropped packet now and then is inaudible.

You could not use it to speed up from 24fps to 25fps or slow down 25fps to 24fps.

PolliSoft
2009-02-27, 01:56
I merged the latest smoothvideo revision into the linuxPort branch to have the smoothVideo tested with the latest fixes. I'm sorry to say I get build errors when using buildsetup.bat (the error I get is that samplerate.h cannot be found), so there is no installer. However, when buildiing the .exe file in VS2008, it works!
So, here is a .rar file containing all the files that the installer normally creates.
Xbmc_smoothVideoRev18124_linuxPortRev18128.rar (http://www.megaupload.com/?d=2H1AB2NH)
I talked to bobo1on1 earlier and he will not be able to provide any support for this since it is not even in the linuxport branch. Try it out, but be aware that there might be some bugs.

Good luck!

bobo1on1
2009-02-27, 02:11
Actually I'm committing a merge with linuxport 18128 right now, and WiSo fixed the build on windows.

EMK0
2009-02-27, 02:19
i don't understand is this meant to fix things like long pan scenes in videos where the pictures looks jerky?

bobo1on1
2009-02-27, 02:45
Yes (good question), it is that and that alone that I'm trying to fix.

Zeron
2009-02-27, 04:59
Am I correct in assuming that this will work with the VDPAU decoding once they are merged?

PolliSoft
2009-02-27, 09:47
Got the installer build to work, so here comes an update, still windows build:
XBMCSetup-smoothvideoRev18137_LinuxPortRev18135.exe (http://www.megaupload.com/?d=EA5TT7RS)

eriksmith200
2009-02-27, 10:37
My TV only does 60Hz, so for all 24fps or 25fps videos this probably won't help me? (difference between 60Hz and 48, 50 or 72 Hz is too large)

ultrabrutal
2009-02-27, 11:22
erik, you misunderstand what this tries to do.
waiting for vsync mens that next frame is drawn from the top of the screen and not half way (example) down which looks very weird when picture is moving fast.
it has nothing to do with converting between frame rates (24 to 60 for example)

dpassent
2009-02-27, 12:05
sorry but IMHO it has EVERYTHING to do with the conversion of fps WHEN NEEDED (syncing 24fps to 50Hz or 25fps to 24Hz). Ideally it should work like this:

1. XBMC recognizes the fps of the movie
2. Tries to switch refreshrate to closest to this fps (24,48,72Hz for 23.98fps, 50, 100Hz for 25fps etc)
3. smoothvideo then syncs the movie to the refreshrate (so 23.98 is speeded up a little tiny bit to 24fps to get perfect sync) - thus resamplig is needed with PCM or frame dropping is needed for ac3/dts pass-thru.

That's how the reclock DS filter works. And that's how I understand smoothvideo branch is working (or should work)

DP

ashlar
2009-02-27, 12:11
ultrabrutal, sorry but... this has a lot to do with converting between frame rates. It's not exclusively about converting frame rates but it deals with that as well.

At 60Hz I'm not sure about the real benefits of using reclock-like capabilities. You can try to make the 3:2 cadence (used to play back 24fps stuff) very regular, but I don't know if that is actually worth something. 3:2 it's already juddery enough that I doubt the micro imperfections Reclock can cure matter a lot.

You also mention the "waiting for vsync" stuff, but Reclock it's definitely not only about vsync.

In order of importance (1 and 2 are inverted for lots of people ), I would say Reclock can:

1) Provide silk smooth playback when you have direct multiple refresh rate (24Hz, 48Hz, 72Hz etc. for 24fps material; 25Hz, 50Hz, 75Hz, etc. for 25fps material; and so on and so forth).

2) Provide PAL speed down functionality, bringing artificially accelerated 24fps material back to its original framerate. Provide PAL speedup for people who have 50Hz enabled monitors and prefer a 4% acceleration of 24fps material (thus getting smooth playback) rather than playing it back with a 3:2 cadence at 60Hz.

3) Smooth out the inconsistencies of 3:2 cadence when playing back 24fps material at 60Hz.

Edit: One question: what kind of precision is the algorithm getting for the monitor/TV refresh rate? Windows Reclock goes to the third decimal position (like 24.004Hz).

eriksmith200
2009-02-27, 15:06
sorry but IMHO it has EVERYTHING to do with the conversion of fps WHEN NEEDED (syncing 24fps to 50Hz or 25fps to 24Hz). Ideally it should work like this:

1. XBMC recognizes the fps of the movie
2. Tries to switch refreshrate to closest to this fps (24,48,72Hz for 23.98fps, 50, 100Hz for 25fps etc)
3. smoothvideo then syncs the movie to the refreshrate (so 23.98 is speeded up a little tiny bit to 24fps to get perfect sync) - thus resamplig is needed with PCM or frame dropping is needed for ac3/dts pass-thru.

That's how the reclock DS filter works. And that's how I understand smoothvideo branch is working (or should work)

DP

That's how I understand it as well.

eriksmith200
2009-02-27, 15:07
3) Smooth out the inconsistencies of 3:2 cadence when playing back 24fps material at 60Hz.


So if that's true I can still benefit from the smoothvideo implementation?

ashlar
2009-02-27, 15:41
So if that's true I can still benefit from the smoothvideo implementation?Ok, bear in mind that all I write is taking the Reclock DirectShow audio renderer as an example, supposing that Smoothvideo is following the same course, with a different implementation.

At 60Hz, 23.976fps material will get accelerated so very slightly to 24fps, thus enabling a perfect 3:2 cadence (every even frame is shown thrice, every odd frame is shown twice) and keeping it consistent. So you'll have perfect 3:2 judder but no other anomaly in your playback.

alanwww1
2009-02-27, 16:31
Ok, bear in mind that all I write is taking the Reclock DirectShow audio renderer as an example, supposing that Smoothvideo is following the same course, with a different implementation.

At 60Hz, 23.976fps material will get accelerated so very slightly to 24fps, thus enabling a perfect 3:2 cadence (every even frame is shown thrice, every odd frame is shown twice) and keeping it consistent. So you'll have perfect 3:2 judder but no other anomaly in your playback.

Ashlar you think xbmc really does 3:2 pulldown ?

ashlar
2009-02-27, 17:09
Ashlar you think xbmc really does 3:2 pulldown ?Unfortunately I've asked for this and never got a straight answer. I can't imagine how 24fps stuff is shown at 60Hz otherwise (but maybe the answer is "in a messy way").

Edit: actually, as for the 23.976 getting accelerated to 24, etc. it's relevant for 24Hz. I'm not so sure about 60Hz. I suppose for 60 it would be, but for 59.94 it wouldn't (as that is NTSC frequency, the very reason why the movie got slowed down by 1/1000).

bobo1on1
2009-02-27, 18:04
All refreshrates and framerates are always rounded to the nearest integer.

Xbmc does do a pulldown to convert ntsc dvd's to 23.976 fps, if the refreshrate is 60 hertz, smoothvideo will do a 2 to 5 conversion.
If the refreshrate is 50 hertz, you can speed it up 4.17% to play it at pal speed, providing you don't use passthrough and pcm synctype is set to resample.
If the refreshrate 24 hertz, it will play nicely at 24 fps.

RockDawg
2009-02-27, 18:25
Forgive my ignorance on this topic, but how does XBMC for the Xbox do things? Am I correct that XBMC on a PC (with or without Smoothvideo) should be able to play movies as smooth as the Xbox? My Xbox connected to my TV plays fine by my eyes. So something (Xbox or TV) is doing 3:2 pulldown on my 24fps DVD's, right? It seems judder-free.

ashlar
2009-02-27, 18:50
While I'm not sure that bobo1on1 cares for this "generic" discussion to happen in this thread (and if you don't, just say it and we'll think of where to legitimately take it :)), Xbox outputs at 60Hz only (50Hz in SD maybe, for PAL regions). So your content is bound to have judder, unless it's 60Hz interlaced content (which I strongly doubt). 3:2 judder is not *that* bad, especially if you've never experienced really smooth pans.

Hitcher
2009-02-27, 23:37
Changeset [18143] by bobo1on1
fixed: use g_videoConfig.GetCurrentResolution to get refreshrate
Interesting, does this fix the 'Auto adjust refresh' problem?

bobo1on1
2009-02-28, 00:00
Well, it might, it doesn't get called in the right place yet I think.

alanwww1
2009-02-28, 18:30
Hello Bobo1on1 !

I just testes today's svn and for me the new refresh rate detection method works worse that the old one.

Now it detects the refresh rate wrong even if i don't use the auto refresh rate function (at least with 50hz i get doube speed video playbeck with 25fps and 24fps)

The only way i can make it work is to force refresh rate 50hz.

bobo1on1
2009-02-28, 22:23
I know, when dynamic twinview is on when using the binary nvidia driver, xrandr reports wrong refreshrates.
Already fixed it by using the measured framerate.

dteirney
2009-03-01, 13:12
Anyone having problems compiling this on Linux?

make[1]: Entering directory `/mnt/drive1/XBMC/branches/xbmc-smoothvideo/xbmc/visualizations/Goom'
g++ -MD -c -g -O3 -fPIC -O2 -g -D_DEBUG -Wall -O2 -g -D_DEBUG -Wall -D_LINUX -D_FILE_DEFINED -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DINSTALL_PATH="\"/usr/local/share/xbmc\"" -DHAS_SDL_JOYSTICK -DHAS_XRANDR -DHAS_PCRE -D'SVN_REV="18174M"' -DDLL_PATH_LIBCURL="\"/usr/lib/libcurl.so\"" -I. -I.. -I../../linux -I../../ -I../../../guilib -I../../../visualisations -Igoom2k4-0/src -DDBUS_API_SUBJECT_TO_CHANGE -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/hal -I/usr/include/lzo Main.cpp -o Main.o
make -C goom2k4-0
make[2]: Entering directory `/mnt/drive1/XBMC/branches/xbmc-smoothvideo/xbmc/visualizations/Goom/goom2k4-0'
Making all in src
make[3]: Entering directory `/mnt/drive1/XBMC/branches/xbmc-smoothvideo/xbmc/visualizations/Goom/goom2k4-0/src'
/bin/bash ../ylwrap goomsl_yacc.y y.tab.c goomsl_yacc.c y.tab.h goomsl_yacc.h y.output goomsl_yacc.output -- yacc -d
../ylwrap: line 111: yacc: command not found
make[3]: *** [goomsl_yacc.c] Error 1
make[3]: Leaving directory `/mnt/drive1/XBMC/branches/xbmc-smoothvideo/xbmc/visualizations/Goom/goom2k4-0/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/drive1/XBMC/branches/xbmc-smoothvideo/xbmc/visualizations/Goom/goom2k4-0'
make[1]: *** [goom2k4-0/src/.libs/libgoom2.a] Error 2
make[1]: Leaving directory `/mnt/drive1/XBMC/branches/xbmc-smoothvideo/xbmc/visualizations/Goom'
make: *** [visualizations] Error 2

I went down the road of installing an implementation of yacc but then I got a compile error in the same location.

I haven't ever needed to install anything related to yacc in linuxport, and that's currently building fine so I removed it again.

Why the difference between smooth-video and linuxport for this Goom visualisation? Doesn't seem to be anything related to the smooth video related changes.

bobo1on1
2009-03-01, 17:28
That has nothing to do with smoothvideo, run make clean and the configure script again, and then make, if that one fails run make again, that usually clears things up.

What distribution and architecture are you compiling on? Also, did you somehow modify the timestamps of the source files (cp -R for example) and is your system date correct?

alanwww1
2009-03-01, 22:56
I checked the latest svn and i can report that refresh rate detection works very well now with the files i tested.

I made a few tests with stereo pcm content and it was working pretty well. The video part has played silky smooth with zero visible dropped frames.

The audo if i don' touch pause, rew, ff plays well with a hearable speed adjustment at the beggining of the movie.

If i pause or ff or rev the movie it makes strange pitch changes and it gets back to normal a little too slow.

Sometimes i heared ocasional pitch changing also when i press nothing. Just a notice.

Thanks for the great work anyway.

Alan

dteirney
2009-03-02, 12:52
That has nothing to do with smoothvideo, run make clean and the configure script again, and then make, if that one fails run make again, that usually clears things up.

What distribution and architecture are you compiling on? Also, did you somehow modify the timestamps of the source files (cp -R for example) and is your system date correct?

I'm using Mythbuntu Intrepid x86. Clean svn checkout followed by applying some patches I need for playback of LATM/ACC wrapped audio streams. Nothing related to Goom.

Tried all manor of cleans, configure and make including reallyclean. Still no go. Did a directory diff of xbmc/visualizations/Goom and noticed some missing files compared to current revision of linuxport so I just copied over the whole linuxport Goom folder over the top.

Compile worked fine after that so not sure what happened. Either way, got it up and running with a patch for a different Vsync mode for the newer ATI Catalyst drivers.

Least number of dropped frames and smoothest playback I've seen for the Killa sample so it looks like it's heading in the right direction.

Great work and thanks for your help! Mmmm buttery smooth panning coming to an XBMC HTPC near you. Can't wait.

Hitcher
2009-03-02, 18:02
I checked the latest svn and i can report that refresh rate detection works very well now with the files i tested.

I've tried it using the build found here -
Ok, here is the latest (18163) smoothvideo revision merged together with the 18197 Linuxport revision.
Have fun!
http://www.mediafire.com/download.php?1g3wv5mydmm

/PolliSoft
Desktop res 1280x720 @ 60Hz
GUI res 1920x1080 @ 60Hz
Auto Refresh Rate - On
Sync Video To Display - On


23.98fps video - pressing 'z' shows 1920x1080@24Hz - pressing 'o' shows 25-26fps
25fps video - pressing 'z' shows 1920x1080@50Hz - pressing 'o' shows 29-30fps

bobo1on1
2009-03-02, 19:10
Something is wrong there, when you press o fps should be about the same as the refreshrate.

Hitcher
2009-03-02, 19:27
That what I thought.

Could it the build is maybe missing something?

Even if I try overriding I get the same results.???

bobo1on1
2009-03-02, 19:33
Maybe your system just can't render that fast, try with some low quality video (dvd for example).
With override on it should play really slow if the value used for refreshrate is higher than the actual refreshrate.

Hitcher
2009-03-02, 20:12
Ah, we're getting somewhere.

I turned off 'High Quality Upscaling' to lessen the load on my HTPC and both 23.98fps and 25fps videos were showing 60fps. Again I tried the override but no change.

After much testing (and a lot of WTH moments) I've finally figured out what it's doing on my system.


It only uses the start up refresh rate of XBMC as the fps of any video - even changing the GUI refresh rate during testing will have no effect unless XBMC is then shutdown and restarted.

bobo1on1
2009-03-02, 20:16
That means the build is too old.

Hitcher
2009-03-02, 20:19
Even though PolliSoft's using your last change (18163)?

tslayer
2009-03-02, 20:26
You should really do your own build to be sure what is really in there and which change you are testing. You'll avoid these problems of not knowing exactly which build and changes are in the version you are testing.

bobo1on1
2009-03-02, 20:34
Well, either he didn't, or it got lost in the merge.
The fps you see in the codec information is the exact same value used by dvdplayer.

Hitcher
2009-03-02, 20:39
You should really do your own build to be sure what is really in there and which change you are testing. You'll avoid these problems of not knowing exactly which build and changes are in the version you are testing.
I did start making my own builds a while ago but the guys in the 3rd party build thread churn them out so quickly these days I stopped bothering. Mind you I think applying patches would be beyond me.
Well, either he didn't, or it got lost in the merge.
The fps you see in the codec information is the exact same value used by dvdplayer.
Thanks for the replies, I'll just hang on until another build comes out.

kees1869
2009-03-03, 00:49
Forgive my noobness, I just started to try to build XBMC and was wondering if there's still a need to download libsamplerate separately as it seems to be included in the \xbmc\lib folder. Also I get 176 warnings in total when (release) building this branch, is that normal. I got the feeling I'm missing something.

bobo1on1
2009-03-03, 01:21
WiSo fixed libsamplerate, so no need for it anymore (on windows).

Remember a warning is just that, a warning, the compiler tells you to pay attention to something, I wouldn't worry about it, only if you get an error then something is wrong and you won't be able to compile.

kees1869
2009-03-04, 19:26
I put an SVN build online, more will follow.

Get them here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

Hitcher
2009-03-04, 22:00
I put an SVN build online, more will follow.

Get them here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

Just tried that build and it's giving me the same results -

'Sync Video To Display' is ignoring 'Auto Refresh Rate'.

bobo1on1
2009-03-04, 22:09
Probably some other problem I think, even if xbmc doesn't know the refreshrate fps should still be about the same as the refreshrate, the movie will just play at the wrong speed (either chipmunk or Goa`uld mode).

Hitcher
2009-03-04, 22:13
Will a debug log help?

alanwww1
2009-03-04, 22:28
Bobo1ono1 !

I just want to tell how well the syncing with resample imroved with last svns.

I realy appriciate your work.

bobo1on1
2009-03-04, 22:35
There's nothing useful in the debug log about this.

Try a lower resolution, 1920x1080 is pretty high, and a Radeon HD 2400 is pretty slow, for comparison my 8600GT is twice as fast and that's not even considered a fast card.

kees1869
2009-03-05, 10:49
Just wanted to say I'm uploading zipped versions as well, I prefer it that way myself (until the installer does something useful).

here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

Also zip'ing main branch.

here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eefe234c78e ac944052ce018c8114394287

Hitcher
2009-03-05, 16:39
Tried 1280x720 and the build above but it's still giving me the same results.

It's as if 'Sync Video To Display' is getting the display refresh rate before 'Auto Refresh Rate' has had chance to change it.

Unless I'm missing something stupid of course.

bobo1on1
2009-03-05, 17:32
That has nothing to do with it, the refreshrate is only needed to decide how many times to render a certain frame, the renderer will always render as fast as it can.
Seems like in this case it can't render fast enough.

Maybe someone else with ati graphics can test it as well?

kees1869
2009-03-05, 20:59
Same problems here as well on a 4870x2 + Q6600 (3.2 GHz). Chipmunk/Goa'uld thing on most files I tried. (avi, mkv, wmv). I don't think it's the hardware. ;)

I'm on Vista btw.

Hitcher
2009-03-05, 23:40
Just tried it on my PC (as opposed to my HTPC) that has a GeForce 6600 graphics card and it works fine, so it's either the ATI card or Vista?

mindweaver
2009-03-05, 23:45
It works for me aswell on NVIDIA 7100 builtin on Vista


My friend runs ATI on XP and it didn't work for him. So I guess it's the same old same old with those ATI cards. :/

Hitcher
2009-03-05, 23:55
Looks like we've found the answer.

Hando
2009-03-06, 11:44
Ati HD 3870 here and it's not working for me either. Was getting Chipmunk/Goa'uld results before the more recent svns. Now with auto-refresh rate and smoothvideo set I get slow/jittery playback and out of sync audio even when xbmc set to 24hz and playing 24hz vid.

specs:-

Ati HD 3870 (audio and vid via HDMI)
Abit An-m2hd mobo
Athlon X2 64 6000
4gb ram

Triple bufferring on - vsync always on in CCC.

Same results with xbmc vsync on or off.

ashlar
2009-03-06, 18:28
Just wanted to say I'm uploading zipped versions as well, I prefer it that way myself (until the installer does something useful).

here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

Also zip'ing main branch.

here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eefe234c78e ac944052ce018c8114394287I don't get it, what are we supposed to do with the zipped versions? Overwrite all that's contained in the Program Files\XBMC folder?

hoborg
2009-03-06, 20:59
Hi.
He, he, just tryed this build and it is nice joke.

My audio jumps randomly +3 octaves, then -3octaves, it is really funny :) but video is smooth :D

Using XPSP3, Ati HD3850

davilla
2009-03-06, 21:00
Hi.
He, he, just tryed this build and it is nice joke.

My audio jumps randomly +3 octaves, then -3octaves, it is really funny :) but video is smooth :D

Using XPSP3, Ati HD3850

Also know as Chipmunk/Goa'uld mode :)

kees1869
2009-03-06, 21:57
I don't get it, what are we supposed to do with the zipped versions? Overwrite all that's contained in the Program Files\XBMC folder?

Yes or take the parts you want and leave what you don't want overwritten.. Or recover something you fubar'ed.

dteirney
2009-03-07, 01:04
I'm pretty sure the refresh rate changing is working for me. I have an issue where whenever I bring up the resolution info screen by pressing z on the keyboard XBMC locks up tight. Log at http://pastebin.com/m3a8ad844

I've also noticed that the video starts to stutter when bringing up the Codec info by pressing o.

Things seem pretty stable for me using ATI, but I have the Vsync patch that makes use of Vsync related changes that were introduced around Catalyst 9.1. See http://xbmc.org/trac/ticket/5951 (ATI Linux driver 9.1 supports glXSwapIntervalSGI , works great for XBMC) for more information. Since this smoothvideo branch relies on VSync stuff perhaps some other ATI users could try the patch as well and see whether that improves current behaviour.

Sometimes the AV Sync gets way out >5s after skipping and that's when things go bad.

I just watched most of the Transformers movie with this branch and it was stable and smooth for pretty much all of the movie (including the audio).

Hitcher
2009-03-07, 08:35
Interesting, is there a guide on how to apply these patches so I can try it out?

dteirney
2009-03-07, 23:46
To use the patch you'll need to be compiling from source.

Download the vsync-mode-2-on-ati.patch file from the trac ticket (http://xbmc.org/trac/ticket/5951).

Put it into the top level directory for the XBMC source tree. Then apply using:

patch -p0 < vsync-mode-2-on-ati.patch

That will change the source code in the "guilib/Surface.cpp" file. Recompile with those changes and try it out.

You'll need to be using the Catalyst 9.1 or later driver or that code change will cause undefined problems. The final solution to this patch will look different, but it is enough to test that the Vsync changes work as expected.

bobo1on1
2009-03-08, 23:35
Something I found out recently is if you set the priority of xbmc.bin to -20 on linux there are a lot less glitches.

You can have a script like this:


#!/bin/bash
while [ true ]; do
pidof xbmc.bin | xargs renice -20 -p
sleep 1
done


Save that somewhere and then start it in the background from /etc/rc.local for example.
The downside is if xbmc freezes your system will probably become unresponsive as well.

I've also tried SCHED_FIFO on linux to get realtime priority, but that doesn't work well because xorg can't get any processing time, thus causing a system freeze.

edit: Just tried SCHED_FIFO on both xbmc.bin and X and that seems to work.
I've also found the cause for the low fps on ati with windows, I fixed that and it seems to work, can someone please try? I think it might cause 100% cpu usage.

edit2: Added a howto for setting -20 priority and realtime scheduling in linux to the startpost.

olympia
2009-03-11, 13:40
Something I found out recently is if you set the priority of xbmc.bin to -20 on linux there are a lot less glitches.

You can have a script like this:


#!/bin/bash
while [ true ]; do
pidof xbmc.bin | xargs renice -20 -p
sleep 1
done


Save that somewhere and then start it in the background from /etc/rc.local for example.
The downside is if xbmc freezes your system will probably become unresponsive as well.

I've also tried SCHED_FIFO on linux to get realtime priority, but that doesn't work well because xorg can't get any processing time, thus causing a system freeze.

edit: Just tried SCHED_FIFO on both xbmc.bin and X and that seems to work.
I've also found the cause for the low fps on ati with windows, I fixed that and it seems to work, can someone please try? I think it might cause 100% cpu usage.

edit2: Added a howto for setting -20 priority and realtime scheduling in linux to the startpost.

When you are speaking about glitches, is this mean the intrepid perfromance problem? Are these tricks reducing the effect of this problem?

Or you are mentioning other glitches... ???

bobo1on1
2009-03-11, 19:21
What I'm talking about is an effect of using a multitasking operating system, you can never guarantee that xbmc gets cpu time when it needs to, because the operating system has other things to do as well.

Using SCHED_FIFO scheduling guarantees that xbmc gets cpu time when it needs to.
It also guarantees that it can use the cpu for as long as it wants.
This works pretty good, but if there's a bug in the code that causes xbmc to sit in an endless loop, you can never kill it because the kernel won't give other processes any cpu time.

ashlar
2009-03-11, 19:23
Is this the same as giving RealTime priority to a process under Windows?

spiff
2009-03-11, 19:29
yes pretty much

ashlar
2009-03-11, 19:39
bobo1on1, I tried a strange combination yesterday... I downloaded the latest build that's been made available from your branch (Windows) and set up forced refresh rate at 24Hz. I planned on using this for a Jericho (TV Series) DVD Rip that I have, that under ZoomPlayer+Reclock is played back at 24Hz. Zoom Player info says 29.97 fps reported/23.976 actual.
Standard XBMC with adjust refreshrate keeps it at 60Hz, playing it back with the usual judder.
Hence I thought "this is the right time to try out this smoothvideo". As mentioned, I forced 24Hz but got completely messed up sound (using digital out).
I then tried a new build not from your branch and set manually the refresh rate at 24Hz. Playback was perfect and adjust refreshrate did not kick in to bring the refresh to 60Hz but left it at 24Hz.

I know it's a special case, but thought worth it of being reported.

Hitcher
2009-03-12, 01:46
Just tried SCHED_FIFO on both xbmc.bin and X and that seems to work.
I've also found the cause for the low fps on ati with windows, I fixed that and it seems to work, can someone please try? I think it might cause 100% cpu usage.

If you've got a build I can try I'll be more than happy to test it out.

miljbee
2009-03-12, 17:03
I have opened a trac ticket, because I have some videos for wich refresh rate is not detected correctly. This might impact the smoothvideo branch ...
http://xbmc.org/trac/ticket/6015

kees1869
2009-03-12, 21:55
If you've got a build I can try I'll be more than happy to test it out.

I put 18401 online, fixes should be in there from what I read in the log.

here: http://www.mediafire.com/?n1vq4nyydxz

Hitcher
2009-03-12, 22:03
Thanks, I forgot your were building these.

Now bookmarked.

bobo1on1
2009-03-14, 03:00
bobo1on1, I tried a strange combination yesterday... I downloaded the latest build that's been made available from your branch (Windows) and set up forced refresh rate at 24Hz. I planned on using this for a Jericho (TV Series) DVD Rip that I have, that under ZoomPlayer+Reclock is played back at 24Hz. Zoom Player info says 29.97 fps reported/23.976 actual.
Standard XBMC with adjust refreshrate keeps it at 60Hz, playing it back with the usual judder.
Hence I thought "this is the right time to try out this smoothvideo". As mentioned, I forced 24Hz but got completely messed up sound (using digital out).
I then tried a new build not from your branch and set manually the refresh rate at 24Hz. Playback was perfect and adjust refreshrate did not kick in to bring the refresh to 60Hz but left it at 24Hz.

I know it's a special case, but thought worth it of being reported.

Nice to hear they play smooth, the refreshrate thing is a bit strange because I didn't modify that code in any way.

I have opened a trac ticket, because I have some videos for wich refresh rate is not detected correctly. This might impact the smoothvideo branch ...
http://xbmc.org/trac/ticket/6015

Smoothvideo plays those files at 24 fps, but imho the problem lies more with the files than with xbmc.
Reencoding them with avidemux fixes the files.

bobo1on1
2009-03-16, 22:32
I have done some tests with timestretching, tried both soundtouch (http://www.surina.net/soundtouch/) and rubberband (http://www.breakfastquay.com/rubberband/), but I didn't like either of them, the soundquality is degraded too much.

alanwww1
2009-03-17, 17:39
@Bobo1on1:

For me the branch is pretty stable and works ok most of the time. When do you think it will be merged to main trunk ?

What issues are you working on currently ?

I think what could be improved is the way sound "catches" up with the video so that when i start, pause, skip the video the pitch gets funny low of high for about 10 secs. On win Reclock it is solved so that until the sound gets in sync with video, the player plays the original sound in the original speed. Than it switches to the sound with the adjusted speed. But this is only until it detects all things in the beginning.

What i don't understand is why it needs to catch up again when i pause or skip the video. I mean until that time, the player could know the refresh rates, framerates, video clock rates.

Anyway, thanks for the great work. Now i don't have to watch at panning screens whether i loose frames or not. I see all the frames all the time. It is really great.

ashlar
2009-03-17, 20:32
I think that before moving this to main trunk, the multichannel issues on Windows should be corrected. Without the resampling stuff, this is of limited usefulness. And using multichannel analog out in Windows gets the channel mapping all wrong.

Hitcher
2009-03-17, 20:45
I tried the latest build from kees1869 but FPS were running around 160.
I've not been able to try out the glXSwapIntervalSGI patch for ATI cards though.

kees1869
2009-03-18, 15:45
I tried the latest build from kees1869 but FPS were running around 160.
I've not been able to try out the glXSwapIntervalSGI patch for ATI cards though.

I put a patched one up (vsync-mode-2-on-ati.patch), this one also disables screensaver/power managment while XBMC is running.

People besides Hitcher: Be aware that this patch needs Catalyst 9.1 or up to function properly! (this build will function though on older Catalyst versions or on nVidia cards, just no mode-2 on ATI in that case)

Download frankenstein here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

Included patches:

http://xbmc.org/trac/ticket/5951

http://xbmc.org/trac/ticket/5958

I modified screensaver/power managment patch to be active all the time (original patch ran on playback).

Hitcher
2009-03-18, 16:34
Thanks, I'll try it out later and report back.

What V-Sync option do I need to choose?

kees1869
2009-03-18, 19:21
Thanks, I'll try it out later and report back.

What V-Sync option do I need to choose?

I have it on 'Always Enabled', the debug log shows it to be enabled in that case. Haven't tried the other modes.

bobo1on1
2009-03-18, 23:07
@Bobo1on1:

For me the branch is pretty stable and works ok most of the time. When do you think it will be merged to main trunk ?

What issues are you working on currently ?

I think what could be improved is the way sound "catches" up with the video so that when i start, pause, skip the video the pitch gets funny low of high for about 10 secs. On win Reclock it is solved so that until the sound gets in sync with video, the player plays the original sound in the original speed. Than it switches to the sound with the adjusted speed. But this is only until it detects all things in the beginning.

What i don't understand is why it needs to catch up again when i pause or skip the video. I mean until that time, the player could know the refresh rates, framerates, video clock rates.

Anyway, thanks for the great work. Now i don't have to watch at panning screens whether i loose frames or not. I see all the frames all the time. It is really great.

That has to do with syncing the dvdclock, normally that's synced to the audio but I'm syncing it to the video, the code is a bit complicated so I didn't get around to fixing that. It's usually synced in a few seconds so it's not a big issue.

A bigger problem is that dvd's don't have good timestamps, so the Goa`ulds might pay a visit from time to time. Mpeg4 plays fine.
What I've noticed on linux with nvidia is sometimes a flip is missed, turning on triple buffering helps a lot with that as you're allowed to catch up again, sadly that causes tearing when not using smoothvideo.

Hitcher
2009-03-18, 23:41
Still only runs at the XBMC start up refresh rate.

pilluli
2009-03-21, 00:42
I just try a recent build of smoothvideo branch. First of all I'm impressed as everything worked out of the box (linux with nvidia hardware). Videos were adapted when I set my TV to accept 24Hz and 50Hz. Nice! :)

A couple of problems note reporting:

1. As previously commented, sound was funny until it catched up with the new framerate (around 5-10 secs). It might be better to use the original sound until matched and then do the switch

2. When playing 23.976fps videos at 24Hz refreshrate audio was out of sync with video (around 200ms). This also happens with trunk (see this post http://xbmc.org/forum/showthread.php?t=41185 or this trac ticket http://xbmc.org/trac/ticket/5755). I just thought that the way smoothvideo changes both framerate and audio sampling I was going to finally get rid of that sync problems :(

In any case, Keep the good work!

Rincewind99
2009-03-22, 21:17
I submitted a small and ugly patch for smoothing the audio/video sync thing a little bit:

http://xbmc.org/trac/ticket/6125

It's tested only with PAL DVD-Video (that's what I'm using it for) but maybe it's useful for somebody else.

dmidi
2009-03-23, 23:49
Given your familiarity with secret rabbit code (SRC)...

1. Can you add settings that allow xbmc to upsample audio (in both music and video) to a user defined value? For example, if my DACs support 192 KHz in stereo and 96 Khz in 7.1, then it would be nice to utilize that capability. It is far preferable to handle this on a relatively powerful CPU (with a good algorithm like SRC) vs. having a sound card resample with a much slower DSP! Even most receivers (<$1k) would lag far behind secret rabbit code upsampling on a modern CPU.

2. Of course, upsampling is most appropriate when also able to utilize a user selected quality level. As libsamplerate can be highly CPU intensive for 'audiophile' levels, it would be good if XBMC offered different user selectable quality levels for Music and Video playback (defaults could be Music = higher quality [bestsinc] and Video = lower quality to allow software video decode).

3. Slightly off topic, but if Xbmc was able to load the entire audio file (or a substantial portion for video) into RAM then jitter could be minimized. Beyond eliminating jitter in audio and video, the HDD could spin down during music/movie playback to eliminate noise and heat. Given the move towards 64 bit Core i7 systems with up to 24 GB RAM on MicroATX (Asus, DFI), the user could select the amount of RAM that XBMC should utilize, or a suggested amount could be part of a setup routine at install.

4. With a near perfect waveform and noisefloor using the above methods, XBMC must then avoid windows XP meddling with perfection. When windows mixer muddles the noise, it does so with a dynamic range of 92 db. In contrast, secret rabbit code has an SNR of 143 db at highest quality levels! XBMC needs to play well with WSAPI (vista/windows7) and Kernel Streaming (XP) to avoid having poor drivers resample/remix to a khz and bit level supported by an HDMI connection or sound card DAC (96/192 khz 24 bit).


The above 4 enhancements combined with xbmc's great GUI would make for an audio/videophile level system. As it is now, XBMC holds back even the best hardware in terms of sound and video quality. With the right combination of code (like libsamplerate) and hardware, the PC can be a much better AV platform than dedicated machines. A $1000 PC will rival $20k 'audio/videophile' gear - and the GUI will be leagues ahead.

The 'audible click' found during non-libsamplerate processing that only utilizes drop/repeat packet methodology (ie when passing through to DTS/AC3 receiver) is a perfect example of why processing should take place within a system that processes both video and audio.

In any scenario, bitrate passthrough (where audio is processed separately on a receiver) is severely compromised compared to an SRC approach that corrects video in an intelligent manner (knowing monitor refresh rates, etc). Furthermore, if using anything like the ATI 3xxx series graphics cards, 'bitperfect' only gets worse as the HDMI driver mangles 96/192 khz 20/24 bit multichannel material to 48 khz/16 bit stereo! In that scenario, it's far better to have the option of downsampling with libsamplerate which has far superior algorithms than widows/linux HDMI drivers.

Given the potential upside of libsamplerate and the downside of 'passing the buck' (see ATI 3xxx series), upsampling rather than bit streaming should be advertised as the better feature in 9.04.

Edit:
The Holy Grail is to implement something like Audyssey Room Correction in XBMC - either on a dynamic real-time basis or with P2P shared movie/music file profiles that are muxed with a room profile. That's where the benefit of multicore systems would make Xbmc a system without peer!

alanwww1
2009-03-24, 20:26
I see the branch is cleaned and reopened by Spiff

"branch for re-development of smoothvideo"

Is it because vdpau baranch was merged into the main branch ?

That would really be awsome if vdpau could work with smoothvideo. :rolleyes:

spiff
2009-03-24, 20:27
bobo wanted to start over. no other reason (but yes, it also brings vdpau into there)

alanwww1
2009-03-24, 21:31
bobo wanted to start over. no other reason (but yes, it also brings vdpau into there)

Great news. Thanks. We're here to test.

bobo1on1
2009-03-24, 23:40
Yes I started over, the forced flip thing wasn't going to get any better and I've tried some other things that look very promising.

Given your familiarity with secret rabbit code (SRC)...
The above 4 enhancements combined with xbmc's great GUI would make for an audio/videophile level system. As it is now, XBMC holds back even the best hardware in terms of sound and video quality. With the right combination of code (like libsamplerate) and hardware, the PC can be a much better AV platform than dedicated machines. A $1000 PC will rival $20k 'audio/videophile' gear - and the GUI will be leagues ahead.


That's not really my department, but masteraudio will possibly get a resampler based on libsamplerate so eventually I'll have to use that to prevent resampling twice.

bobo1on1
2009-03-27, 21:01
Everything should be working again on windows and linux, there are some jerks every two minutes or so, I don't know yet what causes that, but it's a lot better than what it was.

kees1869
2009-03-27, 21:24
Everything should be working again on windows and linux, there are some jerks every two minutes or so, I don't know yet what causes that, but it's a lot better than what it was.

It's great, I tried it on Windows! Just watched the killa.sampla and I never seen it so smooth on XBMC! Thanks! :laugh:

I put the Win32 version up here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

(I had to add samplerate.h to get rev. 18986 to build)

Nazgulled
2009-03-27, 21:38
What's killa.sampla? By your comment, seems a nice video to test vieo playback smoothness, where can I get it? :P

kees1869
2009-03-27, 21:54
What's killa.sampla? By your comment, seems a nice video to test vieo playback smoothness, where can I get it? :P

It's a little clip of the movie 'Earth' with a very high bitrate often used to test playback capabilities.

Keep in mind it puts a lot of strain on your cpu, so playback might stutter even though smoothvideo is working fine. I used it for testing because I know it well.

killa.sampla: http://rapidshare.com/files/82525583/killa.sampla.x264.mkv.html

Hitcher
2009-03-27, 22:18
Don't go using the killa sample as a test video because it's got a stupid bitrate (35.0 Mbps) instead check out the ones in my sig.

Nazgulled
2009-03-27, 22:18
Thanks.

Hitcher
2009-03-27, 22:55
I put the Win32 version up here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

I just installed this but there's no Smooth Video options in it. ???

bobo1on1
2009-03-27, 23:04
That's because it's on by default, I've updated the startpost with new info.

Hitcher
2009-03-28, 01:21
That's because it's on by default, I've updated the startpost with new info.

Thanks, I was looking in the videos settings.

Seems my card can't be used as a clock -

CVideoReferenceClock: CreateDevice returned -2005530520, falling back to QueryPerformanceCounter

So systemclock will be used instead but what does that mean exactly?

bobo1on1
2009-03-28, 01:41
Hm that error seems to be D3DERR_DEVICELOST, I'll look into that.
When it falls back to QueryperformanceCounter, it means it uses the systemclock for video, so the video will be jerky again.

I did improve that so it won't be as bad as with linuxport.

Hitcher
2009-03-28, 01:49
It's an ATI Radeon HD 2400 if that's any help.

PolliSoft
2009-03-28, 15:47
Hi and thanks for this version!
I can also confirm that this is very smooth, but I get VSync issues on all videos when running a Smoothvideo build.
Bobo, do you have any tips regarding video settings? I have an Nvidia 8600 card.

---Update---
I turned off Triple buffering in the Nvidia settings, and no more Vsync issues. Bobo, great work!!!

ashlar
2009-03-28, 17:28
I turned off Triple buffering in the Nvidia settings, and no more Vsync issues. Bobo, great work!!!:confused2: Wasn't Bobo suggesting the opposite?

ashlar
2009-03-28, 17:33
I hope somebody will be able to build an updated version to include http://xbmc.org/trac/changeset/19008

This will allow for perfect testing under Windows (without having to suffer through channel misplacement, that is). Thank in advance to the kind soul that will help. ;D

PolliSoft
2009-03-28, 18:59
I hope somebody will be able to build an updated version to include http://xbmc.org/trac/changeset/19008

This will allow for perfect testing under Windows (without having to suffer through channel misplacement, that is). Thank in advance to the kind soul that will help. ;D

On request, merged with linuxport 19013:
http://www.mediafire.com/file/mmyvnmmyymz/XBMCSetup-Rev19002linuxportMerge19013.exe

PolliSoft
2009-03-28, 19:00
:confused2: Wasn't Bobo suggesting the opposite?

I thought so to, but since the implementation is started from scratch, maybe it works in a different way.

bobo1on1
2009-03-28, 19:42
Triple buffering should now be disabled, the reason you get tearing now with triple buffering enabled is because of a driver bug/feature, if the application can't keep up with the refreshrate the nvidia driver turns off vsync.

ashlar
2009-03-29, 04:06
On request, merged with linuxport 19013:
http://www.mediafire.com/file/mmyvnmmyymz/XBMCSetup-Rev19002linuxportMerge19013.exeThank you. Unfortunately something was missing... http://xbmc.org/trac/changeset/19028

Nazgulled
2009-03-29, 05:51
I was here trying to get you guys a fresh build all those latest changes but I'm having trouble merging the latest "linuxport" changes with the "smoothvideo" branch... I have both of them checked out on my hard drive but I don't know how to correctly use TortoiseSVN to merge the two, sorry about that...

I'm sure someone else will upload something for you, still, if anyone uses TortoiseSVN, please give me some hints on how you merge them...

spiff
2009-03-29, 13:19
right click your local copy of the branch you want to merge TO. select tortoisesvn -> merge

set the from url at the branch you want to merge FROM. select the revision range. hit merge.

Hitcher
2009-03-29, 14:06
Hm that error seems to be D3DERR_DEVICELOST, I'll look into that.

Does that mean my card might work then or should I just forget about using smoothvideo?

Nazgulled
2009-03-29, 15:57
right click your local copy of the branch you want to merge TO. select tortoisesvn -> merge

set the from url at the branch you want to merge FROM. select the revision range. hit merge.
Just to be clear, TO=smoothvideo and FROM=linuxport right? When I select "merge", I'm asked to select the merge type from 3 different ones, I suppose it's the first one, but I'm not sure...

Also, I tried this already, like you said and with first merge type but I didn't select any revision range, I left it blank and I believed it started to merge revisions 1-HEAD, which I suppose it's not good right? How do I know exactly which revisions should I merge? Should I look at the last revision number that bobo1on1 merged the svn himself with linxuport?

bobo1on1
2009-03-29, 18:27
Does that mean my card might work then or should I just forget about using smoothvideo?

It supports direct3d, so it should work, it just throws that error for some reason.
What it needs to support is IDirect3DDevice9::GetRasterStatus (http://msdn.microsoft.com/en-us/library/bb174402(VS.85).aspx), but my code doesn't get to the part where that is checked.

When did you last update your drivers? Ati released new drivers on 3/18/2009.

PolliSoft
2009-03-29, 20:01
Thank you. Unfortunately something was missing... http://xbmc.org/trac/changeset/19028

Updated: Merged with 19053.
http://www.mediafire.com/file/jwmynmjj4y2/XBMCSetup-Rev19027linuxportMerge19053.exe

Hitcher
2009-03-29, 21:08
It supports direct3d, so it should work, it just throws that error for some reason.
What it needs to support is IDirect3DDevice9::GetRasterStatus (http://msdn.microsoft.com/en-us/library/bb174402(VS.85).aspx), but my code doesn't get to the part where that is checked.

When did you last update your drivers? Ati released new drivers on 3/18/2009.

Just installed Rev.9.3 and now I don't even see 'CVideoReferenceClock:' in the debug log. ???

bobo1on1
2009-03-29, 22:44
The logging was broken, I fixed it again.

ashlar
2009-03-29, 23:17
Updated: Merged with 19053.
http://www.mediafire.com/file/jwmynmjj4y2/XBMCSetup-Rev19027linuxportMerge19053.exeMany thanks. Really appreciated.

alanwww1
2009-03-30, 00:21
@Bobo1on1

I tried today's svn and i experienced the following on Hardy Linux:

- The fps is NOT near the refresh rate (eg playing back PAL material on 50hz, i see 25fps not 50fps while playback). Is it normal ?

- When VDPAU is enabled i see horrible stuttering. I guess it is not worked on yet.

Generally for me things are not so smooth as with the versions before VDPAU merge.

bobo1on1
2009-03-30, 00:50
The fps is normal.
Can you svn up and post a debug log?

alanwww1
2009-03-30, 01:16
i'll do it tomorow, with vdpau enabled and with disabled.

miljbee
2009-03-30, 12:16
Hello,

I am just curious if it is planned to merge the smoothvideo branch before babylon ?

TFHfony
2009-03-30, 12:42
Hi,

I have just installed this version on my Windows Vista 32-bit, Quadcore AMD Phenom (4 x 2400Mhz), 2gbyte memory and a Geforce 8300.
I noticed that normal movies seems to play fine, but some 1080p demo's seem to stress out my machine. All 4 CPU's go over 80% and the image starts to stutter.

I have tried various settings for the synching, but to no avail. Is this something I have to live with with this smooth video branch? Or is this something that might be solved.
I must say I am pretty impressed though with the image quality and natural motion I get with this version :)

BTW,
Anyone noticed that video/music works fine, but that I can't display pictures with this version?

TFH

spiff
2009-03-30, 12:43
we are in a feature freeze. what do you think that means? ;P

bobo1on1
2009-03-30, 17:11
Hi,

I have just installed this version on my Windows Vista 32-bit, Quadcore AMD Phenom (4 x 2400Mhz), 2gbyte memory and a Geforce 8300.
I noticed that normal movies seems to play fine, but some 1080p demo's seem to stress out my machine. All 4 CPU's go over 80% and the image starts to stutter.

I have tried various settings for the synching, but to no avail. Is this something I have to live with with this smooth video branch? Or is this something that might be solved.
I must say I am pretty impressed though with the image quality and natural motion I get with this version :)

BTW,
Anyone noticed that video/music works fine, but that I can't display pictures with this version?

TFH
Thanks for your test, do you have the same issues with linuxport?

TFHfony
2009-03-30, 17:49
Thanks for your test, do you have the same issues with linuxport?
Yes I do. Don't know if that's good or bad news for you though ;)

ArtVandelae
2009-03-30, 22:15
There seems to be a problem when using the resampler in conjunction with the auto-refresh rate feature. When I start XBMC with a 60Hz desktop refresh rate and then play a 60FPS video everything is perfectly smooth. When I start XBMC with a higher refresh rate (my desktop is normally 85Hz) and it switches to 60 at playback time there is noticeable jitter in the video, audible pitch warbling in the audio and the log is filled with discontinuity errors.

Log with XBMC starting at 85Hz and changing to 60Hz at the start of playback (http://pastebin.com/m5f38fbd1)

Log with XBMC starting at 60Hz (http://pastebin.com/m5fe41017)

alanwww1
2009-03-31, 01:15
There seems to be a problem when using the resampler in conjunction with the auto-refresh rate feature. When I start XBMC with a 60Hz desktop refresh rate and then play a 60FPS video everything is perfectly smooth. When I start XBMC with a higher refresh rate (my desktop is normally 85Hz) and it switches to 60 at playback time there is noticeable jitter in the video, audible pitch warbling in the audio and the log is filled with discontinuity errors.

Log with XBMC starting at 85Hz and changing to 60Hz at the start of playback (http://pastebin.com/m5f38fbd1)

Log with XBMC starting at 60Hz (http://pastebin.com/m5fe41017)

Similar behaviour with me, except the change is from 50hz to 24hz. Mine do even drops back to X whe n i start a video.

Without auto-refresh rate things are working pretty fine. For example i was able to play 24fps content on 50hz with speed changed to 25fps and audio resampled. It was pretty smooth.

Also my issues with vdpau videos seem to be dissapeared (at least without auto refresh rate).

Bobo1on1, can you explain the "adjust clock" method of syncing, How come if video is syncronized, you write that the speed of the video is changed. How is it possible ? Is it already working ? Is the skipping/duplicating method already working ?

bobo1on1
2009-03-31, 01:39
Those bugs are completely unrelated, IDirect3DDevice9::GetDisplayMode doesn't update the refreshrate when it changes, luckily IDirect3D9::GetAdapterDisplayMode does, so I fixed it right away.

alanwww1 can you post a debug log? I need to make sure the change in refreshrate was detected.

The video playback is referenced to the clock, if you want to play 24 fps at 25, you have to speed it up a little, the simplest way to do that is to speed up the clock.
Packet skip/duplicate should work ok.

PolliSoft
2009-03-31, 18:31
Those bugs are completely unrelated, IDirect3DDevice9::GetDisplayMode doesn't update the refreshrate when it changes, luckily IDirect3D9::GetAdapterDisplayMode does, so I fixed it right away.

Build including this change: http://www.mediafire.com/file/jm2znnmzmyz/XBMCSetup-Rev19095linuxportMerge19099.exe

ashlar
2009-03-31, 19:37
Thanks PolliSoft. I'll try this one. The previous one I tried stuttered as hell, on an 8800 GT and XP SP3.

Hitcher
2009-03-31, 20:41
Build including this change: http://www.mediafire.com/file/jm2znnmzmyz/XBMCSetup-Rev19095linuxportMerge19099.exe

Still getting -

CVideoReferenceClock: CreateDevice returned 2152, falling back to QueryPerformanceCounter

but it's different than before -

CVideoReferenceClock: CreateDevice returned -2005530520, falling back to QueryPerformanceCounter

bobo1on1
2009-03-31, 20:54
Thanks PolliSoft. I'll try this one. The previous one I tried stuttered as hell, on an 8800 GT and XP SP3.
Were you playing NTSC dvd by any chance?

Still getting -

CVideoReferenceClock: CreateDevice returned 2152, falling back to QueryPerformanceCounter

but it's different than before -

CVideoReferenceClock: CreateDevice returned -2005530520, falling back to QueryPerformanceCounter

Same error, I just made them easier to look up in d3d9.h.

ashlar
2009-03-31, 22:23
Were you playing NTSC dvd by any chanceNope 23.976fps MKVs (H264 video content, AC3 audio content).

access denied
2009-04-01, 00:11
Hi, I have the same problem as the guys on the previous page do:
My desktop is at 60Hz, and when I start XBMC and play a file which plays @60Hz it is smooth. I start another file, refresh rate switches to 50Hz and when I come back to GUI and back to the first file it is @60Hz again, but not smooth any more.

XP SP3, Core2Duo 3GHz, 2GB RAM, nVidia 9300. Bild is the latest from PolliSoft (http://www.mediafire.com/file/jm2znnmzmyz/XBMCSetup-Rev19095linuxportMerge19099.exe)

Log's here http://pastebin.com/m2fa0a8f1

bobo1on1
2009-04-01, 00:41
Oops, didn't use the adjusted frequency for direct3d, fixed it.

alanwww1
2009-04-01, 01:04
alanwww1 can you post a debug log? I need to make sure the change in refreshrate was detected.


@Bobo1ono1

Here is my log with latest svn, latest nvidia driver, auto refresh rate on, xbmc quitting when i start playback. (with the same svn xbmc-mainbranch it does not quit)

http://pastebin.com/m7b7faebf

bobo1on1
2009-04-01, 01:25
Did you do a make clean first?

Also what's the output of "nvidia-settings -nt -q RefreshRate" ?
It seems to round to 23 hertz.

alanwww1
2009-04-01, 10:36
Did you do a make clean first?

Also what's the output of "nvidia-settings -nt -q RefreshRate" ?
It seems to round to 23 hertz.

I did make make clean first.

I have custom modlines in my xorg.conf ( http://pastebin.com/m6cea3df6 )

I have 50, 60, 23.98 set in the xorg.conf file. When i press "S" and i check the actual refresh rate in the info screen in the main menu. I see 23.98 exactly with a little fluctuation.

It was working very fine before the vdpau merge.
When i get home in the evening i will check the nvidia-settings output.

Thanks for the help !

bobo1on1
2009-04-02, 01:26
There seems to be a bug in the nvidia drivers where glXWaitVideoSyncSGI just returns immediately without an error code and without updating the vblank counter after a change in the RandR mode, I put in a workaround for it which might help.

There's also a good chance I fixed the direct3d issues.

edit: The workaround works, except if you use vdpau, so smoothvideo + auto refreshrate is ok, smoothvideo + vdpau is ok, smoothvideo + auto refreshrate + vdpau is broken.

alanwww1
2009-04-02, 17:03
There seems to be a bug in the nvidia drivers where glXWaitVideoSyncSGI just returns immediately without an error code and without updating the vblank counter after a change in the RandR mode, I put in a workaround for it which might help.

There's also a good chance I fixed the direct3d issues.

Thank you for the efforts. ;) I will try it tonight.

Hitcher
2009-04-02, 17:49
There's also a good chance I fixed the direct3d issues.

Cool, that's the problem I was having wasn't it?

TFHfony
2009-04-02, 22:43
OK, today did a new install of this branch, together with vdpau support..
Playing a 1080p file, rescaling it to 1366 * 768 -> about 3% CPU usage and smooth as a baby skin.

THIS IS HOW IT IS SUPPOSED TO BE

You have done a great job!
It's to bad 9.04 has a feature freeze: They don't know what they are missing.

TFH is gonna watch some more flicks :)

alanwww1
2009-04-03, 01:37
There seems to be a bug in the nvidia drivers where glXWaitVideoSyncSGI just returns immediately without an error code and without updating the vblank counter after a change in the RandR mode, I put in a workaround for it which might help.

There's also a good chance I fixed the direct3d issues.

edit: The workaround works, except if you use vdpau, so smoothvideo + auto refreshrate is ok, smoothvideo + vdpau is ok, smoothvideo + auto refreshrate + vdpau is broken.

@Bobo1on1

There are great improvements in the new svns. I don't have a problem with crashing with auto refresh rate on. I have 25fps content playback silky-smooth even with vdpau enabled. :) Really great work.

Except i still have a slight problem with 24fps contents. I have 2-3 frames skipping in every 2-3 seconds if resample or skip/duplicate is turned on. Here is my log:

http://pastebin.com/m6fbbd260

It is strange that in the log it is still 23.00hz detected, but when i run
nvidia-setting -nt -q refreshrate

it writes: 23.97hz

You have any idea ? Maybe my custom modlines ? I had no problem with it until now.

wizzle
2009-04-03, 02:02
Does anyone have a Windows build of this branch that I can use to test? I've been tinkering with video settings on the main build and it's just not working out.

bobo1on1
2009-04-03, 04:33
Cool, that's the problem I was having wasn't it?
Yes.

OK, today did a new install of this branch, together with vdpau support..
Playing a 1080p file, rescaling it to 1366 * 768 -> about 3% CPU usage and smooth as a baby skin.

THIS IS HOW IT IS SUPPOSED TO BE

You have done a great job!
It's to bad 9.04 has a feature freeze: They don't know what they are missing.

TFH is gonna watch some more flicks :)
Nice to know it works.

@Bobo1on1

There are great improvements in the new svns. I don't have a problem with crashing with auto refresh rate on. I have 25fps content playback silky-smooth even with vdpau enabled. :) Really great work.

Except i still have a slight problem with 24fps contents. I have 2-3 frames skipping in every 2-3 seconds if resample or skip/duplicate is turned on. Here is my log:

http://pastebin.com/m6fbbd260

It is strange that in the log it is still 23.00hz detected, but when i run
nvidia-setting -nt -q refreshrate

it writes: 23.97hz

You have any idea ? Maybe my custom modlines ? I had no problem with it until now.
Is that the exact output? I think fscanf doesn't like the fact that there's no space between the number and hz.
That's an easy fix, but in the meantime you can increase the pixelclock slightly so the refreshrate becomes 24 hertz.

Hitcher
2009-04-03, 08:39
Yes.

Excellent news, can't wait to try it out.

access denied
2009-04-03, 09:51
Compiled yesterday svn 19157, still had the same issue as in my previous post (http://xbmc.org/forum/showpost.php?p=306854&postcount=134). Log is here (http://pastebin.com/m41e2ef86)

Though I think I noticed some improvements...

sensei73
2009-04-03, 10:05
Just tried smooth video branch yesterday!!! It's wonderfull! Playing a lot of 23,976 movies at 24hz perfectly!!! It is as important as vdpau!! right now I will stick with smoothvideo on Hardy (multitread sofware decoding + smmothvideo) until it is compatible with VDPAU.

Thanks again!

PolliSoft
2009-04-03, 18:27
Does anyone have a Windows build of this branch that I can use to test? I've been tinkering with video settings on the main build and it's just not working out.

Another build: SmoothVideo branch Rev19172 merged with linuxport Rev19185.
http://www.mediafire.com/download.php?j2myv0my0q2

Hitcher
2009-04-03, 19:31
Another build: SmoothVideo branch Rev19172 merged with linuxport Rev19185.
http://www.mediafire.com/download.php?j2myv0my0q2

Back to not finding 'CVideoReferenceClock:'.

bobo1on1
2009-04-04, 03:39
Compiled yesterday svn 19157, still had the same issue as in my previous post (http://xbmc.org/forum/showpost.php?p=306854&postcount=134). Log is here (http://pastebin.com/m41e2ef86)

Though I think I noticed some improvements...
That could be a driver bug, also your 50 hertz gets detected as 48 hertz.
edit: Fixed it by re-initializing direct3d on a displaymode change.

Back to not finding 'CVideoReferenceClock:'.
Do you get other debug messages? You might have to turn on debug logging.

weedenbc
2009-04-05, 02:23
New user to XBMC (came from MediaPortal) and just found this threat today. Downloaded and installed 19172 and it seems to work fine, except that my remote doesn't work.

Is this a known issue?

bobo1on1
2009-04-05, 04:03
I didn't even touch that code, but my guess is you had a modified Lircmap.xml which got overwritten by make install.

hal2100
2009-04-05, 16:44
Hello,

any estimation when this could be implemented in the mainline?

weedenbc
2009-04-05, 17:54
I didn't even touch that code, but my guess is you had a modified Lircmap.xml which got overwritten by make install.

I wasn't but I got it fixed. I just fired up Eventghost and used that to map the remote commands, which is something I was going to do anyways.

access denied
2009-04-05, 20:24
bobo1on1 -- my problem (on top of this page) is fixed now. now it is really great.

thanks a lot!

alanwww1
2009-04-06, 00:16
@Bobo1on1

I checked svn 19271 and still i still have the problem with 23,97 converted to 23.0000 and rounded to 23.

In the log:


22:02:02 T:3038989200 M:1712447488 DEBUG: CVideoReferenceClock: Output of nvidia-settings -nt -q RefreshRate: 23,97
22:02:02 T:3038989200 M:1712345088 DEBUG: CVideoReferenceClock: Detected refreshrate by nvidia-settings: 23.000000 hertz, rounding to 23 hertz


It might be because in the string it is coma not dot. I am just guessing.

Things are working fine with 25fps content.

Thanks

bobo1on1
2009-04-06, 01:04
Hello,

any estimation when this could be implemented in the mainline?
No.

@Bobo1on1

I checked svn 19271 and still i still have the problem with 23,97 converted to 23.0000 and rounded to 23.

In the log:


22:02:02 T:3038989200 M:1712447488 DEBUG: CVideoReferenceClock: Output of nvidia-settings -nt -q RefreshRate: 23,97
22:02:02 T:3038989200 M:1712345088 DEBUG: CVideoReferenceClock: Detected refreshrate by nvidia-settings: 23.000000 hertz, rounding to 23 hertz


It might be because in the string it is coma not dot. I am just guessing.

Things are working fine with 25fps content.

Thanks
Ok fixed now, probably :p

Hitcher
2009-04-06, 01:34
If anyone's got an up-to-date build they'd like to share I'd be grateful, thanks.

kees1869
2009-04-06, 07:33
If anyone's got an up-to-date build they'd like to share I'd be grateful, thanks.

here ya go: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

Hitcher
2009-04-06, 11:54
Many thanks.

sensei73
2009-04-06, 13:47
Hi thanks for your branch is working really well!!! with VDPAU :)

But could you merge again with linux port? There ir a important fix about audio syncronisation see--> http://xbmc.org/trac/changeset/19284

Hitcher
2009-04-06, 14:08
Latest build reports this

DEBUG: CVideoReferenceClock: Detected refreshrate: 24 hertz
DEBUG: CVideoReferenceClock: Displaymode changed
DEBUG: CVideoReferenceClock: Cleaning up Direct3d
DEBUG: CVideoReferenceClock: Setting up Direct3d
DEBUG: CVideoReferenceClock: CreateDevice returned 2152
DEBUG: CVideoReferenceClock: Cleaning up Direct3d
DEBUG: CVideoReferenceClock: Setting up Direct3d
DEBUG: CVideoReferenceClock: CreateDevice returned 2152
DEBUG: CVideoReferenceClock: Cleaning up Direct3d
DEBUG: CVideoReferenceClock: Setup failed twice in a row, falling back to QueryPerformanceCounter

bobo1on1
2009-04-06, 17:11
Hi thanks for your branch is working really well!!! with VDPAU :)

But could you merge again with linux port? There ir a important fix about audio syncronisation see--> http://xbmc.org/trac/changeset/19284
I already put something like that in smoothvideo, and I usually merge every few days or so.
Latest build reports this

DEBUG: CVideoReferenceClock: Detected refreshrate: 24 hertz
DEBUG: CVideoReferenceClock: Displaymode changed
DEBUG: CVideoReferenceClock: Cleaning up Direct3d
DEBUG: CVideoReferenceClock: Setting up Direct3d
DEBUG: CVideoReferenceClock: CreateDevice returned 2152
DEBUG: CVideoReferenceClock: Cleaning up Direct3d
DEBUG: CVideoReferenceClock: Setting up Direct3d
DEBUG: CVideoReferenceClock: CreateDevice returned 2152
DEBUG: CVideoReferenceClock: Cleaning up Direct3d
DEBUG: CVideoReferenceClock: Setup failed twice in a row, falling back to QueryPerformanceCounter
Cool, it worked at least once otherwise it wouldn't detect a change in display mode, it's still a very strange issue though.
If you turn off adjust refreshrate you can probably get it working.

Hitcher
2009-04-06, 17:47
With adjust refresh rate off.

DEBUG: CVideoReferenceClock: Setting up Direct3d
DEBUG: CVideoReferenceClock: CreateDevice returned 2152
DEBUG: CVideoReferenceClock: Cleaning up Direct3d
DEBUG: CVideoReferenceClock: Setting up Direct3d
DEBUG: CVideoReferenceClock: CreateDevice returned 2152
DEBUG: CVideoReferenceClock: Cleaning up Direct3d
DEBUG: CVideoReferenceClock: Setup failed twice in a row, falling back to QueryPerformanceCounter

kees1869
2009-04-06, 19:52
I have the same problem Hitcher has (refreshrate on or off)

DEBUG: CVideoReferenceClock: CreateDevice returned 2152
DEBUG: CVideoReferenceClock: Cleaning up Direct3d
ERROR: Window Translator: Can't find window settingscategory
ERROR: Error evaluating boolean expression !Window.Previous(0) + !Window.Previous(SettingsCategory) + !Window.Previous(1001) + !Window.Previous(130) + !Window.Previous(34)
DEBUG: CVideoReferenceClock: Setup failed twice in a row, falling back to QueryPerformanceCounter

This is on an ATI 4870x2 with XBMC rev. 19282 (Catalyst 9.3)

I run this from my main PC which is connected to my TV (hdmi) and my regular monitor.

Lemme know if you need more info or want me to try things.

bobo1on1
2009-04-06, 22:10
Update from svn and try again.

kees1869
2009-04-06, 22:44
Update from svn and try again.

I did and no more Direct3d setup problems, though my display gets detected as 60Hz (which is my pc's display refreshrate and not my TV's, I think this this is more of a SDL/multiple display issue though)

Hitcher, I put this version up for you here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

Hitcher
2009-04-06, 23:05
Thanks both of you. I'll report back.

Hitcher
2009-04-07, 00:04
No joy I'm afraid, it's still the same.

bobo1on1
2009-04-07, 00:19
I did and no more Direct3d setup problems, though my display gets detected as 60Hz (which is my pc's display refreshrate and not my TV's, I think this this is more of a SDL/multiple display issue though)

Hitcher, I put this version up for you here: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc
How are you starting xbmc on your tv?

No joy I'm afraid, it's still the same.
The only thing I can think of is that there is something wrong with your windows installation.

alanwww1
2009-04-07, 00:22
@Bobo1on1
The issue with the coma and point problem was solved. Well done !
Now my refresh rate is correctly detected as 23.969999Hz
Edit: Why is it roundded up to 24hz ? Doesn't it cause some more skipping ?
I will make further testing.

One question: What happens if i select resample, but i play an ac3 or DTS encoded video with passthrough. Does it fall back to skip/duplicate ?

Thanks

kees1869
2009-04-07, 07:46
How are you starting xbmc on your tv?

I'm using SDL_FULLSCREEN_HEAD=2 -p -fs as arguments. (I start via IR Server Suite which calls an UltraMon shortcut, that opens up the secondary display for me and launches XBMC with the above mentioned arguments)

My TV runs in 1080i, so I would expect a refreshrate of 30Hz (that's also what I have UltraMon set it to).

I tried the new svn update (19303), still gets detected as 60Hz.

Clumsy
2009-04-07, 14:40
The branch is not working for me on linux (arch linux, but I don't believe this time this is a matter of newer build tools). Xbmc crashes with an exception on startup. This does not happen with several recent versions in the normal linuxport branch (newest being 19309). See the pastebin for the relevant logs and xorg modeline:

http://pastebin.com/mba3024e

I am thinking that maybe my custom modeline I need for my projector for pixel perfect output might be the problem.

bobo1on1
2009-04-07, 18:33
@Bobo1on1
The issue with the coma and point problem was solved. Well done !
Now my refresh rate is correctly detected as 23.969999Hz
Edit: Why is it roundded up to 24hz ? Doesn't it cause some more skipping ?
I will make further testing.

One question: What happens if i select resample, but i play an ac3 or DTS encoded video with passthrough. Does it fall back to skip/duplicate ?

Thanks
If you choose resample with passthrough, it uses skip/duplicate but the speed change is still enabled, so don't do that.
Rounding the refreshrate doesn't matter, it's done because RandR and direct3d both return the refreshrate as an integer and I want to keep things consistent.

I'm using SDL_FULLSCREEN_HEAD=2 -p -fs as arguments. (I start via IR Server Suite which calls an UltraMon shortcut, that opens up the secondary display for me and launches XBMC with the above mentioned arguments)

My TV runs in 1080i, so I would expect a refreshrate of 30Hz (that's also what I have UltraMon set it to).

I tried the new svn update (19303), still gets detected as 60Hz.
I guess I could read out that environment variable and start direct3d on that adapter.

Hitcher
2009-04-07, 18:37
The only thing I can think of is that there is something wrong with your windows installation.
I might give it go on XP.
If you choose resample with passthrough, it uses skip/duplicate but the speed change is still enabled, so don't do that.
Confused!
Do you mean we should use skip/duplicate if we're using passthrough or not?

kees1869
2009-04-07, 19:23
I might give it go on XP.

Maybe there's something running on your system that interferes with the message handling, some hook perhaps. You run a dedicated HTPC?

bobo1on1
2009-04-07, 19:25
Confused!
Do you mean we should use skip/duplicate if we're using passthrough or not?

You should not choose resample, I suggest you choose clock feedback which may cause some extra jerks in the video instead of annoying clicks in the audio.

bobo1on1
2009-04-08, 16:03
The branch is not working for me on linux (arch linux, but I don't believe this time this is a matter of newer build tools). Xbmc crashes with an exception on startup. This does not happen with several recent versions in the normal linuxport branch (newest being 19309). See the pastebin for the relevant logs and xorg modeline:

http://pastebin.com/mba3024e

I am thinking that maybe my custom modeline I need for my projector for pixel perfect output might be the problem.
Can you post the entire debug log?

Clumsy
2009-04-08, 16:22
Sure thing, thanks for looking into it:

http://pastebin.com/m675d7cf0

kees1869
2009-04-08, 17:06
I guess I could read out that environment variable and start direct3d on that adapter.

I checked the latest build and the debug log always shows the adapter to be 0, no matter what I set SDL_FULLSCREEN_HEAD to. Though I think SDL_FULLSCREEN_HEAD never worked for me. I take it, it's supposed to open XBMC on the secondary display and it never did that, UltraMon does do that though.

Debug Log: http://pastebin.com/m3714651

bobo1on1
2009-04-08, 17:27
Then the environment variable is probably not set or set wrong because there's nothing wrong with the code that reads it out.
From your posts I understand you give it to xbmc as an argument, that's not how you set an environment variable!

kees1869
2009-04-08, 17:55
Then the environment variable is probably not set or set wrong because there's nothing wrong with the code that reads it out.
From your posts I understand you give it to xbmc as an argument, that's not how you set an environment variable!

I've set it globally via system properties and it shows the right adapter now. I don't remember why I set it that way, a bit daft of me.

phillyfan1138
2009-04-08, 19:04
Suppose I download the latest svn for linux. Will this smoothvideo downgrade/resample my audio if I use s/pdif? If it does, is it possible to completely turn this feature off?

alanwww1
2009-04-08, 20:18
Just as a help for everyone wants to test the smoothness of his playback here is a part of Star Wars 3, where the text goes scrolling in the beggining. This part shows all possible missed fraes for me.

http://rapidshare.com/files/218809178/Star_Wars_Episode_III_HD_1080psplit-003.mkv

bobo1on1
2009-04-08, 21:23
Suppose I download the latest svn for linux. Will this smoothvideo downgrade/resample my audio if I use s/pdif? If it does, is it possible to completely turn this feature off?
If you care about audio quality, set the synctype to clock feedback, then you'll get some jerks in the video and the audio is completely untouched.

phillyfan1138
2009-04-08, 22:33
If you care about audio quality, set the synctype to clock feedback, then you'll get some jerks in the video and the audio is completely untouched.

Will I get jerks in the video if my monitor is an exact multiple of my video's frame rate?

bobo1on1
2009-04-08, 22:52
Yes, because your soundcard is not synced to the monitor (hence the resampler).

phillyfan1138
2009-04-09, 04:45
So I cannot get smooth 24p video on my 72hz monitor unless I use smoothvideo? And since s/pdif does not work well with smoothvideo, I cannot really get smooth 24p with my current system?

alanwww1
2009-04-09, 12:20
So I cannot get smooth 24p video on my 72hz monitor unless I use smoothvideo? And since s/pdif does not work well with smoothvideo, I cannot really get smooth 24p with my current system?

With skip/duplicate it works with passthrough and i can't hear any sound quality difference. If the refresh rate is very near to the fps i think you can hardly hear the quality difference in sound.

wizzle
2009-04-10, 03:15
Sorry this is a tad off topic, but I was having trouble getting this to build, and I ended up having to change a line from \cores\dvdplayer\DVDPlayerAudio.h

#include "samplerate.h"
to
#include "../../lib/libsamplerate/src/samplerate.h"

Any ideas why I had to make this tweak?

-w

PolliSoft
2009-04-10, 11:31
Sorry this is a tad off topic, but I was having trouble getting this to build, and I ended up having to change a line from \cores\dvdplayer\DVDPlayerAudio.h

#include "samplerate.h"
to
#include "../../lib/libsamplerate/src/samplerate.h"

Any ideas why I had to make this tweak?

-w

Hi,
it is most likely because the release version of the project lacks an include line in the file "project\VS2008Express\XBMC.vcproj" at the line that starts with AdditionalIncludeDirectories. Add "..\..\xbmc\lib\libsamplerate\src" to that line under the release version, and you will be able to build.

olympia
2009-04-10, 16:59
@bobo1on1

From database point of view can we use linuxport and smoothvideo together with the same database on the same computer?

Thanks!

wizzle
2009-04-10, 18:31
Pollisoft - thanks, that was the problem. the path was included for the debug build but not for release.

bobo1on1
2009-04-10, 23:51
@bobo1on1

From database point of view can we use linuxport and smoothvideo together with the same database on the same computer?

Thanks!

That should work ok.

neurosis13
2009-04-12, 02:14
i couldnt make it work. I've read so much in the last days
and i am just confused.
Can someone please post a short and simple how to for the smooth video build.
would be very helpful.
thanks alot guys.

bobo1on1
2009-04-12, 17:10
If you're building on ubuntu, follow the normal procedure for building from svn, except use the smoothvideo url for svn and install libsamplerate0-dev.

neurosis13
2009-04-12, 17:33
i tried the win32 smootvideo branch from here:
http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

XBMCSetup-Rev19297.exe

i run it on windows 7 but i couldnt notice any improvements so far.

bobo1on1
2009-04-12, 17:39
Please read the startpost and check your debug log (don't forget to turn on debug logging).

neurosis13
2009-04-13, 01:35
in the debug i find this:
00:29:59 T:2336 M:1219772416 WARNING: CDVDVideoCodecFFmpeg::Decode - avcodec_decode_video didn't consume the full packet. size: 42936, consumed: 0

could this be the problem?
or what should i look for in the logs?
thanks for hints.

bobo1on1
2009-04-13, 01:48
Until you give me an accurate description of what the problem is and you post a debug log on http://pastebin.com (and post the url here), there's nothing I can do.

neurosis13
2009-04-13, 06:40
thank you, i will try :

here is the log, i hope this helps:
http://pastebin.com/f7d43f2df

some movies cant keep the framerate at 24, its between 21.5-24
so there is jitter every few seconds.
You see it best at the beginning of planet earth, the scene with the birds.

How can i make this scene for example smooth?

bobo1on1
2009-04-13, 15:47
Your computer is too slow to decode that in software (almost all computers are at the moment), this is not the problem that the smoothvideo branch is trying to fix.

seeker83
2009-04-13, 18:19
Yea the planet earth bird scene is notoriously demanding to play! :p

Anyway THANKS bobo for this wonderful update to XBMC, really great work! :grin:



I'm using kees1869's build rev19297 at http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc and it works perfectly! :D Movies are just as smooth as in MPC (with CoreAVC and Haali's splitter/renderer).

Is multithreaded decoding part of the smoothvideo branch or was this build we downloaded a mix of the two? Also I guess this thread is the best place to look for future builds, right? :)



If you can enable triple buffering for opengl in your videocard driver, you should.Finally I felt I should issue a warning about the triple buffer driver setting which probably is great when it works, but it's not working for me. I use a Gigabyte motherboard with 780g chipset (integrated radeon 3200), Windows Vista x64 and latest ATI drivers, and after enabling triple buffering XBMC crashed with a 99% certainty when launching a video. Some times it even crashed on launch. I don't know exactly what the problem is but as long as I don't enable this option everything works fine (MPC wasn't effected by this setting).

Here's the crash log (for the record, in case anyone tries to google the problem, since it's not obvious from the log what the problem is): DEBUG: CPlayerCoreFactory::GetPlayers(F:\movies\sample.mk v)
NOTICE: DVDPlayer: Opening: F:\movies\sample.mkv
WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
DEBUG: thread start, auto delete: 1
DEBUG: thread start, auto delete: 0
NOTICE: Creating InputStream
INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles
DEBUG: CUtil::CacheSubtitles: START
DEBUG: CUtil::CacheSubtitles: Checking for common subirs...
DEBUG: CUtil::CacheSubtitles: Done (time: 0 ms)
DEBUG: CUtil::CacheSubtitles: Searching for subtitles...
DEBUG: CUtil::CacheSubtitles: Done (time: 1 ms)
DEBUG: CUtil::CacheSubtitles: END (total time: 2 ms)
INFO: CDVDFactorySubtitle::GetSubtitles, searching subtitles done
NOTICE: Creating Demuxer
DEBUG: Win32DllLoader::Load(special://xbmc/system/players/dvdplayer/avutil-49.dll)
DEBUG: Win32DllLoader::Load(special://xbmc/system/players/dvdplayer/avcodec-52.dll)
DEBUG: LoadLibraryA('avutil-49.dll')
DEBUG: LoadLibrary('avutil-49.dll') returning: 05E166C8
DEBUG: Win32DllLoader::Load(special://xbmc/system/players/dvdplayer/avformat-52.dll)
DEBUG: LoadLibraryA('avutil-49.dll')
DEBUG: LoadLibrary('avutil-49.dll') returning: 05E166C8
DEBUG: LoadLibraryA('avcodec-52.dll')
DEBUG: LoadLibrary('avcodec-52.dll') returning: 05E16678
DEBUG: CDVDDemuxFFmpeg::Open - probing detected format [matroska]
DEBUG: CDVDDemuxFFmpeg::Open - av_find_stream_info starting
DEBUG: CDVDDemuxFFmpeg::Open - av_find_stream_info finished
INFO: ffmpeg: Input #0, matroska, from 'F:\movies\sample.mkv':
INFO: ffmpeg: Duration: 01:30:18.04, start: 0.000000, bitrate: N/A
INFO: ffmpeg: Stream #0.0(eng): Video: h264, yuv420p, 1920x808, PAR 1:1 DAR 240:101, 24 tbr, 1k tbn, 48 tbc
INFO: ffmpeg: Stream #0.1(eng): Audio: dca, 48000 Hz, 5.1, s16
INFO: ffmpeg: Stream #0.2(eng): Subtitle: 0x0000
NOTICE: Opening video stream: 0 source: 256
NOTICE: Creating video codec with codec id: 28
DEBUG: FactoryCodec - Video: FFmpeg - Opening
DEBUG: Win32DllLoader::Load(special://xbmc/system/players/dvdplayer/swscale-0.6.1.dll)
DEBUG: LoadLibraryA('avutil-49.dll')
DEBUG: LoadLibrary('avutil-49.dll') returning: 05E166C8
INFO: ffmpeg: [w32thread] thread count = 2
INFO: ffmpeg: [w32thread] init semaphors 1
INFO: ffmpeg: [w32thread] create thread 1
INFO: ffmpeg: [w32thread] init semaphors 2
INFO: ffmpeg: [w32thread] create thread 2
INFO: ffmpeg: [w32thread] init done
DEBUG: FactoryCodec - Video: FFmpeg - Opened
NOTICE: Creating video thread
NOTICE: Opening audio stream: 1 source: 256
NOTICE: Finding audio codec for: 86020
DEBUG: FactoryCodec - Audio: passthrough - Opening
DEBUG: thread start, auto delete: 0
DEBUG: Win32DllLoader::Load(special://xbmc/system/players/dvdplayer/libdts.dll)
NOTICE: running thread: video_thread
DEBUG: FactoryCodec - Audio: passthrough - Opened
NOTICE: Creating audio thread
NOTICE: Opening Subtitle stream: 2 source: 256
DEBUG: FactoryCodec - Overlay: Text Subtitle Decoder - Opening
DEBUG: FactoryCodec - Overlay: Text Subtitle Decoder - Opened
DEBUG: thread start, auto delete: 0
DEBUG: Playback has started
NOTICE: running thread: CDVDPlayerAudio::Process()
INFO: Loading skin file: DialogProgress.xml
DEBUG: CGUIInfoManager::SetCurrentMovie(F:\movies\sample. mkv)
DEBUG: Load DialogProgress.xml: 33.57ms
DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_SYNCHRONIZE
ERROR: Can't open the database MyVideos34.db as it is a NEWER version than what we were expecting!
DEBUG: CDVDAudioCodecPassthrough::ParseFrame - source flags changed flags:89 sr:48000 br:1536000
NOTICE: Creating audio device with codec id: 86020, channels: 2, sample rate: 48000, pass-through
INFO: ffmpeg: [h264] Cannot parallelize deblocking type 1, decoding such frames in sequential order
DEBUG: CVideoDatabase::GetMovieId (F:\movies\sample.mkv), query = select idMovie from movie where idFile=1
DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_DELAY(40000.000000)
DEBUG: CVideoDatabase::GetMovieId (F:\movies\sample.mkv), query = select idMovie from movie where idFile=1
DEBUG: CWDSound::direct_sound_enumerator_member_callback - found Device: Primary Sound Driver
DEBUG: CWDSound::direct_sound_enumerator_member_callback - found Device: Realtek HDMI Output (ATI HDMI Audio)
DEBUG: CWDSound::direct_sound_enumerator_member_callback - found Device: Realtek Digital Output (Realtek High Definition Audio)
DEBUG: CAudioContext::SetActiveDevice - selecting Realtek HDMI Output (ATI HDMI Audio) as output devices
DEBUG: CGUIInfoManager::SetCurrentMovie, got movie info!
DEBUG: Title = Sample
DEBUG: CDVDPlayerVideo - CDVDMsg::GENERAL_RESYNC(125000.000000, 0)
NOTICE: fps: 24.000000, pwidth: 1920, pheight: 808, dwidth: 1920, dheight: 808
DEBUG: CDVDPlayerVideo::OutputPicture - change configuration. 1920x808. framerate: 24.00
NOTICE: Display resolution AUTO : 1920x1080 @ 24.00Hz (42)
WARNING: Upscale: selected algorithm 1
DEBUG: GL: Requested render method: 1
NOTICE: GL: ARB shaders support detected
NOTICE: GL: Selecting Single Pass ARB YUV2RGB shader
NOTICE: GL: No vertex shader, fixed pipeline in use
NOTICE: GL: NPOT texture support detected
DEBUG: GL: Creating Y NPOT texture of size 1920 x 808
DEBUG: GL: Creating U NPOT texture of size 960 x 404
DEBUG: GL: Creating V NPOT texture of size 960 x 404
DEBUG: GL: Creating Y NPOT texture of size 1920 x 808
DEBUG: GL: Creating U NPOT texture of size 960 x 202
DEBUG: GL: Creating V NPOT texture of size 960 x 202
DEBUG: GL: Creating Y NPOT texture of size 1920 x 808
DEBUG: GL: Creating U NPOT texture of size 960 x 202
DEBUG: GL: Creating V NPOT texture of size 960 x 202
DEBUG: GL: Creating Y NPOT texture of size 1920 x 808
DEBUG: GL: Creating U NPOT texture of size 960 x 404
DEBUG: GL: Creating V NPOT texture of size 960 x 404
DEBUG: GL: Creating Y NPOT texture of size 1920 x 808
DEBUG: GL: Creating U NPOT texture of size 960 x 202
DEBUG: GL: Creating V NPOT texture of size 960 x 202
DEBUG: GL: Creating Y NPOT texture of size 1920 x 808
DEBUG: GL: Creating U NPOT texture of size 960 x 202
DEBUG: GL: Creating V NPOT texture of size 960 x 202
DEBUG: CWin32DirectSound::Initialize - secondary sound (stream)buffer created
DEBUG: CDVDPlayerAudio:: Discontinuty - was:200000.000000, should be:-71499.997914, error:-271499.997914
DEBUG: Activating window ID: 12005
DEBUG: Checking if window ID 12005 is locked.
INFO: Loading skin file: VideoFullScreen.xml
DEBUG: Load VideoFullScreen.xml: 1.62ms
DEBUG: Alloc resources: 1.70ms (1.69 ms skin load, 0.00 ms preload)
INFO: Loading skin file: VideoOSD.xml
DEBUG: Load VideoOSD.xml: 3.94ms
DEBUG: Alloc resources: 39.91ms (0.00 ms skin load, 1.83 ms preload)
INFO: Loading skin file: VideoOSDSettings.xml
DEBUG: Load VideoOSDSettings.xml: 2.46ms
DEBUG: CDVDPlayerAudio - CDVDMsg::GENERAL_RESYNC(85000.000000, 1)
DEBUG: Alloc resources: 105.78ms (0.00 ms skin load, 0.53 ms preload)
INFO: Loading skin file: VideoOSDSettings.xml
DEBUG: Load VideoOSDSettings.xml: 2.45ms
DEBUG: Alloc resources: 0.27ms (0.00 ms skin load, 0.06 ms preload)
INFO: GL: Enabling VSYNC
INFO: GL: Using artificial vsync sleep with rate 24.000000
INFO: GL: Selected vsync mode 2
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: exception in CApplication::Render()
ERROR: CApplication::Render(), too many exceptions
FATAL: EXCEPTION_ACCESS_VIOLATION (0xc0000005)
at 0x690737dd(I removed the timestamps since the post became too long)

bobo1on1
2009-04-13, 21:37
Triple buffering is no longer needed, because the algorithm changed considerably a while ago.

neurosis13
2009-04-13, 21:56
Your computer is too slow to decode that in software (almost all computers are at the moment), this is not the problem that the smoothvideo branch is trying to fix.

ok i see, thanks for the info,
at least i dont have to get crazy about it at the moment.

kees1869
2009-04-14, 01:43
I put some new smoothvideo builds online (WIN), a regular build and one where I've disabled the monitor standby while XBMC is running (handy for dual display setups).

These are revision 19434, see the xbmc trac timeline (http://xbmc.org/trac/timeline) for a list of changes since the last build.

Link: http://www.mediafire.com/?sharekey=7641aa7a97b79def67cd7f7bd65f7eeffd2e9b32 4de11e2ec95965eaa7bc68bc

neurosis13
2009-04-14, 02:59
thanks alot for the builds,
i have a question:

XBMCSetup-Rev19434(mod).exe

what are the differences between mod an no mod?

kees1869
2009-04-14, 06:43
thanks alot for the builds,
i have a question:

XBMCSetup-Rev19434(mod).exe

what are the differences between mod an no mod?

The mod one prevents the display from going to standby while XBMC is running. I have a dual display setup and when my PC display goes into standby it also disables XBMC on my TV (which is annoying when watching a movie).

sensei73
2009-04-14, 21:21
Hi there!
Thanks again bobo1on1 for smoothvideo I use it everyday and it's just perfect!!! It's a pity that it cannot be in the 9.04 final!!!
19466--->about this changeset, does it solve the decoding bug with version above ubuntu 8.04?? I can't post anyresult because I'm stuck with 8.04 becvause of this bug!

neurosis13
2009-04-14, 23:21
The mod one prevents the display from going to standby while XBMC is running. I have a dual display setup and when my PC display goes into standby it also disables XBMC on my TV (which is annoying when watching a movie).

i noticed this behaviour, very good idea.
thumbs up.

alanwww1
2009-04-15, 02:01
@Bobo1on1

What is this scheduling workaround for multithreading ?

http://xbmc.org/trac/changeset/19466

Does it solve the Intrepid multithreaded video decoding problem ?

Would be awsome !

bobo1on1
2009-04-15, 03:05
It balances the cpu load but I've never had 1080p decoding without the bug so I can't say for sure, it's an attempt to fix it.

alanwww1
2009-04-15, 13:12
It balances the cpu load but I've never had 1080p decoding without the bug so I can't say for sure, it's an attempt to fix it.

The bug was not there on Hardy. Only on Intrepid and Jaunty. Somehow the entrophy CABAC patch xbmc uses to make semi multithreading for x264 don't work properly with newer Ubuntu libs.

Thanks for trying to solve this problem. I will test it tonight.

LolitaRainking
2009-04-15, 20:23
I just wanted to let you know that on my rig (c2d 2.16 with radeon HD4550) this runs perfect now. Yesterday I accidentaly started the ordinary branch, and let me tell you - boy, that's like night and day. I love this branch!!! I'd kiss you if I got a chance, and I'm straight!

noeikujoo
2009-04-16, 08:31
@Bobo1on1

What is this scheduling workaround for multithreading ?

http://xbmc.org/trac/changeset/19466


This scheduling workaround solved the Intrepid multithreaded decoding problem on my HTPC (c2d 2.4 with GeForce 8400GS). I tested yesterday new version and h264 1080p MKVs runs smoothly at normal framerate and core loads were almost even, framedrops were the only ones generated at the begining of the playing but not increasing at all while the whole of the movie. Now I can run XBMC without VDPAU. I noticed that playback is much more smoother with software decoding than with VDPAU. MKVs with embedded subtitles and auto refresh rate began to work when I disabled VDPAU.

alanwww1
2009-04-16, 09:51
I only tested one 1080p file with the scheduling workarund, but is only helping to share the loads between the two cores, but the loads don't go higher than max 65-65% for eighter of the cores i have the same amount of framedrops as without the workaround.

On hardy with the same file i have 90-90 % core utilization with no framedrops. I think the problem is not the utlization sharing of the two cores it is more the problem of having the decode process sequential. The two threads are waiting each other to finish. This is why we can not utilize the whole of the cpu times. This is why so far it does not matter if the two threads are waiting for each other on the same core or on a different core.

It is just like if you try a 100% one core written code on a quad core processor you will surely not see more than 25% CPU utilization per core.

On xbmc we only see more than 50-50% because we have some other running processes like audio decodeing and ubuntu base daemons.

So i think we should be dig more into the code of the xbmc cabac patch for ffmpeg what's causing this behaviour.

About vdpau smoothness i realized that with latest nvidia driver and strict binding turned on in advancedsettings.xml i have an almost perfect playback, but when i turn on any .SRT subtitles it starts to stutter. I have to make more tests to confirm this. I will make some test files so everyone could debug this situation. I think it is more the problem of the vdpau decoding than the smoothvideo branch.

noeikujoo
2009-04-16, 11:10
I tested many 1080p files and the loads went higher than 65% on my setup. I got only three to five dropped frames when playing "killa sample". The loads were not still even (70% and 97%), when frames were dropped, but more even as before workaround. Other tested 1080p files plays fine without dropped frames. Before workaround frames were dropped almost all h.264 1080p files if not using VDPAU.

alanwww1
2009-04-16, 12:46
I tested many 1080p files and the loads went higher than 65% on my setup. I got only three to five dropped frames when playing "killa sample". The loads were not still even (70% and 97%), when frames were dropped, but more even as before workaround. Other tested 1080p files plays fine without dropped frames. Before workaround frames were dropped almost all h.264 1080p files if not using VDPAU.

I make som efurther testing today. I tried a high bitrate 20-30mps Dark Knight BD rip, which plays just fine iwth Hardy around 90-90 % Core utilization, but with Jaunty i can't get to work without dropped frames. I will check it without audio resampling enabled, because i think it could also take ups some CPU time.

sensei73
2009-04-16, 13:09
tips --=>if you guys run with a dedicated htpc, just stick with hardy!!! It's working really great here!

noeikujoo
2009-04-16, 15:29
I make som efurther testing today. I tried a high bitrate 20-30mps Dark Knight BD rip, which plays just fine iwth Hardy around 90-90 % Core utilization, but with Jaunty i can't get to work without dropped frames. I will check it without audio resampling enabled, because i think it could also take ups some CPU time.
I noticed that you are using Jaunty and I'm running XBMC on Intrepid. Maybe there is some difference between Jaunty and Intrepid on Core ulitization?

What revision of XBMC smoohtvideo you are running? Yesterday I tested earlier downloaded 19466 revision. Just a moment ago I noticed that newer 19485 revision has some modifications on "thread scheduling workaround" -> http://xbmc.org/trac/changeset/19485/branches/smoothvideo

alanwww1
2009-04-16, 17:34
I noticed that you are using Jaunty and I'm running XBMC on Intrepid. Maybe there is some difference between Jaunty and Intrepid on Core ulitization?

What revision of XBMC smoohtvideo you are running? Yesterday I tested earlier downloaded 19466 revision. Just a moment ago I noticed that newer 19485 revision has some modifications on "thread scheduling workaround" -> http://xbmc.org/trac/changeset/19485/branches/smoothvideo

I think my revision was higher than this modification. I will test more tonight when i get home.

wizzle
2009-04-17, 02:06
Hey guys, I've got a quick compiling question. I'm a little unclear of the correct workflow: Should I be merging the Smoothvideo branch with the main linuxport prior to compiling? Or will it already be in sync with the linuxport changes?

bobo1on1
2009-04-17, 02:39
I keep it in sync every few days or so.

ERamseth
2009-04-20, 14:31
I plan on testing out the smoothvideo branch this evening when I get home from work but I have some (dev/debug newbie) questions...




Is there a way to output to a log or screen the exact # or % of dropped frames?
Is there a way to see CPU utilization(s) on screen while playing a file in XBMC? (I thought the "o" key for "codec info" would do it, but this just causes a crash on my rig as of last night)
How do I grab the branch exactly (guessing [I]svn co http://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/smoothvideo)?
Do I need to merge smoothvideo branch with linuxport branch as mentioned above? If so/not, why/why not? Are there advantages/disadvantages to merging/not merging?
Do I need strictbindings (saw references to it)? If so, how do I enable (also saw references on how to enable strictbindings, but some conflicted with others... just wanted to be sure)?


Side note: Thanks for all the hard work. Hopefully smoothvideo can help with my problems as described here: http://xbmc.org/forum/showthread.php?t=49235

bobo1on1
2009-04-20, 15:51
1. You can see dropped frames when you press o, keep in mind that jerks are usually not caused by frame drops.
2. Turn on debug logging, or run 32 bit linux so it doesn't crash.
3. Yes.
4. I keep it updated every few days or so, you can merge it yourself but it can seriously break things. Follow this rule of thumb: if you have to ask about it, don't do it.
5. I have no idea.

ERamseth
2009-04-20, 15:55
2. Turn on debug logging, or run 32 bit linux so it doesn't crash.

Is that just the setting in xbmc menus? I think I've seen it there.

alanwww1
2009-04-20, 23:51
@Bobo1on1

I have the branch up and working for days now without noticable problems.
The one thing i can not get perfect is VDPAU playback smoothly.
If i turn in VDPAU with smoothbranch i have smooth playback until i put some srt subtitles on the screen. After that there starts the stutterings. I think maybe it is more a problem of the VDPAU implementation than the smoothvideo branch. Do you have any idea why another surface over the original makes things worse ?

Great work anywa, thanks,

Alan

Bagger
2009-04-22, 22:09
Straight to the point.
How do I know that the "smoothvideo" version has installed ?

On the very first page " It's on by default, under Settings->System->Audio hardware you can set the sync type and the maximum speed adjust percentage when Resample is selected." > I dont get any of these options.

Im running a minimal install of hardy. It started of with XBMC 8.10 svn 16164.
Then upgraded to 9.04 Beta 1 svn19608. I followed the instructions HERE (https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/smoothvideo/XBMC/README.linux) , Every thing seemed to install ok> but I still get mini stutters and no options like above.
Then after reading above ERamseth says he used this address "svn co http://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/smoothvideo" which is different to the one in the instructions. After compiling and installing nothing changed.
Obviously I`m not doing something quite right and being new to Linux I cant put my finger on it.

My system
C2D @2.4GHz
2GB ram
Asus 9400GT 512 MB ( nvidia 185.19 Drivers)

thanks

bobo1on1
2009-04-22, 22:50
You probably have xbmc installed in /usr and smoothvideo installed in /usr/local or something, either remove the other xbmc or start xbmc.bin directly from the smoothvideo directory.

Bagger
2009-04-23, 17:29
You probably have xbmc installed in /usr and smoothvideo installed in /usr/local or something, either remove the other xbmc or start xbmc.bin directly from the smoothvideo directory.


A bit of a schoolboy error on my behalf, I was compiling from XBMC dir not smoothvideo/XBMC...doh

but now when I use the configure " ./configure --prefix=/usr --disable-pulse "
It tells me theres a library missing
"checking for main in -lsamplerate... no
configure: error: ERROR: Could not find a required library. Please see README.linux"

alanwww1
2009-04-23, 17:33
A bit of a schoolboy error on my behalf, I was compiling from XBMC dir not smoothvideo/XBMC...doh

but now when I use the configure " ./configure --prefix=/usr --disable-pulse "
It tells me theres a library missing
"checking for main in -lsamplerate... no
configure: error: ERROR: Could not find a required library. Please see README.linux"

sudo apt-get install libsamplerate-dev

if i remember well....

Bagger
2009-04-23, 17:51
sudo apt-get install libsamplerate-dev

if i remember well....

Thanks... thats the one :)

kees1869
2009-04-25, 11:56
I put some new smoothvideo builds online (WIN), a regular build and one where I've disabled the monitor standby while XBMC is running (handy for dual display setups).

These are revision 19691, see the xbmc trac timeline (http://xbmc.org/trac/timeline) for a list of changes since the last build.

Regular: http://www.sendspace.com/file/px0lgs

Mod: http://www.sendspace.com/file/s6g1ag

ERamseth
2009-04-25, 22:25
Is there any possibility of problems being caused by sharing a ~/.xbmc directory between smoothvideo and linuxport?

Hitcher
2009-04-25, 22:50
Just tried the latest build from kess and I'm really happy to report it's finally working on my set up using ATI Radeon HD 2400.

I've narrowed it down to this settings -

'Use VBlank as clock'

With that disabled I don't see any 'CVideoReferenceClock' references in the log but when it's on I do and they work perfectly now.

CVideoReferenceClock: Detected refreshrate: 24 hertz
CVideoReferenceClock: Displaymode changed
CVideoReferenceClock: Cleaning up Direct3d
CVideoReferenceClock: Setting up Direct3d on adapter 0
CVideoReferenceClock: Detected refreshrate: 24 hertz

bobo1on1
2009-04-26, 01:17
Is there any possibility of problems being caused by sharing a ~/.xbmc directory between smoothvideo and linuxport?
There should be no problems with that.

Just tried the latest build from kess and I'm really happy to report it's finally working on my set up using ATI Radeon HD 2400.

I've narrowed it down to this settings -

'Use VBlank as clock'

With that disabled I don't see any 'CVideoReferenceClock' references in the log but when it's on I do and they work perfectly now.

CVideoReferenceClock: Detected refreshrate: 24 hertz
CVideoReferenceClock: Displaymode changed
CVideoReferenceClock: Cleaning up Direct3d
CVideoReferenceClock: Setting up Direct3d on adapter 0
CVideoReferenceClock: Detected refreshrate: 24 hertz
That's what that option is supposed to do, nice to hear it's finally working for you.

anderskkan
2009-04-26, 06:12
Could you please take a look at this "problem" and see if the "provided" solution could be a reality. That in conjunction with the smoothbranch would be great.

http://xbmc.org/forum/showthread.php?p=323545#post323545

Hitcher
2009-04-26, 10:56
That's what that option is supposed to do, nice to hear it's finally working for you.

Cheers, and thanks.

garvani
2009-04-28, 15:09
Im having allsorts of problems with tearing in windows.. Only on my secondary screen though (1360x768) , no tearing is present if i play on my primary monitor (1920x1080). mpchc will obviously play fine on secondary screen, but for a seamless movie experience by remote I really would rather not go down the external player branch.
Ive tried what i think is everything before asking for help, changed a lot of settings from the jittery video thread and every other thread ive came across, but no luck as of yet. I have just downloaded kees latest smoothvideo windows build with the same problem.. In that I dont get any CVideoReferenceClock in the logs.

If someone could just spare 5 minutes and look over the settings and the log i would appreciate it!

So these are the settings ive got at the moment:

Have left default smoothvideo settings alone.
xbmc vsync option - driver decide
ati option - on unless application specify
tripple buffering is off

Hardware and software:
Ati HD4830..
Windows 7 7057
Latest 9.4 ati catalyst
Kees windows build of smoothvideo branch - xbmc revision 19691
Primary display is 1920x1080 monitor but outputting via dvi-hdmi to 42" Samsung lcd secondary screen running at 1360x768 @ 60hz, have used ultramon to get xbmc on other screen, have set xbmc to 1360x768@60hz.

Using a 24fps SD test file.. "Taken" Mainly because it takes less than 10 seconds to see if its tearing or not.. the fps of the video playing is ~24fps.. i read that it should be the refresh rate of the screen?

Heres my xbmc log
http://pastebin.com/m466675f2

ashlar
2009-04-29, 03:16
There should be no problems with that.


That's what that option is supposed to do, nice to hear it's finally working for you.I get those lines in the log but even with no frames dropped I get stuttering from time to time... is there anything major left over for development or in your opinion this should be ready for prime time?
Meaning: should I worry or is this still heavily under development?

Edit: here's the log http://xbmc.pastebin.com/f29c7350e
I have triple buffering disabled, vsync forced on in the Nvidia control panel (8800GT - drivers 182.08, XP SP3), "let drivers decide vsync" inside XBMC. I selected medium quality resampling. Using an X-Fi analog out.
The sample played is the beginning of Wall-E where it's really easy to detect stuttering... it's as if the video lags behind from time to time, I can't better put it in words.

bobo1on1
2009-04-29, 04:19
Im having allsorts of problems with tearing in windows.. Only on my secondary screen though (1360x768) , no tearing is present if i play on my primary monitor (1920x1080). mpchc will obviously play fine on secondary screen, but for a seamless movie experience by remote I really would rather not go down the external player branch.
Ive tried what i think is everything before asking for help, changed a lot of settings from the jittery video thread and every other thread ive came across, but no luck as of yet. I have just downloaded kees latest smoothvideo windows build with the same problem.. In that I dont get any CVideoReferenceClock in the logs.

If someone could just spare 5 minutes and look over the settings and the log i would appreciate it!

So these are the settings ive got at the moment:

Have left default smoothvideo settings alone.
xbmc vsync option - driver decide
ati option - on unless application specify
tripple buffering is off

Hardware and software:
Ati HD4830..
Windows 7 7057
Latest 9.4 ati catalyst
Kees windows build of smoothvideo branch - xbmc revision 19691
Primary display is 1920x1080 monitor but outputting via dvi-hdmi to 42" Samsung lcd secondary screen running at 1360x768 @ 60hz, have used ultramon to get xbmc on other screen, have set xbmc to 1360x768@60hz.

Using a 24fps SD test file.. "Taken" Mainly because it takes less than 10 seconds to see if its tearing or not.. the fps of the video playing is ~24fps.. i read that it should be the refresh rate of the screen?

Heres my xbmc log
http://pastebin.com/m466675f2

If you want to get the CVideoReferenceClock lines in the debug log you have to turn on debug logging under Settings->System->Hardware.
I don't know how to fix your problem, other than switching the primary and secondary monitors when you start xbmc.
Smoothvideo isn't going to help you get vsync.

I get those lines in the log but even with no frames dropped I get stuttering from time to time... is there anything major left over for development or in your opinion this should be ready for prime time?
Meaning: should I worry or is this still heavily under development?

Edit: here's the log http://xbmc.pastebin.com/f29c7350e
I have triple buffering disabled, vsync forced on in the Nvidia control panel (8800GT - drivers 182.08, XP SP3), "let drivers decide vsync" inside XBMC. I selected medium quality resampling. Using an X-Fi analog out.
The sample played is the beginning of Wall-E where it's really easy to detect stuttering... it's as if the video lags behind from time to time, I can't better put it in words.

Try playing some 25 fps video, my guess is the video you're playing has either strange timestamps or the frame duration is a little off.

ashlar
2009-04-29, 04:28
Try playing some 25 fps video, my guess is the video you're playing has either strange timestamps or the frame duration is a little off.I have few 25fps ones... also, I had problems with other videos as well, not just Wall-E.

Bagger
2009-04-29, 15:57
The Skip/duplicate option.

Am I corrrect in assuming this option is so I can still have DD and DTS audio and the correct frame rate video.

With this option set 24 FPS movies play nice and smooth at 25 FPS and I still get DTS sound but now instead of the video judder I get an audible tap tap tap on the sound.
Is this how it is ?

lixe
2009-04-29, 18:15
Hello,
I'm new to linux, is there a How-To to set this one up? I'm using Jaunty and the latest SVN. Would be very nice if some could tell me how to install this =)

ubiq
2009-04-29, 18:24
There is something strange about the latest updates to the smoothvideo branch. I was using revision 19504 without any problems, but today decided to upgrade to the latest revision 19710 because you had merged with linuxport 19632 that included the fix to export tv-shows. After upgrading all my videos (23,976fps, 24fps, 25fps and 30fps) started to have occasional framedrops. The video froze for a small amount of time (not stuttering, more of a lockup) and sound went funny for that moment. OSD showed that fps dropped and some frames dropped too. I reverted back to revision 19504 and now all the problems are gone (problems caused by smoothvideo).

Here (http://pastebin.com/m1b94bd1d) is the debug log. I don't know why it says SVN:19809 in the log? I checked out smoothvideo branch when I did a clean install to my HTPC and now I just did:

1. svn up
2. make clean
3. ./configure --prefix=/usr --disable-pulse
4. make -j2
5. sudo make install

All that was done in my users XBMC folder that the initial checkout created. I have read that this is the way to upgrade, but did I mess something up or did svn up grab the latest linuxport? That could explain why my video playback started to behave strangely but somehow I doubt that 'cos when I reverted back to older build with svn up -r 19504 in the same XBMC folder it gave me the build from the smoothvideo branch?

Ubuntu Intrepid 8.10
Alsa-1.0.19
NVIDIA-Linux-x86-185.19

bobo1on1
2009-04-30, 00:12
I have few 25fps ones... also, I had problems with other videos as well, not just Wall-E.
Could be just a side-effect of not using a realtime operating system, I'm not sure there's much I can do about it.
Also windows doesn't provide a vblank counter or even a vblank signal, so I have to keep polling GetRasterStatus which is not very efficient.

The Skip/duplicate option.

Am I corrrect in assuming this option is so I can still have DD and DTS audio and the correct frame rate video.

With this option set 24 FPS movies play nice and smooth at 25 FPS and I still get DTS sound but now instead of the video judder I get an audible tap tap tap on the sound.
Is this how it is ?
Check the debug log and see if the refreshrate was detected correctly.

Hello,
I'm new to linux, is there a How-To to set this one up? I'm using Jaunty and the latest SVN. Would be very nice if some could tell me how to install this =)
Install it the same way as linuxport except use the smoothvideo url and install libsamplerate0-dev

There is something strange about the latest updates to the smoothvideo branch. I was using revision 19504 without any problems, but today decided to upgrade to the latest revision 19710 because you had merged with linuxport 19632 that included the fix to export tv-shows. After upgrading all my videos (23,976fps, 24fps, 25fps and 30fps) started to have occasional framedrops. The video froze for a small amount of time (not stuttering, more of a lockup) and sound went funny for that moment. OSD showed that fps dropped and some frames dropped too. I reverted back to revision 19504 and now all the problems are gone (problems caused by smoothvideo).

Here (http://pastebin.com/m1b94bd1d) is the debug log. I don't know why it says SVN:19809 in the log? I checked out smoothvideo branch when I did a clean install to my HTPC and now I just did:

1. svn up
2. make clean
3. ./configure --prefix=/usr --disable-pulse
4. make -j2
5. sudo make install

All that was done in my users XBMC folder that the initial checkout created. I have read that this is the way to upgrade, but did I mess something up or did svn up grab the latest linuxport? That could explain why my video playback started to behave strangely but somehow I doubt that 'cos when I reverted back to older build with svn up -r 19504 in the same XBMC folder it gave me the build from the smoothvideo branch?

Ubuntu Intrepid 8.10
Alsa-1.0.19
NVIDIA-Linux-x86-185.19
Update from svn and try again, I tried out something to compensate for an unreliable glXWaitVideoSyncSGI but it wasn't working that well.

Bagger
2009-04-30, 00:22
Got a strange problem.

Smooth video only seems to work the once.
ie if I boot up all at default setting (as a fresh install would give ) play a 24fps DTS movie, it plays with "Jerk o vision" as expected. I then stop the movie select skip/duplicate play the movie again and its fine 25fps,DTS sound ( with tapping).
But if I stop the movie and either start it again or another 24fps movie its back to "Jerk o vision"
The only way to get it back is to reselect the resample option play a movie, stop the movie, reselect skip/duplicate and play it again.

And to get even wierder if I select the debugging mode I cant get smoothvideo to work at all.( managed to turn it on while playing though)
http://www.pastebin.ca/1407832

SVN 9.04 beta1 r19809
Ubuntu 8.04 minimal install
NVidia Drivers 185.19

bobo1on1
2009-04-30, 01:18
You're playing a 24 fps movie at 50 hertz and you're using passthrough with the resample option which doesn't work (it defaults to clock feedback).

Either use a better refreshrate (60, 48 or 24 hertz) and use skip/duplicate or disable passthrough and use resample.

Bagger
2009-04-30, 02:22
You're playing a 24 fps movie at 50 hertz and you're using passthrough with the resample option which doesn't work (it defaults to clock feedback).

Either use a better refreshrate (60, 48 or 24 hertz) and use skip/duplicate or disable passthrough and use resample.

Sorry if you didnt get the jist of my post.
In order for me to use skip/duplicate I have to set resample then play, stop then select skip/duplicate then play again else it doesnt do any thing.

Doing things like above makes 24fps movies play @ 25 fps with pass through using skip/duplicate.

If I dont use the above method then using skip/duplicate just plays 24fps movie @ 24fps.

Or are you saying that 24fps movie doesnt work @50Hz with skip/duplicate.Or is it the 50Hz causing the dodgey sound

Unfortunatly my TV doesnt support 24 or 48. If it did then I wouldnt have to use smoothvideo any way.....would I ?