1. How to configure servers

The easiest way to stream video on demand (VoD) is to use progressive HTTP streaming which doesn't require any additional or special web server configuration. DeoVR player will download video header and based on this information will send HTTP Range requests to the web server in order to download necessary parts of the video file.

Just upload your video files to the public folder of your Web Server and if you encoded your video right it should work without any additional server configuration.

There are 2 downsides of this method:
  • No seamless quality change based on a user internet speed
  • Users will be able to download your videos using a direct link.
2. Video encoding basics

There are quite a few different video and audio encodings available but not all of them you can use to play high-resolution VR video. All VR-ready PCs have hardware video decoding acceleration and it is a good idea to make use of it, more about it below. Set “Key Frame Distance” to 1-2 seconds, this will ensure good compromise between file size and smooth seeking.

There are simple rules you can follow to make sure that your customers will be able to watch your videos:

  • The most supported video codec today is H.264/MPEG-4 AVC, any VR-compatible PC can play it. Use it if you want maximum compatibility, you can use the same video file to stream your videos directly in users browsers. Select AAC audio encoding with a bitrate from 128k to 384k depending on your case and MP4 container format. It has limitations:
    • Maximum resolution hardware decoders can handle is 4096x4096 @ 30 FPS or 4096x2048 @ 60 FPS, do not exceed these constraints to ensure smooth playback for your users.
    • It requires more bitrate (internet bandwidth) to get the same visual quality than modern video codecs listed below.
  • More advanced video codec is H.265/HEVC, it provides the same visual quality at a lower bitrate than H.264 and NVidia GeForce GTX 10 Sires video cards can decode up to 8192x8192 @ 30 FPS with a built-in hardware video decoder and some mobile Exynos SoCs. Use the same audio settings and container format as for H.264 video codec. Limitations:
    • Browsers do not support this codec this means that you can not use it for direct web-browser streaming.
    • Windows 7 doesn’t support hardware accelerated video decoding for this codec.
    • Takes much longer to encode with software video encoder compared to H.264
  • VP9 is an alternative video encoder from Google, it is very close to H.265 in terms of video quality for the same bitrate and it is open source software. Use Vorbis audio codec and WebM container format. Limitations:
    • All Apple products don’t officially support it.
    • @TODO: Need to test hardware decoding/Codecs on Win 7 and Win 10

If you want to ensure that all your users will be able to watch your videos, you should provide several streaming options to them. The absolute minimum would be:

  • Original H.265 video in the highest resolution and framerate for high-end users.
  • H.264 4k video option for the maximum compatibility.
3. Preparing the webpage

Important!
DeoVR saves settings for videos internally, title will be the title of the video, but if you want to send multiple videos with same title—use ID to distinct between them.

"title": "ExampleVideo"
"id": 555
1. Resolutions

Create list of "encodings". Create at least one encoding. Each encoding should contain encoding name and list of "videoSources". Set the URL and resolution for each video source.

"encodings":
[
    {
     "name": "h264",
         "videoSources":
         [
             {
                 "resolution": 1080,
                 "url": "C:/JsonExampleVideos/ExampleVideo_1080p.mp4"
             },
             {
                 "resolution": 1440,
                 "url": "C:/JsonExampleVideos/ExampleVideo_1440p.mp4"
             },
             {
                 "resolution": 1920,
                 "url": "C:/JsonExampleVideos/ExampleVideo_1920p.mp4"
             },
             {
                 "resolution": 2160,
                 "url": "C:/JsonExampleVideos/ExampleVideo_2160p.mp4"
             },
             {
                 "resolution": 2880,
                 "url": "C:/JsonExampleVideos/ExampleVideo_2880p.mp4"
             },
             {
                 "resolution": 3360,
                 "url": "C:/JsonExampleVideos/ExampleVideo_3360p.mp4"
             },
             {
                 "resolution": 3840,
                 "url": "C:/JsonExampleVideos/ExampleVideo_3840p.mp4"
             }
         ]
     }
]
2. Timestamps

Create a new list of "timeStamps". Each time stamp has time in seconds and a name value.

"timeStamps":
[
    {
        "ts": 15,
        "name": “Rabbit jumps”
    },
    {
        "ts": 30,
        "name": “Rabbit Sleeps”
    }
]

Important!
For correct work of timeStamps you should also specify length of the video in seconds, otherwise unnecessary.

"videoLength": 60
3. Corrections

Declare "corrections" and set horizontal ("x") or vertical ("y") offset [min -7.5, max 7.5], brightness ("br"), contrast ("cont") or saturation ("sat") values [min -70, max 70].

"corrections":
    {
        "x": 5,
        "y": -5,
        "br": -10,
        "cont": 10,
        "sat": 20
    }
4. Other

"stereoMode" can be set to "sbs" for side by side stereoscopic layout, "tb" for top-bottom layout or "off" for monoscopic videos.

"stereoMode": "tb"

"screenType" can be set to "flat" for a 2D quad display inside of VR, "dome" for 180° videos, "fisheye" for fisheye lens videos and "sphere" for 360° videos, “220” for 220° mesh and “250” for 250° mesh.

"screenType": "sphere"
5. Full JSON example
{
    "path": null,
    "encodings":
    [
        {
         "name": "h264",
             "videoSources":
             [
                 {
                     "resolution": 1080,
                     "url": "C:/JsonExampleVideos/ExampleVideo_1080p.mp4"
                 },
                 {
                     "resolution": 1440,
                     "url": "C:/JsonExampleVideos/ExampleVideo_1440p.mp4"
                 },
                 {
                     "resolution": 1920,
                     "url": "C:/JsonExampleVideos/ExampleVideo_1920p.mp4"
                 },
                 {
                     "resolution": 2160,
                     "url": "C:/JsonExampleVideos/ExampleVideo_2160p.mp4"
                 },
                 {
                     "resolution": 2880,
                     "url": "C:/JsonExampleVideos/ExampleVideo_2880p.mp4"
                 },
                 {
                     "resolution": 3360,
                     "url": "C:/JsonExampleVideos/ExampleVideo_3360p.mp4"
                 },
                 {
                     "resolution": 3840,
                     "url": "C:/JsonExampleVideos/ExampleVideo_3840p.mp4"
                 }
             ]
         }
    ],
    "title": "ExampleVideo",
    "screenType": "sphere",
    "stereoMode": "tb",
    "skipIntro": 0,
    "videoThumbnail": null,
    "timeStamps":
    [
        {
            "ts": 15,
            "name": "Wall"
        },
        {
            "ts": 30,
            "name": "Window"
        },
        {
            "ts": 45,
            "name": "Door"
        }
    ],
    "corrections":
    {
        "x": 5,
        "y": -5,
        "br": -10,
        "cont": 10,
        "sat": 20
    },
        "is3d": true,
        "videoLength": 60,
        "id": 123,
}

Important!
“is3d” should always be true, in case of false video will be forced monoscopic.