Using MediaVault & mediavault_script (OS4)

MediaVault v1.5.1 & mediavault_script v1.6

(Open pictures in new page for larger view)
Picture
About MediaVault and mediavault script.
Well, it's been a few months since my last blog entry, but I finally found the motivation to fulfill the promise to do a review of MediaVault.  So, in this entry, I'll provide an in-depth review of MediaVault v1.5.1 written by George Sokianos, who has made many great contributions to the AmigaOS4 community. I'll also cover using it with mediavault script version 1.6, which I wrote to allow choosing an audio player or saving the stream via a requester.

Download MediaVault from OS4Depot 

  
www.os4depot.net/?function=showfile&file=network/misc/mediavault.lha

Download mediavault_script from OS4Depot  
www.os4depot.net/?function=showfile&file=network/misc/mediavault_script.lha


What is MediaVault Anyway?

MediaVault v1.5.1 is an AmigaOS4 program that allows you to search for and play streaming radio stations as well as podcasts.  It also allows you to save your favorites and, in the case of Podcasts, mark streams to listen to at a later date.  With the help of the mediavault script, portions of radio station streams and full podcasts can be saved to a file on hard disc for later playback on your Amiga or other devices.  More on mediavault script later. First, let's take a detailed look at MediaVault.

Understanding the MediaVault Interface

Picture
Three sections of MediaVault's interface.
As can be seen, MediaVaults interface is divided into three main sections. On the left is a list which is broken into Radio and Podcast sections. Under each of these are subsections to help find and store your favorite streams.  The middle section contains controls to set search parameters and list "Discovered" radio or podcast streams.  The section on the right contains controls to start playing the streams, save links to the "Favourite" (Star+) and "Listen Later" (Book+) lists. This section also displays information about the selected stream currently playing.  The interface is very clean and easy to use. Hats off to George for the nice design.

Finding and Playing Radio Streams

Picture
Found and playing a local radio station with ffplay.
When MediaVault is started, the "Radio" list item is selected.  In the middle section of the GUI are controls to filter by Name, Genre, Country and Language.  Once these are fields are set, click the "Discover" button to find matching radio stations.  As seen above, I entered the station frequency as name and set Country to U.S. and Language to English. Once I clicked Discover it found the local radio station I was looking for.  I then highlighted the station I wanted and click the "Play" button on the right to start streaming the station with ffplay.  On the right side of the interface, information about the station is displayed, along with a logo for that station, if the station supplies one.
Picture
Playing a stream from the "popular" list with AmigaAmp3.
Two other ways to find radio streams include clicking on the "Popular" and "Trending" list entries in the Radio tree. These show the most listened to or trending stations over the last 24 hours.  Once you find a radio stream you like, click on the "Star" with the plus, to add the station to the "Favourite" list. The plus on the star will turn to a minus sign. Clicking the minus Star removes the selected entry from the "Favourite" list. 

 Let's Explore Podcasts

Picture
Found the "Amiga Ireland Podcast".
Clicking on "Podcast" in the tree list takes you to the podcast search page. As seen above, I found the "Amiga Ireland Podcast" link. Clicking on the link brings up links to all the individual episodes to listen to, as shown below.
Picture
Playing the October 19, 2021 episode with Emotion.
Clicking a link, then the "Play" button starts the podcast playing.  As with the Radio section, the information about the podcast is displayed in the right section of the interface, along with a logo, if available. The "Star" is still available to add podcast links to the "Favourite" list. Note that this does not save the individual episode link, but will only save the top-level link, which can then be clicked on to see the full episode list.  This is where the "Book" button comes into play. If you highlight a specific podcast episode, then click the "Book" button, the individual episode link will be placed in the "Listen Later" tree list.  As with "Favourites", selecting an episode and clicking when the "Book" button shows the minus sign, removes the entry.
Picture
Showing Trending English language, Comedy podcasts.
The last thing to cover in the "Podcast" section is the "Trending" entry.  Selecting this shows a page that allows searching trending podcast by Genre and Language. As can be seen, I have found the "Funny or Die Podcasts" by searching "Comedy" and "English" language.   Clicking this entry will bring up the list of individual episodes.

Let's Talk Scripts

So, what's all the talk about scripts at the beginning of this blog? We'll by default MediaVault will use AmigaAmp3 to play the streams, which works well, but what if you want to use a different player for some reason. For example, AmigaAmp3 takes up a lot of CPU time on an A1222+.  This is where scripts come into play.  If you look in the "scripts" draw, in the MediaVault directory, you will see a file named "start_player.sample".  If you look at this script in an editor, you will see that you can comment and uncomment some lines in the script to use either "ffplay" or "Emotion" to play streams. If you rename this script to "start_player", MediaVault will use this script and use the uncommented section to choose the program to use for playing the stream.  It's nice to have this flexibility but it's painful to change between different players.  What if there were an easy way to pick a player on the fly, like from a requester?  

MediaVault Script v1.6

Hey, that's what I wanted to do, so I wrote a script. Then I decided I wanted to be able to save a Podcast stream so I could listen to it on other devices. So, I added that capability too.

 Installing MediaVault Script v1.6

First download the mediavault_script.lha file from OS4Depot. (See link at the top of this blog entry.). Unpack the lha file and rename the "start_player_v1.6" file to "start_player". Then move the "start_player" script file into the "MediaVault/scripts" directory.  Make sure to read the readme file and set the "User Settings" within the script as desired.  For each feature to work, the required program must be installed and run at least one time. If a required program is missing an error requester will be displayed.  

Using MediaVault Script

Picture
Choose a player or save stream from a requester.
Once the install is complete, select a Radio or Podcast stream and click "Play".  The requester shown in the above picture will be displayed, allowing you to select the desired player or save format.  If you don't select anything the requester will timeout in 5 seconds (default) and AmigaAmp3 will be used.  The "Save to mp3" selection will use ffmpeg to convert the stream to mp3 audio and save it as a .mp3 file.  The "Save Copy" selection will use ffmpeg to copy the stream in its original format and save it in an “mka” file format.  This will be faster but may not be as compatible with other devices as the “mp3” format. 
Picture
Picking a location and filename when saving a podcast.
If the a "Save" selection is chosen, a save requester will appear so the filename and location can be changed. If not changed the defaults of "Ram:" and "Saved_Stream" will be used.  The appropriate file extension will be added. If the requesters "Cancel" button is selected, the script exits without saving.
Picture
Saving a podcast stream to a file.
If "OK" is selected, an ffmpeg console window is opened to monitor the download progress.  A "MediaVault Save" requester is also open. Clicking on "Done", while the download in progress will stop the stream download and close the file so it can be played. This allows for capturing portions of radio streams or part of a podcast.  To download full podcast episodes, let the download complete (the “MediaVault Downloading...” console window will close) then click "Done" on the Save requester to close it.

MediaVault Script User Settings

The MediaVault Script has a "User Settings" section which allows the user to set the behavior of the script.  Note: Do not change anything outside of the "User Settings" section unless you are sure of what you are doing.  The following items can be changed.
Picture
Set the default play action.
This sets the default action when the requester is disabled. No requester will be shown. This is ignored if the requester is enabled.
Picture
ffplay related settings.
Set ffp_width to the number of pixels used for the ffplay window width.
Set ffp_height to the number of pixels used for the ffplay window height.
Set "dispmode" to choose the type of video display that ffplay will use. 
Note selection 1 uses a lot of CPU time, so only use for faster systems.
Set to selection 2 for slower systems. 
Picture
Set requester parameters.
Set "show_player_req" to 1 to override the default "player" selection and display a requester. Set to 0 to not show a requester.
Set req_time to the number of seconds the requester will be shown before it defaults to AmgiaAmp3 and closes.
Set default_volume to the location for saving streams.  (Volume:[path])
Set default_filename to the name of the file to save. The proper extension will be automatically appended.

How does it work on the A1222 Plus?

Picture
MediaVault playing a radio stream with Emotion on the A1222 Plus.
MediaVault and MediaVault Script works well on the A1222 Plus with some exceptions.  For best performance use Emotion as the stream player. This works very well and only uses about 20% of the CPU.  Playing streams with AmigaAmp3 will also work fine, but it will use about 75% of the CPU.  The current version of ffplay (v6.1) does not work with the A1222 Plus so it cannot be used for playing streams.  The same goes for the current version of ffmpeg (v6.1), so saving streams is not yet possible.  I plan to look into other options for saving the streams on the A1222 Plus, so maybe someday it will be possible. No promises though. 

A Final Word

MediaVault is a standout program for AmigaOS4, and its capabilities are expanded with MediaVault Script. The pair makes a quite nice streaming Radio and Podcast solution. If you like and use MediaVault, please send Goerge Sokianos a donation by buying him a coffee here:
ko-fi.com/W7W465887  

Thanks to Maijestro, a video of MediaVault using mediavault script can be viewed here:  www.youtube.com/watch?v=qfEqZPxy31M
(Subscribe to his channel to support him.)

I hope you have enjoyed this blog entry. Comments are welcome and suggestions on what you would like to hear about next are always welcome.​