When capturing video, how can the default resolution & bitrate be changed? — Oculus
Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

When capturing video, how can the default resolution & bitrate be changed?

Currently, the video capture feature outputs at 1024px at 5Mb/s. This document has this to say about the related system property (debug.oculus.enableVideoCapture):
When enabled, each enterVrMode generates a new mp4 file in /sdcard/oculus/VideoShots/. Videos are full resolution, undistorted, single-eye, with full-compositing support. Defaults are 1024 resolution at 5 Mb/s.
The term used, "defaults", imply these settings can be changed. However, there's no reference as to how. Can I get clarification on this?
S7 Exynos Nougat. 2017 Gear VR. Public test channel.

Best Answer

  • NinjaGGNinjaGG Posts: 227 Oculus Staff
    Accepted Answer
    Following up to answer your question: You can set the android properties `debug.oculus.videoResolution` and `debug.oculus.videoBitrate`

    For example: `adb shell setprop debug.oculus.videoResolution 1536`
    If you need immediate help or want additional support/context on an issue you are having with our platform or integrations:

    1. Gather any and all logs, screenshots, and version numbers of relevant software (Oculus SDK, engine, etc.)
    2. Please submit a ticket here (include what you've gathered in step 1).
    3. Tag me @NinjaGaijin once you have done so!

Answers

  • NinjaGGNinjaGG Posts: 227 Oculus Staff
    Hi, thanks for reaching out! I have passed this question along to the proper channels and will update you once I receive a response.
    If you need immediate help or want additional support/context on an issue you are having with our platform or integrations:

    1. Gather any and all logs, screenshots, and version numbers of relevant software (Oculus SDK, engine, etc.)
    2. Please submit a ticket here (include what you've gathered in step 1).
    3. Tag me @NinjaGaijin once you have done so!
  • firagabirdfiragabird Posts: 168
    Art3mis
    @NinjaGaijin

    This is huge, and AFAIK the only time these Android system properties were mentioned in any public setting. May I request that these be added to the Oculus' official list of properties (and also the page on video capture) so that everyone else with the same query can easily find it?

    Again, thank very much! I've been searching for these settings as far back as the original announcement of the video recording feature :)
    S7 Exynos Nougat. 2017 Gear VR. Public test channel.
  • NinjaGGNinjaGG Posts: 227 Oculus Staff
    Glad to have helped with this! I'll pass along your suggestion to the proper parties.
    If you need immediate help or want additional support/context on an issue you are having with our platform or integrations:

    1. Gather any and all logs, screenshots, and version numbers of relevant software (Oculus SDK, engine, etc.)
    2. Please submit a ticket here (include what you've gathered in step 1).
    3. Tag me @NinjaGaijin once you have done so!
  • QUAKEQUAKE Posts: 24
    Brain Burst
    What's the difference between video resolution  and texture size?

    adb shell setprop debug.oculus.videoResolution 1536

    vs

    adb shell setprop debug.oculus.textureWidth 1536
    adb shell setprop debug.oculus.textureHeight 1536




  • firagabirdfiragabird Posts: 168
    Art3mis
    @QUAKE

    videoResolution changes the encoded resolution of the video capture (defaults to 1024).

    The texture* properties changes the resolution of the eye buffer, which is the texture the game engine renders to (controlled by the dev, but Oculus recommends 1024).

    A good way of imagining them is that the eye buffer texture needs to get mapped onto the video capture. If the video res is larger than the eye buffer res, the latter gets stretched to fit the former.

    From my personal experience, each have distinct purposes.
    • Increasing the eye buffer is effectively supersampling i.e. forcing the game to render at a higher resolution. Games look sharper while playing as well as recording, but at a huge performance cost.
    • Increasing the video resolution only affects video capture and doesn't change the encoding quality. The only use I've seen for it so far is in forcing Youtube to play my HD captures in 4K, which gets encoded with a higher bitrate and subsequently better playback quality.
    S7 Exynos Nougat. 2017 Gear VR. Public test channel.
  • firagabirdfiragabird Posts: 168
    Art3mis
    edited February 2018
    Increasing the video resolution only affects video capture and doesn't change the encoding quality. The only use I've seen for it so far is in forcing Youtube to play my HD captures in 4K, which gets encoded with a higher bitrate and subsequently better playback quality.
    I recently discovered another application for recording at higher resolutions: accurately capturing scene detail that's rendered at panel-limited resolutions, such as Oculus Home. I posted my analysis on Reddit, including videos that showcase the difference. The TL;DR is that in certain cases (e.g. Oculus Home's rug), there will be aliasing on the captured video that isn't encountered when viewing in the headset. If the goal is to accurately present in-game image quality in video form, content creators must record at a panel-limited resolution of 1536px.

    This however is an issue (at least on an S7 Exynos); in Oculus Home and many other titles, recording at this resolution introduces heavy frame tearing. I've yet to try this on a higer end phone, and will update this post when I get such results.

    EDIT Feb 20: Tried this with an S8 Exynos (see this video capture for reference); it has the exact same issue when recording Oculus Home. I tested recording at 1536px on other titles known to push the phone's limits, like Bait! and Defense Grid 2, and the same frame tearing couldn't be replicated.

    @NinjaGaijin

    Could you ask the team behind the video capture function if there's a way to record video at half the framerate (30fps instead of 60)? Not every type of app game needs 60fps to accurately present it, and many Gear VR Youtubers upload in 30fps. Recording overhead would be significantly reduced, and the image quality would be improved at the same bitrate.
    S7 Exynos Nougat. 2017 Gear VR. Public test channel.
  • firagabirdfiragabird Posts: 168
    Art3mis
    Following up to answer your question: You can set the android properties `debug.oculus.videoResolution` and `debug.oculus.videoBitrate`

    For example: `adb shell setprop debug.oculus.videoResolution 1536`

    @NinjaGaijin

    As of the time of this post, these properties no longer have any effect when I set them in Oculus Go. Can you pass this feedback along to the team? Also, the corresponding page about Android system properties has disappeared from the latest Go SDK documentation.
    S7 Exynos Nougat. 2017 Gear VR. Public test channel.
Sign In or Register to comment.