Skip to content

After pyinstaller packages the program and copies the program to other devices, it prompts that the ffmepeg file cannot be found. #121

Open
@jiongjiongJOJO

Description

@jiongjiongJOJO

Image

  File "imageio/core/format.py", line 590, in append_data
  File "imageio/plugins/ffmpeg.py", line 587, in _append_data
  File "imageio/plugins/ffmpeg.py", line 648, in _initialize
  File "imageio_ffmpeg/_io.py", line 508, in write_frames
  File "imageio_ffmpeg/_io.py", line 124, in get_first_available_h264_encoder
  File "imageio_ffmpeg/_io.py", line 58, in get_compiled_h264_encoders
  File "imageio_ffmpeg/_utils.py", line 33, in get_ffmpeg_exe
RuntimeError: No ffmpeg exe could be found. Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable.

After investigation, the reason was not that ffmpeg could not be found. There was this file in the packaged directory. The reason was that after the program transferred the device, ffmpeg did not have permission and could not be called.

It is recommended to add code that grants writable permissions in the get_ffmpeg_exe function.

pyinstaller packaging instructions:

pyinstaller -D --contents-directory dist --collect-data imageio-ffmpeg -n "main" "main.py"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions