Skip to content
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

three.js streaming video materials with videojs for 360 video #8216

Closed
gak2 opened this issue Feb 24, 2016 · 12 comments
Closed

three.js streaming video materials with videojs for 360 video #8216

gak2 opened this issue Feb 24, 2016 · 12 comments

Comments

@gak2
Copy link

gak2 commented Feb 24, 2016

Hi there,

I am attempting to combine threejs with videojs, in order to map streamed 360 video onto a sphere. Wowza is the media streamer.

So I create a video tag, convert it to a videojs object in order to facilitate HLS/DASH streaming, then set that stream as the source for a three.js video material. I can stream over HLS into this videojs object OK:

var gPlayer = videojs('gVideo');
gPlayer.src = "http://localhost:1935/vod/sample/playlist.m3u8";
gPlayer.play();

And separately, I can wrap an mp4 file around a sphere OK

var texture = new THREE.VideoTexture( threeVideo );
texture.generateMipmaps = false; 
texture.magFilter = THREE.LinearFilter; 
texture.minFilter = THREE.LinearFilter;
var material   = new THREE.MeshBasicMaterial( { map : texture } );

But the moment I try to combine these two, by mapping that streaming source to three.js ..

threeVideo.src = "http://localhost:1935/vod/sample/playlist.m3u8";
threeVideo.type="application/x-mpegURL"

.. I get all manner of errors:

WebGL: INVALID_VALUE: texImage2D: no video
255(index):1 [GroupMarkerNotSet(crbug.com/242999)!:24FC430C]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.

Any thoughts? Thanks you!!

@makc
Copy link
Contributor

makc commented Feb 25, 2016

yeah, m3u is not a video, it is a text file that says where the video is

@gak2
Copy link
Author

gak2 commented Feb 25, 2016

Thank you for the feedback.

As it happens, this wasn't the problem: I have three.js now streaming the .m3u8 URL.

Anyway, not a bug after all - thanks for your help.

@varumora
Copy link

May I ask how did you managed to get the video texture from videojs and pass it to three.js? I'm trying to do it too but with no success. Thanks :)

@oschvr
Copy link

oschvr commented Jul 5, 2016

I'd like to know too gak2

@GurudathTS
Copy link

Hello,

Any solution for this issue?

@DiogenesSyndrome
Copy link

DiogenesSyndrome commented Sep 19, 2016

Hello there,
Did any of you guys manage to find a solution ?
I am also very interested

Thanks

@oschvr
Copy link

oschvr commented Sep 19, 2016

@DiogenesSyndrome
Copy link

Thanks a lot for the quick answer, ostocino.
However, my problem is slightly different; I am trying to map a RTSP stream as a texture on a sphere, not an HLS. The goal is also to be able to play in on VR googles (Oculus).
Do you have any ideas for that ? Or anyone else ?

@danrossi
Copy link

@gak2. Minus the CORS issue HLS was working but suddenly now on Safari Yosemite, IOS 9, WebView it is not rendering. No webgl errors, nothing. Just a black screen. Switching back to the video element it is displaying.

Any ideas ?

@danrossi
Copy link

please refer here #9754

@Len0re
Copy link

Len0re commented Dec 26, 2017

Hey! This is EXACTLY what I'm trying to achieve in the past month, and with very little success... Can someone help? I'm also using wowza/videojs for this.

@gak2 can you please tell us how you did it? Thanks!!

@danrossi
Copy link

I'm keeping this thread active and cross posting my active tickets with webkit.

#9754

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

9 participants