Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.07k stars 1.51k forks source link

Trying to hide the Logger Bar in the console #2149

Open Ernesto-Alves67 opened 2 months ago

Ernesto-Alves67 commented 2 months ago

Discussed in https://github.com/Zulko/moviepy/discussions/2145

Originally posted by **Ernesto-Alves67** March 28, 2024 # Recently i made a YouTube Downloader, and add GUI to it. > - Using the **anaconda** enviroment to run and build. > - The problem is when i build the app with pyinstaller. > - I'm using this comand to build ``` pyinstaller --hidden-import=PyQt5 --hidden-import=threading --hidden-import=time --hidden-import=pytube --hidden-import=moviepy --hidden-import=moviepy.editor --hidden-import=os --hidden-import=json --hidden-import=sys --hidden-import=youtubesearchpython --hidden-import=pygame ``` > - I try to change the files **AudioClip.py** and **ffmpeg_audiowriter.py** in an attempt to disable the logger bar. > - And that's works only when i running the app using the following comand: ``` python ytdl_main.py ``` > The app works normaly and do not print the audio writting process. >> On the main code I also direct the outputs of the application to itself with: ```Python def initUI(self): self.setWindowIcon(QtGui.QIcon(self.ui.iconspath+'app-64.png')) sys.stdout = self ``` # My question is: > Why when I compile with pyinstaller, without '**_--noconsole_**' tag to hide the console, I run the .exe, and when writing the audio, it still writes progress to the console? >> I have done tests with '**_--noconcole_** ' too. But when he goes to write audio he can't finish the process. **Project Link:** https://github.com/Ernesto-Alves67/YoutubeDownloader_/tree/main/Gui_version