DLNA and Mediatomb

Humax HDR-Fox T2 running CFW 3.03, Webif 1.3.3-3

Please excuse the fumblings of an amateur but I would welcome a little help!

I am trying to use a DLNA-enabled media player (Sumvision Micro 4) to access recordings on a 2Tb USB drive connected to my HDR. The disk has a top-level directory 'Video' with subdirectories for 'Films', Documentaries', TV Drama etc, then series names and so forth. Up to five levels of subdirectory are needed to reach some files.

At first the player could access the internal drive on the HDR and play both HD and SD videos but couldn't see the USB drive. I figured that this means that the internal DLNA service supports only the main drive. Not really a surprise.

Next try was to use Mediatomb and set up a link to the \Video folder on the USB drive. On the Mediatomb Webif page I found the USB drive under 'Media' and set Scan Mode='Inotify', Scan Level='Full', set 'Recursive' and clicked on 'Set'. The USB disk was read, taking in all about 5 minutes.

Now the player can see also the USB drive listed under 'MediaTomb' but all 2420 video files are shown in a single alphabetic list. Useless, almost.

A bit more delving pointed to Mediatomb's import script 'Import.js'. I can't pretend to understand it properly but it does seem that the script is aimed mainly at audio and photo files, using metatags to create a kind of structure. A comment above the Video import function notes that there are no standards for metadata and a simple bit of code follows that looks suspiciously like 'please create one long list'.

I'm not concerned by the lack of metadata for video files, I would just like to be able to access the files via the directory structure on the disk. On the Mediatomb website I have found some guidance on how to change 'Import.js' to do what I want but I'm not sure how to proceed.

Any help much appreciated!
 
The custom firmware mvdisks package might be what you need.

Mounts external drives under "My Video" to allow export by the DLNA server (HDR only)
 
Thanks af123. I did see the mvdisks package, and it seems a more elegant solution, but I was put off by reports that it could cause available disk space to be shown incorrectly. If I draw a blank with Mediatomb I will certainly give it a try.
 
On the Mediatomb website I have found some guidance on how to change 'Import.js' to do what I want but I'm not sure how to proceed.

Any help much appreciated!
Can't hurt to give it a try. There are various ways you can edit the file. The easiest is probably to do it through the editor in the web interface but you could also use FTP to transfer it to your computer, edit it then send it back up.
 
At first the player could access the internal drive on the HDR and play both HD and SD videos but couldn't see the USB drive. I figured that this means that the internal DLNA service supports only the main drive. Not really a surprise.
Correct.

I am trying to use a DLNA-enabled media player (Sumvision Micro 4) to access recordings on a 2Tb USB drive connected to my HDR.
Is this only able to operate by DLNA, or can it interrogate Network Attached Storage as well? If so, we have a solution.

use FTP to transfer it to your computer, edit it then send it back up.
Being careful about the difference between Linux and Windows line ends of course.
 
Thanks to both for tips and advice. I have a feeling that if Mediatomb can be made to work in the way I want then others might also find it useful.

The easiest is probably to do it through the editor in the web interface
I did try this method, commenting out the existing 'addVideo' function in 'Import.js' and entering a replacement (taken from advice on the scripting page of Mediatomb's Wiki section), then saved the file and rebooted the HDR, finally rebuilding the Mediatomb link to the video folder on the USB drive. No error was reported but the result was unchanged when I connected via the player - all entries in a single list, so I guess that what I did was either wrong or irrelevant. The folder heirarchy of the internal drive is seen correctly by the media player, I assume using the hummy's own DLNA server, so I think the problem must lie with Mediatomb.

The 'Import.js' script file is in mod\mediatomb\js: do I just need to edit that file and save it or should I also click 'Make Executable'? Also, does the Webif editor take care of the Linux line-end needs?

Is this only able to operate by DLNA, or can it interrogate Network Attached Storage as well?
I'm not sure. There seems to be a capability to access PC files via Windows Share but I wasn't looking for this and haven't tested it.
 
There seems to be a capability to access PC files via Windows Share but I wasn't looking for this and haven't tested it.
I think you will find this the best route. Install the samba package, then the content of the HDR-FOX (and any attached drives) will be navigable and accessible over the network as if it were a Windows file share (the content will only be playable as long as it is decrypted first). Mediatomb is an unnecessary overhead, and there's more than one way to skin a cat.

See also:


does the Webif editor take care of the Linux line-end needs?
Yes.

UNIX-type OSs terminate a line with CR, DOS-type OSs use CR+LF (which were the commands you had to send to a teletype, or a video terminal emulating a teletype, to make it start a new line at the left margin). The trouble is that if you give a UNIX-type OS CR+LF at the end of a line in a file, it can interpret that as two end-of-lines or as an invalid format (and the Humax OS is a version of Linux). Programmers editors can be configured to create Windows-type files or UNIX-type files (but Windows Notepad ain't one of those!).
 
Last edited:
No - not the wrong way round BH, as the DOS terminator is correct in your posting.
Originally, for Unix, the line terminator was defined as NL (newline) which has the same ASCII code as LF
 
What I meant was.... oh, never mind.

This raises an interesting question: surely UNIX machines would have been around in the teletype era? So to output sense on a teletype, they would have to read "NL" in the output file and convert that to a CR-LF sent to the teletype. That means the designers of DOS chose to store a 1:1 replica of the ASCII stream to the output in the original file, whereas the UNIX designers chose to store a new line as one character instead of two, and converted the NL to CR-LF in the teletype driver - at the cost of not being able to overprint a line.
 
There were differing models of teletype machine, lots of variations which you had to be aware of when ordering one.
You tended to always use the same type/model on one site.
There were also differences in the way characters were represented on the page - at the maths lab, Cambridge, a special font was used in the production of numeric tables, with emphasis on being able to distinguish values correctly.
 
Install the samba package
Thanks for the advice. I do have samba installed and use it regularly to connect from a PC for downloading - it works brilliantly but the media player doesn't see the HDR other than via DLNA. I may have missed something and will check again - it would be the ideal way.

Incidentally, if I have to use mvdisks is there a way to ensure that the HDR doesn't write to the USB disk?

Mediatomb:
When changes to import.js made no difference to the listing of files seen by the player I started to wonder whether Mediatomb was recognising as video the files on my USB drive (most are MP4 H.264 plus a few MPEG2). I now know that Mediatomb uses a list of file types 'mappings.xml' to identify 'photo', 'audio' or 'video'. I couldn't see an easy way to inspect the file on the HDR (the editor in Webif can't open it) so I downloaded Mediatomb from the repository to check offline.

The mappings can be changed but straight from the repository those for Audio and Video are:
Video - .ASF, .ASX, .WMV, .WVX, .WM, .WMX and .FLV
Audio - .MP3, .WMA, .WAX, .M3U
These out-of-the-box settings aren't very useful but they do explain why changes to the video section of import.js made no difference.

I think I know what changes to make to 'mappings.xml'. Am I correct in thinking I need to use Telnet? - in which case I have some homework to do!
 
There were differing models of teletype machine, lots of variations which you had to be aware of when ordering one.
I used at least eight different models of teletype from four different manufacturers and they all needed a carriage return, line feed sending to move to the start of the next of the next line but I do agree that things were much less standardised in those days.
 
if I have to use mvdisks is there a way to ensure that the HDR doesn't write to the USB disk?
Not really, except the external drive will be imaged into a subdirectory - and the 'Fox won't write to a subdirectory unless it's recording a series, and then the folder name has to match (unless you do a manual move/copy/delete of course, or if you have auto-delete turned on).

I think I know what changes to make to 'mappings.xml'. Am I correct in thinking I need to use Telnet? - in which case I have some homework to do!
You have several options (and probably a few more I haven't thought of):
  • FTP the file to your PC and use a proper programmers editor on it;
  • Edit the file on PC with Notepad and then run a UNIX converter on the file before sending it back;
  • Get af123 to update the WebIF to include .xml files in the edit list for the diagnostics editor;
  • Run the nano editor through a Telnet session;
  • Run the nano editor through a Webshell session.
I've never used nano, but it's available in the package list. I assume it runs on the command line (like vi). webshell is another package, which (when installed and rebooted) adds a command line interface to the WebIF diagnostics page.

Telnet is simple enough, see http://wiki.hummy.tv/wiki/Telnet
 
Last edited:
Thanks BH, much appreciated. Some of the options are a bit outside my comfort zone but I will look into changing mappings.xml. From what I can see Mediatomb ignores .ts files as well as .mp4 and .mpg so updates to mappings.xml and Import.js probably would be helpful to others.

Is this only able to operate by DLNA, or can it interrogate Network Attached Storage as well?
Success!:thumbsup:
I found that my media player can use what it calls a 'shortcut' and asks for UserID, Password, Domain, Server and IP address. I took the plunge and input just the IP address, ignoring the rest, and now it can see and play all media files on the HDR and an attached USB disk. The practical effect is that an old non-smart tv can connect wirelessly to view anything on or connected to either of the HDRs in the house. £30 well spent.

Thanks again to everyone for constructive help and support.
 
Last edited:
Let's hope it doesn't wipe your HDR and USB disk then. Some of the reviews are not exactly encouraging.
It's the same old story - a reasonably decent device let down by poor software.
 
Let's hope it doesn't wipe your HDR and USB disk then.
Thanks for the warning! I haven't seen any reviews that make that complaint but I'll look into what they say. With a direct connection to an IP address the player allows copy / delete / move / rename operations on files. That could pose a risk but I won't be using it for file maintenance, or to play files that the HDR might be using. Fingers crossed.

I have seen negative reviews from buyers who expected to find Apps for things like Netflix and also complaints that the remote control is poor; its not great but it does the job and to an extent you get what you pay for.
 
Unfortunately the documentation for the wiki documentation on Mediatomb is missing

http://mediatomb.cc/pages/documentation

I can't find the files on my HDR even thou I've installed the package. I'm sure there is useful stuff above if I could find the files on my HDR that's using FTP / and the webif...

like it says:

/ mod /mediatomb /js (24.0KiB)

which is empty.

I know that Humax is suppose to run out of processing power in converting the TS file. Android Bubble app now supports cross coding so I was rather hoping I could get it to read say R4 recording in TS and output that to me server. Android acting as control point, if I'm using the correcting terming.

https://play.google.com/store/apps/details?id=com.bubblesoft.android.bubbleupnp.unlocker&hl=en_GB

Any help gratefully received.
 
Unfortunately the documentation for the wiki documentation on Mediatomb is missing.

A quick google finds it here:
https://help.ubuntu.com/community/MediaTomb

I gave up trying to use it and found an easier route using Samba but you may have more success. Good Luck!

Edit: Oops, I see what you meant. The above link provides some basic stuff but the link there to 'documentation' is dead, for the moment at least.
 
Last edited:
Back
Top