Skip to content

Use with pyinstaller frozen exe results in errors on Windows #116

@3ll3d00d

Description

@3ll3d00d

Using this lib (for either ffprobe or ffmpeg) results in the following error when running on Windows

[WinError 6] The handle is invalid

Applying the suggested workaround from https://github.com/pyinstaller/pyinstaller/wiki/Recipe-subprocess to always set stdin resolves the issue for me

i.e.

in _run.py change https://github.com/kkroening/ffmpeg-python/blob/master/ffmpeg/_run.py#L205 to

stdin_stream = subprocess.PIPE

in _probe.py change https://github.com/kkroening/ffmpeg-python/blob/master/ffmpeg/_probe.py#L16 to

p = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

I don't know if this covers all use cases or has any side effects, happy to PR the above though if you want me to.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions