'Unable to add audio clip in audio source in Unity
I have added audio source component in Unity Scene but I am unable to add audio clip in it. It is throwing the following error:
Errors during import of AudioClip Assets/sound1.ogg:
FSBTool ERROR: The format of the source file is invalid, see output for details.
FSBTool ERROR: Internal error from FMOD sub-system.
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
I am using Unity version 2019.3.14f1. I have tried different sound source formats (mp3 and wav) but it is trowing the same error. How to resolve this?
Solution 1:[1]
Try to work with ffmpeg when working with media formats. ffmpeg is available for linux and windows. A simple command to check a file is
ffprobe file.ogg
You can also do extended checks including conversion to fix the file. There are prenty of methods. Just search for "ffmpeg integrity check"
If you are lazy as myself i would simply convert it to a wav file and back to ogg again.
ffmpeg -i file.ogg file.wav
ffmpeg -i file.wav file.ogg
Solution 2:[2]
For others, who might stumble upon this:
Working solution for me was to open the file with audacity, then export it as .ogg
Solution 3:[3]
import a video as audio is imported with it
if you dont put the video inside the ui panal you should not see the video but keep the music
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nur1 |
| Solution 2 | Benedikt Böhm |
| Solution 3 | LordCrazyOfLife |
