tidal-dl-ng
tidal-dl-ng copied to clipboard
[Help] Hidden command window when ffmpeg is doing it's thing?
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
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
@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?
isn't this already fixed in latest versions of the program?
well, I'm already using the most recent version, but the 'problem' still exists... seems I need to look for a fixed ffmpeg version - or try and install Python and compile it myself
wdym fixed? just get latest ffmpeg binary and point the setting to that executable with FULL path...
I already used the latest nightly builds from both repositories (replacing my previous 'stable' version from last September). None of them works w/o briefly opening the console window. Nevertheless, in the end I get the files I want- it's just a little annoying.
https://github.com/BtbN/FFmpeg-Builds/releases https://github.com/GyanD/codexffmpeg/releases
I see, well... there is a PR waiting... hope it will be implemented