Flash mp3 player problems.....

  • Thread starter =?ISO-8859-1?Q?Ralph_H=F6glund?=
  • Start date
?

=?ISO-8859-1?Q?Ralph_H=F6glund?=

The story is this. I have succeeded to find a nice stream player:
MyMP3Stream. The problem I have is that it only accept
XML-playlists. I am going to use a free site where I can store my
songs for streaming. This site produces playlists in m3u-format
for wich I can download.

I have some choices here, either to find another player that
supports m3u-format or modify the player I have to accept
m3u-lists or find a converter script that converts from m3u to
XML player file (or that I write such a script myself).

As I do not beleive the idea to invent the wheel once again I
wonder if anyone have someting to help me out?

Would appreciate that.

Kindest regards,

Ralph
 
C

cwdjrxyz

Ralph said:
The story is this. I have succeeded to find a nice stream player:
MyMP3Stream. The problem I have is that it only accept
XML-playlists. I am going to use a free site where I can store my
songs for streaming. This site produces playlists in m3u-format
for wich I can download.

I have some choices here, either to find another player that
supports m3u-format or modify the player I have to accept
m3u-lists or find a converter script that converts from m3u to
XML player file (or that I write such a script myself).

As I do not beleive the idea to invent the wheel once again I
wonder if anyone have someting to help me out?

I know that the free Winamp player can use .m3u and I think the free
Real 10.5 player can also. There likely are several more. I do not know
enough about your situation to know if these would be right for your
problem. However it would not take long for you to download one of
these players, test it, and delete it if it is not suited.
 
?

=?ISO-8859-1?Q?Ralph_H=F6glund?=

cwdjrxyz skrev:
I know that the free Winamp player can use .m3u and I think the free
Real 10.5 player can also. There likely are several more. I do not know
enough about your situation to know if these would be right for your
problem. However it would not take long for you to download one of
these players, test it, and delete it if it is not suited.
Sorry, I was not clear enough. I want an embedded player that the
visitor can choose by clicking on a label "Play music clips".

I know that even Windows media player nav handle m3u.

What I have that works fine is MyMP3Stream. Link:

http://bohuswines.se/scripts/indexmain.html

Click on: "Musik-clips". This player reads xml-playlist fine.

Ralph
 
C

cwdjrxyz

Ralph said:
Sorry, I was not clear enough. I want an embedded player that the
visitor can choose by clicking on a label "Play music clips".

I know that even Windows media player nav handle m3u.

What I have that works fine is MyMP3Stream. Link:

http://bohuswines.se/scripts/indexmain.html

Click on: "Musik-clips". This player reads xml-playlist fine.

Yes, I now see that you want the player to be embedded and supplied by
the server rather than depending on some player that might or might not
be installed on the computer browser - a very good idea. Google has
just started embedding their own player for their new video service.
However the code is extremely complicated, partly because they have
videos for sale as well as free ones.

For applications where you are willing to use an existing player on a
browser such as the WMP and if you are willing to use javascript, I
have made a special embedded player with buttons for each selection. An
example is at http://www.cwdjr.net/souearly/songs2Root.php . Much of
the code is written in php which you will not be able to see when you
view the source, but I can supply a text file of the php.
 
T

Toby Inkster

cwdjrxyz said:
An example is at http://www.cwdjr.net/souearly/songs2Root.php . Much
of the code is written in php which you will not be able to see when you
view the source, but I can supply a text file of the php.

Tip for writing example PHP files...

1. Include the following at the very top of your PHP file:

<?php
if ($_GET['source']) {
highlight_file($_SERVER['SCRIPT_FILENAME']);
exit;
}
?>

2. And include the following near the end:

<p><a href="<?=$_SERVER['PHP_SELF']?>?source=1">View source.</a></p>
 
N

Neredbojias

With neither quill nor qualm, =?ISO-8859-1?Q?Ralph_H=F6glund?= quothed:
Sorry, I was not clear enough. I want an embedded player that the
visitor can choose by clicking on a label "Play music clips".

I know that even Windows media player nav handle m3u.

What I have that works fine is MyMP3Stream. Link:

http://bohuswines.se/scripts/indexmain.html

Click on: "Musik-clips". This player reads xml-playlist fine.

All that I get is a blank little window.
 
C

cwdjrxyz

Toby said:
cwdjrxyz said:
An example is at http://www.cwdjr.net/souearly/songs2Root.php . Much
of the code is written in php which you will not be able to see when you
view the source, but I can supply a text file of the php.

Tip for writing example PHP files...

1. Include the following at the very top of your PHP file:

<?php
if ($_GET['source']) {
highlight_file($_SERVER['SCRIPT_FILENAME']);
exit;
}
?>

2. And include the following near the end:

<p><a href="<?=$_SERVER['PHP_SELF']?>?source=1">View source.</a></p>

Thanks, Toby. That is useful when you want someone to view the php code
easily. Actually the page I gave is just part of a set of pages that
can be reached at http://www.cwdjr.info/media/playersRoot.php . Links
to the external script, php text, etc are given near the bottom of the
page under the description of the scripted WMP embedded player. I have
been working on a new section for several embedded broadband video
formats, and this will be added sometime in the future. At that time I
might revise older parts of the page set somewhat.

However, I should note that one can use the basic WMP player, without a
lot of fancy stuff and without script, to play a .wax playlist which
can contain a mixture of several audio formats supported by the WMP.
The link at the extreme upper left of the page referenced is such an
enbedded example.
 
?

=?ISO-8859-1?Q?Ralph_H=F6glund?=

Neredbojias skrev:
With neither quill nor qualm, =?ISO-8859-1?Q?Ralph_H=F6glund?= quothed:




All that I get is a blank little window.
Try to download Macromedia Flash player.
 
C

cwdjrxyz

Ralph said:
Neredbojias skrev:
Try to download Macromedia Flash player.

Yes, your page does require that flash be installed on the computer. I
was able to download your file with the extension .swf which shows the
player. It of course will not work offline as it needs to be on your
site to have access to the music.

I also downloaded a free trial of a program to be put on the server for
streaming mp3s or certain video formats that you also have on the
server. What it actually does is convert your media to a flash format
and adds some player chrome and playlists. It too requires flash on a
browser to be viewed. It used awful code for the flash that included
the dual ActiveX-embed paths, so I was not interested in it.

I then looked at Google's new video service for their free videos. If
you view the video online, you must have flash installed. However
Google has a special player which you may download fairly rapidly. You
may also download the videos as a Google .gvp file. However the .gvp
file is just a link to the actual video file at Google, and the
computer must be online when you use the Google player. If you open
Opera and have it open a Google .gvp file, it gives you a short file
that includes a URL for an .avi file. If you follow this URL, you can
download the .avi. It can be huge - about 60MB for 15 minutes in one
case. There are several variations of avi files, and not all types will
play on all players. This avi could not be opened by the WMP. It could
be opened by a player that comes with Nero, but there was only video
with missing sound. However if you use Xilisoft to convert the avi to
..wmv format, the resulting .wmv would play correctly on the WMP. Of
course for the videos that Google sells, everything is highly encrypted
and you can not download the complete video in any format without
paying.

I now wonder if it is more likely that a computer would have a WMP
player installed or flash installed, as it appears the methods I
examined required at least some player be installed. For now I plan to
stick to streaming multiple files using a .wax and/or .ram file which
can contain a playlist of several songs.
 
?

=?ISO-8859-1?Q?Ralph_H=F6glund?=

cwdjrxyz skrev:
Yes, your page does require that flash be installed on the computer. I
was able to download your file with the extension .swf which shows the
player. It of course will not work offline as it needs to be on your
site to have access to the music.

I also downloaded a free trial of a program to be put on the server for
streaming mp3s or certain video formats that you also have on the
server. What it actually does is convert your media to a flash format
and adds some player chrome and playlists. It too requires flash on a
browser to be viewed. It used awful code for the flash that included
the dual ActiveX-embed paths, so I was not interested in it.

I then looked at Google's new video service for their free videos. If
you view the video online, you must have flash installed. However
Google has a special player which you may download fairly rapidly. You
may also download the videos as a Google .gvp file. However the .gvp
file is just a link to the actual video file at Google, and the
computer must be online when you use the Google player. If you open
Opera and have it open a Google .gvp file, it gives you a short file
that includes a URL for an .avi file. If you follow this URL, you can
download the .avi. It can be huge - about 60MB for 15 minutes in one
case. There are several variations of avi files, and not all types will
play on all players. This avi could not be opened by the WMP. It could
be opened by a player that comes with Nero, but there was only video
with missing sound. However if you use Xilisoft to convert the avi to
.wmv format, the resulting .wmv would play correctly on the WMP. Of
course for the videos that Google sells, everything is highly encrypted
and you can not download the complete video in any format without
paying.

I now wonder if it is more likely that a computer would have a WMP
player installed or flash installed, as it appears the methods I
examined required at least some player be installed. For now I plan to
stick to streaming multiple files using a .wax and/or .ram file which
can contain a playlist of several songs.
I do not really understand what you (cwdjrxyz) are talking about.
My original issue was to convert from m3u-playlist to
xml-playlist. The player I have is excellent and I have no
intention to go into your complicated descriptions.

So, if you have any tip for me, thank you.

Ralph
 
C

cwdjrxyz

Ralph Höglund wrote:


I do not really understand what you (cwdjrxyz) are talking about.
My original issue was to convert from m3u-playlist to
xml-playlist. The player I have is excellent and I have no
intention to go into your complicated descriptions.

Just for the record, a .wax is an xml playlist that can contain as
little as a single song, but it is designed to work on the WMP and a
few other players, not flash. Likewise a Real .ram can direct to a SMIL
file, which is a xml language that contains a sequence of media as well
as many other possible things.

Now the method you are using apppears to be based on a flash format,
and you say you need a xml playlist for it instead of an m3u one that
you apparently have. The question then becomes does your player accept
an xml play list at all, and if it does, what is the documentation for
this. Surely there should be some information concerning this on sites
associated with the player or any possible discussion groups concerning
your player, if the player will support an xml play list. There are
very many types of play lists, some xml and some not. Thus finding
written documentation of the structure of the playlist required for the
player is critical, although one might be able to make guesses and hack
a playlist structure with enough effort.
 
C

cwdjrxyz

cwdjrxyz said:
Now the method you are using apppears to be based on a flash format,
and you say you need a xml playlist for it instead of an m3u one that
you apparently have. The question then becomes does your player accept
an xml play list at all, and if it does, what is the documentation for
this. Surely there should be some information concerning this on sites
associated with the player or any possible discussion groups concerning
your player, if the player will support an xml play list.

You might try the forum at http://www.doom9.net/ . Go to their
general/audio encoding section. This forum is mainly about video, but
audio only subjects often are discussed. I should add that some of the
things discussed at this site are not legal in all countries, but what
you wish to do does not fall into that class. However if anyone wants
to try some tricks to copy DVDs that might be discussed here, you had
best know what the laws are where you live. Some very obscure formats
and players have been discussed from time to time.
 
?

=?ISO-8859-1?Q?Ralph_H=F6glund?=

cwdjrxyz skrev:
Ralph Höglund wrote:






Just for the record, a .wax is an xml playlist that can contain as
little as a single song, but it is designed to work on the WMP and a
few other players, not flash. Likewise a Real .ram can direct to a SMIL
file, which is a xml language that contains a sequence of media as well
as many other possible things.

Now the method you are using apppears to be based on a flash format,
and you say you need a xml playlist for it instead of an m3u one that
you apparently have. The question then becomes does your player accept
an xml play list at all, and if it does, what is the documentation for
this. Surely there should be some information concerning this on sites
associated with the player or any possible discussion groups concerning
your player, if the player will support an xml play list. There are
very many types of play lists, some xml and some not. Thus finding
written documentation of the structure of the playlist required for the
player is critical, although one might be able to make guesses and hack
a playlist structure with enough effort.
OK, thank you for clarification. Yes, I have all information on
what is needed, look here:

This is the code in the .fla-script for loading the playlist:

// XML (Playlist + Arrayhandling)

data_xml = new XML();
data_xml.ignoreWhite = true;
data_xml.onLoad = ladeDaten;
data_xml.load(playlist);

function ladeDaten(success) {
if (success) {
aPath = new Array();
songTitel = new Array();
songArtist = new Array();
songCover = new Array();
audioTracks = new Array();
audioTracks = this.firstChild.childNodes;
totalAudio = audioTracks.length;
for (var i=0; i<totalAudio; i++) {
if (audioTracks.nodeName == "song") {
aPath.push(audioTracks.attributes.path);
songTitel.push(audioTracks.attributes.title);
songArtist.push(audioTracks.attributes.artist);
songCover.push(audioTracks.attributes.bild);
}
}
AudioPath = aPath[0];
titel = songTitel[0];
artist = songArtist[0];
aktAudio = 1;
trackAnzeige = aktAudio+" / "+totalAudio;
status = "Status: Spellista - Laddad";
if (playerlook) setCover(0);
erstesBild = true;
} else {
status = "Status: Spellista - Ej laddad";
}
delete audioTracks;
delete data_xml;
}
----------------------------------------------------------

This is the format for the xml-file (example file with only path
and title, artist and bild(picture) can be contained if necessary):

<?xml version="1.0"?>
<songs>
<song path="URL/songtitle1.mp3" title="songtitle1"/>
<song path="URL/songtitle2.mp3" title="songtitle2"/>
</songs>

Format for the m3u-file (example file):

URL/songtitle1.mp3
URL/songtitle2.mp3

----------------------------------------------------------

I think that the best method is to create the xml-file from the
data sitting in the m3u-file in the php-script that I use for
uploading the playlist to the server. It is just that my
knowledge in php programming is rather limited at this point. I
have though found that the methods for handling text data and
file reading/writing reminds me a lot of PERL, am I right?

Regards,
Ralph
 
T

Travis Newbury

The m3u-Play list can easily be read by your Flash player. Then just
add some code to convert it to the XML you want (thought XML is not
sessesarily needed for the player)

If you are going to use XML and FLash I would like to sugest a free
extension for Flash (works in MX and better) It is called "XML
Shortcuts" it allows you to access XML information by name rather than
parent/child/sibling relationships.
 
?

=?ISO-8859-1?Q?Ralph_H=F6glund?=

Travis Newbury skrev:
The m3u-Play list can easily be read by your Flash player. Then just
add some code to convert it to the XML you want (thought XML is not
sessesarily needed for the player)

If you are going to use XML and FLash I would like to sugest a free
extension for Flash (works in MX and better) It is called "XML
Shortcuts" it allows you to access XML information by name rather than
parent/child/sibling relationships.
Thanks Travis.

As the flash mp3-player is all set up for xml-playlist I don't
want to dig in the players code, but leave it as it is.

I have therefore actually decided to convert the m3u file into an
xml-playlist now. The php-program I have in the server for
uploading playlists am I adding code to for that purpose. I had
to dig in my memory for my C, C++, Perl etc knowledge and I am
soon finished with the task. Have not been programming för almost
ten years now....

With the excellent: http://se2.php.net/ I got all the help I
could possibly get. So I am quite happy now.

Thanks all for your comments.

Ralph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top