Jump to content

Ubuntu - USB as Media Source (changing USB-Sticks)


CVXDEV
Go to solution Solved by CVXDEV,

Recommended Posts

Dear all,

 

I have a question related to Linux(Ubuntu), mounting USB-drives and Emby using it as a media source.

Is it possible to use a folder (e.g. /user/media/usb) as a "standard" mounting location for various USB drives, and whatever is on the USB, Emby searches the drive and shows the content on the media library?

Goal:
I plug any USB drive into the same USB-slot, it gets auto-mounted to /user/media/usb and any media content on the USB is visible in my Library.

Basically, if I have guests and they bring different USB-drives with media that i can just plug & play them through emby, without much configuration in Linux (which I am fairly inexperienced) and my media server is headless.

I guess it is more a question of Linux mounting than emby library, but maybe someone here configured something similar...

 

I tried to dig up some information on USB-mounting in Linux, User/emby folder permissions, ... but haven't found really the answer.

(I found the following thread (https://emby.media/community/index.php?/topic/55874-linux-noob-needs-help-path-for-external-drive/), but it's not answering all my questions, therefore it would be great if you could guide me in the right direction - thanks.)

  • Like 1
Link to comment
Share on other sites

Hi, yes it should work fine, did you try adding the usb drive path as an emby library? You will need to run a library scan if you swap the drive though.

Link to comment
Share on other sites

Hey Luke,
thanks for your quick response!

I added the drive path in emby as a library, but it didn't find any content. If the media could be either audio or video, i guess the best is to select mixed content, right?

For the library scan i would set-up a automatic task, to refresh it every 15min (which i believe is the shortest interval).

 

Then it looks like I need to further dig into the Linux permissions / mounting as indicated in the above link - but glad to hear that it should be possible.

Link to comment
Share on other sites

Mixed content would be your best bet, yes. Is content still not showing up? If nothing is showing up, permissions are a likely culprit. 

Link to comment
Share on other sites

  • Solution

After a while of research i made it work, for all as reference:

- on Ubuntu you can install "usbmount", but the normal way via apt-get seems to be not working 100%, so best is to follow instruction here:

https://www.linuxuprising.com/2019/04/automatically-mount-usb-drives-on.html

 

- after installing, you need to configure  "/etc/usbmount/usbmount.conf"

ENABLED=1
MOUNTPOINTS="/home/user1/USB"
FILESYSTEMS="vfat ntfs fuseblk  ext2 ext3 ext4 hfsplus"
MOUNTOPTIONS="sync,noexec,nodev,noatime,nodiratime"
FS_MOUNTOPTIONS="-fstype=vfat,uid=1000,gid=1000,dmask=0007,fmask=0177"
VERBOSE=no

This should enable the automount on Ubuntu, and you can then refer to your mounted folder in Emby-Server ("/home/user1/USB"). After scanning the Library, all folders of the USB should appear in the Emby-Library.

I have to highlight, this currently works only with FAT-formatted USBs, NTFS I couldn't make work (yet).

 

I think the problem was the right permissions for the automount, that's why emby wasn't able to access the data, which now works with the FS_MOUNTOPTIONS configuration.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...