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

Writegear ffmpeg creationflag #375

Merged

Conversation

ibtsam3301
Copy link
Contributor

@ibtsam3301 ibtsam3301 commented Aug 31, 2023

Added Feature: Detached Subprocess Creation for Windows

In this pull request, I've added a new feature to enable detached subprocess creation on Windows within the writegear module. This enhancement enhances the process management capabilities of the module.

Requirements / Checklist

Context

This can be useful while creating an exe file for a python script that uses writegear. On windows even after creating the exe file in windowed mode or no-console mode, the ffmpeg.exe command line window would pop up while its being used by write gear.

Types of changes

  • New feature (non-breaking change which adds functionality)

@welcome
Copy link

welcome bot commented Aug 31, 2023

Thanks so much for opening your first PR here, a maintainer will get back to you shortly!

In the meantime:

@ibtsam3301 ibtsam3301 changed the base branch from master to testing August 31, 2023 19:53
@abhiTronix
Copy link
Owner

@ibtsam3301 Look good except, we don't need extra variable for the same, a optional flag might work better.

@abhiTronix abhiTronix self-assigned this Sep 2, 2023
@abhiTronix abhiTronix added BUG 🐛 Vidgear api's error, flaw or fault BUG CONFIRMED ✅ Bug is confirmed! labels Sep 2, 2023
@abhiTronix abhiTronix changed the base branch from testing to development September 2, 2023 06:33
@abhiTronix
Copy link
Owner

@ibtsam3301 One question, Why not CREATE_NO_WINDOW ?

What I know:

The difference is in what the started process can do. In both cases it won't have a console. But with the CREATE_NO_WINDOW option it can call AttachConsole(ATTACH_PARENT_PROCESS) and get access to the parent's console window (if available). That explicitly will not work when you specify DETACH_PROCESS. The only option then is for the started process to use AllocConsole() to create its own console.

Or in other words, you can be sure that the started process will never be able to chatter into your own console by using DETACH_PROCESS.

@abhiTronix abhiTronix added WORK IN PROGRESS 🚧 currently been worked on. ENHANCEMENT ⚡ New Feature/Addition/Improvement and removed BUG CONFIRMED ✅ Bug is confirmed! labels Sep 2, 2023
@abhiTronix abhiTronix added this to In progress in VidGear v0.3.2 via automation Sep 2, 2023
@abhiTronix abhiTronix added this to the v0.3.2 milestone Sep 2, 2023
@abhiTronix abhiTronix linked an issue Sep 2, 2023 that may be closed by this pull request
4 tasks
@abhiTronix
Copy link
Owner

@ibtsam3301 I'm merging this PR, and will make necessary changes that are required. Also we don't need this flag for logging mode where we are debugging stuff. Thank you,

@abhiTronix abhiTronix merged commit 2e6c928 into abhiTronix:development Sep 3, 2023
5 checks passed
VidGear v0.3.2 automation moved this from In progress to Done Sep 3, 2023
@welcome
Copy link

welcome bot commented Sep 3, 2023

Congrats on merging your first pull request here! 🎉 You're awesome!
Alt Text

@abhiTronix abhiTronix added SOLVED 🏁 This issue/PR is resolved now. Goal Achieved! and removed WORK IN PROGRESS 🚧 currently been worked on. labels Sep 3, 2023
@ibtsam3301 ibtsam3301 deleted the writegear_ffmpeg_creationflag branch September 3, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG 🐛 Vidgear api's error, flaw or fault ENHANCEMENT ⚡ New Feature/Addition/Improvement SOLVED 🏁 This issue/PR is resolved now. Goal Achieved!
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

[Proposal]: Add ffmpeg creationflag in Writegear API
2 participants