Search Unity

Question Record webcam texture in Unity? (Use Unity to record webcam view)

Discussion in 'Audio & Video' started by nathanbiomedeng, Nov 17, 2021.

  1. nathanbiomedeng

    nathanbiomedeng

    Joined:
    Nov 17, 2021
    Posts:
    2
    Hi all, this is a very specific need for one of my projects.

    I was able to display my webcam texture onto a 3D cube in Unity, but is there a way to record this webcam texture while running the game? and I would like to output this webcam view to files like mp4.

    In short, I would like to specifically use Unity to record any webcam view.
     
  2. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    189
    Hello,

    Do you need to record it in the editor or in the build as well?

    If this is only in editor you can use recorder package. You could output your webcam feed to a render texture and in your recorder instead of game view you select render texture asset.

    Let me know if this helps :)
     

    Attached Files:

    nathanbiomedeng likes this.
  3. nathanbiomedeng

    nathanbiomedeng

    Joined:
    Nov 17, 2021
    Posts:
    2
    Oh awesome, I read of this recorder but didn't know you can select render texture specifically. Let me give it a try right now! May I ask if you have any thoughts on the executable version for recording, is this possible too?
     
  4. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    189
    It is something we are discussing but for now its editor only. If you want to do it in game you will need to do it or use a third party. There are a couple of good options on the asset store as well.
     
  5. amy020413

    amy020413

    Joined:
    Mar 29, 2023
    Posts:
    1
    Do you success it?
    I'm trying to proceed so that I save the video that I'm trying to play on the webcam as mp4, but it doesn't work.
    Please help me.