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

[Free] Save AudioClip to MP3: save an audioclip to mp3, wav and convert wav to mp3

Discussion in 'Assets and Asset Store' started by Team-on, Feb 24, 2021.

  1. Team-on

    Team-on

    Joined:
    Nov 25, 2018
    Posts:
    4
    Asset now avaliable on the Asset Store.

    With this package you can save an audioclip to mp3 in unity3d. Also plugin can save audioclip to wav and convert wav to mp3.

    It works with Windows, Android and IOS(tested). And probably on Mac(untested, but should work).


    Lame unity port from 3wz/Lame-For-Unity
    Wav save script from https://gist.github.com/darktable/2317063

    Also it opensourced.
    https://assetstore.unity.com/packages/tools/audio/save-audioclip-to-mp3-189071
    https://github.com/Team-on/Unity3D-save-audioClip-to-MP3
     
    zacharyaghaizu likes this.
  2. werper

    werper

    Joined:
    Nov 10, 2021
    Posts:
    1
    Well, asset is a good application, I used it quite often for my needs. The only thing I observed, is that it started to show me adds and to redirect to unknown sites, after I clicked the download button. I understand that everyone wants to earn money, but not in this way. I almost forget that asset does not keep the quality of videos, every time it was 720p or even lower. Fortunately it was recommended to use youtube m4a converter and downloader , by a friend. After a few tries, I found it friendly user and very easy in use. Also it has an entire variety of file extensions, just choose what you need, and download.
     
    Last edited: Nov 17, 2021
  3. JakeSimpson

    JakeSimpson

    Joined:
    Dec 4, 2019
    Posts:
    20
    OK, so using this.

    It does not compile on OSX. It does not compile for the Windows build either - there is a bug in the native methods where LibName is never actually set for specific modes (ie a build command does not trip any of the #if statements in LibLameMP3.c)


    #if UNITY_EDITOR

    #if UNITY_EDITOR_OSX
    const string libname = @"__Internal";
    #else
    const string libname = @"libmp3lame.dll";
    #endif

    #elif UNITY_IOS
    const string libname = @"__Internal";
    #elif UNITY_ANDROID
    const string libname = @"mp3lame";
    #endif

    none of these are actually hit when trying to do a built either in OSX or in Windows. You get about 30 odd error messages telling you 'libname is not defined' when trying to do an application build in either windows or in OSX (either trying to build the .app, or trying to build an XCode project).

    This is using 2021.2.10f1

    This, however, does work (at least to build on Windows and OSX. There are other issues I am running into that stops me building a complete app that runs, so hard to test.)


    #if UNITY_EDITOR

    #if UNITY_EDITOR_OSX
    const string libname = @"__Internal";
    #else
    const string libname = @"libmp3lame.dll";
    #endif

    #elif UNITY_IOS
    const string libname = @"__Internal";
    #elif UNITY_ANDROID
    const string libname = @"mp3lame";

    #elif UNITY_STANDALONE_WIN
    const string libname = @"libmp3lame.dll";

    #elif UNITY_STANDALONE_OSX
    const string libname = @"__Internal";
    #endif
     
  4. JakeSimpson

    JakeSimpson

    Joined:
    Dec 4, 2019
    Posts:
    20
    Is there any chance of the libmp3lame .so files for OSX being posted directly? OSX will build, but fails on trying to call native code because, for obvious reasons, the .so files aren't there, and Unity is not building them, even though the C code is there. It does for IOS, because that has to be built via XCode, but OSX won't work in the editor till the .so files exist, and I can't get them to build because the XCode project that is built via Unity for this doesn't come in correctly so XCode can actually load it, so I can't build the .so files..
     
  5. Farshadfarzan368

    Farshadfarzan368

    Joined:
    Sep 10, 2022
    Posts:
    73
    How to convert mp3 byte array to audioclip?
     
  6. Farshadfarzan368

    Farshadfarzan368

    Joined:
    Sep 10, 2022
    Posts:
    73
    How to use voice chat in unity transport?