9

I installed linux dual boot with windows, now I can't play any videos from another mounted partition.

I should also mention that only videos have this problem and I can open pictures, documents, music, ... with no problem. Also the problem is not video codecs, If I copy and paste video in linux partition it playes flawlessly.

I tried opening with smPlayer and media player and no success.SmPlayer error log: MPV has finished unexpectedly. Exit code: 2

/snap/smplayer/76/usr/bin/mpv --no-quiet --terminal --no-msg-color --input-ipc-server=/tmp/smplayer-mpv-96c1 --msg-level=ffmpeg/demuxer=error --video-rotate=no --no-config --no-fs --hwdec=no --sub-auto=fuzzy --no-input-default-bindings --input-vo-keyboard=no --no-input-cursor --cursor-autohide=no --no-keepaspect --wid=88080420 --monitorpixelaspect=1 --osd-level=1 --osd-scale=1 --osd-bar-align-y=0.6 --sub-ass --embeddedfonts --sub-ass-line-spacing=0 --sub-scale=1 --sub-font=Arial --sub-color=#ffffffff --sub-shadow-color=#ff000000 --sub-border-color=#ff000000 --sub-border-size=0.75 --sub-shadow-offset=2.5 --sub-font-size=50 --sub-bold=no --sub-italic=no --sub-margin-y=8 --sub-margin-x=20 --sub-codepage=ISO-8859-1 --sub-pos=100 --volume=55 --cache=auto --screenshot-template=cap_%F_%p_%02n --screenshot-format=jpg --screenshot-directory=/home/nymeria/Pictures/smplayer_screenshots --audio-pitch-correction=yes --volume-max=110 --term-playing-msg=MPV_VERSION=${=mpv-version:}
INFO_VIDEO_WIDTH=${=width}
INFO_VIDEO_HEIGHT=${=height}
INFO_VIDEO_ASPECT=${=video-params/aspect}
INFO_VIDEO_FPS=${=container-fps:${=fps}}
INFO_VIDEO_FORMAT=${=video-format}
INFO_VIDEO_CODEC=${=video-codec}
INFO_DEMUX_ROTATION=${=track-list/0/demux-rotation}
INFO_AUDIO_FORMAT=${=audio-codec-name}
INFO_AUDIO_CODEC=${=audio-codec}
INFO_AUDIO_RATE=${=audio-params/samplerate}
INFO_AUDIO_NCH=${=audio-params/channel-count}
INFO_LENGTH=${=duration:${=length}}
INFO_DEMUXER=${=current-demuxer:${=demuxer}}
INFO_SEEKABLE=${=seekable}
INFO_TITLES=${=disc-titles}
INFO_CHAPTERS=${=chapters}
INFO_TRACKS_COUNT=${=track-list/count}
METADATA_TITLE=${metadata/by-key/title:}
METADATA_ARTIST=${metadata/by-key/artist:}
METADATA_ALBUM=${metadata/by-key/album:}
METADATA_GENRE=${metadata/by-key/genre:}
METADATA_DATE=${metadata/by-key/date:}
METADATA_TRACK=${metadata/by-key/track:}
METADATA_COPYRIGHT=${metadata/by-key/copyright:}
INFO_MEDIA_TITLE=${=media-title:}
INFO_STREAM_PATH=${stream-path}
 --audio-client-name=SMPlayer --term-status-msg=STATUS: ${=time-pos} / ${=duration:${=length:0}} P: ${=pause} B: ${=paused-for-cache} I: ${=core-idle} VB: ${=video-bitrate:0} AB: ${=audio-bitrate:0} /media/nymeria/New Volume/Downloads/Attack.on.Titan.S04E30.720p.10bit.WEB-DL.x265.SoftSub.DigiMoviez.mkv

[file] Cannot open file '/media/nymeria/New Volume/Downloads/Attack.on.Titan.S04E30.720p.10bit.WEB-DL.x265.SoftSub.DigiMoviez.mkv': Permission denied Failed to open /media/nymeria/New Volume/Downloads/Attack.on.Titan.S04E30.720p.10bit.WEB-DL.x265.SoftSub.DigiMoviez.mkv. Exiting... (Errors when loading file)

I tried mounting the partition with sudo and It did not fix the problem.

I read somewhere that the problem could be because partition format is not ext4, but I had linux manjaro before this and had no problem palying videos from the same partition.

2 Answers2

14

The SMPlayer snap does not seem to have permissions to access the partition. This seems to be a snap issue. Installing the APT version should fix it.

sudo snap remove smplayer
sudo apt install smplayer
Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • Can someone explain the downvote? – Archisman Panigrahi Dec 02 '23 at 18:06
  • Not my DV, but does apt actually install the non-snap version? It often installs the snap anyway – Chris H Dec 04 '23 at 15:19
  • AFAIK, apt installs the snap version for a few apps like Firefox, Chromium and Telegram. For most apps, it does install the debian package. – Archisman Panigrahi Dec 04 '23 at 15:22
  • It's definitely the case for firefox, even going so far as to remove the properly installed version (and its ppa) and replace it with a snap when going from 20.04 to 22.04, at which point lots of things didn't work. Another example is pdftk, which is what made me detest snaps so much in the first place. Not only does it not read/write /tmp, it fails silently - probably the worst anti-user behaviour I've seen in the *nix world. Knowing that some common binaries are installed as snaps against the user's wishes, I'd want solid, tested confirmation that it does what it's told for smplayer – Chris H Dec 04 '23 at 15:28
  • At least on 20.04 you're right and apt works properly – Chris H Dec 04 '23 at 15:31
  • Compare https://packages.ubuntu.com/search?keywords=smplayer and https://packages.ubuntu.com/search?keywords=firefox. You will see that the version number of firefox has snap. SMPlayer does not. – Archisman Panigrahi Dec 04 '23 at 15:36
  • 1
    I have asked a question regarding this https://askubuntu.com/questions/1494899/where-can-i-find-the-list-of-dummy-apt-packages-which-actually-install-snap – Archisman Panigrahi Dec 04 '23 at 15:37
14

This is most likely due to the default security policy for Snap applications regarding connecting to the removable-media interface which is usually not granted by default ... You can inspect that for snap installed smplayer like so:

$ snap connections smplayer
Interface               Plug                             Slot                     Notes
alsa                    smplayer:alsa                    -                        -
audio-playback          smplayer:audio-playback          :audio-playback          -
desktop                 smplayer:desktop                 :desktop                 -
desktop-legacy          smplayer:desktop-legacy          :desktop-legacy          -
dvb                     smplayer:dvb                     -                        -
home                    smplayer:home                    :home                    -
jack1                   smplayer:jack1                   -                        -
mount-observe           smplayer:mount-observe           -                        -
mpris                   -                                smplayer:mpris           -
network                 smplayer:network                 :network                 -
network-bind            smplayer:network-bind            :network-bind            -
network-control         smplayer:network-control         -                        -
network-manager         smplayer:network-manager         -                        -
opengl                  smplayer:opengl                  :opengl                  -
optical-drive           smplayer:optical-drive           :optical-drive           -
pulseaudio              smplayer:pulseaudio              -                        -
removable-media         smplayer:removable-media         -                        -
screen-inhibit-control  smplayer:screen-inhibit-control  :screen-inhibit-control  -
unity7                  smplayer:unity7                  :unity7                  -
wayland                 smplayer:wayland                 :wayland                 -
x11                     smplayer:x11                     :x11                     -

... and can be enabled with:

sudo snap connect smplayer:removable-media

... so it will report as such:

$ snap connections smplayer
Interface               Plug                             Slot                     Notes
alsa                    smplayer:alsa                    -                        -
audio-playback          smplayer:audio-playback          :audio-playback          -
desktop                 smplayer:desktop                 :desktop                 -
desktop-legacy          smplayer:desktop-legacy          :desktop-legacy          -
dvb                     smplayer:dvb                     -                        -
home                    smplayer:home                    :home                    -
jack1                   smplayer:jack1                   -                        -
mount-observe           smplayer:mount-observe           -                        -
mpris                   -                                smplayer:mpris           -
network                 smplayer:network                 :network                 -
network-bind            smplayer:network-bind            :network-bind            -
network-control         smplayer:network-control         -                        -
network-manager         smplayer:network-manager         -                        -
opengl                  smplayer:opengl                  :opengl                  -
optical-drive           smplayer:optical-drive           :optical-drive           -
pulseaudio              smplayer:pulseaudio              -                        -
removable-media         smplayer:removable-media         :removable-media         manual
screen-inhibit-control  smplayer:screen-inhibit-control  :screen-inhibit-control  -
unity7                  smplayer:unity7                  :unity7                  -
wayland                 smplayer:wayland                 :wayland                 -
x11                     smplayer:x11                     :x11                     -

... and this can be disabled anytime with:

sudo snap disconnect smplayer:removable-media

Notice this can also be done from the UI of the snap-store AKA Software app like this:

enter image description here

Raffa
  • 32,237