Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

how to generate a valid playlist.xml?

34 replies [Last post]
Reply
informations about this a terrible ...informations about this a terrible to find here so i just made this thread. Im currently using: <?xml version='1.0' encoding='UTF-8'?> <playlist version='1' xmlns='http://xspf.org/ns/0/'> <trackList> <track> <creator>author</creator> <title>my movie</title> <location>data/movie.mp4</location> <image>data/movie.jpg</image> <info>http://www.mypage.at</info> </track> </trackList> </playlist> its the only one which is working for me... i also tried jws xml but my jw player says thats not valid <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Example media RSS playlist for the JW Player</title> <link>http://www.jeroenwijering.com</link> <item> <title>Opening credits</title> <media:content url="http://content.bitsontherun.com/videos/cdqMNeoG.m4v" type="video/x-m4v" start="00:00" /> <media:thumbnail url="http://www.jeroenwijering.com/upload/ed1.jpg" /> <description>In which we meet Proog and Emo, the two characters of this movie.</description> <link>http://orange.blender.org/</link> </item> </channel> </rss> the problem @ the first one is that ive no "description". the second one isnt working but its the original from jw.
Reply

Please review the v4.1.x player supported playlists here: http://code.jeroenwijering.com/trac/wiki/FlashFormats

The annotation element of the XSPF playlist holds the description. See the chart on the page referenced above for the equivalent element in the other playlist formats.

Reply

i found a good example for a playlist.xml

<smil xmlns="http://www.w3.org/2001/SMIL20/Language">
<head>
<meta name="title" content="Example SMIL playlist for the JW Player"/>
<meta name="link" content="http://www.rafaelhaider.at"/>
</head>
<body>
<seq>

<par>
<audio src="data/lawine.mp4" title="Lawine" alt="Mein aktuellstes Projekt" author="Rafael Haider" dur="00:05:58.0" begin="0s" />
<!--<anchor href="http://www.bigbuckbunny.org/"/>-->
<!--<textstream src="captions.xml"/>-->
<fullscreen="true" />
<anchor href="http://www.rafaelhaider.at"/>
<img src="data/lawine.jpg"/>
</par>

</seq>
</body>
</smil>

Reply

The SMIL playlist format is massive overkill for most uses of the Flash player! :)

Reply

what worked in v3:

<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" version="1">
<trackList>
<track>
<creator>test file 1</creator>
<title>test file 1</title>
<location>rtmp://abc.xyz.org:80</location>
<identifier>mp3:pass1/1218794401</identifier>
</track>
</trackList>
</playlist>

...doesn't in v4.1... any suggestions?

Reply

First, streamscript has been replaced by a global flashvar streamer for all types of streaming.

Global means that it goes in your player code:so.addVariable('streamer', 'rtmp://zyx.wvu.tsr/application/instance');
Only path(s) if used and the filename go in the playlist. If the filename does not have a recognizable media file extension, then use the type flashvar to tell the player what type of media it is going to receive.

<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" version="1">
  <trackList>
    <track>
      <creator>test file 1</creator>
      <title>test file 1</title>
      <location>mp3:pass1/1218794401</location>
      <meta rel='type'>sound</meta>
    </track>
  </trackList>
</playlist>

And, I think the "mp3:" should be prepended to the filename, not the path, but I could be wrong about that. I don't have FMS3 to test against, so I can't confirm that.

Reply

Hi all, I'm an HTML/XML novice but have a good idea of how this generally works.

I'm trying to get my mp3 playlist to work, I've exported a playlist from iTunes - no joy, Tried copy and pasting the code above and editing accordingly - no joy. Spent about 10 hours and getting nowhere....errr, slowly! lol

I'm developing the site using RapidWeaver (I know, I'm really lazy! lol):
I've installed player v4.1 into the same folder as the mp3's on my server
The webpage appears to find the player (although the preview image is all wonky), but can't seem to find the playlist at all. I don't know if the playlist is invalid or I've done something wrong in the embed code.

The embed code is listed below:

<strong><blockquote>
<html>
<head>
<title>MediaPlayer</title>
</head>
<body>
<center>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8"
width="320" height="300"
id="theMediaPlayer">
<param name=movie value="player.swf">
<param name=quality value="high">
<param name=bgcolor value="#FFFFFF">
<param name=allowFullScreen value="false">
<param name=swLiveConnect value="true">
<param name=allowScriptAccess value="sameDomain">
<param name="FlashVars" value="file=v4playlist.xml&width=320&height=300&displaywidth=320&displayheight=300&autostart=true&shuffle=true&image=preview.jpg&logo=preview.jpg&backcolor=0xFFFFFF">

<embed type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"
width="320" height="300" bgcolor="#FFFFFF"
name="theMediaPlayer"
src="player.swf"
flashvars="file=v4playlist.xml&width=320&height=300&displaywidth=320&displayheight=200&autostart=true&shuffle=true&image=preview.jpg&logo=preview.jpg&backcolor=0xFFFFFF">
</embed>
</object>

</center>
</body>
</html></blockquote>
</strong>

A sample of my xml playlist:

<strong><blockquote><?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" version="1">
  <trackList>
    <track>
      <creator>The Groove</creator>
      <title>1999 (Studio Demo)</title>
      <location>mp3:1999_StudioDemo.mp3</location>
      <meta rel='type'>sound</meta>
    </track>

<track>
      <creator>The Groove</creator>
      <title>Give It Away (Live)</title>
      <location>mp3:GiveItAway_Live.mp3</location>
      <meta rel='type'>sound</meta>
    </track>

  </trackList>
</playlist></blockquote>
</strong>

Any help would be greatly appreciated.
website - http://www.thegroove.info
email - info@thegroove.info (if you would be so kind)

Thank you so much, hopefully in advance!

Glyn

Reply

Don't prepend "mp3:" to the location element data.<location>GiveItAway_Live.mp3</location>That form of location data is only for RTMP streaming from FMS3.

Also you don't need:<meta rel='type'>sound</meta>since your media files have a recognized extention of "mp3".

The relative path for everything but FLVs starts from the location of the HTML document so your MP3s have to be in the same directory as the HTML.

Reply

kLink,

That's fantastic thank you so much! - the tracks are now playing! :-D

...one other thing *looks sheepishly* - I can't get the playlist to display so that viewers can scroll and choose tracks? - would love to do something similar to this:

http://home5.inet.tele.dk/nyboe/flash/mediaplayer/playlistlinks.htm

Any help again?

Thank you

Glyn

Reply

What version of the player?

You have a v4.x player file "player.swf" but v3.x flashvars.

If you are using a v4.x player, see: http://code.longtailvideo.com/trac/wiki/FlashVars for the falshvars playlist and playlistsize

These are v3.x flashvars: &width=320&height=300&displaywidth=320&displayheight=200 if you are using a v4.x player remove them from your code.

Reply

That's brilliant thank you so much!

I'm getting to understand it a little now! :-D

Still a few little issues but I think I can work it out

Thank you again!

Reply

Hi,

Does someone know how i can use the JW Player on Joomla and get an add-on or a script in order to generate automatically the thumbs of the videos for the playlist ?
I have 250 videos so i don't want to do it myself !

Thanks

Reply

I have a problem, I had a crash on our server and apparently never saved my playlist in our backup and the kid that created the playlist.xml is not around any longer and I desperately need a fix.

Here's what I have:

<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript">
var PLAYER_OBJECT = null, nPlayerId = 0;

function playerBuild() {
nPlayerId++;
var sPlayerId = 'pl' + nPlayerId;
var so = new SWFObject('player-viral.swf',sPlayerId,'400','315','9','#204080');
so.addParam( 'allowscriptaccess', 'always' );
so.addParam( 'allowfullscreen', 'true' );
so.addParam( 'wmode', 'opaque' );
so.addParam( 'repeat', 'true' );
so.addParam( 'flashvars', 'file=playlist.xml&fullscreen=true&autostart=true' );
so.write( 'playerDiv' );
};

function playerReady(obj) {
PLAYER_OBJECT = getPlayer(obj['id']);
PLAYER_OBJECT.addModelListener('STATE', 'stateTracker');
PLAYER_OBJECT.bReloadPlaylist = false;
};

function getPlayer(gid) {
if(navigator.appName.indexOf("Microsoft") != -1) return window[gid];
else return document[gid];
};

function stateTracker(obj) {
if( obj.newstate == 'COMPLETED') {
if (PLAYER_OBJECT.getConfig().item == PLAYER_OBJECT.getPlaylist().length-1 ) {
PLAYER_OBJECT.bReloadPlaylist = true;
setTimeout("PLAYER_OBJECT.sendEvent('ITEM',0)", 0);
PLAYER_OBJECT.sendEvent('PLAY','true');
}
else
{
PLAYER_OBJECT.sendEvent('ITEM',PLAYER_OBJECT.getConfig().item+1);
PLAYER_OBJECT.sendEvent('PLAY','true');
}
} else {
if ( PLAYER_OBJECT.bReloadPlaylist ) {
if (obj.newstate != 'BUFFERING') {
PLAYER_OBJECT.bReloadPlaylist = false;
PLAYER_OBJECT.sendEvent('PLAY','true');
PLAYER_OBJECT.sendEvent('LOAD',PLAYER_OBJECT.getPlaylist());
};
};
};
};

</script>

Any suggestions as to how I make a playlist that will work for me? I have 8 video files that I use, named 1.FLV, 2.FLV, 3.FLV and so on.

Any help would be greatly greatly greatly appreciated.

Thanks,
I M

Reply

Can you provide a link to where you are running this?

Reply

can any one show me how to create a playlist xml from scratch.??????????????

thank you

Reply
Reply

what is "downloading data from plugins.logatailvideo" while i open my jwplayer, it says like this.
and play start time delays.....

thanks
eritrea

Reply

@eritrea - When you download the player, make sure to uncheck the "Viral Plugin" checkbox. That will remove those messages.

Reply

I downloaded the files opened my directory http://www.mt-araratbc.org and uploaded the three players all in the html sub-directory. I inserted the below file in the code page of the webpage and when tested it says the player will be displayed. In fact it is displayed and when the page is published to the site I upload file=video-4.flv and every things works like a charm.
I have no joy using the wizard or any of the other file settings.
I desire to make available 4 video files which would or could be selected and played one at a time.
Please can you tell me how to or would you provide a similar script below that will allow the call up of one of four video files for viewing.
I'd appreciate a cut an paste job if at all possible or please direct to step by simple step for this unlearned country boy. Thanks and Best Regards

<p id='preview'>The player will show in this paragraph</p>
<script type='text/javascript' src='swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','player','400','300','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=video-4.flv');
s1.write('preview');
</script>

Reply

@Cleaver B - Can you provide a link to where that code is on your site? The link you supplied does not contain it, thanks.

Reply

I'm trying to setup my first playlist. We have been playing single flv and mp4 files fine. Our environment is a wowza streaming server and serving flv and soon mp4 files.

I'm basically trying to get the example files working so I've copied everything from the tutorial, including crossdomain.xlm.

I've tried to use local (same directory) files, as well as the sample ones from longtail. is there a place to download a fully functional set of pages that have playlists working?

When I try to use the playlist file, I basically get nothing. Screen is blank. Below is the pages I currently have:

videoplayer.html:

<script type='text/javascript' src='swfobject-1.5.js'></script>

<div id='mediaplayer'></div>

<script type="text/javascript">
var so = new SWFObject('player.swf','playerID','650','240','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addVariable('playlistfile', 'playlist.xml');
so.addVariable('playlist.position', 'right');
so.addVariable('playlist.size', '250');
so.addVariable('controlbar', 'over');
so.write('mediaplayer');
</script>

playlist.xml:

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/">
<channel>
<title>MRSS Playlist Playlist</title>
<item>
<title>Big Buck Bunny</title>
<media:content url="/videos/bunny.mp4" />
<media:thumbnail url="/thumbs/bunny.jpg" />
<description>Big Buck Bunny is a short animated film by the Blender Institute,
part of the Blender Foundation.</description>
<jwplayer:duration>33.03</jwplayer:duration>
</item>
<item>
<title>Sintel</title>
<media:content url="/videos/sintel.mp4" />
<media:thumbnail url="/thumbs/sintel.jpg" />
<description>Sintel is a fantasy computer generated short movie. It's the third
release from the Blender Open Movie Project.</description>
<jwplayer:duration>888.06</jwplayer:duration>
</item>
<item>
<title>Elephant's Dream</title>
<media:content url="/videos/elephant.mp4" />
<media:thumbnail url="/thumbs/elephant.jpg" />
<description>Elephant's Dream is the world’s first open movie, made entirely
with open source graphics software such as Blender.</description>
<jwplayer:duration>653.79</jwplayer:duration>
</item>
</channel>
</rss>

Reply

Can you provide a link?

Reply

I had two working videos on my website that come from my valid XML playlist. Now I'm trying to add a third video to my playlist, and while the XML seems to be valid, the third video is not showing up on my web page's playlist.

Here's the XML:

<?xml version="1.0" encoding="UTF-8"?>
<playlist xmlns="http://xspf.org/ns/0/" version="1">
  <title>RoboPutt Video Playlist</title>
  <tracklist>
    <track>
      <title>What is RoboPutt? (Short Version)</title>
<creator>RoboPuttGolf</creator>
<annotation>Get a glimpse into what RoboPutt is. When you are ready to know more, watch the Extended

Version.</annotation>
<location>http://www.roboputt.com/videos/Short_What_Is_RoboPutt_SLV.flv</location>
<info>What is RoboPutt? (Short Version)</info>
        <image>http://www.roboputt.com/images/roboputt_video.png</image>
<duration>00:01:35</duration>
    </track>
    <track>
      <title>What is RoboPutt? (Extended Version)</title>
      <creator>RoboPuttGolf</creator>
      <annotation>A more detailed version of the same video showing you how RoboPutt can help you and your putting

game</annotation>
      <location>http://www.roboputt.com/videos/Long_What_Is_RoboPutt_HD3.flv</location>
      <info>What is RoboPutt? (Extended Version)</info>
      <image>http://www.roboputt.com/images/roboputt_video2.png</image>
      <duration>00:04:34</duration>
    </track>
    <track>
      <title>RoboPutt on Capital Golf Weekly</title>
      <creator>Capital Golf Weekly</creator>
      <annotation>Capital Golf Weekly, a TV show aired in the Washington DC area of the U.S., kicks off its Season 14 premiere with a segment on RoboPutt. The segement lasts from around 01:24 to about 03:24.</annotation>
      <location>http://bcove.me/o871sojy</location>
      <image>http://www.roboputt.com/images/roboputt_video3.png</image>
    </track>
  </tracklist>
</playlist>

The URL for the playlist is here: http://www.roboputt.com/index.html

Can someone please help me out and tell me why the 3rd video isn't showing up? Is it because it's an external video, and not one hosted on my site?

Thanks.

Reply

The issue with the 3rd video is because you are leeching from BrightCove...

Reply

So all the files have to be on my domain? There's no way to link to videos on an external site?

Reply

For example, the player supports YouTube videos. But some CDNs, BrightCove for example, go to great lengths to stop people from leeching their videos and stealing their bandwidth (what you are doing), and that is why it won't work.

Reply

Hi,
I'm using jwplayer 5.7. Playlist on HTML5 works fine, but I don't know how to specify the three video encode formats in XML playlist (mp4, webm & ogv).

This is a playlist example for one item:

<rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<item>
<title>VideoDemo</title>

<jwplayer:file>http://xxxxx.com/videos/src/7705111050.webm</jwplayer:file>
<jwplayer:file>http://xxxxx.com/videos/src/7705111050.ogv</jwplayer:file>
<jwplayer:file>http://xxxxx.com/videos/src/7705111050.mp4</jwplayer:file>
<media:thumbnail url="http://xxxxx.com/videos/thumbs/7705111050.jpg" />
<description>Demo Video for Test</description>
<jwplayer:provider>http</jwplayer:provider>

</item>
</channel>
</rss>

how I specifies a correct playlist xml for 3 video encodes?
If you navigate with Opera (Flash & Quicktime desactivated), you get this message:
The video could not be loaded, either because the server or network failed or because the format is not supported: http://xxxxx.com/videos/src/7705111050.mp4
But video for Opera would must be http://xxxxx.com/videos/src/7705111050.ogv

Also, Mime-type for ogv, webm & mp4 are correct on Apache2.

Video player launcher:

<script type="text/javascript" src="http://xxxxx.com/js/jwplayer.js"></script>
<script type="text/javascript">
jwplayer("mediaplayer_wrapper").setup({
flashplayer: "http://xxxxx.com/flash/player.swf",
width:'790',
height:'300',
image: 'http://xxxxx.com/videos/thumbs/1.jpg',
'playlistfile': 'http://xxxxx.com/playlist/mode/featured/id/1',
'playlist.position': 'right',
'playlist.size': '250',
'controlbar': 'bottom',
modes: [
{type: 'flash', src: 'http://www.almansa.tv/imagecss/flash/player.swf'},
{type: 'html5'},
{type: 'download'}
],
plugins:{
'gapro-2':{},
'fbit-1':{},
}
});

</script>

Reply

@jamon

Have you tried using levels?

(ie). an example from my web site.

levels:
[
  { file: 'video/IL DIVO & TONI BRAXTON - The Time of Our Lives.mp4'},
  { file: 'video/IL DIVO & TONI BRAXTON - The Time of Our Lives.ogv'},
  { file: 'video/IL DIVO & TONI BRAXTON - The Time of Our Lives.webm'},
],

Something worth noting:

in the above example I placed the mp4 first as this is to accommodate Safari users. In doing so, Safari will load the mp4 much faster than it is was located elsewhere.

Also, in the above example I am using a relative path and I am now testing IF an absolute path does make any difference(s); the jury is still out on this.

Hope this i shelpful for you

Reply

You can also use levels with an XML playlist. Example - http://developer.longtailvideo.com/player/testing/files/bitrates.xml

Reply

Well, I found a response:

http://developer.longtailvideo.com/player/trunk/fl5/js/test/examples/assets/mrss.xml

Thanks

Reply

Np

Reply

I am a novice - and need help.

I want to have a playlist for videos.

Do I create an XML file and put it in the same root folder as JM player.

Anyone have a workable simple example of this XML file

Thanks

Reply
Reply

I am created playlist file as like above mentioned.Its working fine.

Just one problem.After played first song its not start to play next song upto user click next button.Is there possible to play next song after a song complete

Reply

Yes, set the repeat variable to either always or list.

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options