About ofVideoPlayer


#1

I am developing video + opencv player in web.
like this

http://monkeytalk.jp/wa/OFNewPlayer.html?http%3A%2F%2Fmonkeytalk.jp%2Ffiles%2Fvideos%2F2018%2F10%2F08%2F153900335055956-sd.mp4

you can play video by pushing start button in center toolbar.
and select another video from this

http://monkeytalk.jp

But some video stop suddenly in playing.
I think this is come from high cpu ratio.
I think best solution is using thread but now emscripten cannot use it.

So I want to change a ofVideoPlayer to another one.
Do you know good one?
or
Now,I am reading videos by ofVideoPlayer.load (Http…)
Is it bad ?
Should I change it loadasync?
or
Does ofVideoPlayer have low CPU option?


#2

ofVideoPlayer on the web uses an html video element so it’s the fastest you can use, if you are using opencv the high cpu usage probably comes from using opencv rather than from ofVideoPlayer

What i would do is implement the filters using shaders rather than opencv if cpu usage is a problem


#3

Ok I wll try shader
So I will try examples/shader at first.

By the way ,when I start playing video ,Some video don’t show pictures.
I think It comes from ofVideoPlayer.load (Http…)
Should I change it to loadasync?

Thank you arturo.


#4

no, loadasync doesn’t have any effect on the web cause load is always asynchronous there


#5

I gave up to user shader.
Reason:
I want to add catoon like effect to image.
But I cannot find good method to use with shader.
I found this method ,but this way need 3D data.
Do you know another one?


#6

I found even if I commented out all opencv draw code .ofVideoPlayer stoped to show sometimes.
(It often begin in chrome)
So I think between ofVideoPlayer and network have some reason to stop.
But I don’t want to say network is too weak.
Because I opened directly http://…*.mp4 ,it showed well.
Do you know about this?