snesrev / zelda3

Home Page:https://discord.gg/AJJbJAzNNJ

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

other/msu/encode_opus.py error

foldfree opened this issue · comments

Describe your bug here. And how to reproduce it.

using homebrew and macOS 13.4

In the ./zelda3/other/msu/ directory, I run: python3 encode_opus.py and I get this error:

(...)
Converting ../../msu/ALttP-msu-Deluxe-113.pcm
Converting ../../msu/ALttP-msu-Deluxe-114.pcm
Traceback (most recent call last):
  File "/Users/cesar/zelda3/other/msu/encode_opus.py", line 127, in <module>
    result = future.result()
             ^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cesar/zelda3/other/msu/encode_opus.py", line 121, in task
    convert_to_opuz(r"../../msu/ALttP-msu-Deluxe-%d.pcm" % i, i >= 48 or kMsuTracksWithRepeat[i])
  File "/Users/cesar/zelda3/other/msu/encode_opus.py", line 75, in convert_to_opuz
    result, framelist, preskip, msu_repeat_pos, songlength = encode_to_msu_opus(filename, 128000)
                                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cesar/zelda3/other/msu/encode_opus.py", line 54, in encode_to_msu_opus
    enc = create_encoder(bitrate)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/cesar/zelda3/other/msu/encode_opus.py", line 44, in create_encoder
    enc.bitrate = bitrate
    ^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/opuslib/classes.py", line 232, in <lambda>
    _set_bitrate = lambda self, x: opuslib.api.encoder.encoder_ctl(
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/opuslib/api/encoder.py", line 83, in encoder_ctl
    return request(libopus_ctl, encoder_state, value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/lib/python3.11/site-packages/opuslib/api/ctl.py", line 66, in inner
    raise opuslib.exceptions.OpusError(result_code)
opuslib.exceptions.OpusError: b'invalid argument'

note: On ubuntu LTS 22.04, it just worked..

What is your build target?

macOS 13.4