Search Unity

Video How to set ✅ 60 FPS on WebCamTexture?

Discussion in 'Audio & Video' started by makaka-org, May 28, 2023.

  1. makaka-org

    makaka-org

    Joined:
    Dec 1, 2013
    Posts:
    1,023
    WebCamTexture provides 30 FPS maximally for the Rear Camera on iPhone XS Max regardless of Application.targetFrameRate, although this camera supports 60FPS, 120FPS and 240 FPS.

    Is it a Limitation of WebCamTexture or Bug?
    How to set 60 FPS on WebCamTexture?

    ---------------------------------------------------------------------------------------------

    Update: I released Camera Feed on Background (docs) — Unity Asset which operates WebCamTexture class and does all the work for you.

    cover.png
     
    Last edited: May 31, 2023
  2. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    You need to use WebCamTexture.requestedFPS and it doesn't matter what Application.targetFramerate is. You could run your game at 120 fps and still want a 30 fps video.