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

ffmpeg is installed, but stempeg/cmds.py is saying it isn't #48

Open
drscotthawley opened this issue May 11, 2024 · 3 comments
Open

ffmpeg is installed, but stempeg/cmds.py is saying it isn't #48

drscotthawley opened this issue May 11, 2024 · 3 comments

Comments

@drscotthawley
Copy link

drscotthawley commented May 11, 2024

Howdy! I'm having trouble using stempeg on a fresh Ubuntu machine. I installed and built ffmpeg using script that was linked to in the README, and ffmpeg sits in /usr/bin and works...

$ which ffmpeg
/usr/bin/ffmpeg
$ ffmpeg --help
ffmpeg version 4.2.1 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/root/ffmpeg_build --extra-cflags=-I/root/ffmpeg_build/include --extra-ldflags=-L/root/ffmpeg_build/lib --bindir=/root/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-nonfree
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
...etc

Same as on my old machine where everything's fine.

But when I run the python code on my new machine, I get...

  File "/mnt/sfs/shawley.../data.py", line 2, in <module>
    import stempeg 
  File "/home/shawley/envs/myenv/lib/python3.10/site-packages/stempeg/__init__.py", line 16, in <module>
    from .read import read_stems
  File "/home/shawley/envs/myenv/lib/python3.10/site-packages/stempeg/read.py", line 7, in <module>
    from stempeg.write import FilesWriter
  File "/home/shawley/envs/myenv/lib/python3.10/site-packages/stempeg/write.py", line 23, in <module>
    from .cmds import FFMPEG_PATH, mp4box_exists, get_aac_codec, find_cmd
  File "/home/shawley/envs/myenv/lib/python3.10/site-packages/stempeg/cmds.py", line 43, in <module>
    raise RuntimeError(
RuntimeError: ffmpeg or ffprobe could not be found! Please install them before using stempeg. See: https://github.com/faroit/stempeg

Setting export FFMPEG_PATH=/usr/bin or even export FFMPEG_PATH=/usr/bin/ffmpeg doesn't help.

What needs to happen here?
Thanks!

@drscotthawley
Copy link
Author

drscotthawley commented May 11, 2024

Ok, so the docs aren't totally obvious that ffprobe is needed, and the install script linked to doesn't build it.
Or at least didn't for me.
Or maybe it does build it but then doesn't move it to /usr/bin.

In any case, just running sudo apt install ffmpeg fixed everything. 👍
So... ready to close this anytime.

@faroit
Copy link
Owner

faroit commented May 12, 2024

Hey Scott, that sounds unpleasant. Maybe it would help to raise specific errors for ffprobe alone?

@drscotthawley
Copy link
Author

Yea, that sounds like a good idea.

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

No branches or pull requests

2 participants