Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't extract ogg files with unityextract #83

Open
Lykrast opened this issue Jun 20, 2019 · 3 comments
Open

Can't extract ogg files with unityextract #83

Lykrast opened this issue Jun 20, 2019 · 3 comments

Comments

@Lykrast
Copy link

Lykrast commented Jun 20, 2019

Extracting ogg files with unityextract from unity3d files keeps giving me this error:

Traceback (most recent call last):
  File "unityextract", line 159, in <module>
    main()
  File "unityextract", line 155, in main
    exit(app.run())
  File "unityextract", line 57, in run
    self.handle_asset(asset)
  File "unityextract", line 97, in handle_asset
    samples = extract_audioclip_samples(d)
  File "C:\Users\Lykrast\AppData\Local\Programs\Python\Python36-32\lib\site-packages\unitypack\utils.py", line 37, in extract_audioclip_samples
    sample = af.rebuild_sample(sample)
  File "C:\Users\Lykrast\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fsb5\__init__.py", line 212, in rebuild_sample
    from . import vorbis
  File "C:\Users\Lykrast\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fsb5\vorbis.py", line 12, in <module>
    vorbis = load_lib('vorbis')
  File "C:\Users\Lykrast\AppData\Local\Programs\Python\Python36-32\lib\site-packages\fsb5\utils.py", line 76, in load_lib
    raise LibraryNotFoundException('Could not load the library %r' % (names[0]))
fsb5.utils.LibraryNotFoundException: Could not load the library 'vorbis'
  • Windows 10 64 bit version 1803
  • unityextract and fsb5 installed with pip and up to date

I have put the libogg and libvorbis provided by fsb5 on the following places and so far none of them worked or changed the error:

  • C:\Windows\System32
  • Where the unityextract script is C:\Users\Lykrast\AppData\Local\Programs\Python\Python36-32\Scripts
  • Where unitypack got installed C:\Users\Lykrast\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\unitypack
  • Where fsb5 got installed C:\Users\Lykrast\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\fsb5
@GergoLadi
Copy link

I was facing the same issue. I figured I'd see if it works on Windows 7, so I fired up a VM. As soon as I set everything up and started the script, I got a message box telling me that MSVCRT120.dll was missing from the system. So I went ahead and downloaded and installed the Visual C++ Redistributable Packages for Visual Studio 2013 pack that contains said DLL, and sure enough, it worked! Then I went back to my Windows 10, installed the redistributables there as well, success. So if you get this error despite having libvorbis.dll in the right place, chances are you're also missing this pack. Just make sure you get the right version for your Python -- if you have the 32-bit version (which seems to be the case for you), get the 32-bit version of the redistributables, even if your operating system itself is 64-bit.

@sebastientromp
Copy link

This didn't work for me. I've copied the dll mentioned here to more or less the same places as Lykrast above, but the script still can't find them.
I've also installed the Visual C++ Redistributable linked above.

$ ./bin/unityextract --audio -o out/audio2 /d/Games/Hearthstone/Data/Win/{rad_base,rad_enus,actors,cards,cardxml,dbf,expansionmusic,heromusic,gameobjects,legendary,missionsound,otherminionsound,playsound,premiummaterial,scriptableobject,shared,sounds,spell}*.unity3d
Traceback (most recent call last):
  File "./bin/unityextract", line 159, in <module>
    main()
  File "./bin/unityextract", line 155, in main
    exit(app.run())
  File "./bin/unityextract", line 57, in run
    self.handle_asset(asset)
  File "./bin/unityextract", line 97, in handle_asset
    samples = extract_audioclip_samples(d)
  File "C:\Users\Daedin\AppData\Local\Programs\Python\Python37\lib\site-packages\unitypack\utils.py", line 37, in extract_audioclip_samples
    sample = af.rebuild_sample(sample)
  File "C:\Users\Daedin\AppData\Local\Programs\Python\Python37\lib\site-packages\fsb5\__init__.py", line 212, in rebuild_sample
    from . import vorbis
  File "C:\Users\Daedin\AppData\Local\Programs\Python\Python37\lib\site-packages\fsb5\vorbis.py", line 12, in <module>
    vorbis = load_lib('vorbis')
  File "C:\Users\Daedin\AppData\Local\Programs\Python\Python37\lib\site-packages\fsb5\utils.py", line 76, in load_lib
    raise LibraryNotFoundException('Could not load the library %r' % (names[0]))
fsb5.utils.LibraryNotFoundException: Could not load the library 'vorbis'

Still looking, I'll post something here if I ever get it to work :)

@sebastientromp
Copy link

Using ProcessMonitor I found out where the script was looking for the libs:

image

Please also note that it's looking for vorbis.dll, and not libvorbis.
So copying the libvorbis.dll to my user's bin folder and renaming it to vorbis.dll seemed to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants