• Hello Guest!

    We have recently updated our Site Policies regarding the use of Non Commercial content within Paid Content posts. Please read the new policy here.

    An offical announcement about this new policy can be read on our Discord.

    ~The VaMHub Moderation Team
  • Hello Guest!

    We posted an announcment regarding upcoming changes to Paid Content submissions.

    Please see this thread for more information.

Guide: Watch VR videos without VR hardware

Sally Whitemane

Well-known member
Featured Contributor
Messages
263
Reactions
942
Points
93
Patreon
sallyw
No VR headset? No problem!

How does this work?
This will obviously not bring you magically into the third dimension.
It allows you to watch a VR video in a 'normal' perspective. You will see it from one of two recorded eyes.
You will be able look around with your mouse.

Example from video players 'MPC-BE' without 360° support and '5KPlayer' with 360° support:
play VR video in 360.jpg

A few years ago YouTube started to support 360° videos.
To allow users to upload their own 360° videos, a special little tool is needed.
This tool, the 'Spatial Media Metadata Injector' (SMMI), will inject spatial metadata into a video to *mark the video as 360°*.
A video uploaded with this metadata is then properly detected by YouTube as 360°.
The interesting part is - video players like VLC will detect and play this too!

You need:
'mark' the video 360 / inject the spatial metadata:
  1. start SMMI and [Open] your VR video:
  2. 360 video_32.png
  3. Use [Inject metadata] to save a copy that video. It's a good idea to keep the default name with '<filename>_injected' at the end. So you will know what video you've already marked if you collect many. Depending on the size of the video and your drive-speed this may take a moment.
  4. Watch the new video in a player with 360° support like VLC or 5KPlayer, by default you will look to the 'side', you must use the mouse at the start of the video to rotate the view around (in VLC = left mouse button; in 5KPlayer toggle the 360°-button first and then use the left mouse button)
  5. (delete your 'old' video once you verified everything worked)
What video player is better?
They both have problems. I'd prefer VLC if it can handle the playback smoothly because it can 'zoom'.

VLC pro: allows to change the zoom / field of view with the mouse wheel, direct 3D control with left mouse button, stable
VLC con: fails to play high resolution VR video smooth due to lack of hardware decoding

5KPlayer pro: will play back even very high resolution 8K with hardware decoding, allows 3D control with left mouse button (button only after 360-mode was activated)
5KPlayer con: does not allow to change the zoom / field of view(!), sketchy & not very well known software, changes file-open-with-associations during installation without asking, did crash for me in fullscreen mode

EDIT: third option - VLC 4.0.0 nightly
Allows smooth 8K playback by using NVdec (Nvidia graphics card only!)
This is the only good option for resolutions above 4K with zoom.
I was able to set up the latest VLC nightly build with 8K playing smoothly.
Download the portable 7z- or zip-version so it won't interfere with whatever player you've installed already.
Extract and create a shortcut to vlc.exe and these parameters:
vlc.exe --codec=nvdec,any --dec-dev=nvdec
This is required for smooth playback and force the GPU to do the decoding.

For some reason in VLC 4.0.0 the mouse wheel is set to rotate instead of zooming the view.
The zoom is set to Page Up / Down by default. Fix:
Tools > Preferences > Hotkeys
Shrink the viewpoint field of view (360°) = Mouse Wheel Up
Expand the viewpoint field of view (360°) = Mouse Wheel Down
Save

This NVdec speed boost should work on all GeForce GTX 1030 (Pascal generation) or newer cards for h264/AVC and h265/HEVC videos.
Older cards will only decode h264/AVC faster.

If you know alternative players - please let me know! Note the player must work without a VR hardware and support 360° and that is rare. I've been using this method for years and these two players are the only I know.

MKV-source videos?
It's possible that your source file came in a MKV-container. The SMMI only supports video in .MOV- and .MP4-containers. So you will have to change that. This is usually the point where non-IT people make a big mistake and re-encode the video to MP4. This is not necessary and very bad! It's a waste of time and will destroy the video-quality. The correct way to do this is with a ffmpeg command like ...
ffmpeg -i "input.mp4" -codec copy "output.mkv"
... where -codec copy is the key to copy of the video- and audio-stream. Now nothing changes except the container becomes MKV.

Hint:
For POV adult content it's worth checking which one of the two eyes is better centered for an optimal view. Try to turn around!
 
Last edited:
What? This is wild. I didn't even know this was a thing and the timing is weird because I was just about render out a crud quality version of my stereoscopic movie and trailer (seriously, I'm not trying to plug) by cropping out a small portion of the dominant eye so people can watch it in 2D. Does this work with 180 degree videos as well?

Edit 1: Dude... DUDE! I don't think I can explain how awesome it is that you showed me this.

Edit 2: So it is safe to assume that it won't project like this on every steaming site. Do you have any suggestions on a quick and easy way to create a 2D version of my work to upload to a steaming service? I have a more complicated way of doing it at hand but you seem to know your stuff. Some degradation in quality is acceptable.
 
Last edited:
So it is safe to assume that it won't project like this on every steaming site. Do you have any suggestions on a quick and easy way to create a 2D version of my work to upload to a steaming service? I have a more complicated way of doing it at hand but you seem to know your stuff. Some degradation in quality is acceptable.

When it comes to web stuff this I don't have much experience. I think you have two options:
  • (1) find a web player with WebVR- or WebXR-support
> should(?) be able to play the video directly in normal '2D' (one eye) or stream to a VR-headset directly (I cannot verify without headset)​
> the older WebVR is a now deprecated and WebXR is new (may not be supported everywhere?)​
> no conversion, no quality loss​
> this deoVR player seems interesting and simple
> many adult VR sites seem to use a paid solution based on delight-vr
  • (2) convert it into an unwarped non VR-video [advanced!]
> unavoidable quality loss, requires time to re-encode​
> not easy, requires a good knowledge about FFmpeg and digital video in general (get either ffmpeg-git-full.7z from the first link or ffmpeg-n5.0-latest-win64-lgpl-5.0.zip from the second, extract /bin/ffmpeg.exe from them, drop it in your VR video folder or, that's what I do, drop it in C:\Windows\ to use it from everywhere, Windows will complain about admin permissions)​
> the video gets split into the left- and right-eye-parts and then unwarped, requires fiddling with the settings to get the unwarp part right​
> nice for a quick non-VR preview videos​
> less resource intensive during playback, because the resolution is cut in half​
> not VR capable anymore, no 180/360 control anymore, only a classic 2D video​

For (2) I have an old .bat-file that can do this with FFmpeg. This is what I used many years ago before I know about 360° metadata. I made it so that a VR-source video can be drag- and dropped on it. It will create two unwarped video for the eyes. My notes in there where for a specific video - ignore them or use the correct the math to calculate the correct values for unwarping for your source-video.

Code:
rem https://stackoverflow.com/questions/66960003/unwarping-180-vr-footage-with-ffmpeg-v360-filter
rem ffmpeg -i %1 -filter_complex "[0:v]v360=input=hequirect:output=flat:h_fov=100:v_fov=67.5:in_stereo=sbs:out_stereo=sbs:w=1280:h=720[flat];[flat]split[left][right];[left]stereo3d=sbsl:ml[left_mono];[right]stereo3d=sbsl:mr[right_mono]" -map [left_mono] "%~n1_left.mkv" -map [right_mono] "%~n1_right.mkv"
rem
rem vr video resolution:        4320 x 2160
rem vreye-wres x vreye-hres:    2160 x 2160
rem vreye-aspect-ratio:         1:1
rem vr-hfov:                    180°
rem vr-vfov:                    180°
rem
rem 9:16 PORTAIT UNWARP:
rem wres x hres: from 2160x2160 to 1080x1920
rem hfov = vr-hfov x [wres/vreye-wres]
rem           180° x [1080 / 2160]
rem           180° x 0.5
rem           90°
rem vfov = vr-vfov x [hres/vreye-hres]
rem      =    180° x [1920/2160]
rem      =    180° x 0.8888
rem      =    160°
rem
rem FOV CUT OFF 25%                      HFOV                      VFOV
rem 9:16  PORTRAIT UNWRAP: 90°  x 0.75 = 67.5° ----  160° x 0.75 = 120°
rem 10:16 PORTRAIT UNWRAP: 100° x 0.75 = 75°   ----  160° x 0.75 = 120°
rem 16:9  WIDE     UNWRAP: 160° x 0.75 = 120°  ----  90°  x 0.75 = 67.5°
rem 1:1   SQUARE   UNWRAP: 180° x 0.75 = 135°  ----  180° x 0.75 = 135°
rem 1:1   SQUARE   UNWRAP: 180° x 0.66 = 120°  ----  180° x 0.66 = 120° <--- 33% CUT OFF

set WRES=1920
set HRES=1080
set HFOV=120
set VFOV=67.5
REM SPLIT LEFT + RIGHT + UNWARP
ffmpeg -i %1 -preset medium -crf 22 -filter_complex "[0:v]v360=input=hequirect:output=flat:h_fov=%HFOV%:v_fov=%VFOV%:in_stereo=sbs:out_stereo=sbs:w=%WRES%:h=%HRES%[flat];[flat]split[left][right];[left]stereo3d=sbsl:ml[left_mono];[right]stereo3d=sbsl:mr[right_mono]" -map [left_mono] "left_%WRES%x%HRES%_hfov%HFOV%_vfov%VFOV%.mkv" -map [right_mono] "right_%WRES%x%HRES%_hfov%HFOV%_vfov%VFOV%.mkv"
pause

I know! It is a complicated long list of FFmpeg parameters. However I specifically made it this way to keep the quality as high as possible and do everything in a single conversion step. One could simplify this by doing a left- / right-eye split first. Then it would have to convert two times. Not ideal.
 

Attachments

  • VR split left+right+unwarp.zip
    897 bytes · Views: 0
Last edited:
Thanks! I can't wait to try this out.

Edit 1: Amazing, pretty much does exactly what I need it too. Wa able to tweak it and get the results I wanted! How can I thank you enough? Quick question though, anyway to keep the audio intact for the new files?
 
Last edited:
anyway to keep the audio intact for the new files?

Option 1:
This line will get you a exact copy of the audio-stream from the original video in a MP4:
Code:
ffmpeg -i input.mp4 -vn -acodec copy audio_only.mp4
The -vn tells it to ignore the video stream.

Once you have two files, video-stream and audio-stream, you can use two inputs -i and combine them to a final video:
Code:
ffmpeg -i unwarped_2d_video.mkv -i audio_only.mp4 -codec copy  final.mp4

Option 2:
Make the bat-file more complicated and add mapping for the audio-stream:
I'm not 100% sure this is all correct, but it worked for me. Haven't touched this for years.
Code:
ffmpeg -i %1 -preset medium -crf 22 -map 0:a -acodec copy -filter_complex "[0:v]v360=input=hequirect:output=flat:h_fov=%HFOV%:v_fov=%VFOV%:in_stereo=sbs:out_stereo=sbs:w=%WRES%:h=%HRES%[flat];[flat]split[left][right];[left]stereo3d=sbsl:ml[left_mono];[right]stereo3d=sbsl:mr[right_mono]" -map [left_mono] -map 0:a "%~n1_left_%WRES%x%HRES%_hfov%HFOV%_vfov%VFOV%.mkv" -map [right_mono] -map 0:a "%~n1_right_%WRES%x%HRES%_hfov%HFOV%_vfov%VFOV%.mkv"


It's hard to find anything that FFmpeg cannot do. People like to call it the swiss army knife.
I use it a lot when a streaming site asks me to register to watch in a higher resolution or they refuse to allow a download at all.
A look at the pages source code with Control + U to find the video url. (or easier - use addons for that)
Paste that url in a terminal for FFmpeg the right commands and it downloads in full quality.
 

Attachments

  • VR split left+right+unwarp with audio.zip
    938 bytes · Views: 0
Last edited:
Even easier... Get GOMplayer, the free version if on Windows/Mac found here: https://www.gomlab.com/gomplayer-media-player/ Then, Next, open ANY 3D video such as a VR film, and press the 360 mode button on the bottom control bar. Done!

This knowledge took me 3 weeks to research online. I hope I have helped you guys save so much hassle!!
P.S. Even available for mobile cell phone as an app.
Exsosus
 
Back
Top Bottom