360 VIDEO PLAYER (with VR mode) - Unity Tutorial
Вставка
- Опубліковано 8 лют 2025
- ▶ Support my work and grab the source code on patreon : / valemvr
▶ Join the Valem discord channel : / discord
In this quick tutorial we are learning how to create a 360 viewer inside unity for 360 video and photos. We will implement a simple User Interface to watch the video and we will make it support Virtual Reality headset such as Oculus Rift and HTC Vive.
Introduction music : "All That" by "bensound.com"
where was this beautiful masterpiece a few years ago... wait, it was a few years ago...!
if you cannot find the lighting then click window and rendering
thanks
Great tutorial, nice one!
U LITERALLY SAVED ME
thank you so much for this!
It works! thanks! The only thing that is "wrong" is that when I look up or at the ground the video image is distorted. View the 360 video dimensions in the video properties in VLC player to set the texture size. (4096 x 1344), can anyone help with this?
merci merci merci ! It demystifies it . So passing by adobe Première is not a necessity great stuff
Thank you so much, awesome video! YOU ROCK!
I found it. I hope it works with the new version you just taught me how to use. Re-subscribing:)
Thank you for this easy tutorial! I like your accent as well :P
Great !
Oh, thank you.
Thank you for this tutorial. Can you please explain how to LIVE stream a video in unity? What are the methods to do
Thank you, very useful tutorial.
can we change camera height becoz we feel like we are not standing in ground.
Hey cool video! Is it possible to insert objects I can interact with in unity while having a 360 video playing as background?
Hi, this is a great tutorial, if you need to play a VR movie with up and down image, how can you do it?
How to do a walk through in a vr video is it possible ?
can you update it
hi, thx a lot. your tutorial was pretty helpful. have a question though; the camera movement with mouse input works fine on pc in play mode, but if I build it for android, the rotation movement does not continue from the last position of the camera if I take my finger away and retouch again. whenever I stop touching on the screen, and press again to continue rotation, the camera jumps to another position, maybe to the original position of the camera (not sure) and still rotates as long as the finger is on the screen. maybe I have to tell in the code, that it had to continue from the last rotated position instead of the original position. is there a way to solve this issue for android? thanks again
Should 360 videos for (Oculus Quest 2) VR be transcoded?
Can we play 5.7k resolution videos in Android mode? if not then what is the maximum limit for the android platform in Unity?
C'est formidable Valem! Merci tellement! =D J'ai commencé un Startup qui s'appelle Second Nature et ca inclus le VR/360 video....aimerais-tu entendre plus et si tu aimes l'idée, joindre mon équipe comme CTO? C'est quoi ton couriel éléctronique?
Gracias!
This tutorial is amazing! I followed it but have an issue. it cannot jump to the another video after typing the path. Another question is that can this video be played in Oculus headset?
Thanks a lot, Valem! Is it possible to make this work with a stereoscopic video? (so you can actually see depth in VR)
Hi Nick, I have followed this tutorial and am using 3D, not just 360. I had to select Android SDK Tools under External Tools in Preferences. Then when you go to your shader, you will see a "3D Layout" dropdown; select either over under or side by side depending on your source clip. You also need to ensure that your clip size, defined in your Render Texture, is set to the full dimensions of the clip (taking into account both the left and right eye; so your clip is likely to have almost square dimensions if it is "Over Under")
Nice video - very fun. Although I can't get VR to work correctly in the current version of Unity. It would be nice to have an update. The XR section in the Project Settings-Player isn't there.
Its best to implement the camera as a VR camera (from another tutorial) and then just follow the same tutorial to add the stereoscopic video and make VR buttons for play, stop, etc.
Can i use this with Oculus Go ?
hello
your on youtube
Thanks for "360 VIDEO PLAYER (with VR mode) - Unity Tutorial".
I have a question for you in 360 video.
How do I put a video in Oculus Quest 2 and load it through the video path?
Android path question.
I am getting an error when i am pressing any button from play pause and stop
The error i am getting is
" Object reference not set to an instance of an object VideoManager.Play () (at Assets/VideoManager.cs.17) "
It appears in the Scene Panel but not in the Game panel. Any workaround?
Sorry. I just checked. I had to set Clear Flags to "Skybox" instead of "Solid Color". Fixed.
if i have a video which is old and i want to make it location based but i just know the location of the place where it was taken and it was taken from height .. but i would like to change the view of the video as well is it possible
Can we make Webgl built of this app and will it work same in VR device?
is this working on an android mobile build? I tried but did not work on my side,
Could you make it for 360 youtube videos? So instead of entering the file location we enter the URL?
Under shader I cannot see panoramic? just the other three? any ideas?
Can the button be clicked when the video is exported to as VR apk?
when I look around my headset does not move. There is no option to 'enable virtual reality support'
Hey can you help me, at 3:55 when I finished my script, Unity said that "The associated script can not be loaded. Please fix any compile errors and assing a valid script."
Any idea ? I ca'nt moove in my video. Eveyrthing is correct in my script, I had had double checked!!
Thanks a lot.
Same
same
Merci
I have just tried it but doesn't seem to work with internet URLs
Hi! I like your tutorial. I have got a question. I have been trying it but I do not have any 360 cam yet, therefor I am trying it with a 360 video dowloaded from youtube. But it seems strange it is kinda of cut in four. So what should be video format to do it? where can I find videos to test it before buying a 360 cam??? Thanks!
Hi, you can use Unity to make your own 360 videos as well. See tutorial on how to do it here: ua-cam.com/video/C_u3rM-y154/v-deo.html
Thanks for this video. It solved a lot of problems but curious, is it possible to apply this render texture to say a rectangle object on the scene that when clicked to play would go to the 360 video?
Yes indeed thats the way to go ! Create a button with the image set as the render texture and it should work with a bit more work on the ui!
@@ValemVR Thanks for the quick reply...so hard to find anything on this. SO basically I could create a video gallery similar to say an online youtube 360 gallery wuth thumbnails to click to start playing a 360 movie of my own. Would it set thought to replace the skybox current with the 360 movie?
great video, but i cant see my lighting, etc....i only see inspctor, anyway to turn on the rest to see?
Go to windows > rendering > lighting to open the lightning settings :)
@@ValemVR thank you!!
I want to develop an oculus go application using Unity Game Engine. I want to use my VR videos via internal path because VR videos size are so high. How can i access my videos filepath using unity app? In fact, i want to use oculus go internal file path for open my video in my application.
I can't add png icons , can anyone help ?
Just found the answer to this in one of the other comments, "if you can't view your imported icons properly (in the Project Tab), then click on the icon -> Inspector Property -> Texture Type -> Sprite (2D and UI) -> Apply / Save."
@@brettcameratraveler hey I can view my icons in the Project panel but I am not able to drag and drop that Icons to the image script
@@brettcameratraveler later on i added colors to it for my understanding. Then i tried using that buttons but my buttons were not working i was getting errors.
If you don't mind can you share your script with me ? Or if I'll send you mine cause you check what's wrong because i am a newbie in scripting
@@mohammadrazakhan3852 I was able to drag and drop only after selecting and applying "Sprite (2D and UI)" for each PNG icon file. Find it by following the decision tree I mentioned in my previous comment.
Thanks so much for the comprehensive tutorial!
I've been following it but I encountered an issue importing my 360 video to unity. The error I get is:
WindowsVideoMedia error 0xc00d36c4 while reading Video.mp4
Context: CreateObjectFromByteStream
Error details: The byte stream type of the given URL is unsupported.
Wondering if you have any ideas what might be going wrong and what I should do about it.
it might mean that your video data (the data inside the file) is unsupported by Unity's default video player and you might have to get a new video
Bonjour, d'abord merci pour ce tutoriel. Serait-ce possible d'ajouter le script C# VideoManager complet dans la description S.T.P. ? J'ai pourtant suivi à la lettre tes instructions mais le compilateur me donne constamment une erreur. Comme ma connaissance du C est très limitée, j'ai dû louper quelque chose. Ton aide serait très appréciée.
Merci
Salut, quel est l erreur indiqué par la console ? Oui je vais mettre un lieu vers le code source
Anybody elses videos come out a bit grainy?