DS Forums

 
 

FTP upload to Humax


Reply
Thread Tools Search this Thread
Old 16-01-2011, 20:21
nowster
Forum Member
 
Join Date: May 2009
Posts: 103

If you've uploaded a file to your HDR and found it didn't appear in the Media menu, you'll have not updated the .hmt file to tell the system where the other files are...

Here's an upload tool for Linux users (needs perl and curl):

Code:
#!/usr/bin/perl
use Fcntl;

my $filename = shift;
my $server = shift;
my $folder = shift;

if (!$filename || !$server) {
    print STDERR "$0 filename server [destination folder]\n";
    exit 1;
}

my ($name) = $filename =~ /^([^.]+)\./;

my $path = "Video/". ($folder ? "$folder/" : "");
my $dest = "/mnt/hd3/$path$name";

open HMT, "+<$name.hmt";
sysseek(HMT, 33, SEEK_SET);
syswrite(HMT,"$dest\0");
close HMT;

system "curl -u HumaxFTP:0000 --ftp-create-dirs -P - ".
    "-T '$name.{ts,nts,hmt}' 'ftp://$server/$path/'";
The file transfer seems to be fairly slow: 2MB/s if you're on an inactive channel, or 1.6MB/s on an SD channel.

Last edited by nowster : 16-01-2011 at 20:23. Reason: typo
nowster is offline   Reply With Quote
Please sign in or register to remove this advertisement.
Old 16-01-2011, 21:14
REPASSAC
Forum Member
 
Join Date: Jun 2010
Location: Perchede, France
Posts: 1,936
If you've uploaded a file to your HDR and found it didn't appear in the Media menu, you'll have not updated the .hmt file to tell the system where the other files are...

Here's an upload tool for Linux users (needs perl and curl):

Code:
#!/usr/bin/perl
use Fcntl;

my $filename = shift;
my $server = shift;
my $folder = shift;

if (!$filename || !$server) {
    print STDERR "$0 filename server [destination folder]\n";
    exit 1;
}

my ($name) = $filename =~ /^([^.]+)\./;

my $path = "Video/". ($folder ? "$folder/" : "");
my $dest = "/mnt/hd3/$path$name";

open HMT, "+<$name.hmt";
sysseek(HMT, 33, SEEK_SET);
syswrite(HMT,"$dest\0");
close HMT;

system "curl -u HumaxFTP:0000 --ftp-create-dirs -P - ".
    "-T '$name.{ts,nts,hmt}' 'ftp://$server/$path/'";
The file transfer seems to be fairly slow: 2MB/s if you're on an inactive channel, or 1.6MB/s on an SD channel.
Perhaps you need to do ths yourself.
REPASSAC is offline   Reply With Quote
Old 17-01-2011, 05:01
nowster
Forum Member
 
Join Date: May 2009
Posts: 103
Perhaps you need to do ths yourself.
Would you prefer I keep my findings to myself and not share? What if the people who had worked out how to get FTP working on the HDR or who wrote AV2HDR had kept their knowledge to themselves?
nowster is offline   Reply With Quote
Old 17-01-2011, 09:08
bryhhh
Forum Member
 
Join Date: Aug 2004
Location: North West UK
Posts: 292
Have I missed something? Is there now a FTP server running (or available) for the HDR?
bryhhh is offline   Reply With Quote
Old 17-01-2011, 09:36
grahamlthompson
Forum Member
 
Join Date: May 2005
Location: Redditch Worcs
Posts: 17,289
Have I missed something? Is there now a FTP server running (or available) for the HDR?
Where have you been . It's in the Foxsat-hdr threads on AV forums. Extremely clever poster figured it out based on the work done to crack the icord.
grahamlthompson is online now   Reply With Quote
Old 17-01-2011, 09:38
GaseousClay
Forum Member
 
Join Date: Oct 2008
Location: Worcester
Posts: 4,185
Have I missed something? Is there now a FTP server running (or available) for the HDR?
http://www.avforums.com/forums/frees...t-working.html
GaseousClay is offline   Reply With Quote
Old 17-01-2011, 12:35
ray-don
Forum Member
 
Join Date: Jan 2011
Location: North East England
Posts: 54
If you've uploaded a file to your HDR and found it didn't appear in the Media menu, you'll have not updated the .hmt file to tell the system where the other files are...
You've raised a good point there nowster. The file path stored in the HMT file wasn't a problem when the only means to copy was via USB, as the path could be hard coded. The box took care of the rest when you copied it over to HDD. Now with FTP you can copy, or move, a file from one sub-directory to another and there is no automatic mechanism to update the path.
ray-don is offline   Reply With Quote
Old 17-01-2011, 13:27
gomezz
Forum Member
 
Join Date: Oct 2004
Location: Buckingham
Posts: 28,534
Where have you been . It's in the Foxsat-hdr threads on AV forums.
Posted off-topic in an unrelated thread. Not hard to see how it was easy to miss.
gomezz is offline   Reply With Quote
Old 17-01-2011, 14:01
REPASSAC
Forum Member
 
Join Date: Jun 2010
Location: Perchede, France
Posts: 1,936
Would you prefer I keep my findings to myself and not share? What if the people who had worked out how to get FTP working on the HDR or who wrote AV2HDR had kept their knowledge to themselves?
Sorry - I don't know what I was thinking about (Will leave the computer alone next time I have had a few drinks).
REPASSAC is offline   Reply With Quote
Old 17-01-2011, 20:45
caldirun
Forum Member
 
Join Date: Dec 2008
Posts: 67
You've raised a good point there nowster. The file path stored in the HMT file wasn't a problem when the only means to copy was via USB, as the path could be hard coded. The box took care of the rest when you copied it over to HDD. Now with FTP you can copy, or move, a file from one sub-directory to another and there is no automatic mechanism to update the path.
So FTP is not the way to write to the HDR, its back to USB, or is there a fix?
Just thought it was strange, the folder I had created on the HDR disappeared from the media list when I loaded files created with AV2HDR, always worked with USB!
caldirun is offline   Reply With Quote
Old 18-01-2011, 00:36
nowster
Forum Member
 
Join Date: May 2009
Posts: 103
The bit of perl code posted above fixes the location information in the .hmt file, then uploads the trio of files (.ts, .nts, and .hmt) to that locaion on the box via FTP (using the curl program).

perl and curl are available for Windows. They're command line only.
nowster is offline   Reply With Quote
Old 18-01-2011, 09:40
grahamlthompson
Forum Member
 
Join Date: May 2005
Location: Redditch Worcs
Posts: 17,289
You've raised a good point there nowster. The file path stored in the HMT file wasn't a problem when the only means to copy was via USB, as the path could be hard coded. The box took care of the rest when you copied it over to HDD. Now with FTP you can copy, or move, a file from one sub-directory to another and there is no automatic mechanism to update the path.
Hi Ray-don

Not tried this but if you set the destination folder as the internal HDD video folder and sub folder and write the 3 files using AV2HDR, won't AV2HDR sort that out automatically ?

Regards
Graham
grahamlthompson is online now   Reply With Quote
Old 18-01-2011, 11:12
nowster
Forum Member
 
Join Date: May 2009
Posts: 103
Hi Ray-don
...won't AV2HDR sort that out automatically ?
It doesn't appear to have this function.

The path stored in the .hmt file needs to be of the form:

/mnt/hd3/Video/<folder>/<filename_before_full_stop>

eg.

/mnt/hd3/Video/Pages from Ceefax_20110117_0415
or
/mnt/hd3/VIdeo/QI XL/QI XL_20110115_2100

Note that they're "/" not "\".
nowster is offline   Reply With Quote
Old 18-01-2011, 14:52
ray-don
Forum Member
 
Join Date: Jan 2011
Location: North East England
Posts: 54
Hi Ray-don

Not tried this but if you set the destination folder as the internal HDD video folder and sub folder and write the 3 files using AV2HDR, won't AV2HDR sort that out automatically ?

Regards
Graham
Sorry Graham but that won't work. Selection of the destination folder is for the P.C.only. When I can get round to it I intend to modify AV2HDR to allow selection of transfer via USB or FTP. The latter with the option to specify a sub-directory path if required.
ray-don is offline   Reply With Quote
Old 18-01-2011, 14:57
grahamlthompson
Forum Member
 
Join Date: May 2005
Location: Redditch Worcs
Posts: 17,289
Sorry Graham but that won't work. Selection of the destination folder is for the P.C.only. When I can get round to it I intend to modify AV2HDR to allow selection of transfer via USB or FTP. The latter with the option to specify a sub-directory path if required.
No good fitting a network cable and trying Netdrive then
grahamlthompson is online now   Reply With Quote
Old 18-01-2011, 21:24
staceydsf
Forum Member
 
Join Date: May 2005
Location: Brightlingsea, Essex
Posts: 105
The bit of perl code posted above fixes the location information in the .hmt file, then uploads the trio of files (.ts, .nts, and .hmt) to that locaion on the box via FTP (using the curl program).

perl and curl are available for Windows. They're command line only.
Hi

Have downloaded strawberry Perl for Windows what Curl version do I need, there seems to be lots of different types,

I little cheeky, but, any chance of a how to document?
Thanks
staceydsf is offline   Reply With Quote
Old 18-01-2011, 22:49
nowster
Forum Member
 
Join Date: May 2009
Posts: 103
I little cheeky, but, any chance of a how to document?
Thanks
You need perl in your path. Save the script above as something like "humaxput.pl". Have it and the files you want to upload in the same directory (folder) and, on the command line, change into that directory and run:

perl humaxout.pl "Name of Programme_20110102_1925.hmt" 192.168.1.9

where 192.168.1.9 is replaced with the IP address of your box. It should then upload it to the main area of the media list.

perl humaxout.pl "Name of Programme_20110102_1925.hmt" 192.168.1.9 "Folder Name"

would put it in a folder called "Folder Name" on the HDR. The quotes are important.

As for getting curl, I'd suggest the first one from here: http://www.paehl.com/open_source/?CURL_7.21.3 Put it in your path.
nowster is offline   Reply With Quote
Old 19-01-2011, 02:17
ray-don
Forum Member
 
Join Date: Jan 2011
Location: North East England
Posts: 54
No good fitting a network cable and trying Netdrive then
Network cable ?, I thought you had Homeplugs. As to Netdrive, it will connect to the the HDR O.K. if you uncheck "FTP Passsive Mode" in the "Advanced" menu but transfer speed is ridiculously slow compared to FTP with Filezilla. Don't even bother installing it.
ray-don is offline   Reply With Quote
Old 19-01-2011, 07:49
swedish cook
Forum Member
 
Join Date: Oct 2004
Posts: 821
Network cable ?, I thought you had Homeplugs. As to Netdrive, it will connect to the the HDR O.K. if you uncheck "FTP Passsive Mode" in the "Advanced" menu but transfer speed is ridiculously slow compared to FTP with Filezilla. Don't even bother installing it.
Agree on Netdrive - I installed Netdrive to see if it would allow seemless playback with vlc without downloading first, didn't work, seemed slow, vlc got upset, little feedback on progress of transfer - quickly removed. Filezilla seems a much better option, fast, drag and drop, good progress reporting and vlc seems quite happy to start playback whilst the transfer is in progress.
swedish cook is offline   Reply With Quote
Old 19-01-2011, 15:05
grahamlthompson
Forum Member
 
Join Date: May 2005
Location: Redditch Worcs
Posts: 17,289
Network cable ?, I thought you had Homeplugs. As to Netdrive, it will connect to the the HDR O.K. if you uncheck "FTP Passsive Mode" in the "Advanced" menu but transfer speed is ridiculously slow compared to FTP with Filezilla. Don't even bother installing it.
No'p so far not networked the hdr apart from testing iplayer with a long extention lead. I simply unslot the drive and connect it to the esata port on my laptop. Transfer speeds are not a problem
grahamlthompson is online now   Reply With Quote
Old 21-01-2011, 14:22
tv-Addict
Forum Member
 
Join Date: Dec 2008
Posts: 148
Agree on Netdrive - I installed Netdrive to see if it would allow seemless playback with vlc without downloading first, didn't work, seemed slow, vlc got upset, little feedback on progress of transfer - quickly removed. Filezilla seems a much better option, fast, drag and drop, good progress reporting and vlc seems quite happy to start playback whilst the transfer is in progress.
Strange... I get exactly the same transfer speed through NetDrive and FileZilla (40-50mbps), once the download has started - it sometimes takes 10 seconds to start with NetDrive, but is fast after that.
tv-Addict is offline   Reply With Quote
Old 21-01-2011, 14:50
grahamlthompson
Forum Member
 
Join Date: May 2005
Location: Redditch Worcs
Posts: 17,289
Strange... I get exactly the same transfer speed through NetDrive and FileZilla (40-50mbps), once the download has started - it sometimes takes 10 seconds to start with NetDrive, but is fast after that.
That's slower than you can get with USB if you tune to an off air channel, I got a real time transfer of about 6.9 times real time for a BBC1-Hd recording with a recording of average bitrate 8.08mbps which if my maths is right is about 56mbps
grahamlthompson is online now   Reply With Quote
Old 21-01-2011, 23:10
nowster
Forum Member
 
Join Date: May 2009
Posts: 103
The problem with the ARM processor in the HDR (I've been told by someone who works with ARM processors) is that the hard drive interface probably doesn't use DMA. (The network port probably doesn't, either.) This is a major slow down in transferring.
nowster is offline   Reply With Quote
 
Reply




 
Forum Jump


All times are GMT. The time now is 16:20.