Linux: Can't Access Output folder as SMB Share
I am not able the access the output folder via Samba while ffmpegfs is running and the folder is mounted. Once ejected, the folder is accessible via Samba and empty but ffmpegfs is not running.
OS: Ubuntu 24.10
I apologize for the lack of correct terms such, still fairly new to Ubuntu. I have my in-folder as the Samba share from Windows PC and my out-folder as '/home/aj/ffmpegfs-out'. Running this command
ffmpegfs --log_maxlevel=TRACE '/run/user/1000/gvfs/smb-share:server=desktop-8mjh95v,share=aj%20(kp_centi)%20-%20xld%20rips' '/home/aj/ffmpegfs-out' --desttype=ALAC --log_stderr
I'm wanting to access the out folder on my Windows PC, but as soon as ffmpegfs runs, the folder becomes in accessible via Samba. Not sure if it's a permissions thing or what. The output works, since I dragged out a few folders from the out-folder else where, and the files played fine.
Interesting approach with /run/user/1000/gvfs/smb-share... I'm quite familiar with Linux, but I did not know this was possible.
This is how I do it. I mapped NAS drives to a directory on a Debian machine, mapped this directory with FFMpegfs, and made the result accessible via Samba.
On your Ubuntu machine, mount the input folder somewhere first; e.g, create /home/aj/ffmpegfs-in, then use this directory:
mkdir /home/aj/ffmpegfs-in mount -t cifs //windowsmachine/yourshare/ /home/aj/ffmpegfs-in
Replace windowsmachine with your Windows PC name and yourshare with whatever you named your share drive. Probably you need to enter your user name and password. You should be able to list the Windows PC's contents now.
Then map this directory:
ffmpegfs --log_maxlevel=TRACE ' '/home/aj/ffmpegfs-in' '/home/aj/ffmpegfs-out' --desttype=ALAC --log_stderr
Now allow access from the Windows PC to /home/aj/ffmpegfs-out:
There seems to be an access rights problem, I don't know from the Edit /etc/samba/smb.conf (e.g. "nano /etc/samba/smb.conf") and add these lines:
[ffmpegfs]
comment = ffmpegfs filesystem
guest ok = Yes
read only = yes
inherit acls = Yes
path = /home/aj/ffmpegfs-out
aio read size = 1
Restart samba.
From you windows machine you should be able to see the ffmpegfs share and its contents. You could drag & drop files from there.
I didn't know how to properly call smb shares. All I did was install samba from apt install, cause it wasn't included by default. I opened the files app and typed in smb:// once connected, I just dragged the folder in to the terminal so it auto filled.
Somehow those commands to mkdir and mount the folder has to be ran seprately. I get a mkdir error running it as one line.
I also had to install cifs since somehow the commands were just not working correctly or existed. I seem to have a fussy setup or can't figure out the mount and cifs commands. I'll have to look in to resources to make this properly work
Just to make sure I understand: I am using Mount to call cifs to mount my Windows smb share to ffmpegfs-in
Run ffmpegfs to have in folder as ffmpegfs-in and output as ffmpegfs-out.
Make ffmpegfs-out a samba share, to be used from my Windows Machine.
Thanks
Yes, Samba and CIFS are not part of the base install packet. They are optional.
You need to run mkdir just once, but if you want to suppress the error when it already exists, call "mkdir -p ..."
I am using Mount to call cifs to mount my Windows smb share to ffmpegfs-in
Run ffmpegfs to have in folder as ffmpegfs-in and output as ffmpegfs-out.
Make ffmpegfs-out a samba share, to be used from my Windows Machine.
Yes.
Yes, Samba and CIFS are not part of the base install packet. They are optional.
You need to run mkdir just once, but if you want to suppress the error when it already exists, call "mkdir -p ..."
I am using Mount to call cifs to mount my Windows smb share to ffmpegfs-in Run ffmpegfs to have in folder as ffmpegfs-in and output as ffmpegfs-out. Make ffmpegfs-out a samba share, to be used from my Windows Machine.
Yes.
I managed to actually get mount to do the cifs to mount my share to a folder.. Somehow i'm still suck with the samba share being accessible before starting ffmpegfs, then suddenly not accessible through samba once ffmpegfs starts. I can access it locally in Linux. It seemingly seems to be ffmpegfs restricting folder access for Samba
I managed to actually get mount to do the cifs to mount my share to a folder.. Somehow i'm still suck with the samba share being accessible before starting ffmpegfs, then suddenly not accessible through samba once ffmpegfs starts. I can access it locally in Linux. It seemingly seems to be ffmpegfs restricting folder access for Samba
I don't see why it should.
Could you do a "ls -l ffmpegfs-out" before the directory was mounted with FFmpegfs and after?
I would like to see the permissions.
I managed to actually get mount to do the cifs to mount my share to a folder.. Somehow i'm still suck with the samba share being accessible before starting ffmpegfs, then suddenly not accessible through samba once ffmpegfs starts. I can access it locally in Linux. It seemingly seems to be ffmpegfs restricting folder access for Samba
I don't see why it should.
Could you do a "ls -l ffmpegfs-out" before the directory was mounted with FFmpegfs and after?
I would like to see the permissions.
I did the ls - commands before and after. placed below. I did the LS, started ffmpegfs, did ls again with nothing in it, mounted my samba shares, and did ls again.
aj@aj-VMware-Virtual-Platform:~$ ls -l '/home/aj/ffmpegfs-out'
total 0
aj@aj-VMware-Virtual-Platform:~$ sudo ffmpegfs --log_maxlevel=TRACE /home/aj/ffmpegfs-in /home/aj/ffmpegfs-out --desttype=ALAC --log_stderr -o allow_other -o prebuffer_size=1G
[sudo] password for aj:
2024-12-30 23:01:02.874 DEBUG : Creating new media file cache.
2024-12-30 23:01:02.958 TRACE : ********* FFMPEGFS Options *********
2024-12-30 23:01:02.958 TRACE : Base Path : /home/aj/ffmpegfs-in/
2024-12-30 23:01:02.958 TRACE : Mount Path : /home/aj/ffmpegfs-out/
2024-12-30 23:01:02.958 TRACE : --------- Format ---------
2024-12-30 23:01:02.958 TRACE : File Type : ALAC
2024-12-30 23:01:02.977 TRACE : Audio Codec : alac (ALAC (Apple Lossless Audio Codec))
2024-12-30 23:01:02.977 TRACE : Smart Transcode : no
2024-12-30 23:01:02.977 TRACE : Auto Copy : OFF
2024-12-30 23:01:02.978 TRACE : Recode to same fmt: NO
2024-12-30 23:01:02.978 TRACE : Profile : NONE
2024-12-30 23:01:02.978 TRACE : Level : INVALID
2024-12-30 23:01:02.978 TRACE : Include Extensions:
2024-12-30 23:01:02.978 TRACE : Hide Extensions :
2024-12-30 23:01:02.978 TRACE : --------- Audio ---------
2024-12-30 23:01:02.978 TRACE : Codecs : ALAC (Apple Lossless Audio Codec)+unknown
2024-12-30 23:01:02.978 TRACE : Bitrate : 131.1 kbps
2024-12-30 23:01:02.978 TRACE : Sample Rate : 44.100 kHz
2024-12-30 23:01:02.978 TRACE : Max. Channels : 2
2024-12-30 23:01:02.978 TRACE : --------- Video ---------
2024-12-30 23:01:02.978 TRACE : Codec : unknown
2024-12-30 23:01:02.978 TRACE : Bitrate : 2.10 Mbps
2024-12-30 23:01:02.978 TRACE : Dimension : width=unlimited height=unlimited
2024-12-30 23:01:02.978 TRACE : Deinterlace : no
2024-12-30 23:01:02.978 TRACE : --------- HLS Options ---------
2024-12-30 23:01:02.978 TRACE : Segment Duration : 10s
2024-12-30 23:01:02.978 TRACE : Seek Time Diff : 30s
2024-12-30 23:01:02.978 TRACE : ---- Hardware Acceleration ----
2024-12-30 23:01:02.978 TRACE : Hardware Decoder:
2024-12-30 23:01:02.978 TRACE : API : NONE
2024-12-30 23:01:02.978 TRACE : Frame Buffering : (null)
2024-12-30 23:01:02.979 TRACE : Device :
2024-12-30 23:01:02.979 TRACE : Hardware Encoder:
2024-12-30 23:01:02.979 TRACE : API : NONE
2024-12-30 23:01:02.979 TRACE : Frame Buffering : (null)
2024-12-30 23:01:02.979 TRACE : Device :
2024-12-30 23:01:02.979 TRACE : --------- Subtitles ---------
2024-12-30 23:01:02.979 TRACE : No subtitles : no
2024-12-30 23:01:02.979 TRACE : --------- Virtual Script ---------
2024-12-30 23:01:02.979 TRACE : Create script : no
2024-12-30 23:01:02.979 TRACE : Script file name : index.php
2024-12-30 23:01:02.979 TRACE : Input file : scripts/videotag.php
2024-12-30 23:01:02.979 TRACE : --------- Logging ---------
2024-12-30 23:01:02.979 TRACE : Max. Log Level : TRACE
2024-12-30 23:01:02.980 TRACE : Log to stderr : yes
2024-12-30 23:01:02.980 TRACE : Log to syslog : no
2024-12-30 23:01:02.980 TRACE : Logfile : none
2024-12-30 23:01:02.980 TRACE : --------- Cache Settings ---------
2024-12-30 23:01:02.980 TRACE : Expiry Time : 1w
2024-12-30 23:01:02.980 TRACE : Inactivity Suspend: 15s
2024-12-30 23:01:02.980 TRACE : Inactivity Abort : 30s
2024-12-30 23:01:02.980 TRACE : Pre-buffer Time : unlimited
2024-12-30 23:01:02.980 TRACE : Pre-buffer Size : 1024.0 MB
2024-12-30 23:01:02.980 TRACE : Max. Cache Size : unlimited
2024-12-30 23:01:02.980 TRACE : Min. Disk Space : unlimited
2024-12-30 23:01:02.980 TRACE : Cache Path : /var/cache/ffmpegfs/
2024-12-30 23:01:02.980 TRACE : Disable Cache : no
2024-12-30 23:01:02.980 TRACE : Maintenance Timer : 1h
2024-12-30 23:01:02.981 TRACE : Clear Cache : no
2024-12-30 23:01:02.981 TRACE : --------- Various Options ---------
2024-12-30 23:01:02.981 TRACE : Remove Album Arts : no
2024-12-30 23:01:02.981 TRACE : Max. Threads : 64
2024-12-30 23:01:02.981 TRACE : Decoding Errors : ignore
2024-12-30 23:01:02.981 TRACE : Min. DVD Chapter : 00:01.000
2024-12-30 23:01:02.981 TRACE : Old Name Scheme : no
2024-12-30 23:01:02.981 TRACE : --------- Experimental Options ---------
2024-12-30 23:01:02.981 TRACE : Windows 10 Fix : SMB Lockup Fix Active
aj@aj-VMware-Virtual-Platform:~$ ls -l '/home/aj/ffmpegfs-out'
total 0
aj@aj-VMware-Virtual-Platform:~$ sudo mount -t cifs //10.235.1.121/eac /home/aj/ffmpegfs-in
Password for root@//10.235.1.121/eac:
aj@aj-VMware-Virtual-Platform:~$ ls -l '/home/aj/ffmpegfs-out'
total 0
drwxr-xr-x 2 root root 0 Aug 3 2022 김현정
drwxr-xr-x 2 root root 0 Aug 9 2022 ABBA
drwxr-xr-x 2 root root 0 Aug 11 2022 aespa
drwxr-xr-x 2 root root 0 Aug 11 2022 'After School'
drwxr-xr-x 2 root root 0 Aug 8 2022 'Alan Jackson'
drwxr-xr-x 2 root root 0 Sep 5 2022 'Antonín Dvořák, Zoltán Kodály, Bedřich Smetana; NBC Symphony Orchestra, Arturo Toscanini'
drwxr-xr-x 2 root root 0 Mar 16 2024 Apink
drwxr-xr-x 2 root root 0 Sep 5 2022 'Ashley Tisdale'
drwxr-xr-x 2 root root 0 Sep 5 2022 A★Teens
drwxr-xr-x 2 root root 0 Feb 8 2024 'Bee Gees'
drwxr-xr-x 2 root root 0 Aug 4 2022 'Blue Öyster Cult'
drwxr-xr-x 2 root root 0 Jul 31 2022 Boston
drwxr-xr-x 2 root root 0 Jul 31 2022 Brandy
drwxr-xr-x 2 root root 0 Aug 5 2022 'Britney Spears'
drwxr-xr-x 2 root root 0 Jul 31 2022 Cartoons
drwxr-xr-x 2 root root 0 Jun 13 2024 'Charli XCX'
drwxr-xr-x 2 root root 0 Jul 31 2022 Cher
drwxr-xr-x 2 root root 0 Mar 16 2024 CHUU
drwxr-xr-x 2 root root 0 Aug 1 2022 'Daft Punk'
drwxr-xr-x 2 root root 0 Aug 1 2022 'Daniel Bedingfield'
drwxr-xr-x 2 root root 0 Aug 9 2022 'David Cook'
drwxr-xr-x 2 root root 0 Aug 11 2022 'Destiny’s Child'
drwxr-xr-x 2 root root 0 Aug 9 2022 Dvořák
drwxr-xr-x 2 root root 0 Oct 28 23:49 EACFolderCreation-main
drwxr-xr-x 2 root root 0 Mar 16 2024 Eagles
drwxr-xr-x 2 root root 0 Aug 1 2022 'Everything but the Girl'
drwxr-xr-x 2 root root 0 Aug 1 2022 'Fatboy Slim'
drwxr-xr-x 2 root root 0 Aug 7 2022 'Fenix TX'
drwxr-xr-x 2 root root 0 Aug 10 2022 Fergie
drwxr-xr-x 2 root root 0 Aug 1 2022 Fischerspooner
drwxr-xr-x 2 root root 0 Aug 10 2022 'Fleetwood Mac'
drwxr-xr-x 2 root root 0 Aug 9 2022 Fuel
drwxr-xr-x 2 root root 0 Aug 11 2022 'f(x)'
drwxr-xr-x 2 root root 0 Aug 6 2022 'Garth Brooks'
drwxr-xr-x 2 root root 0 Apr 1 2024 '(G)I-DLE'
drwxr-xr-x 2 root root 0 Aug 2 2022 'Gustav Holst; New York Philharmonic, Zubin Mehta'
drwxr-xr-x 2 root root 0 Aug 11 2022 'Gwen Stefani'
drwxr-xr-x 2 root root 0 Sep 5 2022 'Hannah Montana - Miley Cyrus'
drwxr-xr-x 2 root root 0 Aug 11 2022 'Hilary Duff'
drwxr-xr-x 2 root root 0 Aug 2 2022 'Hootie & the Blowfish'
drwxr-xr-x 2 root root 0 Aug 2 2022 'Icona Pop'
drwxr-xr-x 2 root root 0 Apr 1 2024 ITZY
drwxr-xr-x 2 root root 0 Jun 23 2024 IVE
drwxr-xr-x 2 root root 0 Aug 6 2022 'John Mayer'
drwxr-xr-x 2 root root 0 Aug 3 2022 JoJo
drwxr-xr-x 2 root root 0 Aug 2 2022 'Jonas Brothers'
drwxr-xr-x 2 root root 0 Aug 10 2022 'Jordin Sparks'
drwxr-xr-x 2 root root 0 Aug 3 2022 Kelis
drwxr-xr-x 2 root root 0 Jun 6 2024 'Kylie Minogue'
drwxr-xr-x 2 root root 0 Aug 7 2022 'La Bouche'
drwxr-xr-x 2 root root 0 Aug 3 2022 'Lady Gaga'
drwxr-xr-x 2 root root 0 Oct 28 23:49 'LE SSERAFIM'
drwxr-xr-x 2 root root 0 Aug 3 2022 'Loudon Wainwright III'
drwxr-xr-x 2 root root 0 Aug 4 2022 Madonna
drwxr-xr-x 2 root root 0 Jan 7 2024 'Mark Stephen Pelfrey'
drwxr-xr-x 2 root root 0 Aug 6 2022 'Maroon 5'
drwxr-xr-x 2 root root 0 Aug 3 2022 MBLAQ
drwxr-xr-x 2 root root 0 Aug 3 2022 'Miley Cyrus'
drwxr-xr-x 2 root root 0 Aug 9 2022 Moby
drwxr-xr-x 2 root root 0 Aug 9 2022 'Modest Mouse'
drwxr-xr-x 2 root root 0 Aug 10 2022 'Montgomery Gentry'
drwxr-xr-x 2 root root 0 Aug 3 2022 'Natalie Imbruglia'
drwxr-xr-x 2 root root 0 Jan 19 2024 Nayeon
drwxr-xr-x 2 root root 0 May 20 2024 'NCT 127'
drwxr-xr-x 2 root root 0 Jun 23 2024 'NCT DREAM'
drwxr-xr-x 2 root root 0 Aug 6 2022 'Nelly Furtado'
drwxr-xr-x 2 root root 0 May 1 2023 'New folder'
drwxr-xr-x 2 root root 0 Jun 21 2024 NewJeans
drwxr-xr-x 2 root root 0 Mar 20 2024 'Nujabes & Fat Jon'
drwxr-xr-x 2 root root 0 Aug 6 2022 'One Direction'
drwxr-xr-x 2 root root 0 Aug 5 2022 OneRepublic
drwxr-xr-x 2 root root 0 Aug 7 2022 'Passion Pit'
drwxr-xr-x 2 root root 0 Aug 7 2022 'Peter White'
drwxr-xr-x 2 root root 0 Aug 8 2022 Play
drwxr-xr-x 2 root root 0 Mar 16 2024 'Purple Kiss'
drwxr-xr-x 2 root root 0 Sep 5 2022 'Pussycat Dolls'
drwxr-xr-x 2 root root 0 Aug 4 2022 QT
drwxr-xr-x 2 root root 0 Aug 4 2022 'Red House Painters'
drwxr-xr-x 2 root root 0 Aug 11 2022 Rihanna
drwxr-xr-x 2 root root 0 Aug 6 2022 'Shania Twain'
drwxr-xr-x 2 root root 0 Aug 8 2022 'Space Cowboy'
drwxr-xr-x 2 root root 0 Aug 9 2022 'Spice Girls'
drwxr-xr-x 2 root root 0 Aug 20 2022 'Stacie Orrico'
drwxr-xr-x 2 root root 0 Aug 11 2022 STAYC
drwxr-xr-x 2 root root 0 Aug 11 2022 Sting
drwxr-xr-x 2 root root 0 Aug 17 17:24 'Stray Kids'
drwxr-xr-x 2 root root 0 Aug 4 2022 'SUPER JUNIOR'
drwxr-xr-x 2 root root 0 Aug 10 2022 'Temple of the Dog'
drwxr-xr-x 2 root root 0 Aug 9 2022 'The Beach Boys'
drwxr-xr-x 2 root root 0 Aug 11 2022 'The Beatles'
drwxr-xr-x 2 root root 0 Apr 4 2024 'The Cheetah Girls'
drwxr-xr-x 2 root root 0 Sep 30 2022 'The Doobie Brothers'
drwxr-xr-x 2 root root 0 Mar 16 2024 'The Fray'
drwxr-xr-x 2 root root 0 Aug 2 2022 'The J. Geils Band'
drwxr-xr-x 2 root root 0 Aug 9 2022 'The Police'
drwxr-xr-x 2 root root 0 Sep 5 2022 'The Pussycat Dolls'
drwxr-xr-x 2 root root 0 Aug 4 2022 'They Might Be Giants'
drwxr-xr-x 2 root root 0 Aug 4 2022 Timbaland
drwxr-xr-x 2 root root 0 Jun 23 2024 'TOMORROW X TOGETHER'
drwxr-xr-x 2 root root 0 Sep 5 2022 'Tom Petty & the Heartbreakers'
drwxr-xr-x 2 root root 0 Aug 9 2022 'Tony Bennett & Lady Gaga'
drwxr-xr-x 2 root root 0 Aug 8 2022 'Trouble Maker'
drwxr-xr-x 2 root root 0 Aug 10 2022 Usher
drwxr-xr-x 2 root root 0 Aug 10 2022 'Vanessa Hudgens'
drwxr-xr-x 2 root root 0 Jun 22 2024 'Various Artists'
drwxr-xr-x 2 root root 0 Aug 8 23:51 WHY
drwxr-xr-x 2 root root 0 Aug 10 2022 'Will Smith'
drwxr-xr-x 2 root root 0 Jan 22 2024 WJSN
aj@aj-VMware-Virtual-Platform:~$
I did just run into the same issue. The problem in my case was that I omitted the fuse option allow_other as in
ffmpegfs --log_maxlevel=TRACE '/run/user/1000/gvfs/smb-share:server=desktop-8mjh95v,share=aj%20(kp_centi)%20-%20xld%20rips' '/home/aj/ffmpegfs-out' --desttype=ALAC --log_stderr -o allow_other
I guess I didn't note it on here, but I did do the allow other and it ran. It was in the pasted above.