Differences in Playlist Files
Permalink to Differences in Playlist FilesA point of confusion for many SOS users is the difference between a presentation playlist and a playlist.sos file. While all of the same attributes can be used in both, they serve two distinct purposes. A playlist.sos file can be thought of as a configuration file for a dataset. It contains the name, the path to the data to be displayed, and any other settings you wish. Each playlist.sos file should be stored with the content pieces it refers to (though this isn’t required) and should reference just one dataset. A presentation playlist groups multiple datasets into a list that can be used for a presentation. Presentation playlists have to end with the extension .sos and can be named anything as long as there are no spaces or special characters in the name. All presentation playlists should be stored in the sosrc directory in the home folder for each user. You can read more about presentation playlists in the Presentation Manual.
There are two places where you can modify a dataset: in your presentation playlist (such as weather_overview.sos) or in the playlist.sos file. When you modify a dataset in a presentation playlist, the changes will only apply in that specific playlist. If you modify a playlist.sos file, then every presentation playlist that points to thatplaylist.sos file will reflect those changes. The playlist.sos files that you create should be considered the master copy. Note: Changes made to playlist.sos files that are provided by NOAA will be overwritten every week when the sync with NOAA FTP server occurs. If you want to make changes to those playlist.sos files, first copy them into your site-custom folder.
Dataset playlist.sos Files
Permalink to Dataset playlist.sos FilesThere is a fairly strict format that must be followed within the playlist.sos file. Any specifications that are made in the playlist.sos will be default settings for how that dataset is displayed. Here is an example of what is contained in the playlist.sos file for the Blue Marble dataset:
At a bare minimum, you have to include the name and data (or layerdata) attributes. Everything else is optional. For site-custom datasets created by the site, there are some attributes that don’t apply and also a few that are just for site-custom datasets. The playlist.sos files can be created with the Visual Playlist Editor or written by hand using a program like gedit or Notepad. For a complete listing of attributes available for the playlist.sos file, see the Playlist Reference Guide. The SOS software will ignore any lines that begin with a pound sign (#). This is a great way to temporarily ignore some attributes or to add comments.
Because all of the content pieces should be stored in the same folder as the
playlist.sos file, it is not necessary to include the entire path to the files.
You only need to include the data name. For example, to include labels all you
need to type is label = labels.txt
. If the data is stored in another
location, then the path needs to be included. For example, label = /shared/sos/media/atmosphere/dataset/labels.txt
.
There can be multiple playlist.sos files in one folder for different versions of the dataset. The file names simply need to start with playlist and end with .sos and there must be one file that is named playlist.sos. For example, you could have playlist.sos, playlist_with_audio.sos, and playlist_extra_labels.sos all in the same folder. If you don’t have a playlist.sos file then none of the variations will show up in the data catalog on the iPad.
The “include” lines used in presentation playlists should not be used in a playlist.sos file, since the purpose of the playlist.sos file is to describe a single self-contained dataset with optional layers, PIPs, etc. Only presentation playlists should use the include attribute.
Example playlist.sos
Permalink to Example playlist.sosThe “Blue Marble” dataset has two playlist.sos
files in the
blue_marble folder: playlist.sos and
playlist_audio.sos. Both playlists point to the same data, and the
only difference is that one includes audio and a timer and the other doesn’t.
Notice that the audio files have been put into their own folder. If there are
multiple audio files or PIPs, a folder can be created in the dataset folder that
contains those files. While this isn’t required, it helps to keep the folder
uncluttered.
When files that are referenced in the playlist.sos file aren’t in the same
directory as the playlist.sos, the path to the file needs to be included.
Take note in the playlist_audio.sos file how the audio points to
audio/BlueMarble.mp3
since the mp3 file isn’t in the same directory as the
playlist.sos. Either relative paths (audio/BlueMarble.mp3
) or full paths
(/shared/sos/media/land/blue_marble/blue_marble/audio/BlueMarble.mp3) can be
used in the playlist.sos files. Be careful to avoid typos, as the dataset
won’t work if anything is wrong!