Brew Install MPV on Streamlit Cloud

I’m using elevenlabs API to stream an audio response. It requires MPV (which I’ve install on my local device), but I don’t know how to do that on the cloud. Anyone know the solution?

Here’s the traceback from the log:

Traceback (most recent call last):
  File "/home/adminuser/venv/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/", line 552, in _run_script
    exec(code, module.__dict__)
  File "/mount/src/paignful-demo/", line 227, in <module>
    stream_audio(time_buying_response, strip=False)
  File "/mount/src/paignful-demo/", line 99, in stream_audio
    return stream(audio_stream)
  File "/home/adminuser/venv/lib/python3.8/site-packages/elevenlabs/", line 62, in stream
    raise ValueError(message)
ValueError: mpv not found, necessary to stream audio. On mac you can install it with 'brew install mpv'. On linux and windows you can install it from

mpv is available in Debian, the operating system running in your Streamlit Cloud environment. You can install it by adding it to packages.txt, pretty much like you use requirements.txt to install python packages.

Thank you for replying. Just to confirm, would the line in packages.txt be: “brew install mpv”?

No, just the name of the package. The program that sets up your environment already knows how to install it (which is not using brew, by the way).

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.