Skip to content

Cannot open "capture.mp4" when starting record #54

@kennygoff

Description

@kennygoff

I've followed the build directions and was able to build capsulerun. However when pressing F9 to record, ffmpeg is throwing an error when opening the "capture.mp4" file to write.

The error stems from the call to avio_open and it's PROTOCOL_NOT_FOUND. Doing some digging it seems that ffmpeg needs to be built with different configuration options, possibly --enable-protocol=file. I ran out of time to dig further and I don't know how the cmake provided ffmpeg is built, so I don't know exactly what could fix it, and I have not tried rebuilding ffmpeg with a different configuration.

Error location in source:

// In: capsulerun/src/encoder.cc

/* open the output file, if needed */
ret = avio_open(&oc->pb, output_path, AVIO_FLAG_WRITE);
if (ret < 0) {
  Log("Could not open '%s'", output_path);
  exit(1);
}

Environment notes:

  • macOS Sierra
  • FFmpeg was also installed via homebrew initially, but I uninstalled that version when trying to debug
  • Launched with a .app game

Research references:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions