Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kennygoff opened this issue Jul 21, 2017 · 2 comments
Open

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

kennygoff opened this issue Jul 21, 2017 · 2 comments

Comments

@kennygoff
Copy link

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:

@fasterthanlime
Copy link
Collaborator

Ah, that's what I get for being smart and trying to get the smallest macOS ffmpeg+x264 build for capsule.

Brb cutting a new build that actually contains the file protocol!

By the way, thanks a lot for the exemplary report - I wish all GitHub issues were like this :)

@fasterthanlime
Copy link
Collaborator

Hmm, --enable-protocol=file is definitely in my usual ffmpeg configure options https://gist.github.com/fasterthanlime/4dd42d376bc7f0bb769114b9b28f72a3 - that's fishy.

I'll keep investigating, ran into #55 while trying to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants