PDA

View Full Version : Slimserver 6.5 on SynologyDS106 and m4a



cyrusblack
2006-10-08, 04:30
Sorry if this is just the ignorance of a linux newbie.

Slimserver6.5/SSODS r2b4 now run happily on my DS106 (thanks flipflip and others) and I even managed to install AlienBBC and edit the custom-convert.conf to make it work with mplayer-stdout.

MP3s & Internet Radio now work fine from SB3 and Softsqueeze 3.

However, most of my 4000 tracks are Apple AAC m4a and I'm realising from these forums (fora?) that SSODS/Slimserver won't work with these out of the box as there's no [mov123] converter.

Nothing I've read here (apologies if I've missed something) specifies whether mplayer-stdout piped to lame, say, can be used to do this and if so the arguments list required in custom-convert.conf

So my question is, if m4a from DS106 is possible can anyone tell me how to do it? TIA. Paul

bpa
2006-10-08, 08:49
The following are the mods to the convert.conf file to support m4a using mplayer on a normal Linux systems. mplayer has been modded slightly to make it work on the DS106 because it has no /dev/fd devices.

I advise you to look at how flipflip has used mplayer for RTSP with AlienBBC and then adapt the following mov entries for the DS106. You will be removing the
"4>&1 1>&2 2>/dev/null" stuff as that is part of what flipflip's stdout mods do.


mov mp3 * *
[mplayer] -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:file=/dev/fd/4 $FILE$ 4>&1 1>&2 2>/dev/null | [lame] --silent -q $QUALITY$ -b $BITRATE$ - -

mov flc * *
[mplayer] -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:file=/dev/fd/4 $FILE$ 4>&1 1>&2 2>/dev/null | [flac] -cs --totally-silent --compression-level-0 --endian big --sign signed --channels 2 --bps 16 --sample-rate 44100 - -

mov wav * *
[mplayer] -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:file=/dev/fd/4 $FILE$ 4>&1 1>&2 2>/dev/null - -

cyrusblack
2006-10-08, 15:12
I advise you to look at how flipflip has used mplayer for RTSP with AlienBBC and then adapt the following mov entries for the DS106. You will be removing the
"4>&1 1>&2 2>/dev/null" stuff as that is part of what flipflip's stdout mods do.


bpa, many thanks. I'll have a go with this tho' I'm not entirely on home ground with what it all means..

paul

cyrusblack
2006-10-08, 16:29
I advise you to look at how flipflip has used mplayer for RTSP with AlienBBC and then adapt the following mov entries
bpa, I tried the following using similar pattern to the flipflip rtsp entries. At least I now get 'white noise' where once there was only silence :-) What did I get wrong? Any assistance gratefully received. Thanks. Paul




mov mp3 * *
[mplayer-stdout] -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:file=- $FILE$ 2>/dev/null | [lame] --silent -q $QUALITY$ -b $BITRATE$ - -

mov flc * *
[mplayer-stdout] -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:file=- $FILE$ 2>/dev/null | [flac] -cs --totally-silent --compression-level-0 --endian big --sign signed --channels 2 --bps 16 --sample-rate 44100 - -

mov wav * *
[mplayer-stdout] -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:file=- $FILE$ 2>/dev/null - -

bpa
2006-10-08, 16:51
It's possible that mplayer-stdout has been built without the m4a option so you need to do a standalone check of whether the mplayer-stdout will process your m4a files.

The easiest way is to create a WAV file from an existing m4a file. Example - the following run the command line would convert a test m4a file called infile.mov into a WAV file called outfile.wav (choose a small test file as output WAV will be v. big)

mplayer-stdout -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:file=outfile.wav infile.mov

Test the output WAV file on your PC. If that works then try the MP3 line.

cyrusblack
2006-10-09, 02:09
The easiest way is to create a WAV file from an existing m4a file. Example

Thanks. When I try this in the SSODS/bin directory, I get the response

-ash: mplayer-stdout: not found

The "mplayer-stdout" file is in that directory so I think I'm in the right place but it has no suffix. Is this a feature of executable binaries in the ash shell? If so, how do I run it in the DS environment? TIA Paul

cyrusblack
2006-10-09, 02:36
I *think* mplayer-stdout must be doing something with my m4as. I've just noticed that after rebooting SS and also my Squeezebox3 that when I try to play a m4a track I do get a bar or so of (distorted) music just before it turns into solid white noise.

This makes me think that the arguments in the conf file aren't right yet. Does that make sense? Paul

bpa
2006-10-09, 03:04
when you are in the directory with mplayer-stdout use
./mplayer-stdout

This gives the file path as the current directory as otherwise shell will look on the Path.

Definitely problem with args but I wonder if m4a decoder is not built in - mplayer might try to decode as some other format - hence noise.

testing with files will help find right settings.

mr_hyde
2006-10-09, 03:28
Hello,

you should select only the conversion to wav. You also should only use the wav (build in) option. Disable all other options for the conversion of wav data, because the the server tries to convert the wav from mplayer to flac or something else.

mr_hyde

cyrusblack
2006-10-09, 03:30
when you are in the directory with mplayer-stdout use
./mplayer-stdout

Doh! You have much patience.

That works fine. The output is a wav file which plays correctly on PC.

cyrusblack
2006-10-09, 03:38
The output is a wav file which plays correctly on PC.

Meant to include output to terminal from successful conversion:



MPlayer 1.0pre8-3.4.5 (C) 2000-2006 MPlayer Team
CPU: PowerPC

Playing testm4ain.m4a.
Cache fill: 0.00% (0 bytes)
ISO: File Type Major Brand: Apple iTunes AAC-LC Audio
Quicktime/MOV file format detected.
================================================== ========================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 44100 Hz, 2 ch, s16be, 192.0 kbit/13.61% (ratio: 24000->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio) decoder)
================================================== ========================
[AO PCM] File: testm4aout.wav (WAVE)
PCM: Samplerate: 44100Hz Channels: Stereo Format s16le
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null -ao pcm:fast
[AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default).
AO: [pcm] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 11.7 (11.6) of 11.7 (11.7) 12.9% 0% $<50>

Exiting... (End of file)

cyrusblack
2006-10-09, 03:46
Hello,

you should select only the conversion to wav. You also should only use the wav (build in) option. Disable all other options for the conversion of wav data, because the the server tries to convert the wav from mplayer to flac or something else.

mr_hyde,

I had tried disabling in turn all but one of wav, mp3, flac from the SS Server Settings/File Types screen. Didn't seem to make any difference. Do you mean remove the entries altogether from the conf file? paul

cyrusblack
2006-10-09, 04:04
Test the output WAV file on your PC. If that works then try the MP3 line.

I used the WAV output from mplayer-stdout as input to lame and that produced a playable otput MP3 file. So it looks like the various components are doing their thing ok.

cyrusblack
2006-10-09, 04:29
I had tried disabling in turn all but one of wav

mr_hyde, I tried this again, making sure only wav was enabled and it works! SB3 and SoftSqueeze on Mac currently playing separate tracks simultaneously - even as monstrous WAVs over my slow 802.11b wireless. DS is keeping up well tho' it's not currently doing much else.

You and bpa have been *stars*. Thanks to you both for yr generous help and patience.

Are there any reasons why I should ever need m4a to mp3 or flac or can I just rest on my laurels at this point?

Best, Paul

bpa
2006-10-09, 05:10
MP3 and FLAc will be less demanding on your network and DS-106's network but more demanding on DS-106's processor and memory.

The problem could be to do with either
PCM waveheader or PCM byte order but without seeing your convert.conf file for RTSP, I can't be sure.

cyrusblack
2006-10-09, 05:25
without seeing your convert.conf file for RTSP, I can't be sure.

I've attached custom-convert. rtsp in first 3 entries. mov to wav, flac, mp3 last 3.

Given limitations of 64mb DS106 aired in other parts of forum, maybe just running mov->wav not a bad idea as the network seems to be coping ok? Paul

bpa
2006-10-09, 07:16
There is no correct setting - choose the one that suits your setup and gives reliable sound. WAV and FLAC will give best quality of sound but quality is no good if it is choppy due to bandwidth issues.

There were a few typos "bps 16" should be "bps=16" Missing the "-r" option on lame. - probably my fault - I cut and pasted from another post which may not have been correct .

Also there may be issue with the ao: pcm - not specifying header/noheader I'm not sure what would happen by default.

Also no "--really-quiet" I'm not sure with mplayer-stdout but it's best to not have messages.

The following are lines which I think should work for (basically same as RTSP but removed the -bandwidth option)



mov mp3 * *
[mplayer-stdout] -really-quiet -vc null -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=- $FILE$ 2>/dev/null | [lame] --silent -r -x -q $QUALITY$ -b $BITRATE$ - - 2>/dev/null
mov flc * *
[mplayer-stdout] -really-quiet -vc null -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=- $FILE$ 2>/dev/null | [flac] -cs --endian=little --channels=2 --sign=signed --bps=16 --sample-rate=44100 --compression-level-0 - - 2>/dev/null
mov wav * *
[mplayer-stdout] -really-quiet -vc null -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:waveheader:file=- $FILE$ 2>/dev/null

cyrusblack
2006-10-09, 10:01
The following are lines which I think should work for (basically same as RTSP but removed the -bandwidth option)


I'll give them a whirl, thanks. paul

cyrusblack
2006-10-09, 15:54
The following are lines which I think should work for (basically same as RTSP but removed the -bandwidth option)


All now works with your lines - with only one minor issue of a consistent quiet 'click' when a track starts. Irritating but not a major showstopper. I'll search for 'click' on this forum shortly.

I'm now in tidying up mode. All the new bits are in the custom-convert.conf file but I haven't touched the convert.conf yet - i.e. all the original mov entries are still there. Does the custom-convert entry always take precedence so I can safely leave convert.conf untouched or should all the mov entries referring to [mov123] be removed/commented out?

You've been a great help. Paul

bpa
2006-10-09, 16:19
The click will be from a PCM (WAV) stream with a header being fed into something that expects a PCM stream without a header. The header is played and is heard as a click.

I noticed flipflip had one line with pcm:waveheader - whereas I expected pcm:nowaveheader.

If you use a header then the stream will stop after 3hrs 22mins.

cyrusblack
2006-10-09, 17:00
I noticed flipflip had one line with pcm:waveheader - whereas I expected pcm:nowaveheader.


Changed it but still have click (actually if listen carefully, double click sometimes with 1st louder than 2nd).

bpa
2006-10-09, 17:20
Don't forget to restart slimserver when you make changes to the convert file and I also clear the caches.

Make sure "Really Quiet" is on all mplayer lines - as text to stdout will be played as clicks as well.

Try to isolate and see if it occurs with one or all of WAV, MP3 or FLAC.

cyrusblack
2006-10-10, 02:39
Make sure "Really Quiet" is on all mplayer lines - as text to stdout will be played as clicks as well.

Try to isolate and see if it occurs with one or all of WAV, MP3 or FLAC.

Yes to trying both above BUT have discovered this morning that it's only happening on Mac Softsqueeze and not on the SB3 - last night I was doing all the testing on SSq because I didn't want to wake the family upstairs. Likely to be a player problem then.

So, as I rarely use the Mac laptop to play music (have you ever heard the speakers on an ibook? not a pretty noise), I'm a happy camper. I'm also pleasantly surprised by the DS which seems quite able to manage playing 2 streams probably more reliably than SS on my PC despite its paltry 64mb. Admittedly, navigating menus seems a little more sluggish than with the PC but not by much.

Next stop: iTunes itself on the DS..maybe another day.

Best wishes, Paul

cyrusblack
2006-10-11, 11:02
After all the help I've had, I thought this might be of interest to anyone thinking about DS106/SSODS/SS6.5 and playing aac (m4a @ 192kbps).

I did some empirical performance testing to see how far the DS106 would go (no formal performance measures).

Environment: DS106/SSODS/SS6.5 converting m4a->wav for streaming; old Netgear 802.11b wireless router; SB3 wireless; SSq3 on Mac wireless; Ssq3 on PC wired. DS106 not doing anything else. Network otherwise quiet.

Started playing different tracks on 3 players (don't recommend the mixture of Beatles, Pogues and Neil Young tho'!). No problems with slowness of response to remote controls, browsing, searching etc. The three streams played continuously with no jumps, gaps etc

Amazed, I made sure the players were all pointing at the DS106 server (they were) and closed down SS on the PC just to make sure :-)

Started the SS web interface from the PC and switched between the players, changed tracks, looked at settings. Interface a bit slow but ok and music continued to stream with no probs.

Went for broke and simultaneously started SS web interface on the Mac (wireless). This was straw that broke camel's back. Very sloooow response from SS; same for player remotes; music started breaking up very badly on the 2 wireless and badly on the wired PC.

I was really quite impressed. I'm unlikely ever to want more than 2 streams and one SS web window so it suits my needs. For a modest box, I'm impressed by the DS106.

bpa
2006-10-11, 11:29
Did you try enabling Server Setting/Performance/Webserver Forking ?

cyrusblack
2006-10-12, 09:45
I've now enabled it but don't think it's made much difference - may actually be slightly *more* sluggish when using SS web interface? Is that possible (I'm basing all this on user 'feel' rather than any performance stats)

Behrooz
2006-12-31, 12:57
Hi,

I've bought a DS106 sometime ago to as a network storage. I am now trying to use it as a music server (tks to SSODS).
I am planning to buy a squeezebox but still cannot get .m4a files working (more than 50% of my library). Even looking at this post, couldn't figure out what to do exactly:
I'd like to copy the file posted by Cyrus using bpa's comments. where should I put it (in place of slimserver\convert.conf or \\SSODS\etc\custom-convert.conf-sample, on my DS106 it says -sample at the end...)
I also noticed that cache is set to 128 but I have only 64. Can I just modify it in the text file, is there other things I should modify ?

I am a windows user and realize that even given time I am out of my depth here. If anybody has similar settings for DS106 I'd be more than happy to copy them. Any guidance appreciated.

Pierre

blason
2007-01-01, 08:34
Hi

First of all many thanks to everybody on this thread - I now manage to read m4a on the DS106 and it rocks!

Behrooz: to sum it up, I have created the attached file (renamed .conf) in the slimserver directory on the DS106 alongside convert.conf. I then just need to select the conversion format I want for m4a in the server setting interface.

It works, except for the click at the beginning of each track which I just can't get rid of

flipflip
2007-01-01, 12:00
Thanks blason for your research. I added the rules to the documentation and to the -sample file.

flip

Behrooz
2007-01-13, 11:08
Blason,

Thanks for your reply, just tried it without success. Dropped your file in the \Slimserver\ folder. After restarting and clearing cache I still only have options to use mov123 to convert aac files (when I go to the file type menu).

When I tick one the boxes, it tells me that it can not find the binary... I can see the binary in \SSODS\bin\mplayer-stdout.
The error message is the following:
"Required binary was not found: [mov123] $FILE$" which I believe means that the server doesn't take custom-convert.conf into account.
If you have any idea how to solve this please let me know. If there's no obvious fix for that I think I'll have to start looking for a product more adapted to my skills. shame because the squeezebox looks like a nice toy...

Pierre

flipflip
2007-01-14, 07:25
Pierre, this means the binary "mov123" is not available, not the "mplayer-stdout" program. As you say, SS does not see your custom-convert.conf file. Are you sure about its name? I mean, are you sure it's not called custom-convert.conf.txt (because of stupid Windoze "hide known extension" setting)? And custom-convert.conf also only applies to Slimserver 6.5. Oder version used another filename for the conversion rules (which I don't remeber right now). Btw, restarting SS wil load the new/changed rules, no need to do a rescan.

fefe
2007-12-13, 19:18
Thanks to Blason and everyone else who contributed to this "conversion code".

On my DS207+ and SB3 I can now play my m4as!

But... has anyone succeeded in getting rid of the clicking sound at the start of every song?

Slonk
2008-12-25, 16:55
Thanks to Blason and everyone else who contributed to this "conversion code".

On my DS207+ and SB3 I can now play my m4as!

But... has anyone succeeded in getting rid of the clicking sound at the start of every song?Yes, I think so, see thread http://forums.slimdevices.com/showthread.php?t=56904, posting #38