Closed n8henrie closed 5 years ago
Hi. Thanks for taking a look. It appears that this issue is in our ffmpeg.rs, not the ffmpeg crate. I don't have a Mac so I can't test it but I will gladly accept changes that claim to improve how rustymedia works on MacOS.
I suspect that MacOS doesn't support the O_TMPFILE
flag. This flag creates a file with no name in the filesystem. This is used to cache the transcoded files on the disk but allowing the space to be automatically freed up when the file descriptor is closed or the process exits.
I guess we will need an alternative on MacOS. A simple option would be opening a file with a random name then unlinking it right away.
Perhaps relevant commentary and project: https://github.com/Stebalien/tempfile/issues/13
Both you and this conversation talk about unlinking the tempfile immediately -- I thought unlinking deletes the file, but it sounds like it perhaps isn't deleted until all processes using it have exited.
Would you be interested in a PR if it adds tempfile as a dependency? Or would you prefer one that does it without adding another dependency (even if the implementation is perhaps more naive)?
I would be happy to use the tempfile crate. I see no need to make another implementation of it in our repo.
Project now builds and passes all tests on MacOS.
Still doesn't run though, I'll start a new issue.
Thanks. I'll close this issue then.
MacOS 10.14.1
I suspect may be an issue I need to raise at https://github.com/meh/rust-ffmpeg instead, but just putting it out there.
I was hoping to work on https://github.com/kevincox/rustymedia/issues/4 as my first Rust contribution (thanks for the label), but obviously won't get far if I can't build as is!