slhck / ffmpeg-progress-yield

Run an ffmpeg command with progress
MIT License
57 stars 6 forks source link

Run FFMPEG minimized or hiden #3

Closed djs45 closed 1 year ago

djs45 commented 2 years ago

Hello Is there a way to run ffmpeg with your library in hiden or minimized ? Many thanks

djs45 commented 2 years ago

And is there a way to retrieve statut error @ end of compression ? Thanks a lot

slhck commented 2 years ago

Could you please clarify what you mean by "hidden or minimized"?

Also, to get the output, you can use the stderr property.

djs45 commented 2 years ago

Could you please clarify what you mean by "hidden or minimized"?

Also, to get the output, you can use the stderr property.

Hello When I use ffmpeg-progress-yield , I have a console window of ffmpeg. I try to use extra argument { creationflags: CREATE_NO_WINDOW } / shell=True but exra argument seem to no working. So I have edited "ffmpeg_progress_yield.py" file and add shell=True to subprocess.Popen and now no window console.

Can you verify and get example for extra argument please ?

Many thanks

slhck commented 2 years ago

As I am not a Windows user, it will be hard for me to test these changes. I prefer to not use shell=True since it requires passing the whole command as a string that is correctly formatted/escaped. Also, it works differently under Windows and Unix-based systems—this would make it incompatible.

I remember a previous issue with universal_newlines=True that also didn't work under Windows.

If you have a platform-indepdendent suggestion as to how to fix it, please propose a PR. Otherwise I am not sure at this point how to solve it.

djs45 commented 2 years ago

Yo have to remove '**' in def run_command_with_progress :

def run_command_with_progress(self, popen_kwargs={}) -> Generator[int, None, None]:
slhck commented 2 years ago

Sorry, I don't understand. The current definition of that function has no **:

https://github.com/slhck/ffmpeg-progress-yield/blob/dcde02184ca2faf63a24eafd87a8f0845f037dfc/ffmpeg_progress_yield/ffmpeg_progress_yield.py#L49

djs45 commented 2 years ago

effectively.

I d'ont understand why It work now but it work

Congrat et thank you !