0

I am trying to play a video file using vlc media player through the subprocess command.While running the python3 source code in pycharm, video is played without any console blink. If I convert it to exe and run the application, I am able to see the console blinking, before the video is started to play. Video is played only after a while (video is played only after console blinks, delay is seen).

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • Unclear what you're asking. A command window will open to launch any console executable, yes. The Pycharm terminal may open _minimized_, but it still is "open" while the script runs. – OneCricketeer Jul 28 '22 at 06:03
  • How to avoid this? any help!!! – tulasi dass Jul 28 '22 at 06:08
  • Does this answer your question? https://stackoverflow.com/questions/24799155/python-how-can-i-hide-the-windows-command-prompt-screen-when-the-script-is-run – OneCricketeer Jul 28 '22 at 06:09
  • Or if it is using `pyinstaller`, did you look at the example docs that show `--noconsole` option? – OneCricketeer Jul 28 '22 at 06:11
  • Thanks for the reply @OneCricketeer, but the issue is different, it is not a fixed command prompt. The real issue is, I'm trying to open a video file using VLC media player through subprocess, at that time I can see command prompt starts blinking before opening the video file. (Video file is struggling to get open.) – tulasi dass Jul 28 '22 at 06:22
  • Sounds like separate issues. You should be able to make pyinstaller "hide" the console on exe execution. Then if `subprocess` isn't working, there should be an exception that you are not handing or logging (please show your code). Or VLC is simply slow, in which case, that isn't a Python problem – OneCricketeer Jul 28 '22 at 06:31
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jul 28 '22 at 07:16
  • If I create an exe with console enabled in auto-py-to-exe, console blink issue is not occurred. – tulasi dass Jul 28 '22 at 08:54
  • But I want this issue to be solved even if the console is disabled. – tulasi dass Jul 28 '22 at 09:01

0 Answers0