Skip to content

Conversation

@iusmac
Copy link

@iusmac iusmac commented May 1, 2025

fixes #456

this handles the case where moving frames to the selected Output directory fails because of a different mount point.
For instance, frames are initially stored in /tmp/vhs* (on Linux). Renaming (moving) them from /tmp to an output directory located, let's say in /mnt/hdd (an external hard drive), will fail with an invalid cross-device link error. While renaming to a directory located in /home/$USER will succeed, as /tmp and /home directories (traditionally) share the same root mount point (/).

There's a common practice to mount /tmp on tmpfs, so renaming will also fail as explained above.

Another very subtle pitfall is that os.Rename() also fails in case the user himself created an empty output directory for frames.

To handle all of the above issues, we'll continue to use os.Rename() and fallback to os.CopyFS() on failure.

@iusmac iusmac requested a review from a team as a code owner May 1, 2025 12:37
@iusmac iusmac requested review from bashbunni and removed request for a team May 1, 2025 12:37
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

Successfully merging this pull request may close these issues.

Output frames don't do anything

1 participant