welcome: please sign in

TS-110

TS-110 The TS-110 is a useful and reasonably priced device for the fairly advanced user. Amongst other things, I use mine as a media server which shares films and music to my PS3. Previously I've installed debian on it and used mediatomb as the DLNA server, but eventually ran into a bit of dependency nightmare to do with what packages were available on the ARM architecture and reverted back to QNAP's distribution. I have made a patch to fix multi-disc album sorting on mediatomb here.

The latest firmware release has a version of TwonkyMedia DLNA server which seems quite functional, and I've successfully set up a transcoding solution to allow my PS3 to play my Apple Lossless and standard AAC files via Twonky.

Transcoding with TwonkyMediaServer

DLNA can tell clients that it has multiple formats of the same track available (called resources in DLNA jargon), so that clients can request a format that they understand. For FLAC files with the PS3 this will work fine, since the PS3 knows it can't play FLAC, but (with the change below) TwonkyMediaServer will also present a WAV version of each FLAC and the PS3 will ask for that. Unfortunately the PS3 believes it can play all M4A files, when in fact it can only play ones with AAC compression; as a result, even if there are playable alternate resources available for an ALAC file the PS3 will try the M4A, encounter ALAC, and then display the annoying "Unsupported data" error, instead of trying another resource.

The fix needed here is to (a) set up transcoding for ALAC, and (b) hide the M4A resource entirely from the PS3 whenever it sees an ALAC file. Unfortunately you may also have M4A files with AAC - this solution will hide those as well, and transcode them pointlessly to WAV when the PS3 could in fact play them natively. A possible improvement is to rename all your ALAC files with a different extension and set up a MIME type for them in TMS, so that it can handle them as separate cases.

 #!/bin/sh
if [[  "`alac -t \"$1\" | cut -d ' ' -f 3`" == "alac" ]]; then
        alac -f "$2" "$1"
else
        faad -o "$2" "$1"
fi

exec: m4a2wav $infile $outfile
# capabilities
from=audio/mp4
to=audio/x-wav
synchronous

Issues

The first time you visit an album it may take a moment to show up; I'm not sure how TMS' transcoding works, but it seems to invoke the transcoder briefly on every track when you visit the directory, and then invoke it again when playing. It also caches the transcoded WAV elsewhere on the disk, so if you don't have much free space you may want to set the transcode cache size limit. This can be set by the cachemaxsize= directive in the ini file (in /etc/config/twonkyvision-mediaserver6.ini at the moment).

The other outstanding issue is that TMS doesn't read the disc number tag correctly from M4A files, and so sorts multi-disc albums in the wrong order (track 1 of disc 1, track 1 of disc 2, track 2 of disc 1, track 2 of disc 2, etc). I don't have a fix for this yet.