Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Old Internet Radio
03-12-2019, 14:26
Post: #1
Old Internet Radio
I have an old internet radio that can only play mp3, wma and real audio files, while most of my classical music I store as flac. Since the old device does not even process wav, transcoding does not help.

My files are sorted in directories that contain either mp3 files and no subdirectory named "__mp3__" or they are stored in directories that contain both flac-files and a directory named "__mp3__" (which contains the same files as mp3, so that I can copy them to a mobile device and save storage). In MinimServer I use excludePattern "__mp3__" to prevent showing the same title in flac and mp3. That, however, means that my old internet radio cannot play most of my classical music.

MinimServer can provide the audioformat (#AudioFormat). But what I would actually need is to select between low quality (all titles as mp3) or max quality (flacs where present, mp3 otherwise) and still display only one item per title.

I could think of a number of ways to achieve this, but I did not manage to get any of them working for they all presuppose some added functionality.

(1) If there was a way to have minimwatch add instances of minimserver on QNAP (I use a TS-431) and manage different preferences I could still exclude __mp3__ folders in one and include them but exclude flac-files in the other instance (best if there would be an option to exclude filetypes, but still possible by using the #AudioFormat tag).

(2) If in MinimServer properties I could define a property like AlternativeFormatFolders so that minimServer would add two tags to each file:
- IsInAlternativeFormatFolder=1 if the folder name of the file matches AlternativeFormatFolder (0 otherwise) and
- HasAlternativeFormatFolder=1 if the folder the file is in contains a subfolder whose name matches AlternativeFormatFolder (0 otherwise)
then I could slve my problem even within the same instance of minimServer

(3) minimServer could "simply" add functionality for multiple formats of the same file. (stream.transcode already allows for a list of target formats, but since flac:wav/mp3 is not valid [even flac:mp3 is not valid] I cannot solve my problem this way.)
Find all posts by this user
Quote this message in a reply
03-12-2019, 16:21
Post: #2
RE: Old Internet Radio
The best solution for this would be to run multiple instances of MinimServer with different configurations. The excludePattern property allows you to exclude filetypes as well as excluding directories.

You can run multiple instances of MinimServer on a QNAP NAS using Container Station (see this post). I don't think this is supported by the TS-431. It does appear to be supported by the TS-431P and TS-431+.
Find all posts by this user
Quote this message in a reply
03-12-2019, 17:01
Post: #3
RE: Old Internet Radio
Thanks for the hints! Unfortunately Container Station does not seem to be compatible with the TS-431, indeed.
Find all posts by this user
Quote this message in a reply
04-12-2019, 10:09
Post: #4
RE: Old Internet Radio
As a workaround I have introduced a custom tag "BestQuality" and given BestQuality="Best" to all files except those mp3-files where also a flac-file is present (BestQuality tag not given to the rest). I have set indexTag to "#AudioFormat:FileFormat, BestQuality, ...". Selecting FileFormat->MP3 on the old InetRadio and BestQuality->Best on all other players results in the correct subset of files but is less elegant than I had hoped for. It would get a bit better if at least I could combine #AudioFormat and BestQuality into one Index, but with valueTag "...merge={#AudioFormat, BestQuality}..." I get an error message and so I do when aliasing #AudioFormat:AudioF in indexTags or itemTags and putting "...merge={AudioF, BestQuality}...". Is there a way to combine #AudioFormat and my BestQuality tag into one field?
Find all posts by this user
Quote this message in a reply
04-12-2019, 10:32
Post: #5
RE: Old Internet Radio
It might be simpler to run a second Minimserver on a Raspberry Pi as per my post. You probably don't need much storage space for MP3s and the Pi consumes very little power.
Find all posts by this user
Quote this message in a reply
06-12-2019, 13:02 (This post was last modified: 06-12-2019 13:03 by simoncn.)
Post: #6
RE: Old Internet Radio
(04-12-2019 10:09)zfc Wrote:  It would get a bit better if at least I could combine #AudioFormat and BestQuality into one Index, but with valueTag "...merge={#AudioFormat, BestQuality}..." I get an error message

This is working for me. I added a Quality tag to indexTags and I added Quality.merge={#AudioFormat, BestQuality} to tagValue.

The name of the merged tag needs to be in indexTags (so that you can see it in the index) and both #AudioFormat and BestQuality need to be in either itemTags or indexTags so that you can use them in the merge expression. If you don't want to see these in the index, put them in itemTags.
Find all posts by this user
Quote this message in a reply
06-12-2019, 18:55
Post: #7
RE: Old Internet Radio
@roadster: Thx for the hint, but I'd prefer a software solution.

@simoncn: Thx! Now I I understand how to avoid syntactical errors. But it's still not working or me. On my server #AudioFormat does not deliver any data inside #merge={...}.

In detail:
Scenario 1 (what I actually want):
indexTags: FileType, ...
itemTags: BestQuality, #AudioFormat, ...
tagValue: FileType.merge={#AudioFormat,BestQuality}, ...
Result: FileType is present in the index, but only contains the values "[unknown]" and "Best", not "FLAC" and not "MP3".

Scenario 2 (just testing):
indexTags: FileType, BestQuality, #AudioFormat:AudioF, ...
itemTags: <other tags only>
tagValue: FileType.merge={#AudioFormat}, ...
Result: FileType is not present in the index, BestQuality and AudioF work fine (i.e. have values that lead to some thousand entrys; BestQuality contains "[unknown]" and "Best", AudioF contains "FLAC" and "MP3", as they should)
Find all posts by this user
Quote this message in a reply
06-12-2019, 21:14
Post: #8
RE: Old Internet Radio
I have checked the code and I see why this is not working. Special tags such as #AudioFormat are added after all tagValue options have been processed. I will investigate whether this could be changed so that special tags are added first.

Thanks for letting me know about this issue.
Find all posts by this user
Quote this message in a reply
06-12-2019, 21:16
Post: #9
RE: Old Internet Radio
Great, thanks! (And many thanks for both the great program and support!)
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)