Skip to content

DS video player is slow #4708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
arturoc opened this issue Dec 30, 2015 · 4 comments
Open

DS video player is slow #4708

arturoc opened this issue Dec 30, 2015 · 4 comments

Comments

@arturoc
Copy link
Member

arturoc commented Dec 30, 2015

it's doing a swap and mirror in the cpu by default it also does the color space conversion in the CPU. we could add support for OF_PIXELS_NATIVE which would upload the pixels as they are directly to a texture and use the new facilities in the programmable renderer to do the colorspace conversion there. also the mirroring could happen there by providing it's own textures and marking them as inverted

@ofTheo
Copy link
Member

ofTheo commented Feb 13, 2016

Another option could be to look at the newer WMF API going forward - I think it has native H264 support so wouldn't require a codec pack just to play the files included in the examples.

I know there is ofxWMFVideoPlayer - and I think @DomAmato has been doing some updates ( https://github.com/DomAmato/ofxWMFVideoPlayer/commits/master ) to make it have more parity with the DS based one.

@DomAmato are there any outstanding issues or reasons that the current DS one is preferable over a WMF approach?

@DomAmato
Copy link
Contributor

Reverse playback is sort of hit or miss depending on codec. To switch between it is a little odd too if i remember correctly as it polls the system if a playback rate is supported and if frame thinning is needed. I know some people had decent luck with fast playback rates and even reverse playback rates but I can for sure say that I have had some files not play in reverse at all. An easy test is the video example that comes with OF, I will say it runs large format video files much better though maybe that is due to to the computational overhead that @arturoc outlined.

@charlesveasey
Copy link
Contributor

I had some trouble with ofxWMFVideoPlayer and videos > 2K x 2K. They didn't play back. DS video player worked but was slow. I'm guessing this is related to max texture size on the GPU?

@DomAmato
Copy link
Contributor

its possible, i didn't write the presentation engine behind it obviously but I am pretty sure it was mutated from the Windows SDK examples and the NVidia interop examples. Thats where I got the playback rate from and the rest of the class looks similar to it. We could have both as options like the of sound steam API option and have it default to WMF since it supports more codecs. Seemed like every week a new forum post started with windows and video playback errors :|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants