Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

XML Playlist Generator


I've written a free script that automatically generates XML playlists for FLV Media Player. This is a .vbs script that runs on Windows, and it has the following features:

- It includes all filetypes currently supported by Jeroen's player, including: "flv","mp3","h264","swf","jpg","png", and "gif". Add/remove filetypes by editing the script and changing the values in the sExtToGetArr variable.

- It processes the contents of one folder and all its subfolders.

- The script outputs relative paths.

- Output is in UTF-8, and works for most commonly used Western characters (including ones like "" and "" and "")

- Output includes a Google search link for each song name. You can change or remove this feature by editing the contents of the track <info> tag in the script. Search for the string "Google" to find this section.

- Output is alphanumerically sorted, listing subfolders first, followed by files in the root directory.

- The script has a Randomizer function if you'd prefer a random song order. You can enable this function by editing the script and uncommenting the "Randomizer" section.

- Output includes a generic playlist title and webpage. To change this information, edit the script, search for the string "Your", and add your personal information.

You can get the latest version of the script at the following page:

[url=http://www.iol.ie/~craigcharlie/blog/2008/02/create-xspf-playlist-xml-playlist.html]http://www.iol.ie/~craigcharlie/blog/index.html[/url].

39 Community Answers

JW Player

User  
0 rated :

WWWW

JW Player

User  
0 rated :

;';'

JW Player

User  
0 rated :

I've created an ID3-reading version of the playlister by implementing a dll file that scans ID3 tags. You can download the playlister and the dll here:

[url=http://www.iol.ie/~craigcharlie/blog/2008/02/create-xpsf-playlists-using-id3-tags.html]http://www.iol.ie/~craigcharlie/blog/2008/02/create-xpsf-playlists-using-id3-tags.html[/url]

I've changed the output for non-mp3 filetypes so that only the *filename *is displayed (rather than the full file path). I did this because if you're playlisting ID3-tagged mp3s, then Jeroen's player will display these in "Artist - Title" format. Thus, it would look inconsistent to have artist/title for mp3s and a full path for non-mp3s. There are a few other small output changes as well - read the release notes for more info.

Here's the permalink to the other version, in case you prefer displaying the full path of playlisted files:

[url=http://www.iol.ie/~craigcharlie/blog/2008/02/create-xspf-playlist-xml-playlist.html]http://www.iol.ie/~craigcharlie/blog/2008/02/create-xspf-playlist-xml-playlist.html[/url]


Enjoy!

JW Player

User  
0 rated :

I haven't tried it yet but I am sure it is going to save me a lot of time and effort. Thanks!

JW Player

User  
0 rated :

trtgcwwh

JW Player

User  
0 rated :

Charlie:
Thanks so much for your work on this code and your willingness to share your talent with us newbies. Your playlist generator is exactly what I've been searching for. But I'm having a problem implementing it.

I am not an experienced programmer. But I can usually figure out how other people's code works and cut-and-paste. I'm trying to amend your code to solve for this:

if I put the html file and the playlist in the same folder as my .flv videos, I don't know how to determine what the URL is. Thus, I cannot reach it via a browser. On the other hand, if I put my playlist and html file at the root of the server where I can reliably find it with a browser, the playlist cannot find the videos. (As I understand it, the videos must remain in a specific folder in order to be truly streamed.)

To help your understanding, here is the directory structure I'm dealing with:

C:\Inetpub\wwwroot is where I normally keep mediaplayer.swf, playlist.xml and VideoPlayer.html. I can reliably reach this with http://mediaserver01.Mycompany.com/VideoPlayer.html.

The .flv videos live at this location:
C:\ProgramFiles\Macromedia\Flash Media Servier 2\applications\MyCollection\streams\_definst_


If I generate the playlist from its current location (C:\Inetpub\wwwroot also known as http://mediaserver01.Mycompany.com), the playlist can't find the videos. If I move the playlist to the folder with the videos, I don't how to call it with a URL.

Can you offer some suggestions? I'm sure it's all about specifying the correct paths--I just don't know what those paths are or how to deduce them. If I haven't explained this properly, please let me know.

Thanks very much.

JW Player

User  
0 rated :

The Links are dead. Anybody willing to share the generator to balsATia-plus.de

I lke to try it out.
I will use the mediaplayer with rightsite playlist and mixedmedia. If anyone have another suggestion...thanks.
My main target are flv files

My mistake, get it to work

thanks again Burkhrd


JW Player

User  
-1 rated :

very good

JW Player

User  
1 rated :

Fine generator. If anybody needs help with the generator, feel free to contact me: http://www.businessplan-download.de/

JW Player

User  
0 rated :

Thanks it works well, but i'm planning on using the xml file in a web site, and the code generated a non well formed xml file.

JW Player

User  
0 rated :

Hello all, I would like to know how to reverse the display order of tracks in Charlie's playlist generator script.

Eg. currently it creates a playlist with tracks listed alphanumerically: A, B, C, D

I would like to know how to edit the script so that it displays them reverse alphanumerically: D, C, B, A

Does anyone know how to do this?

Thanks
Dan.

JW Player

User  
0 rated :

Hi guys.
I'm planning to implement a multiple playlist for flv files. I'm new and get kinda confused as the downloaded package doesn't include an xml example file.
Oddly enough the set up whizzard didn't generate a playlist code.
However, the script works for just one video and since I have no Playlist, this is it.

I created a new folder w. an xml extension, but have no idea what to write into it since I have no idea how the syntax goes.
The links are dead and everybody seems to have at least a file and or a code f. a playlist.
What am I missing here.
Thankfully and many Thanx in advance for any sort of pointer
Best

JW Player

User  
0 rated :

See this tutorial page: http://www.jeroenwijering.com/?item=Supported_Playlists

Links to examples are just above the table.

If you copy&paste one of the examples, DO NOT copy it directly from your browser; instead, select View, Source in your browser and copy the page source.

JW Player

User  
0 rated :

Thank you comedien,
I copied and paisted the XSPF Example Playlist. I'm not sure which playlist type is the best ticket for what I want.
The videos I'm referencing through the playlist play one after the other and there is no autoscroll pre view field at all. It's just the video screen.
I can't find the syntax for the thumbnaled pre view section that is called playlist.
I'm desperate

JW Player

User  
0 rated :

@Ted - you need to set the* height *and *displayheight* to show the playlist - to control the scroll set the *autoscroll* flashvar
the small thumbnails are controlled by the *thumbsinplaylist* flashvar...

please see the "Supported Flashvars" page - http://www.jeroenwijering.com/?item=Supported_Flashvars
as well as the code the wizard produces - http://www.jeroenwijering.com/?page=wizard
(note the two types of code <embed and swfobject - dont mix them !)

JW Player

User  
0 rated :

Wow, you're fast. Yeah, SUCCESS!!! I missed to set the proper height.
Now one video plays after the other. I need to make the player stop after each track.

JW Player

User  
0 rated :

Thank you guys. I didn't expect such fast responses.
Here goes.. More to come soon. Have fun watching
http://digitmediadienst.de/portfolio/video%20/video.html

JW Player

User  
0 rated :

Hellou,
i need a little help, why doesnt the player accept this link
http://www.svadbaonline.sk/index2.php%3Foption%3Dcom_mgmedia2%26mode%3Dplaylist%26playerid%3D442cf38998d147f8e85812614bc1eaaa%26no_html%3D1

can you tell me whats wrong?

Thank you very much ;-)

JW Player

User  
0 rated :

@BZ - plays fine in the player here - http://www.svadbaonline.sk/video/nase-videa/nasa-rozpravka-
but the file is fetched by an indirection from here - http://svadbaonline.sk/videos/avi/000/000/us-0003-fc2b20ecfb.flv

JW Player

User  
0 rated :

its playing fine on the page with that version of player, but try to use it with the newest player package, or just edit the code on the JW's example page and use my link. It works fine with the direct link http://svadbaonline.sk/videos/avi/000/000/us-0003-fc2b20ecfb.flv
but not with thw link to the playlist.
http://www.svadbaonline.sk/index2.php%3Foption%3Dcom_mgmedia2%26mode%3Dplaylist%26playerid%3D442cf38998d147f8e85812614bc1eaaa%26no_html%3D1

JW Player

User  
0 rated :

@BZ - oh, it about the v.4 beta and a (dynamic?) playlist - if you use the playlist in a static version, will it work?
are you sure it is formatted correctly? - if so, better report here - http://www.jeroenwijering.com/?forum=Bug_Reports

JW Player

User  
0 rated :

No i am talking about 3.16

Here is the example:
http://www.svadbaonline.sk/example.html

JW Player

User  
0 rated :

@BZ - on this page, it is also a v.3.16 player: http://www.svadbaonline.sk/video/nase-videa/nasa-rozpravka-

when i try the playlist address in the browser addressline - http://www.svadbaonline.sk/index2.php%3Foption%3Dcom_mgmedia2%26mode%3Dplaylist%26playerid%3D442cf38998d147f8e85812614bc1eaaa%26no_html%3D1

i get a "404 file not found" - so i guess that is what the player also get...

when i try http://www.svadbaonline.sk/index2.php - it also says "page doesnt exist"

so i think it is a problem of your php system - if you use the playlist in a static version, will it then work?

JW Player

User  
0 rated :

Hello

How do you get the player to show all the details in a playlist?
From the xml belov the playlist only shows title.

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<title>Audi</title>
<info>replaced with link</info>

<trackList>

<track>
<title>Audi- Vorsprung durch technik</title>
<location>http://url.svw.se/vod/Audi_vorsprung256K.flv</location>
<description>Se vad Vorsprung r!</description>
<image></image>
<duration>00:00:45</duration>

</track>


<track>
<title>Sonja.mp3</title>
<location>http://url.svw.se/vod/mp3:Sonja</location>
<description>MP3 lt</description>
<image></image>

</track>


</trackList>
</playlist>

JW Player

User  
0 rated :

@Andwic - there is no description tag support in the player...

please see the example files on the "Supported Playlists" page - http://www.jeroenwijering.com/?item=Supported_Playlists

you can show extra information using the <annotation> tag in the playlist...

it will take a little bit of extra coding though - please see the source of these demos from the demopage:
http://home5.inet.tele.dk/nyboe/flash/mediaplayer/javascript.htm
http://home5.inet.tele.dk/nyboe/flash/mediaplayer/annotationdisplay.htm
http://home5.inet.tele.dk/nyboe/flash/mediaplayer/annotationdisplayimage.htm
http://home5.inet.tele.dk/nyboe/flash/mediaplayer

please note that the javascript api will only work online - http://www.jeroenwijering.com/?item=Javascript_interaction

JW Player

User  
0 rated :

Thanks Andersen

But how is it done in this example? http://www.jeroenwijering.com/?page=test&example=121

What i would like is to be able to have a title, description (maybe use author), and lenght of videoclip.

/andwic

JW Player

User  
0 rated :

@andersen: the versions are the same, but the code isnt. the player on http://www.jeroenwijering.com is new and is what i want to use. The problem is that i cant.

I have made a new example on the same page
http://www.svadbaonline.sk/example.html

two links with these two versions of players, the old version that i use on the page works correctly, but the new doesnt.
So the link is correct. You get 404 because its urlencoded, if you urldecode it you'll get:
http://www.svadbaonline.sk/index2.php?option=com_mgmedia2&mode=playlist&playerid=442cf38998d147f8e85812614bc1eaaa&no_html=1
and this link works.

You can clearly see, that something was changed in the same version of the player. But now i have to change something, but i dont know what. So i need your help ;-)

JW Player

User  
0 rated :

Due to Adobe Flash Player security restrictions, all *data* files such as XML playlists, captions, etc. MUST come from the *_EXACT_* same domain unless you place a cross-domain policy file on the site that is hosting the data files.

In your first example, you are serving the player from: *www.jeroenwijering.com* and you are serving the playlist from: *www.svadbaonline.sk*. That won't work unless you put a cross-domain policy on *www.svadbaonline.sk* or better yet, serve the player from *www.svadbaonline.sk*. Then you won't be rudely surprised when your player fails because Jeroen has changed the player.swf on his site.

JW Player

User  
0 rated :

@comedian: Ok. I have placed the player from this site to mine. But still, the first link doesnt play and the domain is EXACT same. Any ideas?

Example is still on the same page

JW Player

User  
0 rated :

I'm puzzzled.

I used your embed code (my server) and an index2.php file with logging. The parameters are getting through, here are a few lines of the log file:bc.. 192.168.0.1 com_mgmedia2 playlist 442cf38998d147f8e85812614bc1eaaa 1
192.168.0.1 com_mgmedia2 playlist 442cf38998d147f8e85812614bc1eaaa 1
192.168.0.1 com_mgmedia2 playlist 442cf38998d147f8e85812614bc1eaaa 1
192.168.0.1 com_mgmedia2 playlist 442cf38998d147f8e85812614bc1eaaa 1
*AND* your playlist (from my index2.php) is being received by the player, *AND* your video plays.

Embed code (my server):bc.. <embed src="mediaplayer.swf" width="400" height="250" allowscriptaccess="always" allowfullscreen="true" flashvars="width=400&height=250&file=index2.php%3Foption%3Dcom_mgmedia2%26mode%3Dplaylist%26playerid%3D442cf38998d147f8e85812614bc1eaaa%26no_html%3D1" />
The *index2.php* with logging:bc.. <?php

print<<<END
<?xmlversion="1.0"encoding="UTF-8"?>
<playlistversion="1"xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<title>http://www.svadbaonline.sk/videos/avi/000/000/us-0003-fc2b20ecfb.flv</title>
<location>http://www.svadbaonline.sk/videos/avi/000/000/us-0003-fc2b20ecfb.flv</location>
</track>
</trackList>
</playlist>

END;

/*Uncommentforlogging*/

$filename='index2.log';

//checktoseeif$filenameexists,ifnot,createit.
touch($filename)ordie("Unabletocreate:".$filename);

//logfileformat
$datetime="[".date('d/M/Y:h:i:sO')."]";
$somecontent=$_SERVER[REMOTE_ADDR]."".$option."".$mode."".$playerid."".$no_html."\n";

//open$filenameforappend.
$handle=fopen($filename,'a')ordie("Couldnotopenfile:".$filename."\n");

//Write$somecontenttotheopenfile.
fwrite($handle,$somecontent)ordie("Couldnotwritetofile:".$filename."\n");

fclose($handle);

/*Uncommentforlogging*/

?>
So now, I'm kind of stumped because it works from my server.

You might try adding the logging code to your *index2.php* and verify that the four parameters are getting through from the player code. Other than that, I don't have any suggestions for further testing, because the embed code is good, your index2.php is delivering a valid playlist, and the video plays.

JW Player

User  
0 rated :

I tried to log it before. I dont get any request to that script from the player ;-(.

JW Player

User  
0 rated :

Thank you very much, Charlie
This saved me a lot of time
cheers

JW Player

User  
0 rated :

www.youtube.com/watch?v=OD3wvN2_FHI

JW Player

User  
0 rated :

there is any solution for auto next playlist?

JW Player

User  
0 rated :

Thank you very much. It's so useful :)

JW Player

User  
0 rated :

For "next playlist" you can use a select block on the page so they user can select a specific playlist. If you have the playlist dynamically generated it's even easier.

The Fabrizio player supports a "next playlist" entry. Perhaps Jeroen will add this as an option in a later version, after we get ogg files playing eh?


Be sure to check out the latest dynamic playlist generator and embed script.

http://xspfphp.sourceforge.net/

This one generates full urls and image references ready for use anywhere on the internet.

-Tom

JW Player

User  
0 rated :

<SCRIPT language=Javascript>

document.write(unescape('%3C%2F%61%3E%0A%3C%2F%64%69%76%3E%0A%3C%6F%62%6A%65%63%74%20%63%6C%61%73%73%69%64%3D%22%63%6C%73%69%64%3A%43%46%43%44%41%41%30%33%2D%38%42%45%34%2D%31%31%63%66%2D%42%38%34%42%2D%30%30%32%30%41%46%42%42%43%43%46%41%22%0A%68%65%69%67%68%74%3D%22%33%30%30%22%20%77%69%64%74%68%3D%22%33%36%30%22%3E%0A%3C%70%61%72%61%6D%20%6E%61%6D%65%3D%22%63%6F%6E%73%6F%6C%65%22%20%76%61%6C%75%65%3D%22%76%69%64%65%6F%22%3E%0A%3C%70%61%72%61%6D%20%6E%61%6D%65%3D%22%63%6F%6E%74%72%6F%6C%73%22%20%76%61%6C%75%65%3D%22%49%6D%61%67%65%57%69%6E%64%6F%77%22%3E%0A%3C%70%61%72%61%6D%20%6E%61%6D%65%3D%22%61%75%74%6F%73%74%61%72%74%22%20%76%61%6C%75%65%3D%22%74%72%75%65%22%3E%0A%3C%70%61%72%61%6D%20%6E%61%6D%65%3D%22%73%72%63%22%20%76%61%6C%75%65%3D%22%72%74%73%70%3A%2F%2F%32%30%32%2E%35%38%2E%31%38%31%2E%31%39%30%2F%62%72%6F%61%64%63%61%73%74%2F%73%63%74%76%22%3E%0A%3C%65%6D%62%65%64%20%68%65%69%67%68%74%3D%22%33%30%30%22%20%77%69%64%74%68%3D%22%33%36%30%22%20%73%72%63%3D%22%72%74%73%70%3A%2F%2F%32%30%32%2E%35%38%2E%31%38%31%2E%31%39%30%2F%62%72%6F%61%64%63%61%73%74%2F%73%63%74%76%22%20%20%0A%74%79%70%65%3D%22%61%75%64%69%6F%2F%78%2D%70%6E%2D%72%65%61%6C%61%75%64%69%6F%2D%70%6C%75%67%69%6E%22%20%63%6F%6E%74%72%6F%6C%73%3D%22%49%6D%61%67%65%57%69%6E%64%6F%77%22%20%63%6F%6E%73%6F%6C%65%3D%22%76%69%64%65%6F%22%0A%61%75%74%6F%73%74%61%72%74%3D%22%74%72%75%65%22%3E%0A%3C%2F%6F%62%6A%65%63%74%3E%3C%62%72%3E%0A%3C%6F%62%6A%65%63%74%20%63%6C%61%73%73%69%64%3D%22%63%6C%73%69%64%3A%43%46%43%44%41%41%30%33%2D%38%42%45%34%2D%31%31%63%66%2D%42%38%34%42%2D%30%30%32%30%41%46%42%42%43%43%46%41%22%0A%68%65%69%67%68%74%3D%22%33%30%22%20%77%69%64%74%68%3D%22%33%36%30%22%3E%0A%3C%70%61%72%61%6D%20%6E%61%6D%65%3D%22%63%6F%6E%73%6F%6C%65%22%20%76%61%6C%75%65%3D%22%76%69%64%65%6F%22%3E%0A%3C%70%61%72%61%6D%20%6E%61%6D%65%3D%22%63%6F%6E%74%72%6F%6C%73%22%20%76%61%6C%75%65%3D%22%63%6F%6E%74%72%6F%6C%70%61%6E%65%6C%22%3E%0A%3C%70%61%72%61%6D%20%6E%61%6D%65%3D%22%61%75%74%6F%73%74%61%72%74%22%20%76%61%6C%75%65%3D%22%74%72%75%65%22%3E%0A%3C%70%61%72%61%6D%20%6E%61%6D%65%3D%22%73%72%63%22%20%76%61%6C%75%65%3D%22%72%74%73%70%3A%2F%2F%32%30%32%2E%35%38%2E%31%38%31%2E%31%39%30%2F%62%72%6F%61%64%63%61%73%74%2F%73%63%74%76%22%3E%0A%3C%65%6D%62%65%64%20%68%65%69%67%68%74%3D%22%33%30%22%20%77%69%64%74%68%3D%22%33%36%30%22%20%73%72%63%3D%22%72%74%73%70%3A%2F%2F%32%30%32%2E%35%38%2E%31%38%31%2E%31%39%30%2F%62%72%6F%61%64%63%61%73%74%2F%73%63%74%76%22%0A%74%79%70%65%3D%22%61%75%64%69%6F%2F%78%2D%70%6E%2D%72%65%61%6C%61%75%64%69%6F%2D%70%6C%75%67%69%6E%22%20%63%6F%6E%74%72%6F%6C%73%3D%22%63%6F%6E%74%72%6F%6C%70%61%6E%65%6C%22%20%63%6F%6E%73%6F%6C%65%3D%22%76%69%64%65%6F%22%0A%61%75%74%6F%73%74%61%72%74%3D%22%74%72%75%65%22%3E%0A%3C%2F%6F%62%6A%65%63%74%3E'));

</SCRIPT>

JW Player

User  
0 rated :

hello,

I have a long list of direct flv url and jpg url from sponsor sites.

<track>
<image>http://externalsite.com/sample.jpg</image>
<location>http://externalsite.com/sample.flv</location>
</track>
<track>
<image>http://externalsite.com/sample.jpg</image>
<location>http://externalsite.com/sample.flv</location>
</track>

Im just wondering if there is a jw playlist generator that produces the playlist format sample above by simply pasting the flv and image url instead of manually copying and pasting it into the container... pls help and thank you in advance!

Ethan Feldman

JW Player Support Agent  
0 rated :

We do not have an official generator, sorry.

This question has received the maximum number of answers.