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

Forums

/

playlist/chapters problem on HTTP server

6 replies [Last post]

My player is working totally fine in my location drive but when I uploaded the play to a HTTP server it has problem going to Chapter 4, 5 and 6

View play here:
http://www.dlsweb.rmit.edu.au/bus/public/JWPlayer/heidi/

I am thinking the problem maybe cause by start tag

<?xml version='1.0' encoding='UTF-8'?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<title>Question 1</title>
<creator>RMIT University</creator>
<location>heidi.flv</location>
<image>image01.jpg</image>
<meta rel='type'>video</meta>
<meta rel='start'>0</meta>
<meta rel='captions'>captions.xml</meta>
<annotation>Why did you choose to study the M.Com degree?</annotation>
</track>
<track>
<title>Question 2</title>
<creator>RMIT University</creator>
<location>heidi.flv</location>
<image>image02.jpg</image>
<meta rel='type'>video</meta>
<meta rel='start'>18</meta>
<meta rel='captions'>captions.xml</meta>
<annotation>What is the most enjoyable aspect of the program?</annotation>
</track>
<track>
<title>Question 3</title>
<creator>RMIT University</creator>
<location>heidi.flv</location>
<image>image03.jpg</image>
<meta rel='type'>video</meta>
<meta rel='start'>60</meta>
<meta rel='captions'>captions.xml</meta>
<annotation>What do you find particularly challenging?</annotation>
</track>
<track>
<title>Question 4</title>
<creator>RMIT University</creator>
<location>heidi.flv</location>
<image>image04.jpg</image>
<meta rel='type'>video</meta>
<meta rel='start'>110</meta> //this is suppose to be 01:51
<meta rel='captions'>captions.xml</meta>
<annotation>How important was it for you to interact with lecturers, tutors and your fellow students (ie: contribute in classes)?</annotation>
</track>
<track>
<title>Question 5</title>
<creator>RMIT University</creator>
<location>heidi.flv</location>
<image>image05.jpg</image>
<meta rel='type'>video</meta>
<meta rel='start'>165</meta> //this is suppose to be 02:45
<meta rel='captions'>captions.xml</meta>
<annotation>What do you plan to do following completion of the program?</annotation>
</track>
<track>
<title>Question 6</title>
<creator>RMIT University</creator>
<location>heidi.flv</location>
<image>image06.jpg</image>
<meta rel='type'>video</meta>
<meta rel='start'>203</meta> //this is suppose to be 03:23
<meta rel='captions'>captions.xml</meta>
<annotation>What advice would you like to offer to future M.Com students?</annotation>
</track>
</trackList>
</playlist>

Can anyone help please :)

Thanks in advance!

To do the "chapterizing" right, you really need to use a streaming server or put a stream script on your HTTP server if you are allowed to execute PHP or other scripts.

However, you can also pause the player and let the full video file download, then the chapters should be selectable.

I have cleaned up your player page, your captions file, your playlist, and added the metadata array of time/byte-position to your video file.

You can see your page here: http://willswonders.myip.org:8081/Ruby.html

My upstream is slow, so don't expect miracles.

You can download your files from:

http://willswonders.myip.org:8081/Ruby.html (save the page source)
http://willswonders.myip.org:8081/playlist_Ruby.xml
http://willswonders.myip.org:8081/captions_heidi.xml
http://willswonders.myip.org:8081/Movies/heidi.flv

Be patient, it's slow. Comment out the streamer flashvar and adjust the player, playlist, and accessibility paths to yours.

Thanks lefTy!

When you say "added the metadata array of time/byte-position to your video file." does it mean you added the cue point in the flv?

Also I am wondering how can I ass the captions.xml in the HTML

this is not working
so.addParam('flashvars','captions=captions.xml');

Thanks

"added the metadata" This is done using a software tool FLVMDI, which creates and injects the metadata into the FLV file. This is not cue points. This is an array of time/byte-position corresponding to the keyframes in the video file.

Yours:

Magic: FLV
Version: 1
Has audio: yes
Has video: yes
Offset: 9
--- Tag #1 at 0xD (13) ---
Tag type: Meta
Body length: 2904
Timestamp: 0
* Metadata event name: onMetaData
* Metadata contents: {
    'duration' => 250.095000
    'width' => 320.000000
    'height' => 240.000000
    'videodatarate' => 400.000000
    'framerate' => 15.000000
    'videocodecid' => 4.000000
    'audiodatarate' => 96.000000
    'audiodelay' => 0.038000
    'audiocodecid' => 2.000000
    'canSeekToEnd' => true
    'lasttimestamp' => 250.070000
    'lastkeyframetimestamp' => 250.057000
    'creationdate' => 'unknown'
    'metadatacreator' => 'Manitu Group FLV MetaData Injector 2'
    'metadatadate' => Wed, 25 Feb 2009 01:06:57 Pacific Standard Time
    'keyframes' => {
        'filepositions': [
            3592.000000
            140039.000000
            273865.000000
                 ...
            16658277.000000
            16783163.000000
            16809661.000000
        ]
        'times': [
            0.038000
            1.973000
            3.909000
               ...
            246.368000
            248.237000
            250.057000
        ]
    }
    'filesize' => 16810045.000000
    'videosize' => 13647655.000000
    'audiosize' => 3159420.000000
    'datasize' => 2957.000000
}
Previous tag size: 2915

When you use a playlist, all File Properties MUST come from the playlist.

Reference:

      http://developer.longtailvideo.com/trac/wiki/FlashVars#Fileproperties

This includes the captions file and the auxiliary audio track for "commentary" audio or background music, so you don't need:

so.addVariable('captions', 'captions.xml');

because the captions file is specified in each track of the playlist.

[X] You won't see the [CC] button on the player when using a playlist. This is a little "glitch" in the player that hopefully, will be fixed soon. {X]

@lefTy

I am having a similar problem. Am utilizing the same type of xml playlist, but cannot get it to recognize the duration.

If you have a sec, could you take a look at my code please?

Thanks in Advance.

Playlist Code:
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<title>HR Playlist Test</title>

<trackList>
<track>
<creator>Lee Rhimes</creator>
<title>Introduction</title>
<location>http://intranet/mediaplayer/HRMovies/videos/NEPBO.flv</location>
<image>http://intranet/mediaplayer/HRMovies/Images/NewEmpPg.jpg</image>
<annotation>New Employee Orientation</annotation>
<meta rel="start">0</meta>
<meta rel="duration">18</meta>
</track>
<track>
<title>Benefits</title>
<creator>Lee Rhimes</creator>
<location>http://intranet/mediaplayer/HRMovies/videos/NEPBO.flv</location>
<image>http://intranet/mediaplayer/HRMovies/Images/BenefitProgramPg.jpg</image>
<annotation>Benefits</annotation>
<meta rel="start">63</meta>
<meta rel="duration">163</meta>
</track>
</trackList>
</playlist>

function loadplayer:

// JScript File

function loadplayer(mediafile)
{
//alert(mediafile);
var so = new SWFObject('http://intranet/mediaplayer/player.swf', 'mpl', '600', '260', '9.0.124');

//so.addParam('wmode', 'transparent');

so.addVariable('file', encodeURIComponent('http://intranet/mediaplayer/playlist1.xml?'));
so.addVariable('file', encodeURIComponent('http://intranet/mediaplayer/playlist1.xml?'));
so.addVariable('file', encodeURIComponent('http://intranet/mediaplayer/' + mediafile + '?'));
so.addVariable('respectduration', 'true');
//so.addVariable('streamer', 'lighttpd');
so.addVariable('playlistsize', '320');
so.addVariable('playlist', 'right');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam("wmode","transparent");
so.addVariable('height','260');
so.addVariable('width','600');
//so.addVariable('file',theFile);
//so.addVariable('displayheight','260');
//so.addVariable('displaywidth','320');
so.addVariable('autoscroll','false');
so.addVariable('backcolor','0xffffff');
so.addVariable('frontcolor','0x333333');
so.addVariable('lightcolor','0xcccccc');
so.addVariable('screencolor','0x333333');
//so.addVariable('backcolor','b7b7b7');//opague
//so.addVariable('frontcolor','333333');//darkgrey
//so.addVariable('lightcolor','cccccc');//lightgrey
//so.addVariable('screencolor','333333');//color above and below video default is black
so.addVariable('overstretch','true');
so.addVariable('showicons','true');
so.addVariable('transition','random');
so.addVariable('shownavigation','true');
so.addVariable('showstop','false');
so.addVariable('showdigits','true');
so.addVariable('showdownload','false');
so.addVariable('autoscroll','false');
so.addVariable('thumbsinplaylist','true');
so.addVariable('bufferlength','3');
so.addVariable('repeat','false');
so.addVariable('shuffle','false');
so.addVariable('volume','80');
so.addVariable('autostart','false');
//so.addVariable('linkfromdisplay','true');
//so.addVariable('recommentdations','your xml url here');/*Only for the mediaplayer. Set this to an XML with items you want to recommend. The thumbs will show up when the current movie stops playing, just like YouTube. Here's an example setup and example XML. */
//so.addVariable('javascriptid','mp5');
//so.addVariable('enablejs','true');

so.write('mediaspace');

}

So you win the award for the most flashvars ever used for one player. Hands down.

function loadplayer(mediafile)
{
//alert(mediafile);
  var so = new SWFObject('http://intranet/mediaplayer/player.swf', 'mpl', '600', '260', '9.0.124');
      so.addParam('allowscriptaccess',   'always');
      so.addParam('allowfullscreen',     'true');
    //so.addParam('wmode',               'transparent');
      so.addVariable('file',              encodeURIComponent('http://intranet/mediaplayer/' + mediafile));
      so.addVariable('bufferlength',     '3');
      so.addVariable('playlist',         'right'); 
      so.addVariable('playlistsize',     '320');
      so.addVariable('repeat',           'false');
      so.addVariable('shuffle',          'false');
      so.addVariable('volume',           '80');
      so.addVariable('respectduration',  'true');
      so.addVariable('stretching',       'uniform');
      so.addVariable('showicons',        'true');
    //so.addVariable('linkfromdisplay',  'true');
    //so.addVariable('linktarget',       '_self');
      so.addVariable('backcolor',        'b7b7b7');  //opague
      so.addVariable('frontcolor',       '333333');  //darkgrey
      so.addVariable('lightcolor',       'cccccc');  //lightgrey
      so.addVariable('screencolor',      '333333');  //color above and below video default is black
      so.addVariable('autostart',        'false');
      so.write('mediaspace');
};
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="1" xmlns="http://xspf.org/ns/0/">
  <title>HR Playlist Test</title>
  <trackList>
    <track>
      <creator>Lee Rhimes</creator>
      <title>Introduction</title>
      <location>http://intranet/mediaplayer/HRMovies/videos/NEPBO.flv</location>
      <image>http://intranet/mediaplayer/HRMovies/Images/NewEmpPg.jpg</image>
      <annotation>New Employee Orientation</annotation>
      <meta rel="start">0</meta> 
      <meta rel="duration">18</meta>
    </track>
    <track>
      <title>Benefits</title>
      <creator>Lee Rhimes</creator>
      <location>http://intranet/mediaplayer/HRMovies/videos/NEPBO.flv</location>
      <image>http://intranet/mediaplayer/HRMovies/Images/BenefitProgramPg.jpg</image>
      <annotation>Benefits</annotation>
      <meta rel="start">63</meta> 
      <meta rel="duration">163</meta> 
    </track>
  </trackList>
</playlist>

The start times well into the video file won't work unless you use a streaming server or wait until the file has downloaded at least to that point.