Can I create an M3U playlist and upload it to Centova Cast?
Can I create an M3U playlist and upload it to Centova Cast, instead of using Centova Cast's built-in playlist editor?
Yes, as of v2.2.0 this feature has been added due to popular demand.
While this is a powerful feature which advanced users may find very useful, it is likely that less-experienced users may find it difficult to construct relative file paths in the manner necessary for use on a server (vs. that of their home PC).
As such, this feature is disabled by default and is not officially supported in any capacity by Centova Technologies.
Specifying file paths
When your users build their M3U files, they will normally construct them using the paths to the MP3s on their local computer. In order for Centova Cast to use the same M3U file, however, the MP3s must be on the server, and the paths in the M3U file must refer to the paths on the server.
For example, say the user has an MP3 on his computer named
C:\MP3\Rock\rock_music.mp3, and he wishes to create an M3U playlist file
containing this single MP3. The steps would be as follows:
Using FTP, upload the contents of the
C:\MP3folder to the media directory on the Centova Cast server, maintaining the complete directory structure.
So in the user's FTP client, he should see a
Rockdirectory inside his
mediadirectory, and the
rock_music.mp3file should appear within the
Rockdirectory, just as it would on his local computer.
In the Centova Cast web interface, use the
Update media libraryfeature to import the tracks into the media library. Tracks which are not in the media library will not be recognized by the M3U import feature, even if they exist on the server.
Create an M3U file which uses paths relative to the
C:\MP3folder for each MP3.
So the relative paths in the M3U file should look like
If the M3U file specifies absolute paths instead (such as
this will NOT work because there is no such file as
Once these conditions are met, the user can upload his M3U file.
Enabling M3U Importing
If you wish to enable this feature, edit
and find the following line:
Change it to:
If this line does not already exist, simply add it near the end of the file,
on the line before the
Uploading an M3U File
After this feature has been enabled, users simply need to launch the media
library, select the playlist into which they would like to import the M3U
file, and then click
Options->Import M3U Playlist.
Tracks will be imported in the order in which they appear in the M3U file. Note that once the tracks are imported, they will be governed as usual by the rules of the playlist into which they were imported. (For example, if you import the M3U into a scheduled playlist, the tracks will play at whatever time you've scheduled for the playlist. If you've imported them into a general rotation playlist, they will play with the randomization and weighting settings you've applied to the playlist, and so-on).
I can't figure out the correct relative paths!
If you are having trouble constructing your relative paths, simply open the M3U file and look at the paths it contains. For example, say your M3U contains:
#EXTM3U #EXTINF:123,Rock Artist - Rock Song Rock\rock_music.mp3
Take that first MP3 filename --
Rock/rock_music.mp3 -- and prepend the
account's media directory to it. In most cases, the media directory will be:
The resulting full pathname for the MP3 file is:
Now, login to your server via SSH and check on your server's hard disk -- does
the MP3 exist at that path? If not, adjust your M3U paths a necessary and try
again. Note that you can ignore differences in slashes (i.e.,
Centova Cast will automatically convert them.
I receive the error "M3U Playlist Not Received"
This indicates that PHP did not receive a file upload from the web browser. This is commonly either because:
- the server's temporary path is missing or out of disk space
- the M3U file exceeds the file upload size limits configured in your
I receive the error "x track(s) were not found or could not be imported"
This indicates that the paths specified in your M3U file did not correspond to tracks in Centova Cast's media library.
Barring any potential database problems, there are no other possible reasons for this error. If you receive the above error, consult the section above entitled Specifying file paths, and, if necessary, the I can't figure out the correct relative paths section above.
We regret that we are unable to provide further technical support with this error (thus the reason this feature is disabled by default).
Is there a way to generate a sample M3U file with the correct paths?
Yes, but you need SSH access to the server. (If you are not the server administrator, contact your administrator or hosting provider and direct them to this article.)
First, change to the media directory for the stream:
Replace USERNAME with the actual username of the Centova Cast account.
Next, run the following command (cut and paste for best results):
( echo "#EXTM3U" && find . -name '*.mp3' -printf "#EXTINF:0,%f\n%P\n" ) > sample.m3u
This will create a file called "sample.m3u" in your "media" directory which you can then download via FTP and use as a starting point for building your custom M3U files.