britalmeida / push_to_talk

Add-on for recording audio in Blender's Sequencer
GNU General Public License v3.0
46 stars 11 forks source link

macOS issue: ffmpeg not found #21

Open enzyme69 opened 7 months ago

enzyme69 commented 7 months ago
Screenshot 2023-12-08 at 8 44 59 am Screenshot 2023-12-08 at 8 44 40 am

On macOS, I think ffmpeg issue still persist. Even if I install it through Python Module Manager addon, it does not seem to work.

britalmeida commented 6 months ago

Hi @enzyme69 I'm not familiar with that addon. Does it make ffmpeg available as a command line to the system?

Push to Talk runs ffmpeg as an OS process. Meaning, as if from a command line. It doesn't import a Python ffmpeg module. You can try opening a Terminal and typing ffmpeg? If that doesn't work, you'll need to brew install ffmpeg.

Zophiekat commented 3 months ago

hi i ran into this same issue, in MacOS, the addon wasn't able to find the ffmpeg path. i fixed it by editing the line in the init.py file to make it look for "/usr/local/bin/ffmpeg" specifically

log = logging.getLogger(__name__) os_platform = platform.system() # 'Linux', 'Darwin', 'Java', 'Windows' supported_platforms = {'Linux', 'Darwin', 'Windows'} ffmpeg_exe_path = "/usr/local/bin/ffmpeg"

performing this change was able to load the module successfully.

allisonwhilden commented 3 months ago

Thank you @Zophiekat! That worked for me. As I installed ffmpeg via homebrew, I changed the path to "/opt/homebrew/bin/ffmpeg", and then it worked successfully.

britalmeida commented 3 months ago

The addon should work with ffmpeg installed via homebrew (it does for me).

@Zophiekat / @allisonwhilden is there any error or odd path reported in the console?

If you'd change the addon code to:

print("Finding ffmpeg path...")
ffmpeg_exe_path = shutil.which("ffmpeg")
print(ffmpeg_exe_path)

And run Blender from a terminal to see the output? (adjust for your Blender version)

cd /Applications/Blender/4.1.1-candidate/Blender.app/Contents/MacOS
./Blender

In my testing it's correctly finding the homebrew path:

Finding ffmpeg path...
/opt/homebrew/bin/ffmpeg