dma
Member
Hi,
I had quite alot to archive off my main disk to an exfat USB drive. It's quite hard work doing this via the web interface, plus the dlna server uses an index id for the file name which can be confusing.
I wrote a script to automate this but made it into a simple one-liner that builds a curl command to download the video from the dlna server on the Humax unit. This means you can confine the download to the Humax unit itself, and rename it to something more meaningful.
All the info you need is in the tblObject table in dms_cds.db. With some formatting, it's possible to generate an sql query command to do all of this:
/mod/bin/sqlite3 -separator $'' /mnt/hd2/dms_cds.db "select 'curl localhost:9000/web/media/' || mediaID || '.TS -o \"/media/gpt-drive1/', title || '\"' from tblObject where class == 'object.item.videoItem.movie';"
This just selects every video in the database (of type object.item.videoItem.movie) and builds a curl command where the video is saved to my exfat USB drive mounted at /media/gpt-drive1/. It also means you can selectively grep for certain videos you want to download or just create a batch of jobs. Here's an example:
Let's say I want only videos with "rewind" in the title:
humax# /mod/bin/sqlite3 -separator $'' /mnt/hd2/dms_cds.db "select 'curl localho
st:9000/web/media/' || mediaID || '.TS -o \"/media/gpt-drive1/', title || '\"'
from tblObject where class == 'object.item.videoItem.movie';" | grep -i rewind
curl localhost:9000/web/media/883.TS -o "/media/gpt-drive1/Rewind_ 1985 Final - World Championship_20150430_1140.ts"
curl localhost:9000/web/media/934.TS -o "/media/gpt-drive1/Formula 1 Rewind_20150606_1600.ts"
curl localhost:9000/web/media/949.TS -o "/media/gpt-drive1/World Cup Rewind_20140610_2335.ts"
curl localhost:9000/web/media/1925.TS -o "/media/gpt-drive1/FA Cup Rewind_ 1990 FA Cup Final_20160521_1100.ts"
You can get almost 5MB/sec per download:
humax# curl localhost:9000/web/media/883.TS -o "/media/gpt-drive1/Rewind_ 1985 F
inal - World Championship_20150430_1140.ts"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1619M 100 1619M 0 0 4738k 0 0:05:49 0:05:49 --:--:-- 6104k
Hope this is useful to someone, it certainly made it easy for me...
I had quite alot to archive off my main disk to an exfat USB drive. It's quite hard work doing this via the web interface, plus the dlna server uses an index id for the file name which can be confusing.
I wrote a script to automate this but made it into a simple one-liner that builds a curl command to download the video from the dlna server on the Humax unit. This means you can confine the download to the Humax unit itself, and rename it to something more meaningful.
All the info you need is in the tblObject table in dms_cds.db. With some formatting, it's possible to generate an sql query command to do all of this:
/mod/bin/sqlite3 -separator $'' /mnt/hd2/dms_cds.db "select 'curl localhost:9000/web/media/' || mediaID || '.TS -o \"/media/gpt-drive1/', title || '\"' from tblObject where class == 'object.item.videoItem.movie';"
This just selects every video in the database (of type object.item.videoItem.movie) and builds a curl command where the video is saved to my exfat USB drive mounted at /media/gpt-drive1/. It also means you can selectively grep for certain videos you want to download or just create a batch of jobs. Here's an example:
Let's say I want only videos with "rewind" in the title:
humax# /mod/bin/sqlite3 -separator $'' /mnt/hd2/dms_cds.db "select 'curl localho
st:9000/web/media/' || mediaID || '.TS -o \"/media/gpt-drive1/', title || '\"'
from tblObject where class == 'object.item.videoItem.movie';" | grep -i rewind
curl localhost:9000/web/media/883.TS -o "/media/gpt-drive1/Rewind_ 1985 Final - World Championship_20150430_1140.ts"
curl localhost:9000/web/media/934.TS -o "/media/gpt-drive1/Formula 1 Rewind_20150606_1600.ts"
curl localhost:9000/web/media/949.TS -o "/media/gpt-drive1/World Cup Rewind_20140610_2335.ts"
curl localhost:9000/web/media/1925.TS -o "/media/gpt-drive1/FA Cup Rewind_ 1990 FA Cup Final_20160521_1100.ts"
You can get almost 5MB/sec per download:
humax# curl localhost:9000/web/media/883.TS -o "/media/gpt-drive1/Rewind_ 1985 F
inal - World Championship_20150430_1140.ts"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1619M 100 1619M 0 0 4738k 0 0:05:49 0:05:49 --:--:-- 6104k
Hope this is useful to someone, it certainly made it easy for me...