Skip to content

[in#0 @ 0000013f512fcfc0] Error opening input: Invalid argument #24

Description

@Skyknight47

Getting this error. Tried with both .png and .jpg images.

  1. Yes the file path is correct
  2. Yes the file exists in said path.
  3. Yes it's a valid image.
Error opening input file 'Path/to/my/image.jpg'.
Error opening input files: Invalid argument

    at ChildProcess.exithandler (node:child_process:422:12)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
  code: 4294967274,
  killed: false,
  signal: null,
  cmd: "path/to/ffmpeg/folder/ffmpeg.exe -y -i 'path/to/image.jpg' -vf scale=w=512:h=512:force_original_aspect_ratio=decrease:interl=1 -qscale:v 6 'path/to/output/image_compressed.jpg'"
imgSqueezer.load();
imgSqueezer.setBin('path/to/ffmpeg/folder/ffmpeg.exe');
imgSqueezer.setSourceFilePath(`path/to/results/folder`);

              // Provide the output file path of the compressed image.
              imgSqueezer.setOutputFilePath(`path/to/output/folder`);
               imgSqueezer.setCompressionLevel(FFMPegCompression.COMPRESSION_LEVEL_HIGH);

              imgSqueezer.build();
               let resultImage = await imgSqueezer.compress();

Any idea what is causing this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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