28

I have installed Ubuntu 16.10 on a 120GB hard disk (sda) and I have a secondary internal hard disk 500GB (sdc) which has nothing else but a folder with video files in it.

When I try to open a video with VLC on that sdc drive I get this error:

File reading failed:
VLC could not open the file "/media/"username"/"hardisksdcname"/Videos/"videofoldername"/"videoname".avi" (Permission denied).
Your input can't be opened:
VLC is unable to open the MRL 'file:///media/"username"/"harddisksdcname"/Videos/"videofoldername"/"videoname".avi'. Check the log for details.

The permissions are "read and write" for all (root and others).

When I copy the video to my desktop and then try to play it with VLC (from the desktop source copy) it works but when I try to strictly play it from my SDC hard drive this error appears.

I don't know where VLC stores its log file.

This is how my devices show up:

NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop1    7:1    0   115M  0 loop /snap/vlc/4  ***<--whats that?***
sdb      8:16   0 447,1G  0 disk 
sr0     11:0    1   1,1G  0 rom  /media/papajo/Ubuntu 15.10 amd64
loop2    7:2    0   228K  0 loop /snap/htop/68
loop0    7:0    0    76M  0 loop /snap/core/714
sdc      8:32   0 465,8G  0 disk 
└─sdc1   8:33   0 465,8G  0 part 
sda      8:0    0 119,2G  0 disk 
├─sda2   8:2    0 102,8G  0 part /
├─sda3   8:3    0    16G  0 part [SWAP]
└─sda1   8:1    0   512M  0 part /boot/efi
sr1     11:1    1   1,5G  0 rom  /media/papajo/Ubuntu 16.10 amd64
Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
papajo
  • 2,977
  • 5
  • 19
  • 29
  • Have you tried a different video player such as Videos? – Bob Jan 23 '17 at 23:17
  • the default video player can access those files but I want vlc to do it.. on my previous installation it worked fine... – papajo Jan 23 '17 at 23:18
  • Oh well,the only other thing I can think of is to remove and reinstall VLC,but you probably tried that.Sorry,I don't use VLC;so that's the limit of my (Ha)expertise. – Bob Jan 23 '17 at 23:28
  • Nothing worked for me: reinstalling via snap, moving video folder to home directory, changing ownership to myself and permissions to 777, and what not! Also, I did not want to reinstall using apt as I wanted to use 2 package managers for my system. I came across this thread with help of which I understood recent versions of VLC snaps (VLC 3.0.12.1 on freshly installed Ubuntu 20.04) only has the "home" interface - not the generic "personal-files" interface, which restricts it from using hidden files. – mg007 Mar 08 '21 at 07:53
  • I tried these steps and it didn't work. snap applications are limited to user's home directories. instead, I mounted the partition as /media/$USER/part and did a symbolic link from .part to /media/$USER/part – Bruce Barnett Jan 23 '22 at 20:53

4 Answers4

22
sudo snap remove vlc

Then install it using APT:

sudo apt-get install vlc
Zanna
  • 70,465
  • 3
    This is a copy of @doug answer above ... just without useful commentaries. – Soren A Dec 12 '18 at 14:51
  • 4
    sudo snap install --classic vlc didn't work for me. I installed it using apt and only after that was it loading files outside of $HOME – Andrei Gabriel Grimpels Dec 16 '18 at 08:40
  • 1
    I have a clear installation of Ubuntu 18.04 and I had the same problem reported in the question. This solution worked perfectly for me and solved the problem of not accessible devices from VLC without using snap packages. – Luca Ferraro Feb 25 '19 at 18:16
  • 1
    Craisy simple solution that works) – Fedorov7890 Jan 14 '20 at 22:20
  • +1 On ubuntu 20.10, I tried using vlc to play a file in /tmp, and it wouldn't do it (cannot open file /tmp/foo.mp4 (no such file or directory), and so I removed the snap, and re-installed w/ sudo snap install --classic vlc but it reported: Warning: flag --classic ignored for strictly confined snap vlc (obviously still didn't work). Installing via sudo apt install vlc fixed it. Caveat: apt installed slightly older 3.0.11.1 and snap installs newer 3.0.12.1, but at least the repo version actually works. – michael Mar 01 '21 at 08:09
  • Works on Ubuntu 20.04 like a charm! – Luan Pham Feb 11 '22 at 13:27
18

If you're using the snap vlc, by default it'll be confined. To get around that, remove it:

sudo snap remove vlc

Then install from the command line:

sudo snap install --classic  vlc

This will allow browsing & loading files outside of $HOME

Please note: that on 16.04 with current snapd package this is no longer needed, vlc can browse mounted volumes, obviously same is true for 18.04.

--classic is basically the old --devmode option.

Though atm there seems no way to use hardware decoding with snaps, if that matters to you...

doug
  • 17,026
  • 5
    Still doesnt work... what matters to me is to have it the old way... I dont know what snaps are why are they good I dont want them or have any use for them every program that uses snaps is problematic for me... and they make a mess I have like 10 "snaps" partitions of a few MB each which I never created... – papajo Apr 23 '17 at 13:53
  • Then remove the snap & install the repo vlc that's packaged as a .deb – doug Apr 23 '17 at 21:53
  • how? (not only how to remove the snap version of vlc but the snaps themselves too ) because sudo snap remove vlc doesnt do the trick – papajo May 07 '17 at 07:37
  • 1
    What do you mean 'doesn't do the trick'?, run the command, copy & paste the results to a pastebin or just ask on ubuntu forums which is more suitable to interactive problem solving. – doug May 07 '17 at 21:40
  • Thank you. This worked for me. Could you please explain the difference between the two versions? – Erdnase Dec 04 '17 at 03:18
  • This is not working on Ubuntu 16.04 with VLC 3 and VLC 4, it cannot play files on other hard drives. It seems I have to use a .deb sadly. – Ken Mar 23 '18 at 02:23
  • Vlc no longer needs that --classic option, can browse mounted media in 16.04 & 18.04. If you find differently then update to latest snapd. – doug Mar 24 '18 at 17:01
  • 5
    I still have the same problem with Ubuntu 18.04! – Peshmerge May 15 '18 at 08:39
  • The snap vlc wouldn't play a file in /tmp, terribly annoying (this is Ubuntu 20.10). So I tried: sudo snap install --classic vlc but it reported: Warning: flag --classic ignored for strictly confined snap vlc (and still same problem, of course). Installing via sudo apt install vlc fixed it, albeit apt installs a slightly older (but working!) version of vlc. – michael Mar 01 '21 at 08:11
  • Did not work on Ubuntu 20.04, using apt-get works! – Luan Pham Feb 11 '22 at 13:27
  • This worked on Ubuntu 24.04. Thank you! – Rockishi Dec 30 '23 at 03:58
1

In my case, I had to change ownership of the video file from root to the user I was logged on as. Then the file would play. I am using Ubuntu 20.04, installed VLC via snap.

xinthose
  • 286
  • 1
  • 4
  • 17
-1

Without uninstalling and reinstalling VLC, you can see or listen to your local media files by moving the audio/video file to /home/<your-name>/snap/vlc/<example-audio-file>

rtaft
  • 1,825
  • idk if this works but I am pretty sure you are missing the username /home//snap – rtaft May 18 '20 at 12:15
  • 1
    I didn't miss it, I did put it in the text box provided to answer the question. Somehow when the answer was posted it ended up with two forward slashes where in between those I put the username. This is how I put it. /home//snap/vlc/. – Juan Alvarez May 18 '20 at 21:04