Author Topic: MinimServer  (Read 21318 times)

zeewier

  • Administrator
  • Hero Member
  • *****
  • Posts: 893
  • Country: scotland
  • Thanked: 54 times
MinimServer
« on: 12:57:28 | 25 February, 2015 »
As mentioned in the BBC audio changes thread I have been playing with the MinimServer. I like it.

Apart from offering a useful workaround to play the new HLS streams, one reason why I find this the best UPnP server is that on the Reciva remote app (iOS version) it displays the album artwork (if available) of tracks that are streamed from a networked HD to the Avox TMA1 and Color radios (both on v266 firmware). No other UPnP server that I have tried (and I probably tried every UPnP server that is available for the OSX platform) could do that. MinimServer and modern Reciva media players are a perfect match. Note that I am running MinimServer on a Mac with the audio content (flac) stored on an external HD. Many of these tracks were bought and downloaded as flacs from eClassical and Qobuz, and all come with artwork.

I did discover, however, that the media player of a slightly older radio i.e. the Avox Petite (on v265 firmware) did not play ball: the remote app caused the radio to reboot when trying to access audio content streamed by MinimServer. No such crashes occur when using the supplied remote control. One wonders whether the firmware has something to do with it.

castalla

  • Administrator
  • Hero Member
  • *****
  • Posts: 2517
  • Country: 00
  • Thanked: 48 times
Re: MinimServer
« Reply #1 on: 13:08:45 | 25 February, 2015 »
Are you using it with the m3u file or adding streams to My Stations?
ARTICLE 50 - NOT IN MY NAME

The Resident Alien - http://residentalien.yolasite.com

zeewier

  • Administrator
  • Hero Member
  • *****
  • Posts: 893
  • Country: scotland
  • Thanked: 54 times
Re: MinimServer
« Reply #2 on: 13:37:38 | 25 February, 2015 »
To play the BBC streams I use the m3u file. It sits at the root of the external HD. I haven't tried the My Streams route yet. That would be preferable - if it works - because I can then put the computer to sleep or switch off.

The flac files are organised in folders and MinimServer is pointed at the HD. Media players of the Reciva radios show the folder structure or can display the media content by artist, composer etc.

castalla

  • Administrator
  • Hero Member
  • *****
  • Posts: 2517
  • Country: 00
  • Thanked: 48 times
Re: MinimServer
« Reply #3 on: 13:45:16 | 25 February, 2015 »
Err ... no. The server has to be on as the my streams point to it for the transcoding (AFAIK)

There's a webpage called minimradio which explains it ..
ARTICLE 50 - NOT IN MY NAME

The Resident Alien - http://residentalien.yolasite.com

zeewier

  • Administrator
  • Hero Member
  • *****
  • Posts: 893
  • Country: scotland
  • Thanked: 54 times
Re: MinimServer
« Reply #4 on: 14:05:35 | 25 February, 2015 »
I think you're right. I will investigate.

macplaxton

  • Full Member
  • ***
  • Posts: 60
  • Thanked: 2 times
Re: MinimServer - experience with Tevion 5404 (aka Hip Shing IR706)
« Reply #5 on: 04:14:51 | 26 February, 2015 »
Indeed, the MinimServer has to be running in order to serve. Whether you run that on a big fancy machine or a tiny embedding box doesn't really matter, as long as it is on and has enough horsepower for the job.

I spent yesterday getting this going. It was very straightforward to have the server up and running, but it was slightly more work getting the URLs correct in the My Streams presets on the Reciva website. I'm no network expert, but have been doing quite a bit in the home lately due to making my dumb TV smart with a Google Chromecast, but that's another story. At home there are about 16 devices that are in use on the network including 2 desktop PCs, 1 printer, 1 tablet, 1 games console, 2 internet radios, various mobiles, and a TV.

Here's my experience with MinimServer / MinimStreamer with a bog-standard Tevion 5404 (v257-a-421-a-025).

(I'll try and help with Windows installations if I can, but I haven't regularly used Windows in about 8 years and that was XP Pro. My main desktop is running the Linux distro openSUSE 13.1 64 bit with KDE 4.11.5 desktop.)

Starting at http://minimradio.com/ decide what machine in the house you'll be running MinimServer on. In my case it was my Linux desktop PC, which in on the majority of the time. MinimServer has to be running in order to serve the internet radio streams.

Next up create a folder for the list of streams. The suggestion is to use the title "BBC Radio", but it can be anything. It doesn't have to be in a set location, in my case it was buried in my home folder
Code: [Select]
/home/macplaxton/Programs/Minim/BBC Radio
on a Windows machine I suppose you might put it somewhere like
Code: [Select]
C:\Documents and Settings\[i]your-user-name[/i]\My Documents\My Radio\BBC Radio
Download the sample file linked on the above page and move it inside the folder chosen above. Rename it by removing the dot sample from the end of the name, so you have the file "BBC Radio.m3u". Make sure it is in plain text, you can alter the contents if you need to with a text editor such as Notepad (or in my case Kwrite).

Before the next step, make sure Java 7 is installed on the machine. In my case it was already there for other stuff. If you don't have it, you can either find it where you might usually look for additional software for your operating system or head over to www.java.com and find the version you need.

Jump page to http://minimserver.com/installing.html and chose the correct version of MinimServer that suits your system. You can put this where you like as well. I put it next to my BBC Radio folder
Code: [Select]
/home/macplaxton/Programs/Minim/ and unpacked it from there.

Upon running the .exe file, Windows will probably default to creating a new folder in
Code: [Select]
C:\Program Files\MinimServer (or whatever they have called the folder) and installed it there.

Once you have MinimServer installed, run it and you should have a yellow box down near the clock with a minim note on it. The first run will stop on yellow as it needs configuring to know what folder(s) to serve. At this stage, instruct it to look at your "BBC Radio" folder:

In my case:
Code: [Select]
/home/macplaxton/Programs/Minim/BBC Radio
In Windows case (probably)
Code: [Select]
C:\Documents and Settings\[i]your-user-name[/i]\My Documents\My Radio\BBC Radio
Either way as long as MinimServer is pointing to the right place you should be in business with a green icon down the bottom of the screen. If you go into MinimServer "Properties" (right-click icon in system tray and left-click Properties) you can change this folder under the heading "contentDir". If you click on the "+" button to the right, you can add further folders which might have music you wish to serve.

Under the System tab, I changed the .autoUpdate from "true" to "false". Also under this tab, next to "stream.converter" I have "ffmpeg". That would be something else that may need installing on your machine. I already had it as I use it for other stuff already.

So if you have a green box, you should have a running MinimServer. When you are at this stage, go to MinimServer Properties, go to the Packages tab and in the Available packages should be minimstreamer-0.5.4. Select it and click the install button. When installed it should appear on the right (Installed packages). When that is done, click on "Relaunch"

Next is to be able to reach that server with the internet radio (client).

The next stage can involve a bit of work. I'm not sure if it would just work out of the box, it may do, but on my home network, all my regular network devices (both wired and wireless) are assigned a static IP address. You might do this with the operating system / settings on the device, or you might do it from the router end of things. Make a list and you know where you are at.

My wireless router is the gateway at 192.168.1.1 My MinimServer machine is at 192.168.1.3 My Tevion is at 192.168.1.8

A quick word about routers: Some of the boxes supplied by telcos are just plain awful. Fortunately I was about to kick my UPC supplied Thomson TWG870U "wireless voice gateway" (It's a cable modem with wi-fi and the telephone plugs into it) into a bridged mode so it just acts as a telephone connection and a cable modem. I now use a separate ASUS RT-N66U router which I can actually adjust the settings on. There's nothing worse than dealing with equipment with functions disabled, but you have to use. So if you can, get a decent router.

Back to MinimServer, if it is running ok, you should be able to see it from the Tevion. Switch the Tevion on, make a cuppa while it boots up  ::) and then go to "Media Player" (select) "UPNP Servers" (select) and you should see "MinimServer" on the display. Don't bother going beyond that as it won't work - I just tried calling from the playlist and it just says "connnecting" and doesn't do anything!

Instead go to Reciva https://radios.reciva.com/ and set up an account there. Once set up you can manage "My Stuff" and put in your own custom links in "My Streams". Click "new stream" button on the right and enter a name for that stream, e.g. "BBC R4". Now the steam address (URL) format is as follows:

Code: [Select]
http://192.168.1.3:9790/minimstreamer/*/R4
Where 192.168.1.3 is the IP address of the machine running MinimServer - this is why it is important for having static IP addresses, if they are dynamic your link will probably be pointing to the wrong place and have no connection.

:9790 is the port of MinimServer (this can be changed if required in the MinimServer Properties tab "System" under the heading "http.port")

/minimstreamer/*/R4 is the short link that MinimServer will look up. In the list contained within the "BBC Radio.m3u" text file, is a line: "#EXTINF:-1,[*R4] BBC Radio 4 FM". It will know what under "R4" is the full link which for the 320k UK stream is:

Code: [Select]
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_fourfm.m3u8
and for the 96k non-UK stream is:

Code: [Select]
http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/nonuk/sbr_low/ak/bbc_radio_fourfm.m3u8
Once those settings are entered and saved, you can switch on your radio and at "<Stations>" press select and from "<Location>" go right twice to "<My Stuff>". Pressing select again will get you to "My Streams". Selecting my streams will load the radio with the current list held in My Streams stored at Reciva. From there you can navigate and select your chosen stream.

....but it still won't work just yet and be forever "connecting" on the display of the Tevion. Yes, that's because the BBC stream is getting served up straight HLS format that isn't digestible.

To sort this final hurdle out, in MinimServer Properties, go to the System tab and in the very bottom box "stream.transcode", add the following:

Code: [Select]
*:L16
Alternatively, it also works with:
Code: [Select]
*:L24
Now when you select a link from "My Streams", MinimServer will pull up the corresponding HLS stream and translate it on-the-fly into something that the Tevion will play.

Note: The following two snaps where taken testing non-UK 96k streams.


IMG_20150226_115916_682 by macplaxton, on Flickr

IMG_20150226_095757_631 by macplaxton, on Flickr

Yes, it's a lot of buggering about, but if it extends the useful lifespan of something which is still otherwise working ok, then so be it.

Please note that MinimStreamer is conditionally free at the moment. The developer will probably start charging soon enough. Not unreasonable, as everyone needs to put bread on the table. I've looked at similar programs for getting content to my telly via Google Chromecast. In order to get all the bells and whistles, you simply have to pay a little.

I hope this is helpful to other Reciva owners out there who can utilise the "My Stuff" feature on their radio and don't want to use the MP3 streams (or for the day they get the chop by the BBC)
Tevion 5404 & Roberts Revival iStream

zeewier

  • Administrator
  • Hero Member
  • *****
  • Posts: 893
  • Country: scotland
  • Thanked: 54 times
Re: MinimServer
« Reply #6 on: 04:17:42 | 26 February, 2015 »
[this was written when I had not yet seen macplaxton's excellent post]

Following the advice given here, and with Minimserver and Minimstreamer up and running on my Mac (local IP 192.168.0.2) I added

http://192.168.0.2:9790/minimstreamer/*/Radio 3/http/a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_three.m3u8

to My Streams. The Avox Petite and the Roberts WM-201 see the stream in My Streams but remain stuck on "connecting". The first few attempts of the TMA1 to connect result in "buffering 100%", but then starts to play Radio 3.

Same result with Radio Scotland
(http://192.168.0.2:9790/minimstreamer/*/Radio Scotland/http/a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_scotland_fm.m3u8).

Too bad that this doesn't work for the Petite (this radio isn't that old) and the Roberts.
« Last Edit: 04:24:18 | 26 February, 2015 by zeewier »

macplaxton

  • Full Member
  • ***
  • Posts: 60
  • Thanked: 2 times
Re: MinimServer
« Reply #7 on: 04:28:18 | 26 February, 2015 »
http://192.168.0.2:9790/minimstreamer/*/Radio 3/http/a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_high/ak/bbc_radio_three.m3u8

Shorten that link down to

Code: [Select]
http://192.168.0.2:9790/minimstreamer/*/R3
in My Streams and Minim will pull the full link from the .m3u file. That way, if there any changes to the links, you just have to edit/replace the .m3u file on your computer and not have to go back and change all links in My Streams.  ;)
« Last Edit: 04:58:05 | 26 February, 2015 by macplaxton »
Tevion 5404 & Roberts Revival iStream

zeewier

  • Administrator
  • Hero Member
  • *****
  • Posts: 893
  • Country: scotland
  • Thanked: 54 times
Re: MinimServer
« Reply #8 on: 04:34:22 | 26 February, 2015 »
Good point, thanks!

macplaxton

  • Full Member
  • ***
  • Posts: 60
  • Thanked: 2 times
Re: MinimServer
« Reply #9 on: 05:09:09 | 26 February, 2015 »
Probably the neatest solution is to run MinimServer on a small machine like a Raspberry Pi and serve the house with it. I might do that at some point as the main PC is a bit of power hungry monster.
Tevion 5404 & Roberts Revival iStream

zeewier

  • Administrator
  • Hero Member
  • *****
  • Posts: 893
  • Country: scotland
  • Thanked: 54 times
Re: MinimServer
« Reply #10 on: 05:59:03 | 26 February, 2015 »
It has just occurred to me that if you run Minimserver as a UPnP server on your LAN as described above then this would be a useful way for Reciva radios to keep going in the event of Reciva going bust and the radio portal going off air including My Stuff. Provided that your radio's media player is compatible with Minimserver you could still tune into any station for which you know the URL. Right?

castalla

  • Administrator
  • Hero Member
  • *****
  • Posts: 2517
  • Country: 00
  • Thanked: 48 times
Re: MinimServer
« Reply #11 on: 06:06:48 | 26 February, 2015 »
Theiretically ....

Have you tried the lo stream urls for the BBC ?
ARTICLE 50 - NOT IN MY NAME

The Resident Alien - http://residentalien.yolasite.com

drgeoff

  • Hero Member
  • *****
  • Posts: 851
  • Thanked: 31 times
Re: MinimServer
« Reply #12 on: 06:41:35 | 26 February, 2015 »
I had already tried almost all of what macplaxton wrote when I posted earlier that it doesn't work on my Recivas but does on a Philips device.  The only bit I hadn't done then was the *:L16.  The day before yesterday I had found the transcoding field and tried several values including *:L16, *:L24, *:wav and *:mp3 all without success.  I've just tried *:L16 again after reading macplaxton's post and it still doesn't work.

From what I've been reading it appears that the exact version of ffmpeg may be critical.  As I mentioned earlier I'm running mimimserver on Synology Diskstation OS 5.1-5022 update 2 (the latest available).  Typing ffmpeg at the command line returns

Code: [Select]
ffmpeg version 2.0.2 Copyright (c) 2000-2013 the FFmpeg developers

macplaxton

  • Full Member
  • ***
  • Posts: 60
  • Thanked: 2 times
Re: MinimServer
« Reply #13 on: 06:55:50 | 26 February, 2015 »
I suppose down the line you could set the chain up in a way so that when the radio "calls home", you hijack that call and divert that call to your local or otherwise "pretend Reciva home" and feed the information requested or needing to be sent back to the radio. The radio isn't going to be any the wiser, as long as you can feed it necessary links and with what can play.

The box between it and the outside world would just do all the translation / donkey work.

What would be handy at that point is to set up an online server with an up-to-date m3u file with the correct links so that the "box inbetween" could be ring up daily/weekly/whatever schedule and keep MinimServer on the right path.

It's a bit like running an old 625 line telly with analogue tuner using a Freeview box that has an RF output on it. It might be obsolete, but it still works. Ditto an old 405 line telly with the appropriate conversion bits inbetween the broadcast signal and the set.
Tevion 5404 & Roberts Revival iStream

macplaxton

  • Full Member
  • ***
  • Posts: 60
  • Thanked: 2 times
Re: MinimServer
« Reply #14 on: 07:05:21 | 26 February, 2015 »
Typing ffmpeg at the command line returns
Code: [Select]
ffmpeg version 2.0.2 Copyright (c) 2000-2013 the FFmpeg developers

Well on my Linux box I rebuilt my FFmpeg the other day. I've had to do this on occasion as the ready-built packages, for licensing reasons, don't include some codecs. So I download the source rpm, along with all the other FFmpeg rpms from the Packman repository and rebuild those rpms with the required support.

Looking back through my command lines, I rebuilt it to include libfdk_aac. I'm not sure that is required for this purpose, but I was trying to transcode video so the sound would work on the Chromecast (needed to decode ac3 and DTS soundtracks).

Code: [Select]
macplaxton@linux-dube:~> ffmpeg
ffmpeg version 2.3.6 Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 21 2015 00:15:52 with gcc 4.8 (SUSE Linux)
  configuration: --shlibdir=/usr/lib64 --prefix=/usr --mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-static --enable-debug --disable-stripping --extra-cflags='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables' --enable-pic --optflags='-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables' --enable-gpl --enable-x11grab --enable-version3 --enable-pthreads --datadir=/usr/share/ffmpeg --enable-libfdk_aac --enable-nonfree --enable-avfilter --enable-libpulse --enable-libvpx --enable-libopus --enable-libass --enable-libx265 --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype --enable-avresample --enable-libtwolame --enable-libvo-aacenc --enable-gnutls --enable-frei0r --enable-libcelt --enable-libcdio --enable-ladspa
  libavutil      52. 92.100 / 52. 92.100
  libavcodec     55. 69.100 / 55. 69.100
  libavformat    55. 48.100 / 55. 48.100
  libavdevice    55. 13.102 / 55. 13.102
  libavfilter     4. 11.100 /  4. 11.100
  libavresample   1.  3.  0 /  1.  3.  0
  libswscale      2.  6.100 /  2.  6.100
  libswresample   0. 19.100 /  0. 19.100
  libpostproc    52.  3.100 / 52.  3.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

You could always start with the source and compile it with the appropriate wotsits enabled.

I think your problem is more to do what is enabled/disabled, that the specific version number.
« Last Edit: 07:08:30 | 26 February, 2015 by macplaxton »
Tevion 5404 & Roberts Revival iStream