I'm trying to create a python script
that deals with audios and videos
.
so, I need to use ffmpeg
and it works -for details, I used a CLI program that deals with it, not me-, but when I tried to create an exe file using pyinstaller
, it doesn't contain ffmpeg packages within it!
Now, if anyone want to use the app, he couldn't until he downloads ffmpeg independently, and it's a further step that makes it harder reach my app.
What is the solution/the way to embed ffmpeg with my app?
- What I'm expecting is to find a solution...
- What I've tried is that:
- I tried to search on google, but I found nothing.
- I tried to ask chatGPT and it gives me a script that doesn't work :)
# my_app.spec
# Run with: pyinstaller my_app.spec
# Basic PyInstaller configuration
block_cipher = None
a = Analysis(['main.py'], # Replace 'main.py' with your Python script
pathex=['.'],
binaries=[('C:\\ffmpeg\\bin\\ffmpeg.exe', '.'),
('C:\\ffmpeg\\bin\\ffplay.exe', '.'),
('C:\\ffmpeg\\bin\\ffprobe.exe', '.')],
...
# Rest of the Analysis configuration goes here
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
...
# Rest of the EXE configuration goes here
)