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

Forums

/

captions plugin, playlist with captions

20 replies [Last post]

The captions plugin states to set captions.file to specify the captions file.

How can this be set with playlists?

I have this which used to work for accessibility, but does not work for captions

 <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
   <item>
    <title>video/jack_johnson__better_together</title>
    <media:content url="/app/video/jack_johnson__better_together.flv" type="video/x-flv" />
   <media:group>
    <media:meta type="captions">http://localhost/app/CaptionsController.spr?title=video/jack_johnson__better_together</media:meta>
   </media:group>
  </item>
 </channel>
</rss>

is your movie served from localhost or do you have a cross-domain policy file on the root of localhost so you don't run afoul of the same-domain security restriction?

localhost. Its not that though.

I have a lot of logging. The captions file is not being recognized and added to the playlist entry. No request to CaptionsController is being made at all with this new captions plugin unless I set captions.file when the player is created. That is no good for playlists.

 
Playlist meta elements usually use the exact same name as the flashvar.

Since the flashvar is captions.file, I would try:

<media:meta type=<strong>"captions.file"</strong>>http://localhost/app/CaptionsController.spr?title=video/jack_johnson__better_together</media:meta>

I have pasted my inputs and outputs where it will be more readable at http://pastie.org/425620

I tried two playlists:

playlist item 1 - media:group

<item>
  <title>1. jack_johnson__better_together</title>
  <media:content url="/app/upload/jack_johnson__better_together.flv" type="video/x-flv" />
  <media:group>
    <media:meta type="captions">http://localhost/bookserver/CaptionsController.spr?title=upload/jack_johnson__better_together</media:meta>
    <media:meta type="captions.file">http://localhost/bookserver/CaptionsController.spr?title=upload/jack_johnson__better_together</media:meta>
  </media:group>
</item>

playlist item 1 - no media:group

<item>
  <title>3. jack_johnson__better_together</title>
  <media:content url="/app/upload/jack_johnson__better_together.flv" type="video/x-flv" />
  <media:meta type="captions">http://localhost/bookserver/CaptionsController.spr?title=upload/jack_johnson__better_together</media:meta>
  <media:meta type="captions.file">http://localhost/bookserver/CaptionsController.spr?title=upload/jack_johnson__better_together</media:meta>
</item>

movie.getPlaylist().toJSON()

[
  {
    "file" : "/app/upload/jack_johnson__better_together.flv",
    "height" : 240,
    "streamer" : "http://localhost/stream54.php",
    "width" : 320,
    "title" : "1. jack_johnson__better_together",
    "duration" : 252.68330303030305,
    "start" : 0,
    "type" : "http"
  }
]

The playlist output does not indicate any captions files, and there is no request made to my captions controller.

When I set the flashvar captions.file the captions controller is hit, the captions are returned, and the player is showing them. This of course wont work for playlists.

So I am still trying to figure out how to get playlists to work with captions with the new captions plugin.

I appreciate the ideas. Has anyone actually got captions plugin + playlist to work? Not accessibility plugin + playlist.

Thank you.

I requested that the functionality to include plugin flashvars in a playlist be added to the player.

Jeroen indicated that Ticket #403 would take care of this, but I haven't had the time to try it yet.

http://developer.longtailvideo.com/trac/ticket/403

The issues claims that it is fixed, but does not explain anything about how it was implemented. For example, was it implemented with '<jwplayer:entry>' ? or not?

I would checkout the source but I don't have flash and have already rolled though two 30 day trials of it : \

Neither of these work. The player claims its an invalid XML file.

<jwplayer:captions>http://localhost/app/CaptionsController.spr?title=upload/jack_johnson__better_together</jwplayer:captions>
<jwplayer:captions.file>http://localhost/app/CaptionsController.spr?title=upload/jack_johnson__better_together</jwplayer:captions.file>

<jwplayer:captions file="http://localhost/app/CaptionsController.spr?title=upload/jack_johnson__better_together "></jwplayer:captions>

I am looking at the source for the parsers and seeing

http://developer.longtailvideo.com/trac/browser/trunk/as3/com/jeroenwijering/parsers/JWParser.as


public static function  parseEntry(obj:XML,itm:Object):Object {
  for each (var i:XML in obj.children()) {
   if(i.namespace().prefix == JWParser.PREFIX) {
    itm[i.localName()] = Strings.serialize(i.text().toString());
   }
  }
 return itm;
}

Seems like itm[i.localName()] should grab captions.file and i.text().toString() should get content of the element??

Also

http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Part...

<jwplayer:captions>xxx</jwplayer:captions>

i.namespace().prefix = jwplayer
i.localName() = captions

I am looking for docs on what i.text() is supposed to get. I assume its the content between the elements. And Strings.serialize just decodes the url...

http://developer.longtailvideo.com/trac/browser/trunk/as3/com/jeroenwijering/utils/Strings.as#L80

So

<jwplayer:captions.file>http://localhost/app/CaptionsController.spr?title=upload/jack_johnson__better_together</jwplayer:captions.file>

should do it, right?

I think it would if it go past the 'this xml file is not a valid playlist' issue.

I'd love to know how to add captions to a playlist flv player too. looking forward to any updates to how to get it working.

I haven't tried this with a MediaRSS playlist yet, but in an XSPF playlist you can have a meta element. There was a non-standard meta element for the MediaRSS playlist, but it's no longer shown in the documentation, so I'm guessing that it's no longer supported.

Anyway, in an XSPF playlist meta element, the captions.file flashvar gets loaded into the player like this:

<meta rel="'captions.file'">http://localhost/app/CaptionsController.spr?title=upload/jack_johnson__better_together</meta>

Then when you dump the playlist, you have this:

captions.file: http://localhost/app/CaptionsController.spr?title=upload/jack_johnson__better_together

Which might work. That's as far as I've gotten in the testing.

This is with a v4.4.162 player. Later releases don't work.

Phew...

After looking over the source code saw that XSPF still reads meta tags. I converted my playlist controller to return XSPF rather than RSS.

First I tried lefTy posted,

<meta rel="'captions.file'">/my/captions/file.xml</meta>

That didn't work, but it was at least considered a valid playlist. Then I tried

<meta rel="captions">/my/captions/file.xml</meta>

which at last did work.

I am using 4.4.177 with captions rev 186 both from the trunk earlier this week.

Thanks.

So, is there any way to make captions work using XML/RSS playlist? I've got the latest JW Player v4.4.198.

Or maybe someone can share v4.4.177?

<meta rel="captions"> seems to work only because there's a separate addon by that name on the plugin server. I still can't get XSPF tags to work with plugin flashvars that have periods in the middle (specifically embed.code and captions.file). could this just be a bug in how the string is referenced?

(edited for clarity)

I updated to the new FLV Player and my Captions didnt work any more.

Any Idea how i can fix it?

I downloaded the flv player today and I cannot use captions using "&captions=captions.xml" ... it works with old players, but not with the latest one, any idea why ?
thank you

I think because of some changes with 4.4 you have to start using:

&plugins=captions-1&captions.file=captions.xml

...for embeds. captions-1 is a new plugin that makes use of the captions button that's been added.

Is it possible to use.srt file for the caption?

Looking fo rthe correct markup for using captions stored in playlist and called to the player via javascript?

Any ideas on a final solution that works yet?

Bumping this for the "final solution" too, lol.

Using RTMP streaming and XSPF playlists, and HOPE to have the captions xml files stored in the same folder as the media.

Seems that the captions-1 plugin has to be coded to make the "CC" appear in the skin, but since the caption XML changes with each playlist entry, this entry seems irrelevant.

With v4.4.198, and a playlist like this, the playlist loads, the video plays, the CC appears, but no captioning shows.
<tracklist>
<track>
<title>Some Title</title>
<location>test.flv</location>
<link rel="captions">test_captions.xml</link>
</track>
</tracklist>

I've tried initiating the player with "&plugins=captions-1&captions.file=" as well as "&plugins=captions-1". Also tried rel="captions" and rel="captions.file".
Also tried an alternate location (with crossdomain certificate) as shown below without any luck.

<tracklist>
<track>
<title>Some Title</title>
<location>test.flv</location>
<link rel="captions">http://beta.iriseducation.org/captions/test_captions.xml</link>
</track>
</tracklist>

Any ideas?

Once you start using a playlist, all of the File properties flashvars (including the captions and auxiliary audio files) MUST be placed in each track of the playlist, NOT the player code. ref: http://developer.longtailvideo.com/trac/wiki/FlashVars#Fileproperties Roughly speaking, if it's connected to the primary media file in a track, then it has to be in the same track (images, audio, captions, type, title, etc.), although the streamer flashvar can also be global (used once in the player code). Confused yet?

<meta rel='captions'>http://beta.iriseducation.org/captions/test_captions.xml</meta>

However, http://beta.iriseducation.org/captions/test_captions.xml returns a "404 File not found" error. Maybe that's why your captions don't load.

definately confused now,lol So here's the scenario:

the videos AND captions are located in the same folder that is streamed by the RTMP address

A valid XSPF file is located at http://beta.iriseducation.org/hosted/intelecom/vl/components/com_virtuemart/iris.playlist.php?catego...

A valid CC file is located at drm.iriseducation.org/captions/test_captions.xml

Here it is working (with no CC).

http://beta.iriseducation.org/hosted/intelecom/vl/index.php?option=com_virtuemart&page=shop.browse_p...

And here is a non-playlist of one of the videos with CC that IS working (though the CC is being loaded from somewhere else - validates that it is a working CC file though):

http://beta.iriseducation.org/hosted/intelecom/vl/index.php?page=shop.product_details&flypage=flypag...

Also, how do you use the syntax on this board to denote code like you did above?