You are not logged in.

#1 2019-06-25 20:35:46

JeanLucJ
Member
Registered: 2019-03-08
Posts: 59

[Solved] Problem with reading an Xvid video with samba (synology NAS)

I try to watch an mpeg4 video with mpv.
It fails with one warning, then one error, after displaying correctly about 5 seconds of video and sound :

[ffmpeg/video] mpeg4: Failed to parse extradata
[ffmpeg/video] mpeg4: ac-tex damaged at 37 14
[ffmpeg/video] mpeg4: Error at MB: 681

The video runs perfectly well on my raspberry with osmc, so the file is not corrupt and the video should last about 90 minutes.

ffmpeg -i returns :

Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x304 [SAR 1:1 DAR 45:19], 1561 kb/s, 24 fps, 24 tbr, 24 tbn, 24 tbc
    Stream #0:1: Audio: mp3 (U[0][0][0] / 0x0055), 48000 Hz, stereo, fltp, 128 kb/s

So, what I am missing?
I don't *need* to play it on my computer, but I'm interested to understand what is wrong. So some hints (instead of a direct solution) would be appreciated smile

Regards,

Last edited by JeanLucJ (2019-07-10 02:42:08)

Offline

#2 2019-06-25 21:36:37

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,515

Re: [Solved] Problem with reading an Xvid video with samba (synology NAS)

What does mediainfo output about the mp4 file ?

https://www.archlinux.org/packages/comm … mediainfo/


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#3 2019-06-26 06:48:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,496

Re: [Solved] Problem with reading an Xvid video with samba (synology NAS)

- Does mpv quit or crash?
The video seems corrupt but I'd assume mpv would just ignore than and continue by default.

- Does it play in vlc?

- Do the raspi and arch play the very same file from the same source? Otherwise (copies) md5sum them to ensure there was no I/O error when copying it.

Offline

#4 2019-06-26 07:58:56

latalante1
Member
Registered: 2018-08-30
Posts: 112

Re: [Solved] Problem with reading an Xvid video with samba (synology NAS)

The file is most likely damaged (due to copying). Prepare yourself. You will be flooded with a lot of warnings.

ffmpeg -v warning -i corupted_broken_file -f null -

It is possible that this AVI container video (you did not provide details) has a broken index.

mpv --index=recreate

Xvidcore library (libxvidcore.so) is used by ffmpeg only as an encoder.

ffmpeg -codecs | grep mpeg4

You can use mplayer to decode it (with the use libxvid), but it is very slow and limited compared to the native ffmpeg mpeg-4 decoder.

mplayer -vc xvid valid_xvid.avi

Offline

#5 2019-06-26 19:43:32

JeanLucJ
Member
Registered: 2019-03-08
Posts: 59

Re: [Solved] Problem with reading an Xvid video with samba (synology NAS)

Thanks for the replies.
It crashes with vlc too, and it is indeed the same file accessed from the same source with arch and with raspi... with is samba on a synology NAS.

I did some tests, and actually the video works fine when copied locally.
I feel silly to have overlooked this obvious test...

I'm going to dig more that direction, it's more for curiosity than anything else smile

I suspect the synology actually. I'm not a big fan of their distro, I use an encrypted drive, and there are some limitations (notably : limits on the complete path+name file, some qwirks with rsync or NFS - don't remember - over encrypted drive... than made me setup a dedicated backup server for personnal data, leaving it only function as a mediacenter repository).

I'm changing the topic subject as it is actually not relevant.

Regards;

Offline

#6 2019-06-26 19:55:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,496

Re: [Solved] Problem with reading an Xvid video with samba (synology NAS)

From some cifs mount? In case try to play the file w/ "mpv smb://PATH", the apparent random access (trailing index?) might require specific cache options to the cifs mount to work.

And if you don't have windows, use nfs anyway smile
You might then want to use the "nolock" option, because the NAS has probably a broken NLM implementation tongue

Offline

#7 2019-07-10 02:41:36

JeanLucJ
Member
Registered: 2019-03-08
Posts: 59

Re: [Solved] Problem with reading an Xvid video with samba (synology NAS)

seth wrote:

And if you don't have windows, use nfs anyway smile

I banned windows since some time (I had one computer with windows for gaming, but since wine 3.X, legacy wine and proton can run almost any game).
Also, I banned debian this year, Arch is pretty fantastic for me.

But :
- Crypted folders on Synology do not support NFS (I checked again. What a mess. Next time I'll build my own NAS)
- I must miss something with NFS, but I feel it's less secure than samba : even with root access, you must provide a password to access a samba shared folder. With NFS, it's pretty trivial to get ID and of course use any user name. I'm not an expert so maybe I'm missing some security option with NFS. It's just a feeling, not the result of a complete analysis...
- Why suggesting NFS instead of samba? I mean, apart from the fact that's it's more native to Linux, I don't see any specific benefit (or shortcoming with samba). Again, I'm no expert, I'm just being curious

I'll change the topic to solved, I've no access to my NAS for some time, and I'm sure I can fix it now that I know where to look.
When I come back from vacations, I may complete this post with a solution.

Regards

Offline

#8 2019-07-10 06:59:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,496

Re: [Solved] Problem with reading an Xvid video with samba (synology NAS)

https://wiki.archlinux.org/index.php/NFS - see the note on the head.

NFS is a filesystem and not a convoluted mess of "remote stuff" - you can restrict the access on the server exports and also ID mapping, but the idea is not to allow rogue clients random access which would have to be authorized against a server login. That's the scope of s/ftp
On the upside, the protocol is less of a mess and has proper posix stuff support regardless of the highly insecure (who'd have guess that) NT1 version (search this forum for "vers=1.0" to see lots of users w/ broken smb setups after SMB2 became default) which is so terribly bad that the still bad SMB2 looks incredibly awesome in comparism…
POSIX extensions for later SMB versions are in production but not yet seen, so you'll have limited features on secure protocol versions.

The problem isn't btw. "samba" but "SMB", ie. the protocol.

Offline

Board footer

Powered by FluxBB