Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to trim video clip and convert to byte array at runtime?

Discussion in 'Audio & Video' started by swifter14, Jun 23, 2020.

  1. swifter14

    swifter14

    Joined:
    Mar 2, 2017
    Posts:
    165
    My Video Player plays clips from a path at runtime

    Code (CSharp):
    1. videoplayer.url = path; //mobile gallery path
    2. videoplayer.Play();
    I want to take this clip, trim it to 3 seconds, and convert the trimmed video to a byte array. Is it possible?
    *If so, is it also possible to change the video format while saving?

    Thanks
     
  2. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260