Search Unity

Question Recorder Codec selection by code

Discussion in 'Audio & Video' started by denizerturk, Dec 6, 2023.

  1. denizerturk

    denizerturk

    Joined:
    Oct 31, 2017
    Posts:
    4
    I am trying to use recorder in an automated process but i need my video in ProRes codec. However I can not set the codec by script. Is there a solution for setting codec by script?
     
  2. ellka

    ellka

    Unity Technologies

    Joined:
    Jun 17, 2019
    Posts:
    71
    Hello,
    Could you provide the part of the script where you are trying that?

    Quickly like that, I can tell you that you can do that:
    Code (CSharp):
    1. var recorder = new MovieRecorderSettings();
    2. recorder.EncoderSettings = new ProResEncoderSettings();
    3. ...
    But I might be missing something.

    Also, there's a sample called something like "Movie Recorder Example" that comes with the Recorder package (accessible through the Package Manager window). Maybe the code there can help with knowing what is doable via scripts.
     
    denizerturk likes this.
  3. denizerturk

    denizerturk

    Joined:
    Oct 31, 2017
    Posts:
    4
    Thank you! I found out that EncoderSettings part was not working because of my project's unity version. It is solved after I upgraded my project to unity 2022.3.14
     
    ellka likes this.