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

MoviePy don't works in .exe file made by AutoPyToExe/PyInstaller without console #1891

Closed
MigueldeHaroce opened this issue Jan 4, 2023 · 1 comment
Labels
environment Using moviepy with, or issues possibly stemming from specific OS/platforms/environments. question Questions regarding functionality, usage

Comments

@MigueldeHaroce
Copy link

I used AutoPyToExe to made an executable file from a .py, the executable works great but when I use the function "Windows Based (Hide Console)" don't work the MoviePy library. When the console it's not hidded MoviePy works but when I hide the console MoviePy stop working and don't say any error and only happen with this library because everything else work normal

The option that don't work ⬇️⬇️

The option that MoviePy doesn't work

I want to do an app who convert videos formats, it's works but when I pass to .exe without console, don't work the conversion process. I'm using MoviePy and Python 3.10 in Windows 11

The conversion code it's simple, the process works but with when I pass to .exe file without console stop working:

#code...
clip = moviepy.VideoFileClip(r"" + myPath)
result = moviepy.CompositeVideoClip([clip])
result.write_videofile(pathOnly + output, codec='mpeg4')
#code...

A video about my problem: https://mega.nz/file/4aZWEL6R#2y4WPr7ZgR386wfyV1V4ZAcFodhwzaL4LfIaVLhN9S0

The conversion script don't works, I replicate the code here and gives me the same result:

import moviepy.editor as moviepy
from tkinter import *

window = Tk()
def run():
    clip = moviepy.VideoFileClip(r"" + r"C:\Users\migue\OneDrive\Desktop\promoVideo.mp4")
    result = moviepy.CompositeVideoClip([clip])
    result.write_videofile(r"C:\Users\migue\OneDrive\Desktop\promoVideo" + ".avi", codec='mpeg4')

Button(text="run", command=run).pack()
window.mainloop()

I tried without interface but gives me an error:

import moviepy.editor as moviepy

clip = moviepy.VideoFileClip(r"" + r"C:\Users\migue\OneDrive\Desktop\promoVideo.mp4")
result = moviepy.CompositeVideoClip([clip])
result.write_videofile(r"C:\Users\migue\OneDrive\Desktop\promoVideo" + ".avi", codec='mpeg4')

Error picture

@MigueldeHaroce MigueldeHaroce added the question Questions regarding functionality, usage label Jan 4, 2023
@MigueldeHaroce
Copy link
Author

The solution of this problem:
---> https://stackoverflow.com/questions/74997331/moviepy-dont-works-in-exe-file-made-by-autopytoexe-pyinstaller-with-hide-conso

@keikoro keikoro added the environment Using moviepy with, or issues possibly stemming from specific OS/platforms/environments. label Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environment Using moviepy with, or issues possibly stemming from specific OS/platforms/environments. question Questions regarding functionality, usage
Projects
None yet
Development

No branches or pull requests

2 participants