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

[Help] Hidden command window when ffmpeg is doing it's thing? #167

Open
mversion opened this issue Aug 1, 2024 · 2 comments
Open

[Help] Hidden command window when ffmpeg is doing it's thing? #167

mversion opened this issue Aug 1, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@mversion
Copy link

mversion commented Aug 1, 2024

I need Help.

Each time a track is extracted, a command prompt window briefly pops up and disappears. In the meantime stealing focus away from whatever application I got running.
Any way to have ffmpeg do its thing in the background?

What operating system are you seeing the problem on?

None

Your settings

Win
v0.15.6
@mversion mversion added the help wanted Extra attention is needed label Aug 1, 2024
@JustinRoper
Copy link

The issue seems to be with the library being used ffmpeg-python in Windows when its a compiled exe like pyinstaller and no console. Someone should probably put in an issue over there to add a check for Windows and add a way to to pass in and argument to hide the window sorta how I patched it below.

Locally I was able to fix this by patching the site-packages\ffmpeg\_run.py file. and then when i compile it with pyinstaller noconsole it no longer pops up any console window when its dealing with the HIRES mp4 to flac extractions.

At the top find import subprocess
Add this as a new line under that from subprocess import CREATE_NO_WINDOW

Now find in the file
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream and add this to the end , creationflags=CREATE_NO_WINDOW

Should now look like:
args, stdin=stdin_stream, stdout=stdout_stream, stderr=stderr_stream, creationflags=CREATE_NO_WINDOW

@exislow exislow removed their assignment Nov 8, 2024
@loddar66
Copy link

@JustinRoper seems I'm a bit lost, but where in the overall setup (Windows 11 with tidal_dl_ng + pre-compiled ffmpeg.exe) should this patch be applied?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants