Skip to content

Running without console window? #686

@amamic1803

Description

@amamic1803

I'm making a python script to convert video or image to ASCII art and I need ffmpeg for the last part. The thing is that when I build EXE file using PyInstaller (and select -noconsole option), when code execution comes to the point when ffmpeg is needed, console window still opens for each ffmpeg process opened. I open two processes, code for which is provided here:

process_in = ffmpeg.input(open_path, r=fps)[v_stream_indx].output('pipe:', format='rawvideo', pix_fmt='rgb24', r=fps).run_async(pipe_stdout=True, cmd=ffmpeg_path)

process_out = ffmpeg.input('pipe:', format='rawvideo', pix_fmt='rgb24', s=f'{width}x{height}', r=fps).output(ffmpeg.input(open_path, r=fps, vn=None), save_path, pix_fmt=pixel_format, r=fps, vcodec=og_codec, codec="copy").overwrite_output().run_async(pipe_stdin=True, cmd=ffmpeg_path)

Of course I don't want those console windows as my app has GUI. Strangely, there is no output in any of those 2 windows (I would expect it to be because there are many logs printed out when run from pycharm where main script output is printed out, BTW is there a way to disable that?).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions