Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Resolved Webm video has no audio

Discussion in 'Audio & Video' started by mfatihbarut, Dec 1, 2021.

  1. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,061
    Hi,
    I exported same video file as H264 and webm from Adobe Premiere, while H264 has audio, webm version has no audio in Unity.
    What can be the reason? (I checked webm video has audio)
     
    Last edited: Dec 6, 2021
  2. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    197
    Hello,

    Are you using recorder package? What version of unity and recorder do you use and on what OS?

    Let us know :)
     
  3. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,061
    sure
    recorder 3.0.3
    unity 2021.2.4f1
    windows.
     
  4. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    197
    Hello again,

    To make sure I understand. You save your video file then you want to import it back in unity? When you play it in the unity editor you don't have audio on webm? If yes do you have any warnings in the console when you record it and when you play it?
     
  5. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,061
    not necessarily, I use adobe premiere pro for editing my webm videos. That is the source, I don't remember any warnings
     
    Last edited: Dec 2, 2021
  6. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    197
    Are you using accumulation in one of your recorder? Could you try opening it into vlc see if there is audio? Maybe a screenshot of your window would help us understand what's wrong. Would it be possible to attach the problematic webm file so we could look at it?

    Let us know.
     
  7. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,061
    sure, I sent them by pm
     
  8. antoinecharton

    antoinecharton

    Unity Technologies

    Joined:
    Jul 22, 2020
    Posts:
    197
    Thanks,

    I opened it into a couple of players and all of them played audio from your .webm video. Looks like an issue with premiere support for this format. We can't do much on our end the file recorder generated is good. Maybe ask on adobe forum if there is some way to import it?
     
  9. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,061
    Did you also open it in Unity?
    Because the problem is Unity not the other players...
    Please forget the recorder.
    The recorder has nothing with it.
    The workflow is
    Video (Created somewhere in internet) -> Edited in Adobe Premiere (by me) ->Imported in Unity and not working in Unity.

    I changed my first message as this btw "I exported same video file as H264 and webm from Adobe Premiere, while H264 has audio, webm version has no audio in Unity."
     
    Steven-1 likes this.
  10. The_Island

    The_Island

    Unity Technologies

    Joined:
    Jun 1, 2021
    Posts:
    502
    Hi. Is the video transcoded? If yes, can you check that Import Audio is enabled? Otherwise, can you share your file with us? You can upload the file here or you can DM it to me. I will be able to help you more if I can check the file.
     
  11. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    Hi mfatihbarut!

    One plausible reason why the audio from your webm wouldn't work with Unity is if the audio codec used by Premiere is opus, instead of vorbis. There are 2 possible audio codecs with webm files and vorbis is the only one supported by the VideoPlayer at this point.

    If you share the video with us (The_Island or myself), we'll be able to validate this.

    Thanks!

    Dominique
     
  12. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,061
    good to know thank you. let me check it please
     
  13. DominiqueLrx

    DominiqueLrx

    Unity Technologies

    Joined:
    Dec 14, 2016
    Posts:
    260
    OK, we'll wait for additional info.

    Worth mentioning: the editor should put out a warning if an audio track with unknown audio codec is seen in a webm file.

    Dominique
     
  14. mfatihbarut

    mfatihbarut

    Joined:
    Apr 11, 2018
    Posts:
    1,061
    Thanks a lot Dominique, you saved my day the vorbis was the right answer!