media over smb (smplayer/mpv)

Have a couple of NAS drives, one of which is very old and was up until a few days ago using smbv1.
However, I’ve since forced to to use smbv2 but since this update have noticed that many of my multimedia files (mostly H264 720p) will not play via smplayer or mpv.
Flicking that NAS back to smbv1 the files play again.

Thinking this might be a problem with the nas I put a bunch of multimedia files on my newer NAS that defaults to smbv2 to check - but they also will not play from this nas drive. Forcing that nas to use smbv1 the files will play again.

Files will play fine from smbv2 on VLC (from both drives) so the problem seems to be something to do with mpv (or associated libs).

Anybody have any idea what is up here?
Additional info required?

This is present on both a leap 15.1 and tumbleweed machine - Plasma

Strange. Are you accessing these samba files via a file manager? Or are you mounting these remote filesystems?

Just in case this describes the problem you’re encountering…
https://www.dedoimedo.com/computers/vlc-remote-files.html

Launching these using dolphin
VLC plays the files fine (so I’ve set it as the default media player until I work out what’s going on).

As I understand it - mpv doesn’t support smb but requires dolphin/kio to access smb shares.
When dragging a file into the mpv interface from the nas mpv crashes immediately.
With smbv2 disabled it plays the file fine.

running mpv from konsole sheds no light on the issue

dragging from dolphin into mpv

with smbv2

farcus@linux-jjmc:~> mpv --player-operation-mode=pseudo-gui
Using netbios name LINUX-JJMC.
Using workgroup WORKGROUP.
gensec_spnego_client_negTokenTarg_step: SPNEGO(ntlmssp) login failed: NT_STATUS_WRONG_CREDENTIAL_HANDLE

mpv crashes immediately with no further output

with smbv1

farcus@linux-jjmc:~> mpv --player-operation-mode=pseudo-gui
Using netbios name LINUX-JJMC.
Using workgroup WORKGROUP.
gensec_spnego_client_negTokenTarg_step: SPNEGO(ntlmssp) login failed: NT_STATUS_WRONG_CREDENTIAL_HANDLE


exactly the same output but does not crash and continues on to play the file without any further info in konsole
so I don’t think the root of the error is in the above output

This article discusses what is happening under the hood…
https://pointieststick.com/2018/01/17/videos-on-samba-shares/

Background

For KDE Plasma and apps, the KIO framework is responsible for file access and I/O–including files on Samba shares. Software that uses KIO gets this for free; for other software, KIO can either download the file locally before giving it to the program, or else give the program a Samba URL (e.g. smb://share/path/to/file.avi) and let the program figure out what to do.
KDE does have a KIO-aware video player that could do the job: DragonPlayer. Unfortunately, it’s not actively developed, and a bug prevents this from working.
That leaves 3rd party software, like VLC and MPV. These two don’t use KIO, but they do have Samba clients built in, so they’re able to handle the Samba URLs that KIO gives them!

Do you think this is what you’re observing here?

I don’t know if you NAS needs credentials or whether you allow anonymous (guest) access, but you could try running from a terminal with one of the following depending on your situation…

mpv smb://USER:PASSWORD@SERVER/SHARE/file.mpg
mpv smb://guest:@SERVER/SHARE/file.mpg

I assume that doing that works whereas dragging the file to the application likely fails (incompatible URL handling) as discussed in the blog I linked to.

no credentials are required to access the nas
from command I still cannot play

farcus@linux-jjmc:~> mpv smb://guest:@ls210/share/Yuzuki/Bix/bix.mp4
Playing: smb://guest:@ls210/share/Yuzuki
Using netbios name LINUX-JJMC.
Using workgroup WORKGROUP.
gensec_spnego_client_negTokenTarg_step: SPNEGO(ntlmssp) login failed: NT_STATUS_WRONG_CRE
DENTIAL_HANDLE


switching smplayer to use mplayer instead of mpv, smb share are playable, so I’m sure it’s some kind of smb issue specific to mpv
vlc has never asked for credentials and just works.

Problem I have with the smplayer/mplayer combination is that playback is not smooth (even for local files) - and hasn’t been on this system for several versions of opensuse/mplayer.

Yes, it is strange issue. All I could manage to dredge up along similar lines…
https://www.reddit.com/r/SolusProject/comments/59qirv/samba_and_mpvvlc_lan_streaming/
http://samba.2283325.n4.nabble.com/samba-4-5-x-Doesn-t-work-against-Anonymous-login-to-windows-td4719259.html

Just for completeness, what happens if you attempt to access using no username like this…

mpv smb://ls210/share/Yuzuki/Bix/bix.mp4

I ask this because of this samba bug report
https://bugzilla.samba.org/show_bug.cgi?id=12821
where the same ‘NT_STATUS_WRONG_CREDENTIAL_HANDLE’ error reported.

The following likely describes your solution, makes sense and is consistent with the thrown error… Verify that your Samba client is configured to use <only> SMBv2 and not allow a min SMBv1

https://social.technet.microsoft.com/Forums/ie/en-US/8249ad4c-69aa-41ba-8863-8ecd7a7a4d27/samba-share-password-refused?forum=win10itpronetworking

If you were connecting with another OS, I see that the solution is essentially the same but of course how you configure would be different.

TSU

I still get the same message

gensec_spnego_client_negTokenTarg_step: SPNEGO(ntlmssp) login failed: NT_STATUS_WRONG_CREDENTIAL_HANDLE

I’m not sure how I’d force the NAS to use smb2 as a min (disablng smb1 altogether)
I’ve only just worked out how to get the NAS to work with smbv2 at all
see - https://forums.opensuse.org/showthread.php/538134-Has-stopped-supporting-older-smb-protocols?p=2919540#post2919540

at any rate - I have a solution that I am happy with.
I’ve managed to get mplayer to perform better by adding . . .

cache=8192

to .mplayer/config
so now the smplayer/mplayer option works well

I have some time off from work coming up soon so I might try and delve deeper into this then

That’s good.

I have some time off from work coming up soon so I might try and delve deeper into this then

Keep us posted.

updated mpv on tumbleweed today to version 0.30.0+git.1573301895.cb2d7c1534-38.1
suddenly everything is working over smbv2
Still not working on leap but I see there is an mpv update in the queue there so perhaps once that makes it through it will solve the issue completely