JW Player: Supported Formats

This page lists all mediafile, streaming and playlist types the JW Player supports.

Single Files

Note that the player always tries to recognize a file format by its extension. If no suitable extension is found, the player will presume you want to load a playlist! Get around this issue by setting the provider flashvar, e.g. provider=video.

  • Video in FLV and MP4 and audio in AAC (provider=video).
  • Sounds in MP3 (provider=sound).
  • Images in JPG, GIF and PNG (provider=image).

Here's a list of commonly encountered issues:

  • Though SWF files also load in the player, it is discouraged to use them. The player cannot read the duration and dimensions of SWF files and cannot control its volume or playback.
  • If you cannot seek within an MP4 file be before it is completely downloaded, the cause of this problem is that the so-called MOOV atom (which contains the seeking information) is located at the end of your video. Check out this little application to parse your videos and fix it.
  • If you encounter too fast or too slow playback of MP3 files, it contains variable bitrate encoding or unsupported sample frequencies (eg 48Khz). Please stick to constant bitrate encoding and 44 kHz. The free iTunes software has a decent MP3 encoder. Note that the 4.x player actually supports fewer formats than the 3.x player (it seems due to bugs in the AVM2).
  • If the progress bar isn't running with your FLV file, or if your video dimensions are wrong, this means that your FLV file doesn't have metadata. Fix this by using the small tool from www.buraks.com/flvmdi/.

More technical info on the file formats supported by Flash can be found in this blogpost from Tinic Uro, one of the developers of the Flash plugin. Open Source Flash has another great article on supported Flash file formats.

Youtube Videos

The player includes native support for playing back Youtube videos (provider=youtube). Set this up by assigning the file flashvar to the URL of the Youtube video you want to play (e.g. http://www.youtube.com/watch?v=WuQnd3d9IuA).

The player uses the official Youtube API for this functionality. This API is accessed through the separate yt.swf file, which is included in the player download. In order for Youtube videos to play, you must place the yt.swf file in the same folder as you place player.swf on your webserver.

Unfortunately, there's no way yet to playback higher quality Youtube videos through the API.

HTTP Streaming

Both FLV and MP4 video can be played back with so-called HTTP pseudostreaming servers. These servers allow video viewers to skip to nondownloaded parts of a video. HTTP streaming can be enabled by setting the flashvar provider=http in the player. Here's a few examples of such streaming servers:

Next to the provider=http flashvar, two flashvars are available to configure HTTP streaming:

  • By default, the querystring parameter to provide the start position to the server is called start. (e.g. http://server.com/video.flv?start=3489512). As of version 4.6, this parameter can be configured with the flashvar http.startparam. For example, the Edgecast CDN uses ec_seek, Bitgravity uses starttime and Limelight uses fs as pseudostreaming start parameter.
  • If you use a PHP/ASP/* script for pseudostreaming, you must provide the location of that script with the streamer flashvar. Instead of directly calling the file with start parameter, the player will then call the script, with both file and start as parameters (e.g. (e.g. http://server.com/streamscript.php?file=video.flv&start=3489512).

RTMP Streaming

FLV and MP4 video and MP3 and AAC audio can also be streamed with RTMP Servers, using the provider=rtmp flashvar. In addition to this, RTMP live streams can be played in the player. The following RTMP servers are supported:

In addition to the file and the provider=rtmp flashvar, RTMP streams usually need a third flashvar streamer, which gives the player the location of the RTMP server (e.g. streamer=rtmp://edge.sercer.com/application).

The player will figure out by itself if it needs to strip the .flv extension off the file, or if it needs to prepend a mp4: or mp3: string to load the file. In 5.0, this behaviour can be skipped by setting the rtmp.prepend=false flashvar.

Most frequently used RTMP functionality (such as 302 redirects, the getstreamlength call and Wowza's secureToken) is built into the player. In addition to this, the player supports loadbalancing with XML files. This is used by e.g. the Highwinds and VDO-X CDNs. Instead of loading the video, the RTMP model presumes that the file flashvar is actually an intermediate SMIL file, which is then loaded and parsed to retrieve the actual RTMP streamer and file. In version 5.0 of the player, turn this on by adding the flashvar rtmp.loadbalance=true. Here's an example of such a SMIL file, in case you're interested in building this into your own CDN:

<smil> 
    <head> 
        <meta base="rtmp://68.16.184.155/n9f8m2x7/_definst_"/> 
    </head> 
    <body> 
        <video src="fms/video?doppl=164314e15f9563d3&dopsig=9bfcdaefc371a52fe049bf87c03b7776"/> 
    </body> 
</smil>

A special RTMP case is the live broadcast through the Akamai or Limelight networks. These CDNs use a stream subscription mechanism for load balancing. This is supported by the player, by setting the rtmp.subscribe flashvar to true. The regular file and streamer flashvars are still needed. This parameter can also be parsed as a playlist variable, to allow a playlist with videos from different streaming services.

XML Playlists

First, note that playlist XML files are subject to the Crossdomain security restrictions of Flash. This means that a videoplayer on one domain cannot load a playlist from another domain. It can be fixed by placing a crossdomain.xml file at the server the captions are loaded from. That said, the following playlist formats are supported:

Here is an overview of all the tags of each format the player processes, and the flashvars they correspond to:

Flashvars XSPF RSS itunes: media: ASX ATOM
author creator - author credit author -
date - pubDate - - - published
description annotation description summary description abstract summary
duration duration - duration content duration -
file location enclosure - content ref -
link info link - - moreinfo link
image image - - thumbnail - -
start - - - - starttime -
streamer - - - - - -
tags - category keywords keywords - -
title title title - title title title
provider - - - - - -

All media: tags can be embedded in a media:group element. A media:content element can also act as a container. Additionally, iTunes and MediaRSS tags can be mixed in one RSS feed. The player will pick the last matching element for each property.

Bitrate Switching

The 5.1 player included added support for [Player4Overview#BitrateSwitching bitrate switching], which can be used to optimize the quality of your video stream for each visitor. Bitrate switching is enabled by loading various quality levels of your video through an XML playlist. The levels must be in a media:content element that has a bitrate, url and width defined. Here is an example of such a feed:

<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" >
  <channel>
    <item>
      <title>Progressive download</title>
      <link>http://www.bigbuckbunny.org/</link>
      <description>Big Buck Bunny is a short animated film by the Blender Institute.</description>
      <media:group>
        <media:content bitrate="1500" url="http://bitsontherun.com/videos/Qvxp3Jnv-486.mp4"  width="1080" />
        <media:content bitrate="1100" url="http://bitsontherun.com/videos/Qvxp3Jnv-485.mp4" width="720"/>
        <media:content bitrate="700" url="http://bitsontherun.com/videos/Qvxp3Jnv-484.mp4" width="480" />
        <media:content bitrate="400" url="http://bitsontherun.com/videos/Qvxp3Jnv-483.mp4" width="320" />
      </media:group>
    </item>
  </channel>
</rss>

Leveraging the media:content elements for stream switching ensures that this feed is also compatible with other RSS readers and media players (such as 5.0 JW Player). It is recommended to order the streams by quality, the best one at the beginning. Most players will pick this one.

The media:group element here is optional, but organizes the feed a little.

JWPlayer Namespace

In order to enable all JW Player file properties for all feed formats, the 4.4 player introduced a jwplayer namespace. By inserting this into your feed, file properties that are not supported by the feed format itself (such as the provider or duration in an RSS feed) can be amended without breaking validation. Any of the flashvars listed in the above table can be inserted. Here's an example:

<rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats">
  <channel>
    <title>Example RSS feed with jwplayer extensions</title>
    <item>
      <title>FLV Video</title>
      <link>http://www.bigbuckbunny.org/</link>
      <description>Big Buck Bunny is a short animated film by the Blender Institute, part of the Blender Foundation.</description>
      <enclosure url="../../testing/files/bunny.flv" type="video/x-flv" length="1192846" />
      <jwplayer:author>the Peach Open Movie Project</jwplayer:author>
      <jwplayer:provider>http</jwplayer:provider>
      <jwplayer:duration>34</jwplayer:duration>
    </item>
  </channel>
</rss>

Pay attention to the top level tag, which describes the JW Player namespace with the xmlns attribute. This must be available in order to not break validity.

You can mix jwplayer elements with both the regular elements of a feed and elements from other extensions (mrss/itunes). If multiple elements match the same property, the elements will be prioritized:

  • Elements that are defined by the feed format (e.g. the enclosure in RSS) get the lowest priority.
  • Elements defined by the itunes namespace rank third.
  • Element defined by the media namespace (e.g. media:content) rank second.
  • Elements defined by the jwplayer extension always gets the highest priority.

This feature allows you to set, for example, a specific video version or streaming provider for the JW Player, while other feed aggregators will pick the default content.