Stream Locations FUSE Filesystem (Filesystem in Userspace) maps files from it source location, creating the corresponding STRM in the destination location on-the-fly.
To use this project, you'll need the following prerequisites:
You can install the required libraries using pip
:
$ pip install -r requirements.txt
- Clone or download this repository to your local machine.
- Install the required Python libraries (fusepy and PyYAML) using the command mentioned in the "Requirements" section.
To use the Stream Locations FUSE Filesystem, follow these steps:
-
Open a terminal and navigate to the project directory.
-
Run the FUSE filesystem by executing the script.
$ ./strmfs source_directory dest_directory -o mount_options
Replace source_directory with the path to your media files, dest_directory with the path where you want to mount the filesystem, and mount_options with any optional FUSE mount options you want to specify.
-
Access and stream your video files in .strm format from the mounted filesystem.
To make the Stream Locations FUSE Filesystem mount at boot time or by a specific user, you can use the /etc/fstab file on Linux. Here's how to add an entry to mount it:
- Open a terminal.
- Create a symbolic link to the
strmfs
script, which can be used by fstab
$ ln -s /path/to/strmfs /usr/sbin/mount.strmfs
- Edit the /etc/fstab file using a text editor with root privileges (e.g., sudo nano /etc/fstab).
- Add the following line to the /etc/fstab file, replacing the placeholders with your specific paths and options:
/path/to/src_dir /path/to/dest_dir fuse.strmfs mount_options 0 0
- Replace /path/to/src_dirwith the path to your source directory.
- Replace /path/to/dest_dir with the path where you want to mount the filesystem.
- Replace mount_options with any FUSE mount options you want to specify.
- Save and close the /etc/fstab file.
To test the new entry without rebooting, run the following command:
$ sudo mount -a
This will attempt to mount all entries in /etc/fstab.
Now, the Stream Locations FUSE Filesystem will be mounted automatically at boot time or when the mount -a command is executed.
The project supports a configuration file in YAML format (config.yaml) for setting default mount options. You can place this file in the following locations:
- System-wide configuration: /etc/strmfs/config.yaml
- User-specific configuration: ~/.config/strmfs/config.yaml
The configuration file should have the following format:
mount_options:
allow_other: true
foreground: false
nothreads: true
file_types: "mp4+mkv+mov+m4v+mpg+mpeg+avi+flv+webm+wmv"
You can customize the default mount options in this configuration file.
If you encounter any issues while using the Stream Locations FUSE Filesystem, here are some common troubleshooting steps:
Ensure that you have the required permissions to mount FUSE filesystems. You may need to run the script with administrative privileges (e.g., sudo python strmfs).
Check the source directory for valid video files in supported formats (e.g., .mp4, .mkv). Ensure that the file extensions are correctly set to .strm for streaming.
Verify that your configuration file (config.yaml) is in the correct location (either /etc/strmfs/ for system-wide or ~/.config/strmfs/ for user-specific). Ensure that the YAML syntax is correct.
Double-check that you have installed the required Python libraries (fusepy and PyYAML) using pip. Update them if necessary.
If your issue persists or you encounter a different problem, please open an issue on our GitHub repository with detailed information about the problem you're experiencing.
If you'd like to contribute to this project, please follow these guidelines:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and test them thoroughly.
- Create a pull request with a clear description of your changes.
Your pull request will be reviewed, and once approved, it will be merged into the main branch.
This project is licensed under the MIT License.