× NETGEAR will be terminating ReadyCLOUD service by July 1st, 2023. For more details click here.
Orbi WiFi 7 RBE973
Reply

ReadyDLNA cannot allocate memory while scanning mkv file

talmage
Tutor

ReadyDLNA cannot allocate memory while scanning mkv file

ReadyDLNA on my ReadyNAS Pro 4 with RAIDiator 4.2.31 says that it cannot allocate memory when processing the metadata of three MKV files.  Why would that be?

 

I bought more memory, upgrading the Pro 4 from 1GB to 4GB.  ReadyDLNA still says it cannot allocate memory.

 

Here is are examples of the error message in /var/log/upnp-av.log:

 

[2017/08/14 14:20:26] metadata.c:686: warn: Opening /c/media/Collected/Foo/Foo.mkv failed! [Cannot allocate memory]
[2017/08/14 14:20:26] scanner.c:490: warn: Unsuccessful getting details for /c/media/Foo/Foo.mkv!

 

 

 

 

Model: ReadyNAS RNDP4000|ReadyNAS Pro 4 Chassis only
Message 1 of 7
StephenB
Guru

Re: ReadyDLNA cannot allocate memory while scanning mkv file

When you do a rescan, do these messages always show up on the same files?  If so, did it get further when you upgraded the memory?

Message 2 of 7
talmage
Tutor

Re: ReadyDLNA cannot allocate memory while scanning mkv file

ReadyDLNA always complains about the same files.  Judging by the error message and the source code, it's failing while reading metadata, not the video in the files.  I asked about the problem here so that I won't have to read the source code to find the answer.  I think the problem occurs in libavformat, for which I don't yet have the source code.

 

I expec that the solution is to convert the MKV file into an MP4 file with ffmpeg.  Like so:

 

ffmpeg -i /path/to/Foo.mkv -codec copy /path/to/Foo.mp4

 

I found that solution at askubuntu.com

 

 

Message 3 of 7
StephenB
Guru

Re: ReadyDLNA cannot allocate memory while scanning mkv file


@talmage wrote:

ReadyDLNA always complains about the same files.  Judging by the error message and the source code, it's failing while reading metadata, not the video in the files. 

 


It's extracting the metadata from the files. Since it's always crashing on the same ones, it is mostly file corruption.  Remuxing the MKV (which is what your ffmpeg command does) likely will solve it - though it is better remux it to another MKV.  MP4 players generally are expecting AAC audio, and if your file doesn't use that you likely won't be able to play it. BTW There are other free tools you can use for this, including mkvtoolnix and avidemux.

 

Note if there is file corruption, there could be some issues with playback (both with the original and the remuxed files).  If that's the case you'll need to re-rip it (or download it again).

Message 4 of 7
PutiPlot
Aspirant

Re: ReadyDLNA cannot allocate memory while scanning mkv file

I have an ReadyNAS Ultra with RAIDiator 4.2.28 and has a similar issue.

A lot of my mkv-files is not able to be added when scanned.

Also tried a manual scan through SSH, and got the:
metadata.c:686: warn: Opening /c/media/Videos/High Quality/MOVIENAME.mkv failed! [Cannot allocate memory]

I have tried to remux the mkv with MKVToolNix, tried to rename it, and a lot of different things.

It does not seem I have space or memory issue either:

nasHOME:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/md0 4176564 353596 3613308 9% /
tmpfs 16 0 16 0% /USB
/dev/c/c 7767758348 2671212232 5046546116 35% /c
/c/media 7767758348 2671212232 5046546116 35% /home/ftp/media
nasHOME:~# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/md0 65536 9411 56125 15% /
tmpfs 127616 1 127615 1% /USB
/dev/c/c 121856000 56506 121799494 1% /c
/c/media 121856000 56506 121799494 1% /home/ftp/media

nasHOME:~# top
top - 10:17:59 up 20:20, 1 user, load average: 0.00, 0.02, 0.05
Tasks: 96 total, 1 running, 95 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.3%us, 0.7%sy, 0.0%ni, 99.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 1020932k total, 739544k used, 281388k free, 41488k buffers
Swap: 524272k total, 532k used, 523740k free, 535732k cached

 

What can be the issue? (And how can I fix it?
The MKVs plays fine through SMB

Model: ReadyNAS RNDU2000|ReadyNAS Ultra 2 Chassis only
Message 5 of 7
StephenB
Guru

Re: ReadyDLNA cannot allocate memory while scanning mkv file

Maybe move that MKV into a temporary share (that doesn't have DLNA enabled), and then scan again - moving off the files that aren't playing into their own folder.  Then look for something that they have in common. 

Message 6 of 7
bedlam1
Prodigy

Re: ReadyDLNA cannot allocate memory while scanning mkv file


@talmage wrote:

ReadyDLNA on my ReadyNAS Pro 4 with RAIDiator 4.2.31 says that it cannot allocate memory when processing the metadata of three MKV files.  Why would that be?

 

I bought more memory, upgrading the Pro 4 from 1GB to 4GB.  ReadyDLNA still says it cannot allocate memory.

 

 

Could you advise what brand/model/reference no./part no. of memory you upgraded to please 

 

 

 


 

Message 7 of 7
Top Contributors
Discussion stats
  • 6 replies
  • 3664 views
  • 1 kudo
  • 4 in conversation
Announcements