Wednesday 10 December 2014

Files in wrong order for Panasonic Viera TV DLNA Client

Problem

I have a Panasonic Viera DT65 TV and I like watching video on this. Most of my videos are ordered by title, e.g. part 1, part 1, etc. When I open a folder on the TV I find that all the files are in a different order, for example part 4, part 1, part 7, part 2. If you have many videos then it's pretty hard to get them all in order to make it easy to find the right one to play.

Description

I have a Netgear ReadyNAS, which includes the ReadyMedia DLNA server[1]. The ReadyMedia DLNA server will provide a list of files in a folder in a sort order specified by the DLNA client requesting the list. Unfortunately Panasonic Viera TVs do not specify a sort order and as far as I can see the ReadyMedia DLNA server returns the list in file system order, which is my case is data order. There is no way to change the Panasonic Viera DLNA client sort order.

Solution

The solution to the problem is to force ReadyMedia DLNA server to sort files in the same order every time and ignore any DLNA client sort order requests. This is a good fix for me and for almost all DLNA clients I use the filename is the sort order I require. If you need other sorting, this may not be for you.

If you are able to easily access the server running the ReadyMedia DLNA server and can stop and start the server as well as edit the configuration files you can make a change. In my case my Netgear ReadyNAS allows me to use SSH to connect to the server itself and make changes from the command line.


  1. Stop ReadyMedia DLNA server(I used the ReadyNAS FrontView application)
  2. SSH to the server
  3. cd /etc
  4. vi minidlna.conf
  5. add the following to the bottom of the file (minus the ' marks), 'force_sort_criteria=+upnp:class,+upnp:originalTrackNumber,+dc:title'
  6. save the file
  7. exit vi
  8. Start ReadyMedia DLNA server


You should now be able to access your videos in the correct sort order on your device. I have only the vaguest idea what the parameters mean. Credit should go to NAS Central[3] listed in the sources, which might help you change the sort order if further should you want to.

Sources
[1] ReadyMedia
[2] ReadyMedia change log
[3] NAS Central

Tuesday 21 January 2014

p7zip E_FAIL when uncompressing

Problem

Uncompressing a multi-part zip file on Linux using p7zip throws the error "E_FAIL"

x@y:/media/z/../..$ 7z x ~/Documents/abc-2.0.zip.001

7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_GB.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)

Processing archive: /home/x/Documents/abc-2.0.zip.001

Extracting  ...
...
...
Extracting  abc/def.vmdk
ERROR: E_FAIL  

Description

I have a linux box running Ubuntu 13.10 and it has a large multi-part zip file. Total size of compressed files >40GB; largest file >25GB; number of parts 80. I wanted to unzip this to a 128GB flash drive. As I was unzipping this I got the error E_FAIL. Doing some simple digging around solved this.

E_FAIL means "out of disk"; "unable to make a file of a certain size"; and other variants of that. Basically it struggled to output the uncompressed files to target disk. There are three main reasons for this:

1. You are looking at a compressed archive that is read-only, like a CD-ROM and you've asked -7zip to write to that. It can't do this so fails as if there is no disk space.
2. You are trying to uncompress to a drive with insufficient disk space.
3. You are trying to uncompress a large file to a file system that cannot support a file that large so it fails as if there is no disk space.

My problem was the brand new Flash drive was formatted to exFAT or FAT32 as it appeared to my linux box. Thus the big file (>25GB) couldn't be written above 4GB, which is the limit for FAT32.

Solution

I reformatted the drive in NTFS because it can handle >4GB files and the drive is going to be used on Windows. I re-ran the uncompress process and it worked.

SOURCES

Ubuntu Forums Post