6

I have a video located at /tmp/example.mp4. When I try to play it with VLC I get the following error:

Your input can't be opened: VLC is unable to open the MRL 'file:///tmp/example.mp4'. Check the log for details.

When I check the log it contains the following error-level entry:

filesystem error: cannot open file /tmp/example.mp4 (No such file or directory)

However that file does exist:

$ ls /tmp/example.mp4 
/tmp/example.mp4

Furthermore, when I copy that file to my home folder I can play it without any problems. Why can't VLC play the video from the /tmp folder?


  • VLC version: 3.0.8
  • OS version: Ubuntu 16.04 LTS (4.4.0-173-generic)

Output from ffprobe:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'example.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.40.101
  Duration: 00:00:10.00, start: 0.000000, bitrate: 37 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 640x480, 36 kb/s, 4 fps, 4 tbr, 16384 tbn, 8 tbc (default)
    Metadata:
      handler_name    : VideoHandler
4
  • 2
    Is this a snap? A deb? Something else? For a snap, this seems like expected behavior.
    – user535733
    Mar 17, 2020 at 15:13
  • 1
    @user535733 I installed it via sudo snap install vlc. Why is this expected behavior then? What is the difference?
    – a_guest
    Mar 17, 2020 at 15:29
  • 4
    Snaps run confined by design. They don't have access to most of your system. They can see your /home (nobody else's), and they can see their own /snap. And (essentially) nothing else in the filesystem. This issue pops up for most folks when they use /tmp or try to mount external media that the snap simply cannot see. It's not a bug - it was designed that way (security). Lot of discussion among developers about what to do this going on at snapcraft.io.
    – user535733
    Mar 17, 2020 at 15:32
  • 1
    I totally agree with @user535733 so what you can do is to uninstall the snap version of VLC with sudo snap remove vlc and install the DEB package from the Ubuntu official repository with sudo apt-get install vlc
    – Raffa
    Mar 17, 2020 at 18:35

1 Answer 1

3

GREAT the answer of user @user535733 and Raffa is correct and solve the problem!!!

Then: uninstall the snap version of VLC with

sudo snap remove vlc

and install the Debian (.deb) package from the Ubuntu official repository with

sudo apt-get install vlc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .